@n1xyz/wallet-widget 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -11
- package/dist/Logic/sessionManager.js +8 -8
- package/dist/Logic/sessionManager.js.map +1 -1
- package/dist/Logic/transactionManager.d.ts +0 -22
- package/dist/Logic/transactionManager.js +0 -189
- package/dist/Logic/transactionManager.js.map +1 -1
- package/dist/Logic/utils.d.ts +3 -7
- package/dist/Logic/utils.js +3 -186
- package/dist/Logic/utils.js.map +1 -1
- package/dist/Modal/LoadingFallback.js +1 -1
- package/dist/Modal/LoadingFallback.js.map +1 -1
- package/dist/Modal/N1WalletModal.d.ts +1 -1
- package/dist/Modal/N1WalletModal.js +50 -205
- package/dist/Modal/N1WalletModal.js.map +1 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.d.ts +1 -1
- package/dist/Modal/NordFlow/NordFlow.js +44 -17
- package/dist/Modal/NordFlow/NordFlow.js.map +1 -1
- package/dist/Modal/NordFlow/components/ChainButton.d.ts +5 -2
- package/dist/Modal/NordFlow/components/ChainButton.js +16 -13
- package/dist/Modal/NordFlow/components/ChainButton.js.map +1 -1
- package/dist/Modal/NordFlow/components/EVMChainsButton.d.ts +2 -1
- package/dist/Modal/NordFlow/components/EVMChainsButton.js +11 -9
- package/dist/Modal/NordFlow/components/EVMChainsButton.js.map +1 -1
- package/dist/Modal/NordFlow/components/Header.d.ts +3 -1
- package/dist/Modal/NordFlow/components/Header.js +38 -4
- package/dist/Modal/NordFlow/components/Header.js.map +1 -1
- package/dist/Modal/NordFlow/components/ImageWithFallback.js +1 -1
- package/dist/Modal/NordFlow/components/ImageWithFallback.js.map +1 -1
- package/dist/Modal/NordFlow/components/MoreButton.d.ts +1 -1
- package/dist/Modal/NordFlow/components/MoreButton.js +4 -4
- package/dist/Modal/NordFlow/components/MoreButton.js.map +1 -1
- package/dist/Modal/NordFlow/components/TransactionTable.d.ts +1 -1
- package/dist/Modal/NordFlow/components/TransactionTable.js +11 -11
- package/dist/Modal/NordFlow/components/TransactionTable.js.map +1 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.d.ts +3 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.js +14 -3
- package/dist/Modal/NordFlow/components/WaitingMessage.js.map +1 -1
- package/dist/Modal/NordFlow/components/index.d.ts +0 -1
- package/dist/Modal/NordFlow/components/index.js +0 -1
- package/dist/Modal/NordFlow/components/index.js.map +1 -1
- package/dist/Modal/NordFlow/constants.js +12 -48
- package/dist/Modal/NordFlow/constants.js.map +1 -1
- package/dist/Modal/NordFlow/context/DepositContext.js +112 -41
- package/dist/Modal/NordFlow/context/DepositContext.js.map +1 -1
- package/dist/Modal/NordFlow/context/FlowContext.d.ts +1 -0
- package/dist/Modal/NordFlow/context/FlowContext.js +99 -6
- package/dist/Modal/NordFlow/context/FlowContext.js.map +1 -1
- package/dist/Modal/NordFlow/context/WalletConnectContext.js +76 -20
- package/dist/Modal/NordFlow/context/WalletConnectContext.js.map +1 -1
- package/dist/Modal/NordFlow/hoc/withImageFallback.js.map +1 -1
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.d.ts +2 -1
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js +26 -7
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js.map +1 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +1 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js +10 -15
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js +103 -54
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.d.ts +1 -2
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js +284 -60
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js +2 -2
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js +97 -110
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js +10 -8
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/index.d.ts +5 -9
- package/dist/Modal/NordFlow/screens/index.js +5 -9
- package/dist/Modal/NordFlow/screens/index.js.map +1 -1
- package/dist/Modal/NordFlow/types.d.ts +13 -3
- package/dist/Modal/NordFlow/types.js +4 -3
- package/dist/Modal/NordFlow/types.js.map +1 -1
- package/dist/Modal/NordFlow/utils/depositStorage.d.ts +4 -0
- package/dist/Modal/NordFlow/utils/depositStorage.js +48 -0
- package/dist/Modal/NordFlow/utils/depositStorage.js.map +1 -0
- package/dist/Modal/NordFlow/utils/nordUtils.d.ts +1 -1
- package/dist/Modal/NordFlow/utils/nordUtils.js +1 -1
- package/dist/Modal/NordFlow/utils/nordUtils.js.map +1 -1
- package/dist/Provider/LazyWalletProvider.d.ts +1 -1
- package/dist/Provider/LazyWalletProvider.js +38 -38
- package/dist/Provider/LazyWalletProvider.js.map +1 -1
- package/dist/Provider/N1WalletProvider.d.ts +2 -1
- package/dist/Provider/N1WalletProvider.js +85 -82
- package/dist/Provider/N1WalletProvider.js.map +1 -1
- package/dist/Provider/ShadowRootWrapper.d.ts +1 -1
- package/dist/Provider/WalletErrorBoundary.d.ts +9 -2
- package/dist/Provider/WalletErrorBoundary.js +19 -1
- package/dist/Provider/WalletErrorBoundary.js.map +1 -1
- package/dist/Provider/hooks/useNordUserInitialization.js +87 -35
- package/dist/Provider/hooks/useNordUserInitialization.js.map +1 -1
- package/dist/Provider/icons/CoinbaseWalletIcon.d.ts +1 -1
- package/dist/Provider/icons/ConnectionDotsSVG.d.ts +1 -1
- package/dist/Provider/icons/MetamaskIcon.d.ts +1 -1
- package/dist/Provider/icons/PhantomIcon.d.ts +1 -1
- package/dist/Provider/icons/UserIcon.d.ts +1 -1
- package/dist/Provider/icons/WalletConnectIcon.d.ts +1 -1
- package/dist/Provider/types.d.ts +18 -16
- package/dist/Provider/types.js +8 -2
- package/dist/Provider/types.js.map +1 -1
- package/dist/WidgetButton/N1ConnectButton.d.ts +1 -1
- package/dist/WidgetButton/N1ConnectButton.js +29 -10
- package/dist/WidgetButton/N1ConnectButton.js.map +1 -1
- package/dist/components/Logo.d.ts +2 -1
- package/dist/components/Logo.js +5 -2
- package/dist/components/Logo.js.map +1 -1
- package/dist/components/QRCodeLoader.d.ts +1 -1
- package/dist/components/QRCodeLoader.js +1 -1
- package/dist/components/QRCodeLoader.js.map +1 -1
- package/dist/components/logos/EVMChainsGroup.js +1 -1
- package/dist/components/logos/EVMChainsGroup.js.map +1 -1
- package/dist/components/logos/MoreChainsGroup.js +1 -1
- package/dist/components/logos/MoreChainsGroup.js.map +1 -1
- package/dist/components/logos/index.d.ts +0 -2
- package/dist/components/logos/index.js +0 -2
- package/dist/components/logos/index.js.map +1 -1
- package/dist/config/solana.d.ts +3 -15
- package/dist/config/solana.js +6 -29
- package/dist/config/solana.js.map +1 -1
- package/dist/embedded-main-css.d.ts +1 -1
- package/dist/embedded-main-css.js +1 -1
- package/dist/embedded-main-css.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.css +2 -2
- package/dist/polyfills/windowEthereumGuard.d.ts +6 -0
- package/dist/polyfills/windowEthereumGuard.js +28 -0
- package/dist/polyfills/windowEthereumGuard.js.map +1 -0
- package/package.json +26 -11
- package/dist/utils/dynamicImports.d.ts +0 -25
|
@@ -1,32 +1,65 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
2
4
|
import { Header } from './components';
|
|
3
5
|
import { useFlowStateContext } from './context';
|
|
4
6
|
import { withImageFallback } from './hoc';
|
|
5
|
-
import { AmountInputScreen, AuthLoadingScreen, ChainSelectionScreen, ConnectWalletScreen, DepositProgressScreen, DepositSuccessScreen,
|
|
7
|
+
import { AmountInputScreen, AuthLoadingScreen, ChainSelectionScreen, ConnectWalletScreen, DepositProgressScreen, DepositSuccessScreen, } from './screens';
|
|
6
8
|
import { FlowState } from './types';
|
|
7
9
|
// Apply the withImageFallback HOC to all screen components
|
|
8
10
|
var EnhancedConnectWalletScreen = withImageFallback(ConnectWalletScreen);
|
|
9
|
-
var EnhancedEvmWalletAuthScreen = withImageFallback(EvmWalletAuthScreen);
|
|
10
11
|
var EnhancedChainSelectionScreen = withImageFallback(ChainSelectionScreen);
|
|
11
12
|
var EnhancedAmountInputScreen = withImageFallback(AmountInputScreen);
|
|
12
13
|
var EnhancedDepositProgressScreen = withImageFallback(DepositProgressScreen);
|
|
13
14
|
var EnhancedDepositSuccessScreen = withImageFallback(DepositSuccessScreen);
|
|
14
15
|
var EnhancedAuthLoadingScreen = withImageFallback(AuthLoadingScreen);
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
|
|
16
|
+
var DEFAULT_HEADER_CONFIG = { title: 'Bridge' };
|
|
17
|
+
var HEADER_CONFIG = (_a = {},
|
|
18
|
+
_a[FlowState.CONNECTING_WALLET] = { title: 'Connect Wallet' },
|
|
19
|
+
_a[FlowState.CHAIN_SELECTION] = { title: 'Select Network' },
|
|
20
|
+
_a[FlowState.AMOUNT_INPUT] = {
|
|
21
|
+
title: 'Enter Amount',
|
|
22
|
+
backTarget: {
|
|
23
|
+
state: FlowState.CHAIN_SELECTION,
|
|
24
|
+
contextUpdates: { selectedChain: null, amount: '' },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
_a[FlowState.DEPOSIT_PROGRESS] = { title: 'Processing Deposit' },
|
|
28
|
+
_a[FlowState.DEPOSIT_SUCCESS] = { title: 'Deposit Complete' },
|
|
29
|
+
_a[FlowState.AUTH_LOADING] = { title: 'Authenticating' },
|
|
30
|
+
_a[FlowState.FINAL_SUCCESS] = { title: 'All Set' },
|
|
31
|
+
_a[FlowState.ERROR] = { title: 'Something Went Wrong' },
|
|
32
|
+
_a);
|
|
18
33
|
/**
|
|
19
34
|
* Main component for the wallet connection flow
|
|
20
35
|
*/
|
|
21
36
|
export var NordFlow = function (_a) {
|
|
22
37
|
var onClose = _a.onClose;
|
|
23
|
-
|
|
38
|
+
var _b = useFlowStateContext(), state = _b.state, transition = _b.transition, isClosing = _b.isClosing;
|
|
39
|
+
var shouldAutoClose = state === FlowState.FINAL_SUCCESS || state === FlowState.ERROR;
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
if (!shouldAutoClose) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (onClose) {
|
|
45
|
+
onClose();
|
|
46
|
+
}
|
|
47
|
+
}, [shouldAutoClose, onClose]);
|
|
48
|
+
if (shouldAutoClose) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
var headerConfig = HEADER_CONFIG[state] || DEFAULT_HEADER_CONFIG;
|
|
52
|
+
var backTarget = headerConfig.backTarget;
|
|
53
|
+
var handleBack = backTarget
|
|
54
|
+
? function () {
|
|
55
|
+
return transition(backTarget.state, backTarget.contextUpdates);
|
|
56
|
+
}
|
|
57
|
+
: undefined;
|
|
58
|
+
return (_jsx("div", { className: "z-50 flex items-center justify-center overflow-auto font-era", children: _jsxs("div", { className: "bg-n1-ww-gray-700 relative border border-n1-ww-border rounded-[6px] transition-[max-width,transform,opacity] duration-[3000ms] ease-[cubic-bezier(0.16,1,0.3,1)] m-4 origin-center will-change-[max-width,transform,opacity]", style: { width: 400 }, children: [_jsx(Header, { onClose: onClose, title: headerConfig.title, onBack: handleBack }), _jsx("div", { className: "wallet-connection-flow-content p-4 overflow-visible", children: _jsx(NordFlowScreenRenderer, { state: state, isClosing: isClosing }) })] }) }));
|
|
24
59
|
};
|
|
25
|
-
// Screen renderer component that
|
|
60
|
+
// Screen renderer component that renders the active flow screen
|
|
26
61
|
var NordFlowScreenRenderer = function (_a) {
|
|
27
|
-
var
|
|
28
|
-
// Use the flow state context
|
|
29
|
-
var _b = useFlowStateContext(), state = _b.state, isClosing = _b.isClosing;
|
|
62
|
+
var state = _a.state, isClosing = _a.isClosing;
|
|
30
63
|
// Render the appropriate screen based on the current state
|
|
31
64
|
var renderScreen = function () {
|
|
32
65
|
switch (state) {
|
|
@@ -34,8 +67,6 @@ var NordFlowScreenRenderer = function (_a) {
|
|
|
34
67
|
return _jsx(EnhancedConnectWalletScreen, {});
|
|
35
68
|
case FlowState.CHAIN_SELECTION:
|
|
36
69
|
return _jsx(EnhancedChainSelectionScreen, {});
|
|
37
|
-
case FlowState.ETH_TO_SOL_AUTH:
|
|
38
|
-
return _jsx(EnhancedEvmWalletAuthScreen, {});
|
|
39
70
|
case FlowState.AMOUNT_INPUT:
|
|
40
71
|
return _jsx(EnhancedAmountInputScreen, {});
|
|
41
72
|
case FlowState.DEPOSIT_PROGRESS:
|
|
@@ -44,12 +75,8 @@ var NordFlowScreenRenderer = function (_a) {
|
|
|
44
75
|
return _jsx(EnhancedDepositSuccessScreen, {});
|
|
45
76
|
case FlowState.AUTH_LOADING:
|
|
46
77
|
return _jsx(EnhancedAuthLoadingScreen, {});
|
|
47
|
-
case FlowState.FINAL_SUCCESS:
|
|
48
|
-
return _jsx(EnhancedFinalSuccessScreen, { onDone: onClose || (function () { }) });
|
|
49
|
-
case FlowState.ERROR:
|
|
50
|
-
return _jsx(EnhancedErrorScreen, {});
|
|
51
78
|
default:
|
|
52
|
-
return _jsx(
|
|
79
|
+
return _jsx(EnhancedConnectWalletScreen, {});
|
|
53
80
|
}
|
|
54
81
|
};
|
|
55
82
|
return (_jsx("div", { className: isClosing ? 'n1-ww-animate-fade-out' : 'n1-ww-animate-fade-in', children: renderScreen() }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NordFlow.js","sourceRoot":"","sources":["../../../src/Modal/NordFlow/NordFlow.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NordFlow.js","sourceRoot":"","sources":["../../../src/Modal/NordFlow/NordFlow.tsx"],"names":[],"mappings":";;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAe,SAAS,EAAE,MAAM,SAAS,CAAC;AAMjD,2DAA2D;AAC3D,IAAM,2BAA2B,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAC3E,IAAM,4BAA4B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAC7E,IAAM,yBAAyB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AACvE,IAAM,6BAA6B,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAC/E,IAAM,4BAA4B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAC7E,IAAM,yBAAyB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAUvE,IAAM,qBAAqB,GAAwB,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAEvE,IAAM,aAAa;IACjB,GAAC,SAAS,CAAC,iBAAiB,IAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC1D,GAAC,SAAS,CAAC,eAAe,IAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACxD,GAAC,SAAS,CAAC,YAAY,IAAG;QACxB,KAAK,EAAE,cAAc;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,YAAY,EAAE,GACX,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useEffect } from 'react';\nimport { Header } from './components';\nimport { useFlowStateContext } from './context';\nimport { withImageFallback } from './hoc';\nimport {\n AmountInputScreen,\n AuthLoadingScreen,\n ChainSelectionScreen,\n ConnectWalletScreen,\n DepositProgressScreen,\n DepositSuccessScreen,\n} from './screens';\nimport { FlowContext, FlowState } from './types';\n\ninterface NordFlowProps {\n onClose?: () => void;\n}\n\n// Apply the withImageFallback HOC to all screen components\nconst EnhancedConnectWalletScreen = withImageFallback(ConnectWalletScreen);\nconst EnhancedChainSelectionScreen = withImageFallback(ChainSelectionScreen);\nconst EnhancedAmountInputScreen = withImageFallback(AmountInputScreen);\nconst EnhancedDepositProgressScreen = withImageFallback(DepositProgressScreen);\nconst EnhancedDepositSuccessScreen = withImageFallback(DepositSuccessScreen);\nconst EnhancedAuthLoadingScreen = withImageFallback(AuthLoadingScreen);\n\ninterface HeaderDisplayConfig {\n title: string;\n backTarget?: {\n state: FlowState;\n contextUpdates?: Partial<FlowContext>;\n };\n}\n\nconst DEFAULT_HEADER_CONFIG: HeaderDisplayConfig = { title: 'Bridge' };\n\nconst HEADER_CONFIG: Record<FlowState, HeaderDisplayConfig> = {\n [FlowState.CONNECTING_WALLET]: { title: 'Connect Wallet' },\n [FlowState.CHAIN_SELECTION]: { title: 'Select Network' },\n [FlowState.AMOUNT_INPUT]: {\n title: 'Enter Amount',\n backTarget: {\n state: FlowState.CHAIN_SELECTION,\n contextUpdates: { selectedChain: null, amount: '' },\n },\n },\n [FlowState.DEPOSIT_PROGRESS]: { title: 'Processing Deposit' },\n [FlowState.DEPOSIT_SUCCESS]: { title: 'Deposit Complete' },\n [FlowState.AUTH_LOADING]: { title: 'Authenticating' },\n [FlowState.FINAL_SUCCESS]: { title: 'All Set' },\n [FlowState.ERROR]: { title: 'Something Went Wrong' },\n};\n\n/**\n * Main component for the wallet connection flow\n */\nexport const NordFlow: React.FC<NordFlowProps> = ({ onClose}) => {\n const { state, transition, isClosing } = useFlowStateContext();\n const shouldAutoClose =\n state === FlowState.FINAL_SUCCESS || state === FlowState.ERROR;\n\n useEffect(() => {\n if (!shouldAutoClose) {\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }, [shouldAutoClose, onClose]);\n\n if (shouldAutoClose) {\n return null;\n }\n\n const headerConfig = HEADER_CONFIG[state] || DEFAULT_HEADER_CONFIG;\n const backTarget = headerConfig.backTarget;\n const handleBack = backTarget\n ? () =>\n transition(\n backTarget.state,\n backTarget.contextUpdates\n )\n : undefined;\n\n return (\n <div\n className={`z-50 flex items-center justify-center overflow-auto font-era`}\n >\n <div\n className=\"bg-n1-ww-gray-700 relative border border-n1-ww-border rounded-[6px] transition-[max-width,transform,opacity] duration-[3000ms] ease-[cubic-bezier(0.16,1,0.3,1)] m-4 origin-center will-change-[max-width,transform,opacity]\"\n style={{ width: 400 }}\n >\n {/* Header */}\n <Header\n onClose={onClose}\n title={headerConfig.title}\n onBack={handleBack}\n />\n\n {/* Content */}\n <div className=\"wallet-connection-flow-content p-4 overflow-visible\">\n <NordFlowScreenRenderer\n state={state}\n isClosing={isClosing}\n />\n </div>\n </div>\n </div>\n );\n};\n\n// Screen renderer component that renders the active flow screen\nconst NordFlowScreenRenderer: React.FC<{\n state: FlowState;\n isClosing: boolean;\n}> = ({ state, isClosing }) => {\n // Render the appropriate screen based on the current state\n const renderScreen = () => {\n switch (state) {\n case FlowState.CONNECTING_WALLET:\n return <EnhancedConnectWalletScreen />;\n case FlowState.CHAIN_SELECTION:\n return <EnhancedChainSelectionScreen />;\n case FlowState.AMOUNT_INPUT:\n return <EnhancedAmountInputScreen />;\n case FlowState.DEPOSIT_PROGRESS:\n return <EnhancedDepositProgressScreen />;\n case FlowState.DEPOSIT_SUCCESS:\n return <EnhancedDepositSuccessScreen />;\n case FlowState.AUTH_LOADING:\n return <EnhancedAuthLoadingScreen />;\n default:\n return <EnhancedConnectWalletScreen />;\n }\n };\n\n return (\n <div className={isClosing ? 'n1-ww-animate-fade-out' : 'n1-ww-animate-fade-in'}>\n {renderScreen()}\n </div>\n );\n};\n"]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Chain } from
|
|
1
|
+
import { Chain } from "../types";
|
|
2
2
|
interface ChainButtonProps {
|
|
3
3
|
chain: Chain;
|
|
4
4
|
onClick: (chainId: string) => void;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
soon?: boolean;
|
|
8
|
+
subtitle?: string;
|
|
6
9
|
}
|
|
7
|
-
export declare function ChainButton({ chain, onClick, disabled, }: ChainButtonProps): JSX.Element;
|
|
10
|
+
export declare function ChainButton({ chain, onClick, disabled, selected, soon, subtitle, }: ChainButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ImageWithFallback } from
|
|
2
|
+
import { ImageWithFallback } from "./ImageWithFallback";
|
|
3
3
|
export function ChainButton(_a) {
|
|
4
|
-
var chain = _a.chain, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
|
|
4
|
+
var chain = _a.chain, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, _d = _a.soon, soon = _d === void 0 ? false : _d, subtitle = _a.subtitle;
|
|
5
5
|
var handleClick = function () {
|
|
6
|
-
if (!disabled) {
|
|
6
|
+
if (!disabled && !soon) {
|
|
7
7
|
onClick(chain.id);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
var baseClasses = 'flex flex-col items-center justify-center p-6 bg-n1-ww-gray-50 dark:bg-n1-ww-gray-950 border-2 border-n1-ww-gray-100 dark:border-n1-ww-gray-800 transition-all duration-200 group rounded-lg';
|
|
11
|
-
var enabledClasses = 'hover:border-red-500 dark:hover:border-red-500 hover:bg-red-50/50 dark:hover:bg-n1-ww-gray-900';
|
|
12
|
-
var disabledClasses = 'opacity-50 cursor-not-allowed';
|
|
13
|
-
var buttonClasses = "".concat(baseClasses, " ").concat(disabled ? disabledClasses : enabledClasses);
|
|
14
10
|
var imageClasses = disabled
|
|
15
|
-
?
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
? "opacity-50 grayscale brightness-150"
|
|
12
|
+
: "opacity-90 grayscale brightness-150 transition-all duration-200";
|
|
13
|
+
// Base button classes
|
|
14
|
+
var baseButtonClasses = "group rounded-lg flex items-center justify-between border p-4 bg-n1-ww-gray-900 transition-all duration-200";
|
|
15
|
+
// Conditional classes based on selection, disabled, and soon state
|
|
16
|
+
var buttonClasses = disabled
|
|
17
|
+
? "".concat(baseButtonClasses, " border-n1-ww-border opacity-50 cursor-not-allowed")
|
|
18
|
+
: soon
|
|
19
|
+
? "".concat(baseButtonClasses, " border-n1-ww-border cursor-not-allowed")
|
|
20
|
+
: selected
|
|
21
|
+
? "".concat(baseButtonClasses, " border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer")
|
|
22
|
+
: "".concat(baseButtonClasses, " border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer");
|
|
23
|
+
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, children: [_jsxs("div", { className: "flex items-center justify-start", children: [_jsx("div", { className: "flex items-center justify-center rounded-full bg-n1-ww-gray-650 mr-2 h-8 w-8", children: typeof chain.logo === "string" ? (_jsx(ImageWithFallback, { src: chain.logo, width: 48, height: 48, alt: chain.name, className: imageClasses, fallbackClassName: "w-12 h-12 rounded-full text-lg font-bold opacity-90 group-hover:scale-105 transition-all duration-200 brightness-150", fallbackBgColor: "bg-n1-ww-main/20", fallbackTextColor: "text-n1-ww-main" })) : (_jsx("div", { className: disabled ? "grayscale brightness-150 opacity-50" : "grayscale brightness-150", children: chain.logo })) }), _jsxs("div", { className: "flex flex-col items-start justify-center text-left", children: [_jsx("span", { className: "text-white font-medium text-sm", children: chain.name }), subtitle ? (_jsx("span", { className: "text-n1-ww-gray-100 font-light text-xs", children: subtitle })) : (_jsx("span", { className: "text-white font-light text-xs", children: chain.name }))] })] }), _jsx("div", { className: "flex items-center justify-center", children: soon ? (_jsx("span", { className: "px-2 py-1 rounded text-xs font-medium bg-n1-ww-main-950 text-n1-ww-main-700", children: "SOON" })) : selected ? (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "0.5", y: "0.5", width: "15", height: "15", rx: "7.5", stroke: "#FF441A" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.3333 5.52227L7.48168 11.4007L7.1762 11.7708L6.83012 11.4354L4 8.69212L4.61955 8.10046L7.10358 10.5083L11.6497 5L12.3333 5.52227Z", fill: "#FF441A", stroke: "#FF441A", strokeWidth: "0.5" })] })) : (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "transition-opacity duration-200 group-hover:opacity-80", children: [_jsx("circle", { cx: "8", cy: "8", r: "8", fill: "black" }), _jsx("circle", { cx: "8", cy: "8", r: "7.5", stroke: "white", strokeOpacity: "0.2" })] })) })] }));
|
|
21
24
|
}
|
|
22
25
|
//# sourceMappingURL=ChainButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/ChainButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ChainButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/ChainButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAWxD,MAAM,UAAU,WAAW,CAAC,EAO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AE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,OAAO,GAAE,EAC1C,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,GAAE,IAC9D,CACP,GACG,IACC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { Chain } from \"../types\";\nimport { ImageWithFallback } from \"./ImageWithFallback\";\n\ninterface ChainButtonProps {\n chain: Chain;\n onClick: (chainId: string) => void;\n disabled?: boolean;\n selected?: boolean;\n soon?: boolean;\n subtitle?: string;\n}\n\nexport function ChainButton({\n chain,\n onClick,\n disabled = false,\n selected = false,\n soon = false,\n subtitle,\n}: ChainButtonProps) {\n const handleClick = () => {\n if (!disabled && !soon) {\n onClick(chain.id);\n }\n };\n \n const imageClasses = disabled\n ? \"opacity-50 grayscale brightness-150\"\n : \"opacity-90 grayscale brightness-150 transition-all duration-200\";\n\n // Base button classes\n const baseButtonClasses = \"group rounded-lg flex items-center justify-between border p-4 bg-n1-ww-gray-900 transition-all duration-200\";\n \n // Conditional classes based on selection, disabled, and soon state\n const buttonClasses = disabled\n ? `${baseButtonClasses} border-n1-ww-border opacity-50 cursor-not-allowed`\n : soon\n ? `${baseButtonClasses} border-n1-ww-border cursor-not-allowed`\n : selected\n ? `${baseButtonClasses} border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer`\n : `${baseButtonClasses} border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer`;\n\n return (\n <button\n onClick={handleClick}\n className={buttonClasses}\n disabled={disabled}\n >\n <div className=\"flex items-center justify-start\">\n <div className=\"flex items-center justify-center rounded-full bg-n1-ww-gray-650 mr-2 h-8 w-8\">\n {typeof chain.logo === \"string\" ? (\n <ImageWithFallback\n src={chain.logo}\n width={48}\n height={48}\n alt={chain.name}\n className={imageClasses}\n fallbackClassName=\"w-12 h-12 rounded-full text-lg font-bold opacity-90 group-hover:scale-105 transition-all duration-200 brightness-150\"\n fallbackBgColor=\"bg-n1-ww-main/20\"\n fallbackTextColor=\"text-n1-ww-main\"\n />\n ) : (\n <div className={disabled ? \"grayscale brightness-150 opacity-50\" : \"grayscale brightness-150\"}>{chain.logo}</div>\n )}\n </div>\n <div className=\"flex flex-col items-start justify-center text-left\">\n <span className=\"text-white font-medium text-sm\">{chain.name}</span>\n {subtitle ? (\n <span className=\"text-n1-ww-gray-100 font-light text-xs\">{subtitle}</span>\n ) : (\n <span className=\"text-white font-light text-xs\">{chain.name}</span>\n )}\n </div>\n </div>\n <div className=\"flex items-center justify-center\">\n {soon ? (\n <span className=\"px-2 py-1 rounded text-xs font-medium bg-n1-ww-main-950 text-n1-ww-main-700\">\n SOON\n </span>\n ) : selected ? (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.5\" y=\"0.5\" width=\"15\" height=\"15\" rx=\"7.5\" stroke=\"#FF441A\"/>\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.3333 5.52227L7.48168 11.4007L7.1762 11.7708L6.83012 11.4354L4 8.69212L4.61955 8.10046L7.10358 10.5083L11.6497 5L12.3333 5.52227Z\" fill=\"#FF441A\" stroke=\"#FF441A\" strokeWidth=\"0.5\"/>\n </svg>\n ) : (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"transition-opacity duration-200 group-hover:opacity-80\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"black\"/>\n <circle cx=\"8\" cy=\"8\" r=\"7.5\" stroke=\"white\" strokeOpacity=\"0.2\"/>\n </svg>\n )}\n </div>\n </button>\n );\n}\n"]}
|
|
@@ -3,6 +3,7 @@ interface EVMChainsButtonProps {
|
|
|
3
3
|
chain: Chain;
|
|
4
4
|
onClick: (chainId: string) => void;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
selected?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function EVMChainsButton({ chain, onClick, disabled, }: EVMChainsButtonProps): JSX.Element;
|
|
8
|
+
export declare function EVMChainsButton({ chain, onClick, disabled, selected, }: EVMChainsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { EVMChainsGroup } from '../../../components/logos';
|
|
3
3
|
export function EVMChainsButton(_a) {
|
|
4
|
-
var chain = _a.chain, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
|
|
4
|
+
var chain = _a.chain, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.selected, selected = _c === void 0 ? false : _c;
|
|
5
5
|
var handleClick = function () {
|
|
6
6
|
if (!disabled) {
|
|
7
7
|
onClick(chain.id);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var logoClasses = disabled
|
|
11
|
+
? "opacity-50 grayscale"
|
|
12
|
+
: "opacity-90 grayscale group-hover:grayscale-0 group-hover:scale-105 transition-all duration-200";
|
|
13
|
+
// Base button classes
|
|
14
|
+
var baseButtonClasses = "group rounded-lg flex items-center justify-between border p-4 bg-n1-ww-gray-900 transition-all duration-200";
|
|
15
|
+
// Conditional classes based on selection and disabled state
|
|
16
|
+
var buttonClasses = disabled
|
|
17
|
+
? "".concat(baseButtonClasses, " border-n1-ww-border opacity-50 cursor-not-allowed")
|
|
18
|
+
: "".concat(baseButtonClasses, " border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer");
|
|
19
|
+
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, children: [_jsxs("div", { className: "flex items-center justify-start", children: [_jsx("div", { className: "flex items-center justify-center rounded-full bg-n1-ww-gray-650 mr-2 h-8 w-8", children: _jsx("div", { className: logoClasses, children: _jsx(EVMChainsGroup, { size: 32 }) }) }), _jsxs("div", { className: "flex flex-col items-start justify-center text-left", children: [_jsx("span", { className: "text-white font-medium text-sm", children: chain.name }), _jsx("span", { className: "text-white font-light text-xs", children: chain.name })] })] }), _jsx("div", { className: "flex items-center justify-center", children: selected ? (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "0.5", y: "0.5", width: "15", height: "15", rx: "7.5", stroke: "#FF441A" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.3333 5.52227L7.48168 11.4007L7.1762 11.7708L6.83012 11.4354L4 8.69212L4.61955 8.10046L7.10358 10.5083L11.6497 5L12.3333 5.52227Z", fill: "#FF441A", stroke: "#FF441A", strokeWidth: "0.5" })] })) : (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "transition-opacity duration-200 group-hover:opacity-80", children: [_jsx("circle", { cx: "8", cy: "8", r: "8", fill: "black" }), _jsx("circle", { cx: "8", cy: "8", r: "7.5", stroke: "white", strokeOpacity: "0.2" })] })) })] }));
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=EVMChainsButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVMChainsButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/EVMChainsButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EVMChainsButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/EVMChainsButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA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B,aAC5F,eAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,MAAM,EAAC,SAAS,GAAE,EACxE,eAAM,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAC,CAAC,EAAC,sIAAsI,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,WAAW,EAAC,KAAK,GAAE,IACpO,CACP,CAAC,CAAC,CAAC,CACF,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAC,wDAAwD,aAC/J,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,OAAO,GAAE,EAC1C,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,GAAE,IAC9D,CACP,GACG,IACC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Chain } from '../types';\nimport { EVMChainsGroup } from '../../../components/logos';\n\ninterface EVMChainsButtonProps {\n chain: Chain;\n onClick: (chainId: string) => void;\n disabled?: boolean;\n selected?: boolean;\n}\n\nexport function EVMChainsButton({\n chain,\n onClick,\n disabled = false,\n selected = false,\n}: EVMChainsButtonProps) {\n const handleClick = () => {\n if (!disabled) {\n onClick(chain.id);\n }\n };\n\n const logoClasses = disabled\n ? \"opacity-50 grayscale\"\n : \"opacity-90 grayscale group-hover:grayscale-0 group-hover:scale-105 transition-all duration-200\";\n\n // Base button classes\n const baseButtonClasses = \"group rounded-lg flex items-center justify-between border p-4 bg-n1-ww-gray-900 transition-all duration-200\";\n \n // Conditional classes based on selection and disabled state\n const buttonClasses = disabled\n ? `${baseButtonClasses} border-n1-ww-border opacity-50 cursor-not-allowed`\n : `${baseButtonClasses} border-n1-ww-border hover:border-n1-ww-main-400/50 hover:bg-n1-ww-gray-800 cursor-pointer`;\n\n return (\n <button\n onClick={handleClick}\n className={buttonClasses}\n disabled={disabled}\n >\n <div className=\"flex items-center justify-start\">\n <div className=\"flex items-center justify-center rounded-full bg-n1-ww-gray-650 mr-2 h-8 w-8\">\n <div className={logoClasses}>\n <EVMChainsGroup size={32} />\n </div>\n </div>\n <div className=\"flex flex-col items-start justify-center text-left\">\n <span className={\"text-white font-medium text-sm\"}>{chain.name}</span>\n <span className={\"text-white font-light text-xs\"}>{chain.name}</span>\n </div>\n </div>\n <div className=\"flex items-center justify-center\">\n {selected ? (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.5\" y=\"0.5\" width=\"15\" height=\"15\" rx=\"7.5\" stroke=\"#FF441A\"/>\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.3333 5.52227L7.48168 11.4007L7.1762 11.7708L6.83012 11.4354L4 8.69212L4.61955 8.10046L7.10358 10.5083L11.6497 5L12.3333 5.52227Z\" fill=\"#FF441A\" stroke=\"#FF441A\" strokeWidth=\"0.5\"/>\n </svg>\n ) : (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"transition-opacity duration-200 group-hover:opacity-80\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"black\"/>\n <circle cx=\"8\" cy=\"8\" r=\"7.5\" stroke=\"white\" strokeOpacity=\"0.2\"/>\n </svg>\n )}\n </div>\n </button>\n );\n}\n"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface HeaderProps {
|
|
3
|
+
title?: string;
|
|
3
4
|
onClose?: () => void;
|
|
5
|
+
onBack?: () => void;
|
|
4
6
|
}
|
|
5
7
|
/**
|
|
6
8
|
* Header component for the Nord Flow modal
|
|
7
|
-
* Contains the
|
|
9
|
+
* Contains the "Bridge" text and close button
|
|
8
10
|
*/
|
|
9
11
|
export declare const Header: React.FC<HeaderProps>;
|
|
10
12
|
export {};
|
|
@@ -1,11 +1,45 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { useN1WalletContext, useN1WalletInternalContext } from '../../../Provider/hooks';
|
|
4
|
+
import { shortenAddress } from '../../../utils/shortenString';
|
|
5
|
+
var WalletConnectionBadge = function () {
|
|
6
|
+
var address = useN1WalletContext().address;
|
|
7
|
+
var dynamicWallet = useN1WalletInternalContext().dynamicWallet;
|
|
8
|
+
var connectionAddress = (dynamicWallet === null || dynamicWallet === void 0 ? void 0 : dynamicWallet.address) || address;
|
|
9
|
+
var handleShareClick = useCallback(function () {
|
|
10
|
+
var _a;
|
|
11
|
+
if (!connectionAddress || typeof navigator === 'undefined')
|
|
12
|
+
return;
|
|
13
|
+
var nav = navigator;
|
|
14
|
+
if (typeof nav.share === 'function') {
|
|
15
|
+
nav.share({ title: 'Wallet address', text: connectionAddress }).catch(function () { });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if ((_a = nav.clipboard) === null || _a === void 0 ? void 0 : _a.writeText) {
|
|
19
|
+
nav.clipboard.writeText(connectionAddress).catch(function () { });
|
|
20
|
+
}
|
|
21
|
+
}, [connectionAddress]);
|
|
22
|
+
if (!connectionAddress) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return (_jsxs("div", { className: "inline-flex items-center gap-2 text-[12px] leading-none text-n1-ww-icon", children: [_jsx("span", { className: "flex h-2 w-2 flex-shrink-0 rounded-full bg-n1-ww-accent-neon", "aria-label": "Wallet connected" }), _jsx("span", { className: "underline underline-offset-2 decoration-white/40 tracking-[-0.2px]", children: shortenAddress(connectionAddress) }), _jsx("button", { type: "button", onClick: handleShareClick, className: "flex h-4 w-4 flex-shrink-0 items-center justify-center text-n1-ww-main hover:text-white transition-colors", "aria-label": "Share wallet address", children: _jsxs("svg", { className: "h-full w-full", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M5.93066 8.06944L12.3473 1.65277", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }), _jsx("path", { d: "M8.06958 1.65277H12.3474V5.93055", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }), _jsx("path", { d: "M10.7431 7.80207V12.3472H1.65283V3.25693H6.19797", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })] }) })] }));
|
|
26
|
+
};
|
|
3
27
|
/**
|
|
4
28
|
* Header component for the Nord Flow modal
|
|
5
|
-
* Contains the
|
|
29
|
+
* Contains the "Bridge" text and close button
|
|
6
30
|
*/
|
|
7
31
|
export var Header = function (_a) {
|
|
8
|
-
var onClose = _a.onClose;
|
|
9
|
-
return (
|
|
32
|
+
var onClose = _a.onClose, onBack = _a.onBack, _b = _a.title, title = _b === void 0 ? 'Bridge' : _b;
|
|
33
|
+
return (_jsxs("div", { className: "w-full px-4 pt-4", children: [_jsxs("div", { className: "flex items-center h-4 gap-2", children: [_jsxs("div", { className: "flex flex-1 items-center min-w-0", children: [onBack && (_jsx("button", { type: "button", onClick: onBack, className: "flex h-full items-center justify-center cursor-pointer text-n1-ww-icon hover:text-white pr-4", "aria-label": "Go back", children: _jsx("svg", { className: "h-[10px] w-[6px]", width: "6", height: "10", viewBox: "0 0 6 10", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M5.26316 10L0 5L5.26316 0L6 0.7125L1.48684 5L6 9.2875L5.26316 10Z" }) }) })), _jsx("div", { className: " text-[12px] text-n1-ww-icon opacity-90 tracking-[-0.24px] leading-none", children: title })] }), _jsx("div", { className: "flex flex-1 items-center justify-center px-2", children: _jsx(WalletConnectionBadge, {}) }), _jsx("div", { className: "flex flex-1 justify-end", children: _jsx("button", { type: "button", onClick: function (event) {
|
|
34
|
+
var _a;
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
if ((_a = event.nativeEvent) === null || _a === void 0 ? void 0 : _a.stopImmediatePropagation) {
|
|
38
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
39
|
+
}
|
|
40
|
+
if (onClose) {
|
|
41
|
+
onClose();
|
|
42
|
+
}
|
|
43
|
+
}, className: "flex h-10 w-10 items-center justify-center cursor-pointer text-n1-ww-icon hover:text-white", children: _jsx("svg", { className: "h-[10px] w-[10px]", viewBox: "0 0 10 10", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M5.88381 5L10 0.883812L9.11619 0L5 4.11619L0.883937 0L0 0.883812L4.11619 5L0 9.11619L0.883937 10L5 5.88381L9.11619 10L10 9.11619L5.88381 5Z" }) }) }) })] }), _jsx("div", { className: "h-4 relative mt-0 w-full", children: _jsx("div", { className: "absolute bottom-0 left-0 right-0 top-[-1px] border-b border-n1-ww-border" }) })] }));
|
|
10
44
|
};
|
|
11
45
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/Header.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/Header.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,IAAM,qBAAqB,GAAa;IAC9B,IAAA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I,MAAA,KAAK,CAAC,WAAW,0CAAE,wBAAwB,EAAE,CAAC;oCAChD,KAAK,CAAC,WAAW,CAAC,wBAAwB,EAAE,CAAC;gCAC/C,CAAC;gCACD,IAAI,OAAO,EAAE,CAAC;oCACZ,OAAO,EAAE,CAAC;gCACZ,CAAC;4BACH,CAAC,EACD,SAAS,EAAC,4FAA4F,YAEtG,cACE,SAAS,EAAC,mBAAmB,EAC7B,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,YAElC,eAAM,CAAC,EAAC,6IAA6I,GAAG,GACpJ,GACC,GACL,IACF,EACN,cAAK,SAAS,EAAC,0BAA0B,YACvC,cAAK,SAAS,EAAC,0EAA0E,GAAO,GAC5F,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useCallback } from 'react';\nimport { useN1WalletContext, useN1WalletInternalContext } from '../../../Provider/hooks';\nimport { shortenAddress } from '../../../utils/shortenString';\n\nconst WalletConnectionBadge: React.FC = () => {\n const { address } = useN1WalletContext();\n const { dynamicWallet } = useN1WalletInternalContext();\n const connectionAddress = dynamicWallet?.address || address;\n\n const handleShareClick = useCallback(() => {\n if (!connectionAddress || typeof navigator === 'undefined') return;\n\n const nav = navigator as Navigator & {\n share?: (data: ShareData) => Promise<void>;\n };\n\n if (typeof nav.share === 'function') {\n nav.share({ title: 'Wallet address', text: connectionAddress }).catch(() => {});\n return;\n }\n\n if (nav.clipboard?.writeText) {\n nav.clipboard.writeText(connectionAddress).catch(() => {});\n }\n }, [connectionAddress]);\n\n if (!connectionAddress) {\n return null;\n }\n\n return (\n <div className=\"inline-flex items-center gap-2 text-[12px] leading-none text-n1-ww-icon\">\n <span\n className=\"flex h-2 w-2 flex-shrink-0 rounded-full bg-n1-ww-accent-neon\"\n aria-label=\"Wallet connected\"\n />\n <span className=\"underline underline-offset-2 decoration-white/40 tracking-[-0.2px]\">\n {shortenAddress(connectionAddress)}\n </span>\n <button\n type=\"button\"\n onClick={handleShareClick}\n className=\"flex h-4 w-4 flex-shrink-0 items-center justify-center text-n1-ww-main hover:text-white transition-colors\"\n aria-label=\"Share wallet address\"\n >\n <svg\n className=\"h-full w-full\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.93066 8.06944L12.3473 1.65277\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n />\n <path\n d=\"M8.06958 1.65277H12.3474V5.93055\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n />\n <path\n d=\"M10.7431 7.80207V12.3472H1.65283V3.25693H6.19797\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n </div>\n );\n};\n\ninterface HeaderProps {\n title?: string;\n onClose?: () => void;\n onBack?: () => void;\n}\n\n/**\n * Header component for the Nord Flow modal\n * Contains the \"Bridge\" text and close button\n */\nexport const Header: React.FC<HeaderProps> = ({\n onClose,\n onBack,\n title = 'Bridge',\n}) => {\n return (\n <div className=\"w-full px-4 pt-4\">\n <div className=\"flex items-center h-4 gap-2\">\n <div className=\"flex flex-1 items-center min-w-0\">\n {onBack && (\n <button\n type=\"button\"\n onClick={onBack}\n className=\"flex h-full items-center justify-center cursor-pointer text-n1-ww-icon hover:text-white pr-4\" \n aria-label=\"Go back\"\n >\n <svg\n className=\"h-[10px] w-[6px]\"\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M5.26316 10L0 5L5.26316 0L6 0.7125L1.48684 5L6 9.2875L5.26316 10Z\" />\n </svg>\n </button>\n )}\n <div className={\" text-[12px] text-n1-ww-icon opacity-90 tracking-[-0.24px] leading-none\"}>\n {title}\n </div>\n </div>\n <div className=\"flex flex-1 items-center justify-center px-2\">\n <WalletConnectionBadge />\n </div>\n <div className=\"flex flex-1 justify-end\">\n <button\n type=\"button\"\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n if (event.nativeEvent?.stopImmediatePropagation) {\n event.nativeEvent.stopImmediatePropagation();\n }\n if (onClose) {\n onClose();\n }\n }}\n className=\"flex h-10 w-10 items-center justify-center cursor-pointer text-n1-ww-icon hover:text-white\"\n >\n <svg\n className=\"h-[10px] w-[10px]\"\n viewBox=\"0 0 10 10\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M5.88381 5L10 0.883812L9.11619 0L5 4.11619L0.883937 0L0 0.883812L4.11619 5L0 9.11619L0.883937 10L5 5.88381L9.11619 10L10 9.11619L5.88381 5Z\" />\n </svg>\n </button>\n </div>\n </div>\n <div className=\"h-4 relative mt-0 w-full\">\n <div className=\"absolute bottom-0 left-0 right-0 top-[-1px] border-b border-n1-ww-border\"></div>\n </div>\n </div>\n );\n}; \n"]}
|
|
@@ -4,7 +4,7 @@ import { useState } from 'react';
|
|
|
4
4
|
* A component that renders an image with a fallback div when the image is not available
|
|
5
5
|
*/
|
|
6
6
|
export var ImageWithFallback = function (_a) {
|
|
7
|
-
var src = _a.src, alt = _a.alt, _b = _a.width, width = _b === void 0 ? 'auto' : _b, _c = _a.height, height = _c === void 0 ? 'auto' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.fallbackClassName, fallbackClassName = _e === void 0 ? '' : _e, fallbackText = _a.fallbackText, _f = _a.fallbackBgColor, fallbackBgColor = _f === void 0 ? 'bg-n1-ww-gray-
|
|
7
|
+
var src = _a.src, alt = _a.alt, _b = _a.width, width = _b === void 0 ? 'auto' : _b, _c = _a.height, height = _c === void 0 ? 'auto' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.fallbackClassName, fallbackClassName = _e === void 0 ? '' : _e, fallbackText = _a.fallbackText, _f = _a.fallbackBgColor, fallbackBgColor = _f === void 0 ? 'bg-n1-ww-gray-800' : _f, _g = _a.fallbackTextColor, fallbackTextColor = _g === void 0 ? 'text-n1-ww-gray-400' : _g;
|
|
8
8
|
var _h = useState(false), imageError = _h[0], setImageError = _h[1];
|
|
9
9
|
// Get initials from alt text for fallback
|
|
10
10
|
var getInitials = function (text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageWithFallback.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/ImageWithFallback.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcxC;;GAEG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAqC,UAAC,EAUnE;QATC,GAAG,SAAA,EACH,GAAG,SAAA,EACH,aAAc,EAAd,KAAK,mBAAG,MAAM,KAAA,EACd,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA,EACf,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,yBAAsB,EAAtB,iBAAiB,mBAAG,EAAE,KAAA,EACtB,YAAY,kBAAA,EACZ,
|
|
1
|
+
{"version":3,"file":"ImageWithFallback.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/ImageWithFallback.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcxC;;GAEG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAqC,UAAC,EAUnE;QATC,GAAG,SAAA,EACH,GAAG,SAAA,EACH,aAAc,EAAd,KAAK,mBAAG,MAAM,KAAA,EACd,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA,EACf,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,yBAAsB,EAAtB,iBAAiB,mBAAG,EAAE,KAAA,EACtB,YAAY,kBAAA,EACZ,uBAAqC,EAArC,eAAe,mBAAG,mBAAmB,KAAA,EACrC,yBAAyC,EAAzC,iBAAiB,mBAAG,qBAAqB,KAAA;IAEnC,IAAA,KAA8B,QAAQ,CAAC,KAAK,CAAC,EAA5C,UAAU,QAAA,EAAE,aAAa,QAAmB,CAAC;IAEpD,0CAA0C;IAC1C,IAAM,WAAW,GAAG,UAAC,IAAY;QAC/B,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI;aACR,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,CAAC,CAAC,EAAP,CAAO,CAAC;aACtB,IAAI,CAAC,EAAE,CAAC;aACR,WAAW,EAAE;aACb,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,IAAM,WAAW,GAAG;QAClB,aAAa,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,IAAI,UAAU,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,sBAAsB;QACtB,OAAO,CACL,cACE,SAAS,EAAE,2CAAoC,eAAe,cAAI,iBAAiB,cAAI,iBAAiB,CAAE,EAC1G,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAG,KAAK,OAAI,CAAC,CAAC,CAAC,KAAK;gBACvD,MAAM,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAG,MAAM,OAAI,CAAC,CAAC,CAAC,MAAM;aAC5D,gBACW,GAAG,YAEd,YAAY,IAAI,WAAW,CAAC,GAAG,CAAC,GAC7B,CACP,CAAC;IACJ,CAAC;IAED,eAAe;IACf,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\n\ninterface ImageWithFallbackProps {\n src: string;\n alt: string;\n width?: number | string;\n height?: number | string;\n className?: string;\n fallbackClassName?: string;\n fallbackText?: string;\n fallbackBgColor?: string;\n fallbackTextColor?: string;\n}\n\n/**\n * A component that renders an image with a fallback div when the image is not available\n */\nexport const ImageWithFallback: React.FC<ImageWithFallbackProps> = ({\n src,\n alt,\n width = 'auto',\n height = 'auto',\n className = '',\n fallbackClassName = '',\n fallbackText,\n fallbackBgColor = 'bg-n1-ww-gray-800',\n fallbackTextColor = 'text-n1-ww-gray-400',\n}) => {\n const [imageError, setImageError] = useState(false);\n\n // Get initials from alt text for fallback\n const getInitials = (text: string) => {\n if (!text) return '';\n return text\n .split(' ')\n .map((word) => word[0])\n .join('')\n .toUpperCase()\n .substring(0, 2);\n };\n\n const handleError = () => {\n setImageError(true);\n };\n\n if (imageError || !src) {\n // Render fallback div\n return (\n <div\n className={`flex items-center justify-center ${fallbackBgColor} ${fallbackTextColor} ${fallbackClassName}`}\n style={{\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }}\n aria-label={alt}\n >\n {fallbackText || getInitials(alt)}\n </div>\n );\n }\n\n // Render image\n return (\n <img\n src={src}\n alt={alt}\n width={width}\n height={height}\n className={className}\n onError={handleError}\n />\n );\n};\n"]}
|
|
@@ -4,5 +4,5 @@ interface MoreButtonProps {
|
|
|
4
4
|
onClick: (chainId: string) => void;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function MoreButton({ chain, onClick, disabled, }: MoreButtonProps): JSX.Element;
|
|
7
|
+
export declare function MoreButton({ chain, onClick, disabled, }: MoreButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -7,13 +7,13 @@ export function MoreButton(_a) {
|
|
|
7
7
|
onClick(chain.id);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
var baseClasses = 'flex flex-col items-center justify-center p-6 bg-n1-ww-gray-
|
|
11
|
-
var enabledClasses = 'hover:border-
|
|
10
|
+
var baseClasses = 'flex flex-col items-center justify-center p-6 bg-n1-ww-gray-950 border-2 border-n1-ww-border transition-all duration-200 group rounded-lg';
|
|
11
|
+
var enabledClasses = 'hover:border-n1-ww-border hover:bg-n1-ww-gray-900';
|
|
12
12
|
var disabledClasses = 'opacity-50 cursor-not-allowed';
|
|
13
13
|
var buttonClasses = "".concat(baseClasses, " ").concat(disabled ? disabledClasses : enabledClasses);
|
|
14
14
|
var textClasses = disabled
|
|
15
|
-
? 'mt-4 font-medium text-n1-ww-gray-
|
|
16
|
-
: 'mt-4 font-medium text-n1-ww-gray-
|
|
15
|
+
? 'mt-4 font-medium text-n1-ww-gray-500'
|
|
16
|
+
: 'mt-4 font-medium text-n1-ww-gray-400 group-hover:text-n1-ww-gray-50 transition-colors duration-200';
|
|
17
17
|
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, children: [_jsx(MoreChainsGroup, { size: 32, className: disabled ? 'opacity-50 grayscale' : 'opacity-90' }), _jsx("span", { className: textClasses, children: chain.name })] }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=MoreButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/MoreButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,MAAM,UAAU,UAAU,CAAC,EAIT;QAHhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA;IAEhB,IAAM,WAAW,GAAG;QAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;IAEF,IAAM,WAAW,GACf,
|
|
1
|
+
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/MoreButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,MAAM,UAAU,UAAU,CAAC,EAIT;QAHhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA;IAEhB,IAAM,WAAW,GAAG;QAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;IAEF,IAAM,WAAW,GACf,2IAA2I,CAAC;IAC9I,IAAM,cAAc,GAClB,mDAAmD,CAAC;IACtD,IAAM,eAAe,GAAG,+BAA+B,CAAC;IAExD,IAAM,aAAa,GAAG,UAAG,WAAW,cAAI,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,CAAE,CAAC;IAEtF,IAAM,WAAW,GAAG,QAAQ;QAC1B,CAAC,CAAC,sCAAsC;QACxC,CAAC,CAAC,oGAAoG,CAAC;IAEzG,OAAO,CACL,kBAAQ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,aACxE,KAAC,eAAe,IACd,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,YAAY,GAC3D,EACF,eAAM,SAAS,EAAE,WAAW,YAAG,KAAK,CAAC,IAAI,GAAQ,IAC1C,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Chain } from '../types';\nimport { MoreChainsGroup } from '../../../components/logos';\n\ninterface MoreButtonProps {\n chain: Chain;\n onClick: (chainId: string) => void;\n disabled?: boolean;\n}\n\nexport function MoreButton({\n chain,\n onClick,\n disabled = false,\n}: MoreButtonProps) {\n const handleClick = () => {\n if (!disabled) {\n onClick(chain.id);\n }\n };\n\n const baseClasses =\n 'flex flex-col items-center justify-center p-6 bg-n1-ww-gray-950 border-2 border-n1-ww-border transition-all duration-200 group rounded-lg';\n const enabledClasses =\n 'hover:border-n1-ww-border hover:bg-n1-ww-gray-900';\n const disabledClasses = 'opacity-50 cursor-not-allowed';\n\n const buttonClasses = `${baseClasses} ${disabled ? disabledClasses : enabledClasses}`;\n\n const textClasses = disabled\n ? 'mt-4 font-medium text-n1-ww-gray-500'\n : 'mt-4 font-medium text-n1-ww-gray-400 group-hover:text-n1-ww-gray-50 transition-colors duration-200';\n\n return (\n <button onClick={handleClick} className={buttonClasses} disabled={disabled}>\n <MoreChainsGroup\n size={32}\n className={disabled ? 'opacity-50 grayscale' : 'opacity-90'}\n />\n <span className={textClasses}>{chain.name}</span>\n </button>\n );\n}\n"]}
|
|
@@ -9,5 +9,5 @@ interface TransactionTableProps {
|
|
|
9
9
|
};
|
|
10
10
|
onClose?: () => void;
|
|
11
11
|
}
|
|
12
|
-
export declare function TransactionTable({ tableValues, onClose, }: TransactionTableProps): JSX.Element;
|
|
12
|
+
export declare function TransactionTable({ tableValues, onClose, }: TransactionTableProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -20,29 +20,29 @@ export function TransactionTable(_a) {
|
|
|
20
20
|
if (key === 'status') {
|
|
21
21
|
if (value.toLowerCase().includes('success') ||
|
|
22
22
|
value.toLowerCase().includes('confirmed')) {
|
|
23
|
-
return 'text-
|
|
23
|
+
return 'text-emerald-500 font-medium';
|
|
24
24
|
}
|
|
25
25
|
if (value.toLowerCase().includes('pending')) {
|
|
26
|
-
return 'text-amber-
|
|
26
|
+
return 'text-amber-400 font-medium';
|
|
27
27
|
}
|
|
28
28
|
if (value.toLowerCase().includes('fail') ||
|
|
29
29
|
value.toLowerCase().includes('error')) {
|
|
30
|
-
return 'text-red-
|
|
30
|
+
return 'text-red-400 font-medium';
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (key === 'tx') {
|
|
34
|
-
return 'text-n1-ww-gray-
|
|
34
|
+
return 'text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-400 transition-colors duration-200';
|
|
35
35
|
}
|
|
36
36
|
if (key === 'network') {
|
|
37
|
-
return 'text-purple-
|
|
37
|
+
return 'text-purple-400 font-medium';
|
|
38
38
|
}
|
|
39
39
|
if (key === 'from' || key === 'to') {
|
|
40
|
-
return 'text-n1-ww-gray-
|
|
40
|
+
return 'text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-400 transition-colors duration-200';
|
|
41
41
|
}
|
|
42
42
|
if (key === 'amount') {
|
|
43
|
-
return 'text-
|
|
43
|
+
return 'text-emerald-500 font-semibold';
|
|
44
44
|
}
|
|
45
|
-
return 'text-n1-ww-gray-
|
|
45
|
+
return 'text-n1-ww-gray-50 font-medium';
|
|
46
46
|
};
|
|
47
47
|
// Format display value with ellipsis for long text
|
|
48
48
|
var getDisplayValue = function (key, value) {
|
|
@@ -74,10 +74,10 @@ export function TransactionTable(_a) {
|
|
|
74
74
|
var indexB = fieldOrder.indexOf(keyB);
|
|
75
75
|
return (indexA === -1 ? 999 : indexA) - (indexB === -1 ? 999 : indexB);
|
|
76
76
|
});
|
|
77
|
-
return (_jsxs("div", { className: "relative w-full h-full bg-n1-ww-gray-
|
|
77
|
+
return (_jsxs("div", { className: "relative w-full h-full bg-n1-ww-gray-950 border border-n1-ww-border p-5 rounded-sm flex flex-col justify-center", children: [onClose && (_jsx("button", { onClick: onClose, className: "absolute top-3 right-2 text-n1-ww-gray-600 hover:text-n1-ww-gray-300 transition-colors duration-200 focus:outline-none", "aria-label": "Close details", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })), _jsx("div", { className: "space-y-3 text-sm pt-5", children: sortedEntries.map(function (_a) {
|
|
78
78
|
var key = _a[0], value = _a[1];
|
|
79
|
-
return (_jsxs("div", { className: "flex items-center justify-between py-2 ", children: [_jsx("span", { className: "text-n1-ww-gray-
|
|
80
|
-
getExplorerLink(key, value.text) ? (_jsxs("a", { href: getExplorerLink(key, value.text), target: "_blank", rel: "noopener noreferrer", className: "".concat(getValueStyles(key, value.text), " break-all inline-block group"), title: value.text, children: [_jsx("span", { className: "underline hover:font-bold", children: getDisplayValue(key, value.text) }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3 w-3 ml-1 inline-block opacity-50 group-hover:opacity-100 transition-opacity duration-200", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })] })) : (_jsx("span", { className: "".concat(getValueStyles(key, value.text), " break-all inline-block"), title: value.text, children: value.text })), value.typing && (_jsx("span", { className: "inline-block ml-1 w-[2px] h-[14px] bg-n1-ww-main-
|
|
79
|
+
return (_jsxs("div", { className: "flex items-center justify-between py-2 ", children: [_jsx("span", { className: "text-n1-ww-gray-400 font-medium min-w-[120px]", children: getLabel(key) }), _jsxs("div", { className: "relative transition-all duration-300 ".concat(value.visible ? 'opacity-100' : 'opacity-0', " max-w-[65%] text-right flex-1"), children: [(key === 'tx' || key === 'from') &&
|
|
80
|
+
getExplorerLink(key, value.text) ? (_jsxs("a", { href: getExplorerLink(key, value.text), target: "_blank", rel: "noopener noreferrer", className: "".concat(getValueStyles(key, value.text), " break-all inline-block group"), title: value.text, children: [_jsx("span", { className: "underline hover:font-bold", children: getDisplayValue(key, value.text) }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3 w-3 ml-1 inline-block opacity-50 group-hover:opacity-100 transition-opacity duration-200", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })] })) : (_jsx("span", { className: "".concat(getValueStyles(key, value.text), " break-all inline-block"), title: value.text, children: value.text })), value.typing && (_jsx("span", { className: "inline-block ml-1 w-[2px] h-[14px] bg-n1-ww-main-400 n1-ww-animate-pulse" }))] })] }, key));
|
|
81
81
|
}) })] }));
|
|
82
82
|
}
|
|
83
83
|
//# sourceMappingURL=TransactionTable.js.map
|