@n1xyz/wallet-widget 0.0.14 → 0.0.16
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/dist/Modal/LoadingFallback.js +1 -1
- package/dist/Modal/LoadingFallback.js.map +1 -1
- package/dist/Modal/N1WalletModal.d.ts +1 -0
- package/dist/Modal/N1WalletModal.js +7 -5
- package/dist/Modal/N1WalletModal.js.map +1 -1
- package/dist/Modal/NTSFlow/LoadingFallback.js +1 -1
- package/dist/Modal/NTSFlow/LoadingFallback.js.map +1 -1
- package/dist/Modal/NTSFlow/components/BackButton.js +1 -1
- package/dist/Modal/NTSFlow/components/BackButton.js.map +1 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.js +1 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.js.map +1 -1
- package/dist/Modal/NTSFlow/views/ConnectView.js +2 -2
- package/dist/Modal/NTSFlow/views/ConnectView.js.map +1 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.js +5 -5
- package/dist/Modal/NTSFlow/views/CreateSessionView.js.map +1 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.js +1 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.js.map +1 -1
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js +3 -3
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js.map +1 -1
- package/dist/Modal/NTSFlow/views/SigningView.js +1 -1
- package/dist/Modal/NTSFlow/views/SigningView.js.map +1 -1
- package/dist/Modal/NordFlow/NordFlow.js +2 -2
- package/dist/Modal/NordFlow/NordFlow.js.map +1 -1
- package/dist/Modal/NordFlow/components/ChainButton.js +5 -5
- package/dist/Modal/NordFlow/components/ChainButton.js.map +1 -1
- package/dist/Modal/NordFlow/components/EVMChainsButton.js +4 -4
- package/dist/Modal/NordFlow/components/EVMChainsButton.js.map +1 -1
- package/dist/Modal/NordFlow/components/Header.js +1 -1
- 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/LoadingSquares.js +1 -1
- package/dist/Modal/NordFlow/components/LoadingSquares.js.map +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.js +6 -6
- package/dist/Modal/NordFlow/components/TransactionTable.js.map +1 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.js +1 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.js.map +1 -1
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js +1 -1
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js +3 -3
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js +4 -4
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js +2 -2
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js +4 -4
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js +1 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js +4 -4
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js +3 -3
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.d.ts +1 -1
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js +16 -14
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js.map +1 -1
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js +2 -2
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js.map +1 -1
- package/dist/Modal/Sidebar/N1Sidebar.js +10 -10
- package/dist/Modal/Sidebar/N1Sidebar.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js +5 -5
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js +3 -3
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js +2 -2
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js +2 -2
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js +1 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js +4 -4
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js +6 -6
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js +3 -3
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js +7 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js +13 -13
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js +2 -2
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js +5 -5
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js +1 -1
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js +5 -5
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js.map +1 -1
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js +4 -4
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js.map +1 -1
- package/dist/Provider/N1WalletProvider.d.ts +1 -1
- package/dist/Provider/N1WalletProvider.js +65 -37
- package/dist/Provider/N1WalletProvider.js.map +1 -1
- package/dist/Provider/types.d.ts +13 -0
- package/dist/Provider/types.js.map +1 -1
- package/dist/WidgetButton/N1ConnectButton.js +1 -1
- package/dist/WidgetButton/N1ConnectButton.js.map +1 -1
- package/dist/components/Logo.js.map +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/embedded-main-css.d.ts +2 -0
- package/dist/embedded-main-css.js +3 -0
- package/dist/embedded-main-css.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/main.css +2 -1
- package/package.json +8 -5
- package/dist/Modal/NordFlow/context/deposit/types.d.ts +0 -26
- package/dist/Modal/NordFlow/context/deposit/types.js +0 -2
- package/dist/Modal/NordFlow/context/deposit/types.js.map +0 -1
- package/dist/Modal/NordFlow/context/deposit/useDepositAuth.d.ts +0 -7
- package/dist/Modal/NordFlow/context/deposit/useDepositAuth.js +0 -113
- package/dist/Modal/NordFlow/context/deposit/useDepositAuth.js.map +0 -1
- package/dist/Modal/NordFlow/context/deposit/useDepositTransaction.d.ts +0 -20
- package/dist/Modal/NordFlow/context/deposit/useDepositTransaction.js +0 -235
- package/dist/Modal/NordFlow/context/deposit/useDepositTransaction.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/index.d.ts +0 -3
- package/dist/Modal/NordFlow/hooks/index.js +0 -4
- package/dist/Modal/NordFlow/hooks/index.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useDepositFlow.d.ts +0 -52
- package/dist/Modal/NordFlow/hooks/useDepositFlow.js +0 -385
- package/dist/Modal/NordFlow/hooks/useDepositFlow.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useFlowState.d.ts +0 -32
- package/dist/Modal/NordFlow/hooks/useFlowState.js +0 -189
- package/dist/Modal/NordFlow/hooks/useFlowState.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useInterruptHandler.d.ts +0 -24
- package/dist/Modal/NordFlow/hooks/useInterruptHandler.js +0 -59
- package/dist/Modal/NordFlow/hooks/useInterruptHandler.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useNordInstance.d.ts +0 -0
- package/dist/Modal/NordFlow/hooks/useNordInstance.js +0 -3
- package/dist/Modal/NordFlow/hooks/useNordInstance.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useNordWalletConnect.d.ts +0 -13
- package/dist/Modal/NordFlow/hooks/useNordWalletConnect.js +0 -259
- package/dist/Modal/NordFlow/hooks/useNordWalletConnect.js.map +0 -1
- package/dist/Modal/NordFlow/utils/persistence.d.ts +0 -24
- package/dist/Modal/NordFlow/utils/persistence.js +0 -84
- package/dist/Modal/NordFlow/utils/persistence.js.map +0 -1
- package/dist/Provider/useN1WalletProvider.d.ts +0 -37
- package/dist/Provider/useN1WalletProvider.js +0 -398
- package/dist/Provider/useN1WalletProvider.js.map +0 -1
|
@@ -20,7 +20,7 @@ var EnhancedIdleScreen = withImageFallback(IdleScreen);
|
|
|
20
20
|
*/
|
|
21
21
|
export var NordFlow = function (_a) {
|
|
22
22
|
var onClose = _a.onClose;
|
|
23
|
-
return (_jsx("div", { className: "z-50 flex items-center justify-center overflow-auto font-era", children: _jsxs("div", { className: "bg-n1-gray-50 dark:bg-n1-gray-950 relative border border-n1-gray-200 dark:border-n1-gray-800 rounded-md transition-[max-width,transform,opacity] duration-[3000ms] ease-[cubic-bezier(0.16,1,0.3,1)] w-full max-w-sm m-4 origin-center will-change-[max-width,transform,opacity min-w-96", children: [_jsx(Header, { onClose: onClose }), _jsx("div", { className: "wallet-connection-flow-content p-6 overflow-hidden", children: _jsx(NordFlowScreenRenderer, { onClose: onClose }) })] }) }));
|
|
23
|
+
return (_jsx("div", { className: "z-50 flex items-center justify-center overflow-auto font-era", children: _jsxs("div", { className: "bg-n1-ww-gray-50 dark:bg-n1-ww-gray-950 relative border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-md transition-[max-width,transform,opacity] duration-[3000ms] ease-[cubic-bezier(0.16,1,0.3,1)] w-full max-w-sm m-4 origin-center will-change-[max-width,transform,opacity min-w-96", children: [_jsx(Header, { onClose: onClose }), _jsx("div", { className: "wallet-connection-flow-content p-6 overflow-hidden", children: _jsx(NordFlowScreenRenderer, { onClose: onClose }) })] }) }));
|
|
24
24
|
};
|
|
25
25
|
// Screen renderer component that uses the flow state context
|
|
26
26
|
var NordFlowScreenRenderer = function (_a) {
|
|
@@ -52,6 +52,6 @@ var NordFlowScreenRenderer = function (_a) {
|
|
|
52
52
|
return _jsx(EnhancedIdleScreen, {});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
return (_jsx("div", { className: isClosing ? 'n1-animate-fade-out' : 'n1-animate-fade-in', children: renderScreen() }));
|
|
55
|
+
return (_jsx("div", { className: isClosing ? 'n1-ww-animate-fade-out' : 'n1-ww-animate-fade-in', children: renderScreen() }));
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=NordFlow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NordFlow.js","sourceRoot":"","sources":["../../../src/Modal/NordFlow/NordFlow.tsx"],"names":[],"mappings":";AACA,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,EACpB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,GACX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMpC,2DAA2D;AAC3D,IAAM,2BAA2B,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAC3E,IAAM,2BAA2B,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAC3E,IAAM,4BAA4B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAC7E,IAAM,yBAAyB,GAAG,iB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ACzB,OAAO,KAAC,yBAAyB,KAAG,CAAC;YACvC,KAAK,SAAS,CAAC,gBAAgB;gBAC7B,OAAO,KAAC,6BAA6B,KAAG,CAAC;YAC3C,KAAK,SAAS,CAAC,eAAe;gBAC5B,OAAO,KAAC,4BAA4B,KAAG,CAAC;YAC1C,KAAK,SAAS,CAAC,YAAY;gBACzB,OAAO,KAAC,yBAAyB,KAAG,CAAC;YACvC,KAAK,SAAS,CAAC,aAAa;gBAC1B,OAAO,KAAC,0BAA0B,IAAC,MAAM,EAAE,OAAO,IAAI,CAAC,cAAQ,CAAC,CAAC,GAAI,CAAC;YACxE,KAAK,SAAS,CAAC,KAAK;gBAClB,OAAO,KAAC,mBAAmB,KAAG,CAAC;YACjC;gBACE,OAAO,KAAC,kBAAkB,KAAG,CAAC;QAClC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,uBAAuB,YAC3E,YAAY,EAAE,GACX,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React 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 ErrorScreen,\n EvmWalletAuthScreen,\n FinalSuccessScreen,\n IdleScreen,\n} from './screens';\nimport { 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 EnhancedEvmWalletAuthScreen = withImageFallback(EvmWalletAuthScreen);\nconst EnhancedChainSelectionScreen = withImageFallback(ChainSelectionScreen);\nconst EnhancedAmountInputScreen = withImageFallback(AmountInputScreen);\nconst EnhancedDepositProgressScreen = withImageFallback(DepositProgressScreen);\nconst EnhancedDepositSuccessScreen = withImageFallback(DepositSuccessScreen);\nconst EnhancedAuthLoadingScreen = withImageFallback(AuthLoadingScreen);\nconst EnhancedFinalSuccessScreen = withImageFallback(FinalSuccessScreen);\nconst EnhancedErrorScreen = withImageFallback(ErrorScreen);\nconst EnhancedIdleScreen = withImageFallback(IdleScreen);\n\n/**\n * Main component for the wallet connection flow\n */\nexport const NordFlow: React.FC<NordFlowProps> = ({ onClose }) => {\n return (\n <div\n className={`z-50 flex items-center justify-center overflow-auto font-era`}\n >\n <div className=\"bg-n1-ww-gray-50 dark:bg-n1-ww-gray-950 relative border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-md transition-[max-width,transform,opacity] duration-[3000ms] ease-[cubic-bezier(0.16,1,0.3,1)] w-full max-w-sm m-4 origin-center will-change-[max-width,transform,opacity min-w-96\">\n {/* Header */}\n <Header onClose={onClose} />\n\n {/* Content */}\n <div className=\"wallet-connection-flow-content p-6 overflow-hidden\">\n <NordFlowScreenRenderer onClose={onClose} />\n </div>\n </div>\n </div>\n );\n};\n\n// Screen renderer component that uses the flow state context\nconst NordFlowScreenRenderer: React.FC<{ onClose?: () => void }> = ({ onClose }) => {\n // Use the flow state context\n const {\n state,\n isClosing,\n } = useFlowStateContext();\n\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.ETH_TO_SOL_AUTH:\n return <EnhancedEvmWalletAuthScreen />;\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 case FlowState.FINAL_SUCCESS:\n return <EnhancedFinalSuccessScreen onDone={onClose || (() => { })} />;\n case FlowState.ERROR:\n return <EnhancedErrorScreen />;\n default:\n return <EnhancedIdleScreen />;\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"]}
|
|
@@ -7,16 +7,16 @@ export function ChainButton(_a) {
|
|
|
7
7
|
onClick(chain.id);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
var baseClasses = 'flex flex-col items-center justify-center p-6 bg-n1-gray-50 dark:bg-n1-gray-950 border-2 border-n1-gray-100 dark:border-n1-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-gray-900';
|
|
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
12
|
var disabledClasses = 'opacity-50 cursor-not-allowed';
|
|
13
13
|
var buttonClasses = "".concat(baseClasses, " ").concat(disabled ? disabledClasses : enabledClasses);
|
|
14
14
|
var imageClasses = disabled
|
|
15
15
|
? 'opacity-50 grayscale'
|
|
16
16
|
: 'opacity-90 grayscale group-hover:grayscale-0 group-hover:scale-105 transition-all duration-200';
|
|
17
17
|
var textClasses = disabled
|
|
18
|
-
? 'mt-4 font-medium text-n1-gray-400 dark:text-n1-gray-500'
|
|
19
|
-
: 'mt-4 font-medium text-n1-gray-600 dark:text-n1-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-gray-50 transition-colors duration-200';
|
|
20
|
-
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, 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", fallbackBgColor: "bg-n1-main/10 dark:bg-n1-main/20", fallbackTextColor: "text-n1-main dark:text-n1-main" })) : (_jsx("div", { className: imageClasses, children: chain.logo })), _jsx("span", { className: textClasses, children: chain.name })] }));
|
|
18
|
+
? 'mt-4 font-medium text-n1-ww-gray-400 dark:text-n1-ww-gray-500'
|
|
19
|
+
: 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-ww-gray-50 transition-colors duration-200';
|
|
20
|
+
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, 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", fallbackBgColor: "bg-n1-ww-main/10 dark:bg-n1-ww-main/20", fallbackTextColor: "text-n1-ww-main dark:text-n1-ww-main" })) : (_jsx("div", { className: imageClasses, children: chain.logo })), _jsx("span", { className: textClasses, children: chain.name })] }));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=ChainButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/ChainButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQxD,MAAM,UAAU,WAAW,CAAC,EAIT;QAHjB,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,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,EAAC,sCAAsC,GACxD,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAE,YAAY,YAAG,KAAK,CAAC,IAAI,GAAO,CACjD,EACD,eAAM,SAAS,EAAE,WAAW,YAAG,KAAK,CAAC,IAAI,GAAQ,IAC1C,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Chain } from '../types';\nimport { ImageWithFallback } from './ImageWithFallback';\n\ninterface ChainButtonProps {\n chain: Chain;\n onClick: (chainId: string) => void;\n disabled?: boolean;\n}\n\nexport function ChainButton({\n chain,\n onClick,\n disabled = false,\n}: ChainButtonProps) {\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-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';\n const enabledClasses =\n 'hover:border-red-500 dark:hover:border-red-500 hover:bg-red-50/50 dark: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 imageClasses = disabled\n ? 'opacity-50 grayscale'\n : 'opacity-90 grayscale group-hover:grayscale-0 group-hover:scale-105 transition-all duration-200';\n\n const textClasses = disabled\n ? 'mt-4 font-medium text-n1-ww-gray-400 dark:text-n1-ww-gray-500'\n : 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-ww-gray-50 transition-colors duration-200';\n\n return (\n <button onClick={handleClick} className={buttonClasses} disabled={disabled}>\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\"\n fallbackBgColor=\"bg-n1-ww-main/10 dark:bg-n1-ww-main/20\"\n fallbackTextColor=\"text-n1-ww-main dark:text-n1-ww-main\"\n />\n ) : (\n <div className={imageClasses}>{chain.logo}</div>\n )}\n <span className={textClasses}>{chain.name}</span>\n </button>\n );\n}\n"]}
|
|
@@ -7,13 +7,13 @@ export function EVMChainsButton(_a) {
|
|
|
7
7
|
onClick(chain.id);
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
var baseClasses = 'flex flex-col items-center justify-center p-6 bg-n1-gray-50 dark:bg-n1-gray-950 border-2 border-n1-gray-100 dark:border-n1-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-gray-900';
|
|
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
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-gray-400 dark:text-n1-gray-500'
|
|
16
|
-
: 'mt-4 font-medium text-n1-gray-600 dark:text-n1-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-gray-50 transition-colors duration-200';
|
|
15
|
+
? 'mt-4 font-medium text-n1-ww-gray-400 dark:text-n1-ww-gray-500'
|
|
16
|
+
: 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-ww-gray-50 transition-colors duration-200';
|
|
17
17
|
return (_jsxs("button", { onClick: handleClick, className: buttonClasses, disabled: disabled, children: [_jsx(EVMChainsGroup, { size: 32, className: disabled ? 'opacity-50 grayscale' : 'opacity-90' }), _jsx("span", { className: textClasses, children: chain.name })] }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=EVMChainsButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVMChainsButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/EVMChainsButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,MAAM,UAAU,eAAe,CAAC,EAIT;QAHrB,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":"EVMChainsButton.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/EVMChainsButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,MAAM,UAAU,eAAe,CAAC,EAIT;QAHrB,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,8LAA8L,CAAC;IACjM,IAAM,cAAc,GAClB,gGAAgG,CAAC;IACnG,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,+DAA+D;QACjE,CAAC,CAAC,2JAA2J,CAAC;IAEhK,OAAO,CACL,kBAAQ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,aACxE,KAAC,cAAc,IACb,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 { Chain } from '../types';\nimport { EVMChainsGroup } from '../../../components/logos';\n\ninterface EVMChainsButtonProps {\n chain: Chain;\n onClick: (chainId: string) => void;\n disabled?: boolean;\n}\n\nexport function EVMChainsButton({\n chain,\n onClick,\n disabled = false,\n}: EVMChainsButtonProps) {\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-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';\n const enabledClasses =\n 'hover:border-red-500 dark:hover:border-red-500 hover:bg-red-50/50 dark: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-400 dark:text-n1-ww-gray-500'\n : 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-ww-gray-50 transition-colors duration-200';\n\n return (\n <button onClick={handleClick} className={buttonClasses} disabled={disabled}>\n <EVMChainsGroup\n size={32}\n className={disabled ? 'opacity-50 grayscale' : 'opacity-90'}\n />\n <span className={textClasses}>{chain.name}</span>\n </button>\n );\n}\n"]}
|
|
@@ -6,6 +6,6 @@ import Logo from '../../../components/Logo';
|
|
|
6
6
|
*/
|
|
7
7
|
export var Header = function (_a) {
|
|
8
8
|
var onClose = _a.onClose;
|
|
9
|
-
return (_jsx("div", { className: "p-6 border-b border-n1-gray-200 dark:border-n1-gray-800 w-full max-w-2xl mx-auto", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "flex items-center gap-3", children: _jsx("div", { className: "w-6 h-6 text-n1-gray-50", children: _jsx(Logo, { size: 24 }) }) }), _jsx("button", { onClick: function () { return onClose && onClose(); }, className: "\n text-neutral-400 hover:text-n1-gray-900 dark:hover:text-white \n transition-colors duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]\n h-10 w-10 rounded-full hover:bg-n1-gray-100 dark:hover:bg-n1-gray-800\n flex items-center justify-center\n ", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }) })] }) }));
|
|
9
|
+
return (_jsx("div", { className: "p-6 border-b border-n1-ww-gray-200 dark:border-n1-ww-gray-800 w-full max-w-2xl mx-auto", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "flex items-center gap-3", children: _jsx("div", { className: "w-6 h-6 text-n1-ww-gray-50", children: _jsx(Logo, { size: 24 }) }) }), _jsx("button", { onClick: function () { return onClose && onClose(); }, className: "\n text-neutral-400 hover:text-n1-ww-gray-900 dark:hover:text-white \n transition-colors duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]\n h-10 w-10 rounded-full hover:bg-n1-ww-gray-100 dark:hover:bg-n1-ww-gray-800\n flex items-center justify-center\n ", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }) })] }) }));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/Header.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,0BAA0B,CAAC;AAM5C;;;GAGG;AACH,MAAM,CAAC,IAAM,MAAM,GAA0B,UAAC,EAAW;QAAT,OAAO,aAAA;IACrD,OAAO,CACL,cAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/Header.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,0BAA0B,CAAC;AAM5C;;;GAGG;AACH,MAAM,CAAC,IAAM,MAAM,GAA0B,UAAC,EAAW;QAAT,OAAO,aAAA;IACrD,OAAO,CACL,cAAK,SAAS,EAAC,wFAAwF,YACrG,eAAK,SAAS,EAAC,mCAAmC,aAChD,cAAK,SAAS,EAAC,yBAAyB,YACtC,cAAK,SAAS,EAAC,4BAA4B,YAEzC,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,GAAI,GACd,GACF,EACN,iBACE,OAAO,EAAE,cAAM,OAAA,OAAO,IAAI,OAAO,EAAE,EAApB,CAAoB,EACnC,SAAS,EAAE,kTAKV,YAED,cACE,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,YAElC,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,GAAG,EACf,CAAC,EAAC,sBAAsB,GACxB,GACE,GACC,IACL,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Logo from '../../../components/Logo';\n\ninterface HeaderProps {\n onClose?: () => void;\n}\n\n/**\n * Header component for the Nord Flow modal\n * Contains the logo and close button\n */\nexport const Header: React.FC<HeaderProps> = ({ onClose }) => {\n return (\n <div className=\"p-6 border-b border-n1-ww-gray-200 dark:border-n1-ww-gray-800 w-full max-w-2xl mx-auto\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-6 h-6 text-n1-ww-gray-50\">\n {/* Use Logo component with fallback */}\n <Logo size={24} />\n </div>\n </div>\n <button\n onClick={() => onClose && onClose()}\n className={`\n text-neutral-400 hover:text-n1-ww-gray-900 dark:hover:text-white \n transition-colors duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]\n h-10 w-10 rounded-full hover:bg-n1-ww-gray-100 dark:hover:bg-n1-ww-gray-800\n flex items-center justify-center\n `}\n >\n <svg\n className=\"w-5 h-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n </div>\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-gray-200 dark:bg-n1-gray-800' : _f, _g = _a.fallbackTextColor, fallbackTextColor = _g === void 0 ? 'text-n1-gray-500 dark:text-n1-gray-400' : _g;
|
|
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-200 dark:bg-n1-ww-gray-800' : _f, _g = _a.fallbackTextColor, fallbackTextColor = _g === void 0 ? 'text-n1-ww-gray-500 dark: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,E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AED,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-200 dark:bg-n1-ww-gray-800',\n fallbackTextColor = 'text-n1-ww-gray-500 dark: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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
export function LoadingSquares() {
|
|
4
|
-
return (_jsx("div", { className: "relative w-32 h-32 n1-animate-fade-up", style: { animationDelay: '0.2s' }, children: _jsxs("div", { className: "absolute inset-0 grid grid-cols-2 gap-2", children: [_jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-main/40 dark:bg-n1-main/20 n1-animate-square-loader" }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-main/40 dark:bg-n1-main/20 n1-animate-square-loader", style: { animationDelay: '0.2s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-main/40 dark:bg-n1-main/20 n1-animate-square-loader", style: { animationDelay: '0.4s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-main/40 dark:bg-n1-main/20 n1-animate-square-loader", style: { animationDelay: '0.6s' } }) })] }) }));
|
|
4
|
+
return (_jsx("div", { className: "relative w-32 h-32 n1-ww-animate-fade-up", style: { animationDelay: '0.2s' }, children: _jsxs("div", { className: "absolute inset-0 grid grid-cols-2 gap-2", children: [_jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-ww-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader" }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader", style: { animationDelay: '0.2s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader", style: { animationDelay: '0.4s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader", style: { animationDelay: '0.6s' } }) })] }) }));
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=LoadingSquares.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSquares.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/LoadingSquares.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,MAAM,UAAU,cAAc;IAC5B,OAAO,CACL,cACE,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"LoadingSquares.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/LoadingSquares.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,MAAM,UAAU,cAAc;IAC5B,OAAO,CACL,cACE,SAAS,EAAC,0CAA0C,EACpD,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,YAEjC,eAAK,SAAS,EAAC,yCAAyC,aACtD,cAAK,SAAS,EAAC,8GAA8G,YAC3H,cAAK,SAAS,EAAC,uGAAuG,GAAO,GACzH,EACN,cAAK,SAAS,EAAC,2GAA2G,YACxH,cACE,SAAS,EAAC,uGAAuG,EACjH,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,GAC5B,GACH,EACN,cAAK,SAAS,EAAC,2GAA2G,YACxH,cACE,SAAS,EAAC,uGAAuG,EACjH,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,GAC5B,GACH,EACN,cAAK,SAAS,EAAC,2GAA2G,YACxH,cACE,SAAS,EAAC,uGAAuG,EACjH,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,GAC5B,GACH,IACF,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nexport function LoadingSquares() {\n return (\n <div\n className=\"relative w-32 h-32 n1-ww-animate-fade-up\"\n style={{ animationDelay: '0.2s' }}\n >\n <div className=\"absolute inset-0 grid grid-cols-2 gap-2\">\n <div className=\"relative bg-white dark:bg-neutral-900 border-2 border-n1-ww-gray-100 dark:border-neutral-800 overflow-hidden\">\n <div className=\"absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader\"></div>\n </div>\n <div className=\"relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden\">\n <div\n className=\"absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader\"\n style={{ animationDelay: '0.2s' }}\n ></div>\n </div>\n <div className=\"relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden\">\n <div\n className=\"absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader\"\n style={{ animationDelay: '0.4s' }}\n ></div>\n </div>\n <div className=\"relative bg-white dark:bg-neutral-900 border-2 border-n1-gray-100 dark:border-neutral-800 overflow-hidden\">\n <div\n className=\"absolute inset-x-0 bottom-0 h-full bg-n1-ww-main/40 dark:bg-n1-ww-main/20 n1-ww-animate-square-loader\"\n style={{ animationDelay: '0.6s' }}\n ></div>\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -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-gray-50 dark:bg-n1-gray-950 border-2 border-n1-gray-100 dark:border-n1-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-gray-900';
|
|
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
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-gray-400 dark:text-n1-gray-500'
|
|
16
|
-
: 'mt-4 font-medium text-n1-gray-600 dark:text-n1-gray-400 group-hover:text-red-500 dark:group-hover:text-n1-gray-50 transition-colors duration-200';
|
|
15
|
+
? 'mt-4 font-medium text-n1-ww-gray-400 dark:text-n1-ww-gray-500'
|
|
16
|
+
: 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark: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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AC,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-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';\n const enabledClasses =\n 'hover:border-red-500 dark:hover:border-red-500 hover:bg-red-50/50 dark: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-400 dark:text-n1-ww-gray-500'\n : 'mt-4 font-medium text-n1-ww-gray-600 dark:text-n1-ww-gray-400 group-hover:text-red-500 dark: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"]}
|
|
@@ -31,18 +31,18 @@ export function TransactionTable(_a) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (key === 'tx') {
|
|
34
|
-
return 'text-n1-gray-800 dark:text-n1-gray-200 text-xs font-medium hover:text-n1-main-600 dark:hover:text-n1-main-400 transition-colors duration-200';
|
|
34
|
+
return 'text-n1-ww-gray-800 dark:text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-600 dark:hover:text-n1-ww-main-400 transition-colors duration-200';
|
|
35
35
|
}
|
|
36
36
|
if (key === 'network') {
|
|
37
37
|
return 'text-purple-600 dark:text-purple-400 font-medium';
|
|
38
38
|
}
|
|
39
39
|
if (key === 'from' || key === 'to') {
|
|
40
|
-
return 'text-n1-gray-800 dark:text-n1-gray-200 text-xs font-medium hover:text-n1-main-600 dark:hover:text-n1-main-400 transition-colors duration-200';
|
|
40
|
+
return 'text-n1-ww-gray-800 dark:text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-600 dark:hover:text-n1-ww-main-400 transition-colors duration-200';
|
|
41
41
|
}
|
|
42
42
|
if (key === 'amount') {
|
|
43
43
|
return 'text-green-600 dark:text-emerald-500 font-semibold';
|
|
44
44
|
}
|
|
45
|
-
return 'text-n1-gray-900 dark:text-n1-gray-50 font-medium';
|
|
45
|
+
return 'text-n1-ww-gray-900 dark: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-gray-100 dark:bg-n1-gray-950 border border-n1-gray-200 dark:border-n1-gray-800 p-5 rounded-sm flex flex-col justify-center", children: [onClose && (_jsx("button", { onClick: onClose, className: "absolute top-3 right-2 text-n1-gray-500 dark:text-n1-gray-600 hover:text-n1-gray-500 dark:hover:text-n1-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) {
|
|
77
|
+
return (_jsxs("div", { className: "relative w-full h-full bg-n1-ww-gray-100 dark:bg-n1-ww-gray-950 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 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-500 dark:text-n1-ww-gray-600 hover:text-n1-ww-gray-500 dark: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-gray-500 dark:text-n1-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-main-500 dark:bg-n1-main-400 n1-animate-pulse" }))] })] }, key));
|
|
79
|
+
return (_jsxs("div", { className: "flex items-center justify-between py-2 ", children: [_jsx("span", { className: "text-n1-ww-gray-500 dark: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-500 dark:bg-n1-ww-main-400 n1-ww-animate-pulse" }))] })] }, key));
|
|
81
81
|
}) })] }));
|
|
82
82
|
}
|
|
83
83
|
//# sourceMappingURL=TransactionTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionTable.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/TransactionTable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AASnE,MAAM,UAAU,gBAAgB,CAAC,EAGT;QAFtB,WAAW,iBAAA,EACX,OAAO,aAAA;IAEP,+BAA+B;IAC/B,IAAM,QAAQ,GAAG,UAAC,GAAW;QAC3B,IAAM,MAAM,GAA2B;YACrC,MAAM,EAAE,QAAQ;YAChB,EAAE,EAAE,gBAAgB;YACpB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,IAAI;YACR,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,QAAQ;SACjB,CAAC;QAEF,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;IAC5B,CAAC,CAAC;IAEF,gDAAgD;IAChD,IAAM,cAAc,GAAG,UAAC,GAAW,EAAE,KAAa;QAChD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;YACrB,IACE,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;gBACvC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EACzC,CAAC;gBACD,OAAO,kDAAkD,CAAC;YAC5D,CAAC;YACD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC5C,OAAO,gDAAgD,CAAC;YAC1D,CAAC;YACD,IACE,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACpC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EACrC,CAAC;gBACD,OAAO,4CAA4C,CAAC;YACtD,CAAC;QACH,CAAC;QAED,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YAC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AAC,CAAC,CAAC,CAAC,CACjC,aACE,IAAI,EAAE,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EACtC,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,UAAG,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,kCAA+B,EAC5E,KAAK,EAAE,KAAK,CAAC,IAAI,aAEjB,eAAM,SAAS,EAAC,2BAA2B,YACxC,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAC5B,EACP,cACE,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,8FAA8F,EACxG,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,EACnB,MAAM,EAAC,cAAc,YAErB,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,8EAA8E,GAChF,GACE,IACJ,CACL,CAAC,CAAC,CAAC,CACF,eACE,SAAS,EAAE,UAAG,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,4BAAyB,EACtE,KAAK,EAAE,KAAK,CAAC,IAAI,YAEhB,KAAK,CAAC,IAAI,GACN,CACR,EACA,KAAK,CAAC,MAAM,IAAI,CACf,eAAM,SAAS,EAAC,wFAAwF,GAAQ,CACjH,IACG,KA7CE,GAAG,CA8CP,CACP;gBAhDoC,CAgDpC,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { TableValues } from '../types';\nimport { shortenAddress } from '../utils/nordUtils';\nimport { getExplorerUrl } from '../../../Logic/transactionManager';\n\ninterface TransactionTableProps {\n tableValues: TableValues & {\n amount?: { text: string; visible: boolean; typing: boolean };\n };\n onClose?: () => void;\n}\n\nexport function TransactionTable({\n tableValues,\n onClose,\n}: TransactionTableProps) {\n // Friendly labels for the keys\n const getLabel = (key: string) => {\n const labels: Record<string, string> = {\n amount: 'Amount',\n tx: 'Transaction ID',\n from: 'From',\n to: 'To',\n network: 'Network',\n status: 'Status',\n };\n\n return labels[key] || key;\n };\n\n // Get appropriate color for values based on key\n const getValueStyles = (key: string, value: string) => {\n if (key === 'status') {\n if (\n value.toLowerCase().includes('success') ||\n value.toLowerCase().includes('confirmed')\n ) {\n return 'text-green-500 dark:text-emerald-500 font-medium';\n }\n if (value.toLowerCase().includes('pending')) {\n return 'text-amber-500 dark:text-amber-400 font-medium';\n }\n if (\n value.toLowerCase().includes('fail') ||\n value.toLowerCase().includes('error')\n ) {\n return 'text-red-500 dark:text-red-400 font-medium';\n }\n }\n\n if (key === 'tx') {\n return 'text-n1-gray-800 dark:text-n1-gray-200 text-xs font-medium hover:text-n1-main-600 dark:hover:text-n1-main-400 transition-colors duration-200';\n }\n\n if (key === 'network') {\n return 'text-purple-600 dark:text-purple-400 font-medium';\n }\n\n if (key === 'from' || key === 'to') {\n return 'text-n1-gray-800 dark:text-n1-gray-200 text-xs font-medium hover:text-n1-main-600 dark:hover:text-n1-main-400 transition-colors duration-200';\n }\n\n if (key === 'amount') {\n return 'text-green-600 dark:text-emerald-500 font-semibold';\n }\n\n return 'text-n1-gray-900 dark:text-n1-gray-50 font-medium';\n };\n\n // Format display value with ellipsis for long text\n const getDisplayValue = (key: string, value: string) => {\n if (key === 'tx') {\n return shortenAddress(value, 5, 4);\n }\n\n if (key === 'from' || key === 'to') {\n return shortenAddress(value, 5, 4);\n }\n\n return value;\n };\n\n // Get explorer URL for transaction ID or address\n const getExplorerLink = (key: string, value: string) => {\n\n if (key === 'tx') {\n return getExplorerUrl(value);\n }\n\n if (key === 'from') {\n return `https://explorer.solana.com/address/${value}?cluster=devnet`;\n }\n\n return '';\n };\n\n // Order of fields to display\n const fieldOrder = ['amount', 'status', 'network', 'from', 'to', 'tx'];\n\n // Sort entries based on fieldOrder\n const sortedEntries = Object.entries(tableValues).sort(([keyA], [keyB]) => {\n const indexA = fieldOrder.indexOf(keyA);\n const indexB = fieldOrder.indexOf(keyB);\n return (indexA === -1 ? 999 : indexA) - (indexB === -1 ? 999 : indexB);\n });\n\n return (\n <div className=\"relative w-full h-full bg-n1-gray-100 dark:bg-n1-gray-950 border border-n1-gray-200 dark:border-n1-gray-800 p-5 rounded-sm flex flex-col justify-center\">\n {onClose && (\n <button\n onClick={onClose}\n className=\"absolute top-3 right-2 text-n1-gray-500 dark:text-n1-gray-600 hover:text-n1-gray-500 dark:hover:text-n1-gray-300 transition-colors duration-200 focus:outline-none\"\n aria-label=\"Close details\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n <div className=\"space-y-3 text-sm pt-5\">\n {sortedEntries.map(([key, value]) => (\n <div key={key} className=\"flex items-center justify-between py-2 \">\n <span className=\"text-n1-gray-500 dark:text-n1-gray-400 font-medium min-w-[120px]\">\n {getLabel(key)}\n </span>\n <div\n className={`relative transition-all duration-300 ${value.visible ? 'opacity-100' : 'opacity-0'} max-w-[65%] text-right flex-1`}\n >\n {(key === 'tx' || key === 'from') &&\n getExplorerLink(key, value.text) ? (\n <a\n href={getExplorerLink(key, value.text)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={`${getValueStyles(key, value.text)} break-all inline-block group`}\n title={value.text}\n >\n <span className=\"underline hover:font-bold\">\n {getDisplayValue(key, value.text)}\n </span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-3 w-3 ml-1 inline-block opacity-50 group-hover:opacity-100 transition-opacity duration-200\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\"\n />\n </svg>\n </a>\n ) : (\n <span\n className={`${getValueStyles(key, value.text)} break-all inline-block`}\n title={value.text}\n >\n {value.text}\n </span>\n )}\n {value.typing && (\n <span className=\"inline-block ml-1 w-[2px] h-[14px] bg-n1-main-500 dark:bg-n1-main-400 n1-animate-pulse\"></span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TransactionTable.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/TransactionTable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AASnE,MAAM,UAAU,gBAAgB,CAAC,EAGT;QAFtB,WAAW,iBAAA,EACX,OAAO,aAAA;IAEP,+BAA+B;IAC/B,IAAM,QAAQ,GAAG,UAAC,GAAW;QAC3B,IAAM,MAAM,GAA2B;YACrC,MAAM,EAAE,QAAQ;YAChB,EAAE,EAAE,gBAAgB;YACpB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,IAAI;YACR,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,QAAQ;SACjB,CAAC;QAEF,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;IAC5B,CAAC,CAAC;IAEF,gDAAgD;IAChD,IAAM,cAAc,GAAG,UAAC,GAAW,EAAE,KAAa;QAChD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;YACrB,IACE,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;gBACvC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EACzC,CAAC;gBACD,OAAO,kDAAkD,CAAC;YAC5D,CAAC;YACD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,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ableValues } from '../types';\nimport { shortenAddress } from '../utils/nordUtils';\nimport { getExplorerUrl } from '../../../Logic/transactionManager';\n\ninterface TransactionTableProps {\n tableValues: TableValues & {\n amount?: { text: string; visible: boolean; typing: boolean };\n };\n onClose?: () => void;\n}\n\nexport function TransactionTable({\n tableValues,\n onClose,\n}: TransactionTableProps) {\n // Friendly labels for the keys\n const getLabel = (key: string) => {\n const labels: Record<string, string> = {\n amount: 'Amount',\n tx: 'Transaction ID',\n from: 'From',\n to: 'To',\n network: 'Network',\n status: 'Status',\n };\n\n return labels[key] || key;\n };\n\n // Get appropriate color for values based on key\n const getValueStyles = (key: string, value: string) => {\n if (key === 'status') {\n if (\n value.toLowerCase().includes('success') ||\n value.toLowerCase().includes('confirmed')\n ) {\n return 'text-green-500 dark:text-emerald-500 font-medium';\n }\n if (value.toLowerCase().includes('pending')) {\n return 'text-amber-500 dark:text-amber-400 font-medium';\n }\n if (\n value.toLowerCase().includes('fail') ||\n value.toLowerCase().includes('error')\n ) {\n return 'text-red-500 dark:text-red-400 font-medium';\n }\n }\n\n if (key === 'tx') {\n return 'text-n1-ww-gray-800 dark:text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-600 dark:hover:text-n1-ww-main-400 transition-colors duration-200';\n }\n\n if (key === 'network') {\n return 'text-purple-600 dark:text-purple-400 font-medium';\n }\n\n if (key === 'from' || key === 'to') {\n return 'text-n1-ww-gray-800 dark:text-n1-ww-gray-200 text-xs font-medium hover:text-n1-ww-main-600 dark:hover:text-n1-ww-main-400 transition-colors duration-200';\n }\n\n if (key === 'amount') {\n return 'text-green-600 dark:text-emerald-500 font-semibold';\n }\n\n return 'text-n1-ww-gray-900 dark:text-n1-ww-gray-50 font-medium';\n };\n\n // Format display value with ellipsis for long text\n const getDisplayValue = (key: string, value: string) => {\n if (key === 'tx') {\n return shortenAddress(value, 5, 4);\n }\n\n if (key === 'from' || key === 'to') {\n return shortenAddress(value, 5, 4);\n }\n\n return value;\n };\n\n // Get explorer URL for transaction ID or address\n const getExplorerLink = (key: string, value: string) => {\n\n if (key === 'tx') {\n return getExplorerUrl(value);\n }\n\n if (key === 'from') {\n return `https://explorer.solana.com/address/${value}?cluster=devnet`;\n }\n\n return '';\n };\n\n // Order of fields to display\n const fieldOrder = ['amount', 'status', 'network', 'from', 'to', 'tx'];\n\n // Sort entries based on fieldOrder\n const sortedEntries = Object.entries(tableValues).sort(([keyA], [keyB]) => {\n const indexA = fieldOrder.indexOf(keyA);\n const indexB = fieldOrder.indexOf(keyB);\n return (indexA === -1 ? 999 : indexA) - (indexB === -1 ? 999 : indexB);\n });\n\n return (\n <div className=\"relative w-full h-full bg-n1-ww-gray-100 dark:bg-n1-ww-gray-950 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 p-5 rounded-sm flex flex-col justify-center\">\n {onClose && (\n <button\n onClick={onClose}\n className=\"absolute top-3 right-2 text-n1-ww-gray-500 dark:text-n1-ww-gray-600 hover:text-n1-ww-gray-500 dark:hover:text-n1-ww-gray-300 transition-colors duration-200 focus:outline-none\"\n aria-label=\"Close details\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n <div className=\"space-y-3 text-sm pt-5\">\n {sortedEntries.map(([key, value]) => (\n <div key={key} className=\"flex items-center justify-between py-2 \">\n <span className=\"text-n1-ww-gray-500 dark:text-n1-ww-gray-400 font-medium min-w-[120px]\">\n {getLabel(key)}\n </span>\n <div\n className={`relative transition-all duration-300 ${value.visible ? 'opacity-100' : 'opacity-0'} max-w-[65%] text-right flex-1`}\n >\n {(key === 'tx' || key === 'from') &&\n getExplorerLink(key, value.text) ? (\n <a\n href={getExplorerLink(key, value.text)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={`${getValueStyles(key, value.text)} break-all inline-block group`}\n title={value.text}\n >\n <span className=\"underline hover:font-bold\">\n {getDisplayValue(key, value.text)}\n </span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-3 w-3 ml-1 inline-block opacity-50 group-hover:opacity-100 transition-opacity duration-200\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\"\n />\n </svg>\n </a>\n ) : (\n <span\n className={`${getValueStyles(key, value.text)} break-all inline-block`}\n title={value.text}\n >\n {value.text}\n </span>\n )}\n {value.typing && (\n <span className=\"inline-block ml-1 w-[2px] h-[14px] bg-n1-ww-main-500 dark:bg-n1-ww-main-400 n1-ww-animate-pulse\"></span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { LoadingSquares } from './LoadingSquares';
|
|
3
3
|
export function WaitingMessage(_a) {
|
|
4
4
|
var message = _a.message;
|
|
5
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsxs("h3", { className: "text-xl text-n1-gray-800 dark:text-white transition-all duration-300 h-[32px] flex items-center justify-center relative font-semibold", children: [_jsx("span", { className: "opacity-0 absolute select-none", "aria-hidden": "true", children: "Waiting for transaction" }), _jsx("div", { className: "absolute min-w-[280px]", children: message.visible && message.title })] }), _jsxs("div", { className: "text-sm text-n1-gray-600 dark:text-neutral-400 h-[20px] flex items-center justify-center relative", children: [_jsx("span", { className: "opacity-0 absolute select-none", "aria-hidden": "true", children: "Please sign the transaction in your wallet" }), _jsx("div", { className: "absolute min-w-[280px]", children: message.visible && message.subtitle })] })] })] }));
|
|
5
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsxs("h3", { className: "text-xl text-n1-ww-gray-800 dark:text-white transition-all duration-300 h-[32px] flex items-center justify-center relative font-semibold", children: [_jsx("span", { className: "opacity-0 absolute select-none", "aria-hidden": "true", children: "Waiting for transaction" }), _jsx("div", { className: "absolute min-w-[280px]", children: message.visible && message.title })] }), _jsxs("div", { className: "text-sm text-n1-ww-gray-600 dark:text-neutral-400 h-[20px] flex items-center justify-center relative", children: [_jsx("span", { className: "opacity-0 absolute select-none", "aria-hidden": "true", children: "Please sign the transaction in your wallet" }), _jsx("div", { className: "absolute min-w-[280px]", children: message.visible && message.subtitle })] })] })] }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=WaitingMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WaitingMessage.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/WaitingMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,UAAU,cAAc,CAAC,EAAgC;QAA9B,OAAO,aAAA;IACtC,OAAO,CACL,eAAK,SAAS,EAAC,2DAA2D,aACxE,KAAC,cAAc,KAAG,EAClB,eAAK,SAAS,EAAC,iCAAiC,aAC9C,cAAI,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"WaitingMessage.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/components/WaitingMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,UAAU,cAAc,CAAC,EAAgC;QAA9B,OAAO,aAAA;IACtC,OAAO,CACL,eAAK,SAAS,EAAC,2DAA2D,aACxE,KAAC,cAAc,KAAG,EAClB,eAAK,SAAS,EAAC,iCAAiC,aAC9C,cAAI,SAAS,EAAC,0IAA0I,aACtJ,eAAM,SAAS,EAAC,gCAAgC,iBAAa,MAAM,wCAE5D,EACP,cAAK,SAAS,EAAC,wBAAwB,YACpC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,GAC7B,IACH,EACL,eAAK,SAAS,EAAC,sGAAsG,aACnH,eAAM,SAAS,EAAC,gCAAgC,iBAAa,MAAM,2DAE5D,EACP,cAAK,SAAS,EAAC,wBAAwB,YACpC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,GAChC,IACF,IACF,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { WaitingMessageState } from '../types';\nimport { LoadingSquares } from './LoadingSquares';\n\ninterface WaitingMessageProps {\n message: WaitingMessageState;\n}\n\nexport function WaitingMessage({ message }: WaitingMessageProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 space-y-6\">\n <LoadingSquares />\n <div className=\"space-y-2 text-center w-[300px]\">\n <h3 className=\"text-xl text-n1-ww-gray-800 dark:text-white transition-all duration-300 h-[32px] flex items-center justify-center relative font-semibold\"> \n <span className=\"opacity-0 absolute select-none\" aria-hidden=\"true\">\n Waiting for transaction\n </span>\n <div className=\"absolute min-w-[280px]\">\n {message.visible && message.title}\n </div>\n </h3>\n <div className=\"text-sm text-n1-ww-gray-600 dark:text-neutral-400 h-[20px] flex items-center justify-center relative\">\n <span className=\"opacity-0 absolute select-none\" aria-hidden=\"true\">\n Please sign the transaction in your wallet\n </span>\n <div className=\"absolute min-w-[280px]\">\n {message.visible && message.subtitle}\n </div>\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -4,6 +4,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* Used as the default screen when no specific flow state is active
|
|
5
5
|
*/
|
|
6
6
|
export var IdleScreen = function () {
|
|
7
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center p-8 space-y-4", children: [_jsxs("div", { className: "relative w-12 h-12", children: [_jsx("div", { className: "absolute inset-0 border-2 border-n1-gray-200 dark:border-n1-gray-800 border-b-n1-main rounded-full n1-animate-spin-slow" }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "w-2 h-2 bg-n1-main rounded-full n1-animate-pulse" }) })] }), _jsx("p", { className: "text-n1-gray-700 dark:text-n1-gray-300 text-sm font-medium", children: "Loading" })] }));
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center p-8 space-y-4", children: [_jsxs("div", { className: "relative w-12 h-12", children: [_jsx("div", { className: "absolute inset-0 border-2 border-n1-ww-gray-200 dark:border-n1-ww-gray-800 border-b-n1-ww-main rounded-full n1-ww-animate-spin-slow" }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "w-2 h-2 bg-n1-ww-main rounded-full n1-ww-animate-pulse" }) })] }), _jsx("p", { className: "text-n1-ww-gray-700 dark:text-n1-ww-gray-300 text-sm font-medium", children: "Loading" })] }));
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=00-IdleScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"00-IdleScreen.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/screens/00-IdleScreen.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AACH,MAAM,CAAC,IAAM,UAAU,GAAa;IAClC,OAAO,CACL,eAAK,SAAS,EAAC,yDAAyD,aAEtE,eAAK,SAAS,EAAC,oBAAoB,aAEjC,cAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"00-IdleScreen.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/screens/00-IdleScreen.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AACH,MAAM,CAAC,IAAM,UAAU,GAAa;IAClC,OAAO,CACL,eAAK,SAAS,EAAC,yDAAyD,aAEtE,eAAK,SAAS,EAAC,oBAAoB,aAEjC,cAAK,SAAS,EAAC,qIAAqI,GAAO,EAG3J,cAAK,SAAS,EAAC,mDAAmD,YAChE,cAAK,SAAS,EAAC,wDAAwD,GAAO,GAC1E,IACF,EAGN,YAAG,SAAS,EAAC,kEAAkE,wBAE3E,IACA,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\n/**\n * Idle screen component that displays a loading animation\n * Used as the default screen when no specific flow state is active\n */\nexport const IdleScreen: React.FC = () => {\n return (\n <div className=\"flex flex-col items-center justify-center p-8 space-y-4\">\n {/* Minimalistic but creative loading animation */}\n <div className=\"relative w-12 h-12\">\n {/* Simple spinning ring with primary color accent */}\n <div className=\"absolute inset-0 border-2 border-n1-ww-gray-200 dark:border-n1-ww-gray-800 border-b-n1-ww-main rounded-full n1-ww-animate-spin-slow\"></div>\n\n {/* Subtle pulsing dot in the center */}\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"w-2 h-2 bg-n1-ww-main rounded-full n1-ww-animate-pulse\"></div>\n </div>\n </div>\n\n {/* Simple loading text */}\n <p className=\"text-n1-ww-gray-700 dark:text-n1-ww-gray-300 text-sm font-medium\">\n Loading\n </p>\n </div>\n );\n}; "]}
|
|
@@ -14,11 +14,11 @@ export function ConnectWalletScreen() {
|
|
|
14
14
|
}, [isConnecting]);
|
|
15
15
|
// If connecting, show loading state
|
|
16
16
|
if (isConnecting) {
|
|
17
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-gray-800 dark:text-white font-semibold", children: "Connecting Wallet" }), _jsx("p", { className: "text-sm text-n1-gray-600 dark:text-neutral-400", children: "Please approve the connection request in your wallet" })] })] }));
|
|
17
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-ww-gray-800 dark:text-white font-semibold", children: "Connecting Wallet" }), _jsx("p", { className: "text-sm text-n1-ww-gray-600 dark:text-neutral-400", children: "Please approve the connection request in your wallet" })] })] }));
|
|
18
18
|
}
|
|
19
19
|
// If not connecting, show connect options (exactly like NTS flow)
|
|
20
|
-
return (_jsx("div", { className: "p-6 overflow-hidden relative", children: _jsxs("div", { className: "space-y-4", children: [_jsx("button", { onClick: connectWallet, onMouseEnter: function () { return setIsHovered('wallet'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-n1-gray-200 dark:border-n1-gray-800 hover:border-n1-gray-400 dark:hover:border-white/60\n "), style: {
|
|
20
|
+
return (_jsx("div", { className: "p-6 overflow-hidden relative", children: _jsxs("div", { className: "space-y-4", children: [_jsx("button", { onClick: connectWallet, onMouseEnter: function () { return setIsHovered('wallet'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-gray-400 dark:hover:border-white/60\n "), style: {
|
|
21
21
|
transform: isHovered === 'wallet' ? 'scale(0.99)' : 'scale(1)',
|
|
22
|
-
}, children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsxs("div", { className: "flex items-center", children: [_jsx(IoMdWallet, { className: "w-5 h-5 text-n1-gray-500 dark:text-neutral-400 group-hover:text-n1-gray-900 dark:group-hover:text-white transition-colors duration-300" }), _jsx("span", { className: "\n ml-2 text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-n1-gray-500 dark:text-neutral-400 group-hover:text-n1-gray-900 dark:group-hover:text-white\n "), children: "Continue with Wallet" })] }) }) }), _jsx("button", { disabled: true, onMouseEnter: function () { return setIsHovered('google'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-not-allowed border-n1-gray-200 dark:border-n1-gray-800 opacity-50\n "), children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsx("div", { className: "flex items-center", children: _jsx("span", { className: "text-base font-medium tracking-wide text-n1-gray-500 dark:text-neutral-400", children: "Continue with Google (soon)" }) }) }) }), _jsx("button", { disabled: true, onMouseEnter: function () { return setIsHovered('email'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-not-allowed border-n1-gray-200 dark:border-n1-gray-800 opacity-50\n "), children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsx("div", { className: "flex items-center", children: _jsx("span", { className: "text-base font-medium tracking-wide text-n1-gray-500 dark:text-neutral-400", children: "Continue with Email (soon)" }) }) }) })] }) }));
|
|
22
|
+
}, children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsxs("div", { className: "flex items-center", children: [_jsx(IoMdWallet, { className: "w-5 h-5 text-n1-ww-gray-500 dark:text-neutral-400 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white transition-colors duration-300" }), _jsx("span", { className: "\n ml-2 text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-n1-ww-gray-500 dark:text-neutral-400 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white\n "), children: "Continue with Wallet" })] }) }) }), _jsx("button", { disabled: true, onMouseEnter: function () { return setIsHovered('google'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-not-allowed border-n1-ww-gray-200 dark:border-n1-ww-gray-800 opacity-50\n "), children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsx("div", { className: "flex items-center", children: _jsx("span", { className: "text-base font-medium tracking-wide text-n1-ww-gray-500 dark:text-neutral-400", children: "Continue with Google (soon)" }) }) }) }), _jsx("button", { disabled: true, onMouseEnter: function () { return setIsHovered('email'); }, onMouseLeave: function () { return setIsHovered(null); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-not-allowed border-n1-ww-gray-200 dark:border-n1-ww-gray-800 opacity-50\n "), children: _jsx("div", { className: "relative z-[200] pl-4 isolate", children: _jsx("div", { className: "flex items-center", children: _jsx("span", { className: "text-base font-medium tracking-wide text-n1-ww-gray-500 dark:text-neutral-400", children: "Continue with Email (soon)" }) }) }) })] }) }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=01-ConnectWalletScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01-ConnectWalletScreen.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/screens/01-ConnectWalletScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,UAAU,mBAAmB;IAC3B,IAAA,KAAkC,uBAAuB,EAAE,EAAzD,YAAY,kBAAA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EACtC,SAAS,EAAE,kLAEqB,cAAc,6GAE7C,YAED,cAAK,SAAS,EAAC,+BAA+B,YAC5C,cAAK,SAAS,EAAC,mBAAmB,YAChC,eAAM,SAAS,EAAC,+EAA+E,2CAExF,GACH,GACF,GACC,IACL,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { IoMdWallet } from 'react-icons/io';\nimport { LoadingSquares } from '../components/LoadingSquares';\nimport { ANIMATION_EASE } from '../constants';\nimport { useWalletConnectContext } from '../context/WalletConnectContext';\n\nexport function ConnectWalletScreen() {\n const { isConnecting, connectWallet } = useWalletConnectContext();\n const [isHovered, setIsHovered] = useState<\n 'wallet' | 'google' | 'email' | null\n >(null);\n\n\n useEffect(() => {\n if (!isConnecting) {\n connectWallet();\n }\n }, [isConnecting]);\n\n // If connecting, show loading state\n if (isConnecting) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 space-y-6\">\n <LoadingSquares />\n <div className=\"space-y-2 text-center w-[300px]\">\n <h3 className=\"text-xl text-n1-ww-gray-800 dark:text-white font-semibold\">\n Connecting Wallet\n </h3>\n <p className=\"text-sm text-n1-ww-gray-600 dark:text-neutral-400\">\n Please approve the connection request in your wallet\n </p>\n </div>\n </div>\n );\n }\n\n // If not connecting, show connect options (exactly like NTS flow)\n return (\n <div className=\"p-6 overflow-hidden relative\">\n <div className=\"space-y-4\">\n <button\n onClick={connectWallet}\n onMouseEnter={() => setIsHovered('wallet')}\n onMouseLeave={() => setIsHovered(null)}\n className={`\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ${ANIMATION_EASE}\n cursor-pointer border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-gray-400 dark:hover:border-white/60\n `}\n style={{\n transform: isHovered === 'wallet' ? 'scale(0.99)' : 'scale(1)',\n }}\n >\n <div className=\"relative z-[200] pl-4 isolate\">\n <div className=\"flex items-center\">\n <IoMdWallet className=\"w-5 h-5 text-n1-ww-gray-500 dark:text-neutral-400 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white transition-colors duration-300\" />\n <span\n className={`\n ml-2 text-base font-medium tracking-wide transition-colors duration-300 ${ANIMATION_EASE}\n text-n1-ww-gray-500 dark:text-neutral-400 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white\n `}\n >\n Continue with Wallet\n </span>\n </div>\n </div>\n </button>\n\n <button\n disabled\n onMouseEnter={() => setIsHovered('google')}\n onMouseLeave={() => setIsHovered(null)}\n className={`\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ${ANIMATION_EASE}\n cursor-not-allowed border-n1-ww-gray-200 dark:border-n1-ww-gray-800 opacity-50\n `}\n >\n <div className=\"relative z-[200] pl-4 isolate\">\n <div className=\"flex items-center\">\n <span className=\"text-base font-medium tracking-wide text-n1-ww-gray-500 dark:text-neutral-400\">\n Continue with Google (soon)\n </span>\n </div>\n </div>\n </button>\n\n <button\n disabled\n onMouseEnter={() => setIsHovered('email')}\n onMouseLeave={() => setIsHovered(null)}\n className={`\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ${ANIMATION_EASE}\n cursor-not-allowed border-n1-ww-gray-200 dark:border-n1-ww-gray-800 opacity-50\n `}\n >\n <div className=\"relative z-[200] pl-4 isolate\">\n <div className=\"flex items-center\">\n <span className=\"text-base font-medium tracking-wide text-n1-ww-gray-500 dark:text-neutral-400\">\n Continue with Email (soon)\n </span>\n </div>\n </div>\n </button>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -29,16 +29,16 @@ export function EvmWalletAuthScreen() {
|
|
|
29
29
|
}, [authState, transition]);
|
|
30
30
|
// Render waiting for signature screen
|
|
31
31
|
if (authState === AuthState.WAITING_FOR_SIGNATURE) {
|
|
32
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-gray-800 dark:text-white font-semibold", children: "Waiting for Signature" }), _jsx("p", { className: "text-sm text-n1-gray-600 dark:text-neutral-400", children: "Please sign the message in your Ethereum wallet to authenticate with Solana" })] })] }));
|
|
32
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx(LoadingSquares, {}), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-ww-gray-800 dark:text-white font-semibold", children: "Waiting for Signature" }), _jsx("p", { className: "text-sm text-n1-ww-gray-600 dark:text-neutral-400", children: "Please sign the message in your Ethereum wallet to authenticate with Solana" })] })] }));
|
|
33
33
|
}
|
|
34
34
|
// Render success screen
|
|
35
35
|
if (authState === AuthState.SUCCESS) {
|
|
36
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-8 w-8 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-gray-800 dark:text-white font-semibold", children: "Signature Verified" }), _jsx("p", { className: "text-sm text-n1-gray-600 dark:text-neutral-400", children: "Your Ethereum wallet has been authenticated successfully" })] })] }));
|
|
36
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-6", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-8 w-8 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }), _jsxs("div", { className: "space-y-2 text-center w-[300px]", children: [_jsx("h3", { className: "text-xl text-n1-ww-gray-800 dark:text-white font-semibold", children: "Signature Verified" }), _jsx("p", { className: "text-sm text-n1-ww-gray-600 dark:text-neutral-400", children: "Your Ethereum wallet has been authenticated successfully" })] })] }));
|
|
37
37
|
}
|
|
38
38
|
// Render initial screen
|
|
39
|
-
return (_jsx("div", { className: "overflow-hidden relative", children: _jsxs("div", { className: "space-y-6", children: [_jsx("h2", { className: "text-xl text-n1-gray-800 dark:text-white font-semibold mb-2 text-center", children: "EVM Wallet Authentication" }), _jsx("p", { className: "text-sm text-n1-gray-600 dark:text-neutral-400 text-center mb-4", children: "You need to sign a message to authenticate your Ethereum wallet with Solana" }), _jsx("button", { onClick: handleSignatureRequest, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-n1-gray-200 dark:border-n1-gray-800 hover:border-n1-gray-400 dark:hover:border-white/60\n "), style: {
|
|
39
|
+
return (_jsx("div", { className: "overflow-hidden relative", children: _jsxs("div", { className: "space-y-6", children: [_jsx("h2", { className: "text-xl text-n1-ww-gray-800 dark:text-white font-semibold mb-2 text-center", children: "EVM Wallet Authentication" }), _jsx("p", { className: "text-sm text-n1-ww-gray-600 dark:text-neutral-400 text-center mb-4", children: "You need to sign a message to authenticate your Ethereum wallet with Solana" }), _jsx("button", { onClick: handleSignatureRequest, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-gray-400 dark:hover:border-white/60\n "), style: {
|
|
40
40
|
transform: isHovered ? 'scale(0.99)' : 'scale(1)',
|
|
41
|
-
}, children: _jsx("span", { className: "\n text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-n1-gray-700 dark:text-n1-gray-300 group-hover:text-n1-gray-900 dark:group-hover:text-white\n "), children: "Sign Authentication Message" }) })] }) }));
|
|
41
|
+
}, children: _jsx("span", { className: "\n text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-n1-ww-gray-700 dark:text-n1-ww-gray-300 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white\n "), children: "Sign Authentication Message" }) })] }) }));
|
|
42
42
|
}
|
|
43
43
|
// For backward compatibility
|
|
44
44
|
export { EvmWalletAuthScreen as EthToSolAuthScreen };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"02-EvmWalletAuthScreen.js","sourceRoot":"","sources":["../../../../src/Modal/NordFlow/screens/02-EvmWalletAuthScreen.tsx"],"names":[],"mappings":";AAAA,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,IAAK,SAIJ;AAJD,WAAK,SAAS;IACZ,gCAAmB,CAAA;IACnB,4DAA+C,CAAA;IAC/C,gCAAmB,CAAA;AACrB,CAAC,EAJI,SAAS,KAAT,SAAS,QAIb;AAED,MAAM,UAAU,mBAAmB;IACzB,IAAA,UAAU,GAAK,mBAAmB,EAAE,WAA1B,CAA2B;IACvC,IAAA,KAA4B,Q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AAC,EACd,CAAC,EAAC,gBAAgB,GAClB,GACE,GACF,EACN,eAAK,SAAS,EAAC,iCAAiC,aAC9C,aAAI,SAAS,EAAC,2DAA2D,mCAEpE,EACL,YAAG,SAAS,EAAC,mDAAmD,yEAE5D,IACA,IACF,CACP,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,OAAO,CACL,cAAK,SAAS,EAAC,0BAA0B,YACvC,eAAK,SAAS,EAAC,WAAW,aACxB,aAAI,SAAS,EAAC,4EAA4E,0CAErF,EACL,YAAG,SAAS,EAAC,oEAAoE,4FAG7E,EAEJ,iBACE,OAAO,EAAE,sBAAsB,EAC/B,YAAY,EAAE,cAAM,OAAA,YAAY,CAAC,IAAI,CAAC,EAAlB,CAAkB,EACtC,YAAY,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB,EACvC,SAAS,EAAE,kLAEqB,cAAc,qJAE7C,EACD,KAAK,EAAE;wBACL,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU;qBAClD,YAED,eACE,SAAS,EAAE,2FAC0D,cAAc,uIAEpF,4CAGM,GACA,IACL,GACF,CACP,CAAC;AACJ,CAAC;AAED,6BAA6B;AAC7B,OAAO,EAAE,mBAAmB,IAAI,kBAAkB,EAAE,CAAC","sourcesContent":["// todo: implement\nimport { useEffect, useState } from 'react';\nimport { LoadingSquares } from '../components/LoadingSquares';\nimport { ANIMATION_EASE } from '../constants';\nimport { useFlowStateContext } from '../context/FlowContext';\n\nenum AuthState {\n INITIAL = 'initial',\n WAITING_FOR_SIGNATURE = 'waiting_for_signature',\n SUCCESS = 'success',\n}\n\nexport function EvmWalletAuthScreen() {\n const { transition } = useFlowStateContext();\n const [isHovered, setIsHovered] = useState(false);\n const [authState, setAuthState] = useState<AuthState>(AuthState.INITIAL);\n\n // Handle signature request\n const handleSignatureRequest = () => {\n setAuthState(AuthState.WAITING_FOR_SIGNATURE);\n\n // Simulate signature process - in a real implementation,\n // this would be replaced with actual wallet signature logic\n setTimeout(() => {\n setAuthState(AuthState.SUCCESS);\n }, 2000);\n };\n\n // When signature is successful, trigger transition after a brief success message\n useEffect(() => {\n // todo: implement\n }, [authState, transition]);\n\n // Render waiting for signature screen\n if (authState === AuthState.WAITING_FOR_SIGNATURE) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 space-y-6\">\n <LoadingSquares />\n <div className=\"space-y-2 text-center w-[300px]\">\n <h3 className=\"text-xl text-n1-ww-gray-800 dark:text-white font-semibold\">\n Waiting for Signature\n </h3>\n <p className=\"text-sm text-n1-ww-gray-600 dark:text-neutral-400\">\n Please sign the message in your Ethereum wallet to authenticate with\n Solana\n </p>\n </div>\n </div>\n );\n }\n\n // Render success screen\n if (authState === AuthState.SUCCESS) {\n return (\n <div className=\"flex flex-col items-center justify-center py-12 space-y-6\">\n <div className=\"w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-8 w-8 text-green-600 dark:text-green-400\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n </div>\n <div className=\"space-y-2 text-center w-[300px]\">\n <h3 className=\"text-xl text-n1-ww-gray-800 dark:text-white font-semibold\">\n Signature Verified\n </h3>\n <p className=\"text-sm text-n1-ww-gray-600 dark:text-neutral-400\">\n Your Ethereum wallet has been authenticated successfully\n </p>\n </div>\n </div>\n );\n }\n\n // Render initial screen\n return (\n <div className=\"overflow-hidden relative\">\n <div className=\"space-y-6\">\n <h2 className=\"text-xl text-n1-ww-gray-800 dark:text-white font-semibold mb-2 text-center\">\n EVM Wallet Authentication\n </h2>\n <p className=\"text-sm text-n1-ww-gray-600 dark:text-neutral-400 text-center mb-4\">\n You need to sign a message to authenticate your Ethereum wallet with\n Solana\n </p>\n\n <button\n onClick={handleSignatureRequest}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n className={`\n group relative w-full overflow-hidden rounded-md border-2 bg-n1-ww-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ${ANIMATION_EASE}\n cursor-pointer border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-gray-400 dark:hover:border-white/60\n `}\n style={{\n transform: isHovered ? 'scale(0.99)' : 'scale(1)',\n }}\n >\n <span\n className={`\n text-base font-medium tracking-wide transition-colors duration-300 ${ANIMATION_EASE}\n text-n1-ww-gray-700 dark:text-n1-ww-gray-300 group-hover:text-n1-ww-gray-900 dark:group-hover:text-white\n `}\n >\n Sign Authentication Message\n </span>\n </button>\n </div>\n </div>\n );\n}\n\n// For backward compatibility\nexport { EvmWalletAuthScreen as EthToSolAuthScreen };\n"]}
|