@pushchain/ui-kit 1.0.7-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/package.json +26 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/LoginModal/index.d.ts +19 -0
- package/src/lib/components/LoginModal/index.js +209 -0
- package/src/lib/components/LoginModal/index.js.map +1 -0
- package/src/lib/components/PushUniversalAccountButton/ConnectWalletButton.d.ts +8 -0
- package/src/lib/components/PushUniversalAccountButton/ConnectWalletButton.js +25 -0
- package/src/lib/components/PushUniversalAccountButton/ConnectWalletButton.js.map +1 -0
- package/src/lib/components/PushUniversalAccountButton/TogglePushWalletButton.d.ts +8 -0
- package/src/lib/components/PushUniversalAccountButton/TogglePushWalletButton.js +28 -0
- package/src/lib/components/PushUniversalAccountButton/TogglePushWalletButton.js.map +1 -0
- package/src/lib/components/PushUniversalAccountButton/index.d.ts +13 -0
- package/src/lib/components/PushUniversalAccountButton/index.js +59 -0
- package/src/lib/components/PushUniversalAccountButton/index.js.map +1 -0
- package/src/lib/components/PushWalletToast/index.d.ts +2 -0
- package/src/lib/components/PushWalletToast/index.js +30 -0
- package/src/lib/components/PushWalletToast/index.js.map +1 -0
- package/src/lib/components/common/Button.d.ts +17 -0
- package/src/lib/components/common/Button.js +38 -0
- package/src/lib/components/common/Button.js.map +1 -0
- package/src/lib/components/common/Spinner.d.ts +2 -0
- package/src/lib/components/common/Spinner.js +31 -0
- package/src/lib/components/common/Spinner.js.map +1 -0
- package/src/lib/components/common/icons/ArbitrumMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/ArbitrumMonotone.js +8 -0
- package/src/lib/components/common/icons/ArbitrumMonotone.js.map +1 -0
- package/src/lib/components/common/icons/AvalancheMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/AvalancheMonotone.js +8 -0
- package/src/lib/components/common/icons/AvalancheMonotone.js.map +1 -0
- package/src/lib/components/common/icons/BnbMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/BnbMonotone.js +8 -0
- package/src/lib/components/common/icons/BnbMonotone.js.map +1 -0
- package/src/lib/components/common/icons/CrossIcon.d.ts +6 -0
- package/src/lib/components/common/icons/CrossIcon.js +8 -0
- package/src/lib/components/common/icons/CrossIcon.js.map +1 -0
- package/src/lib/components/common/icons/DashIcon.d.ts +2 -0
- package/src/lib/components/common/icons/DashIcon.js +8 -0
- package/src/lib/components/common/icons/DashIcon.js.map +1 -0
- package/src/lib/components/common/icons/EllipseIcon.d.ts +2 -0
- package/src/lib/components/common/icons/EllipseIcon.js +8 -0
- package/src/lib/components/common/icons/EllipseIcon.js.map +1 -0
- package/src/lib/components/common/icons/EthereumMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/EthereumMonotone.js +8 -0
- package/src/lib/components/common/icons/EthereumMonotone.js.map +1 -0
- package/src/lib/components/common/icons/OptimismMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/OptimismMonotone.js +8 -0
- package/src/lib/components/common/icons/OptimismMonotone.js.map +1 -0
- package/src/lib/components/common/icons/PolygonMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/PolygonMonotone.js +8 -0
- package/src/lib/components/common/icons/PolygonMonotone.js.map +1 -0
- package/src/lib/components/common/icons/PushLogo.d.ts +2 -0
- package/src/lib/components/common/icons/PushLogo.js +8 -0
- package/src/lib/components/common/icons/PushLogo.js.map +1 -0
- package/src/lib/components/common/icons/PushMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/PushMonotone.js +8 -0
- package/src/lib/components/common/icons/PushMonotone.js.map +1 -0
- package/src/lib/components/common/icons/SolanaMonotone.d.ts +2 -0
- package/src/lib/components/common/icons/SolanaMonotone.js +8 -0
- package/src/lib/components/common/icons/SolanaMonotone.js.map +1 -0
- package/src/lib/components/common/icons/index.d.ts +12 -0
- package/src/lib/components/common/icons/index.js +30 -0
- package/src/lib/components/common/icons/index.js.map +1 -0
- package/src/lib/components/common/index.d.ts +3 -0
- package/src/lib/components/common/index.js +9 -0
- package/src/lib/components/common/index.js.map +1 -0
- package/src/lib/constants/environment.d.ts +20 -0
- package/src/lib/constants/environment.js +17 -0
- package/src/lib/constants/environment.js.map +1 -0
- package/src/lib/constants/index.d.ts +38 -0
- package/src/lib/constants/index.js +55 -0
- package/src/lib/constants/index.js.map +1 -0
- package/src/lib/context/WalletContext.d.ts +22 -0
- package/src/lib/context/WalletContext.js +265 -0
- package/src/lib/context/WalletContext.js.map +1 -0
- package/src/lib/context/WalletContextMap.d.ts +2 -0
- package/src/lib/context/WalletContextMap.js +15 -0
- package/src/lib/context/WalletContextMap.js.map +1 -0
- package/src/lib/helpers/index.d.ts +1 -0
- package/src/lib/helpers/index.js +5 -0
- package/src/lib/helpers/index.js.map +1 -0
- package/src/lib/helpers/wallet.helpers.d.ts +6 -0
- package/src/lib/helpers/wallet.helpers.js +42 -0
- package/src/lib/helpers/wallet.helpers.js.map +1 -0
- package/src/lib/hooks/useAppMetadata.d.ts +1 -0
- package/src/lib/hooks/useAppMetadata.js +9 -0
- package/src/lib/hooks/useAppMetadata.js.map +1 -0
- package/src/lib/hooks/usePushChainClient.d.ts +6 -0
- package/src/lib/hooks/usePushChainClient.js +59 -0
- package/src/lib/hooks/usePushChainClient.js.map +1 -0
- package/src/lib/hooks/usePushWallet.d.ts +2 -0
- package/src/lib/hooks/usePushWallet.js +15 -0
- package/src/lib/hooks/usePushWallet.js.map +1 -0
- package/src/lib/index.d.ts +6 -0
- package/src/lib/index.js +11 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/providers/PushWalletProvider.d.ts +3 -0
- package/src/lib/providers/PushWalletProvider.js +49 -0
- package/src/lib/providers/PushWalletProvider.js.map +1 -0
- package/src/lib/providers/walletProviders/BaseWalletProvider.d.ts +17 -0
- package/src/lib/providers/walletProviders/BaseWalletProvider.js +26 -0
- package/src/lib/providers/walletProviders/BaseWalletProvider.js.map +1 -0
- package/src/lib/providers/walletProviders/WalletProviderRegistry.d.ts +13 -0
- package/src/lib/providers/walletProviders/WalletProviderRegistry.js +37 -0
- package/src/lib/providers/walletProviders/WalletProviderRegistry.js.map +1 -0
- package/src/lib/providers/walletProviders/ethereum/metamask.d.ts +15 -0
- package/src/lib/providers/walletProviders/ethereum/metamask.js +137 -0
- package/src/lib/providers/walletProviders/ethereum/metamask.js.map +1 -0
- package/src/lib/providers/walletProviders/helpers/address.d.ts +11 -0
- package/src/lib/providers/walletProviders/helpers/address.js +72 -0
- package/src/lib/providers/walletProviders/helpers/address.js.map +1 -0
- package/src/lib/providers/walletProviders/solana/phantom.d.ts +40 -0
- package/src/lib/providers/walletProviders/solana/phantom.js +130 -0
- package/src/lib/providers/walletProviders/solana/phantom.js.map +1 -0
- package/src/lib/styles/token.d.ts +72 -0
- package/src/lib/styles/token.js +26 -0
- package/src/lib/styles/token.js.map +1 -0
- package/src/lib/types/PushWalletProvider.types.d.ts +54 -0
- package/src/lib/types/PushWalletProvider.types.js +3 -0
- package/src/lib/types/PushWalletProvider.types.js.map +1 -0
- package/src/lib/types/index.d.ts +2 -0
- package/src/lib/types/index.js +6 -0
- package/src/lib/types/index.js.map +1 -0
- package/src/lib/types/wallet.types.d.ts +34 -0
- package/src/lib/types/wallet.types.js +12 -0
- package/src/lib/types/wallet.types.js.map +1 -0
- package/src/lib/utils/theme.d.ts +2 -0
- package/src/lib/utils/theme.js +36 -0
- package/src/lib/utils/theme.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pushchain/ui-kit",
|
|
3
|
+
"version": "1.0.7-alpha.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@metamask/sdk": "^0.32.0",
|
|
6
|
+
"@pushchain/devnet": "^1.0.13",
|
|
7
|
+
"ethers": "^6.13.5",
|
|
8
|
+
"tslib": "^2.3.0",
|
|
9
|
+
"viem": "^2.23.9"
|
|
10
|
+
},
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"main": "./src/index.js",
|
|
13
|
+
"typings": "./src/index.d.ts",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/react": "^18.3.13",
|
|
16
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
17
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
18
|
+
"react": "^18.3.1",
|
|
19
|
+
"styled-components": "^6.1.14",
|
|
20
|
+
"typescript-eslint": "^8.32.1"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"release:stable": "npx nx run ui-kit:nx-release-publish --otp=1"
|
|
24
|
+
},
|
|
25
|
+
"types": "./src/index.d.ts"
|
|
26
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib';
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/ui-kit/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { CONSTANTS } from '../../constants';
|
|
3
|
+
import { ModalAppDetails, ProviderConfigProps, UniversalAddress } from '../../types';
|
|
4
|
+
type LoginModalProps = {
|
|
5
|
+
iframeRef: React.MutableRefObject<HTMLIFrameElement | null>;
|
|
6
|
+
themeMode?: typeof CONSTANTS.THEME.LIGHT | typeof CONSTANTS.THEME.DARK;
|
|
7
|
+
isWalletVisible: boolean;
|
|
8
|
+
isIframeLoading: boolean;
|
|
9
|
+
setIframeLoading: (isIframeLoading: boolean) => void;
|
|
10
|
+
sendWalletConfig: () => void;
|
|
11
|
+
modalAppData: ModalAppDetails | undefined;
|
|
12
|
+
config: ProviderConfigProps;
|
|
13
|
+
universalAddress: UniversalAddress | null;
|
|
14
|
+
isWalletMinimised: boolean;
|
|
15
|
+
setMinimiseWallet: (isWalletMinimised: boolean) => void;
|
|
16
|
+
handleUserLogOutEvent: () => void;
|
|
17
|
+
};
|
|
18
|
+
declare const LoginModal: FC<LoginModalProps>;
|
|
19
|
+
export { LoginModal };
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoginModal = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
+
const common_1 = require("../../components/common");
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const LoginModal = ({ iframeRef, isWalletVisible, isIframeLoading, themeMode = constants_1.CONSTANTS.THEME.DARK, modalAppData, setIframeLoading, sendWalletConfig, universalAddress, isWalletMinimised, setMinimiseWallet, handleUserLogOutEvent, config, }) => {
|
|
10
|
+
const { modal } = config;
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isWalletVisible ? ((0, jsx_runtime_1.jsxs)(FrameContainer, { isWalletMinimised: isWalletMinimised, universalAddress: universalAddress, themeMode: themeMode ? themeMode : constants_1.CONSTANTS.THEME.DARK, accountMenuVariant: modal === null || modal === void 0 ? void 0 : modal.connectedLayout, modalDefaults: modal, children: [isIframeLoading && ((0, jsx_runtime_1.jsxs)(FrameLoadingContainer, { themeMode: themeMode ? themeMode : constants_1.CONSTANTS.THEME.DARK, children: [(0, jsx_runtime_1.jsx)(CloseButtonContainer, { onClick: () => {
|
|
12
|
+
handleUserLogOutEvent();
|
|
13
|
+
}, children: (0, jsx_runtime_1.jsx)(common_1.CrossIcon, { height: "20px", width: "20px", color: themeMode === constants_1.CONSTANTS.THEME.LIGHT ? '#000' : '#FFF' }) }), (0, jsx_runtime_1.jsxs)(LoadingTextContainer, { children: [(0, jsx_runtime_1.jsx)(LoadingText, { children: "Loading..." }), (0, jsx_runtime_1.jsx)(common_1.Spinner, {})] })] })), (0, jsx_runtime_1.jsxs)(FrameSubContainer, { isWalletMinimised: isWalletMinimised, isIframeLoading: isIframeLoading, children: [(0, jsx_runtime_1.jsx)(AccountContainer, { universalAddress: universalAddress, children: universalAddress ? ((0, jsx_runtime_1.jsx)(DashButtonContainer, { onClick: () => setMinimiseWallet(true), children: (0, jsx_runtime_1.jsx)(common_1.CrossIcon, { height: "18px", width: "18px", color: themeMode === constants_1.CONSTANTS.THEME.LIGHT ? '#FFF' : '#000' }) })) : ((0, jsx_runtime_1.jsx)(CloseButtonContainer, { onClick: () => {
|
|
14
|
+
handleUserLogOutEvent();
|
|
15
|
+
}, children: (0, jsx_runtime_1.jsx)(common_1.CrossIcon, { height: "20px", width: "20px", color: themeMode === constants_1.CONSTANTS.THEME.LIGHT ? '#000' : '#FFF' }) })) }), (0, jsx_runtime_1.jsxs)(SplitContainer, { children: [(modal === null || modal === void 0 ? void 0 : modal.appPreview) &&
|
|
16
|
+
modalAppData &&
|
|
17
|
+
(modal === null || modal === void 0 ? void 0 : modal.loginLayout) === constants_1.CONSTANTS.LOGIN.SPLIT && ((0, jsx_runtime_1.jsx)(AppPreviewContainer, { universalAddress: universalAddress, children: (0, jsx_runtime_1.jsxs)(AppContainer, { children: [(modalAppData === null || modalAppData === void 0 ? void 0 : modalAppData.logoURL) && ((0, jsx_runtime_1.jsx)(ImageContainer, { children: (0, jsx_runtime_1.jsx)(Image, { src: modalAppData === null || modalAppData === void 0 ? void 0 : modalAppData.logoURL, alt: modalAppData.title }) })), (0, jsx_runtime_1.jsxs)(TextContainer, { themeMode: themeMode ? themeMode : constants_1.CONSTANTS.THEME.DARK, textColor: themeMode === constants_1.CONSTANTS.THEME.LIGHT
|
|
18
|
+
? '#F5F6F8'
|
|
19
|
+
: '#17181b', children: [(0, jsx_runtime_1.jsx)(Heading, { children: modalAppData.title }), (0, jsx_runtime_1.jsx)(Description, { children: modalAppData === null || modalAppData === void 0 ? void 0 : modalAppData.description })] })] }) })), (0, jsx_runtime_1.jsx)(MainFrameContainer, { children: (0, jsx_runtime_1.jsx)("iframe", { src: `${constants_1.WALLET_CONFIG_URL[config.env]}/auth?app=${window.location.origin}`, allow: "publickey-credentials-create; publickey-credentials-get; *", ref: iframeRef, style: {
|
|
20
|
+
border: 'none',
|
|
21
|
+
width: '-webkit-fill-available',
|
|
22
|
+
height: universalAddress
|
|
23
|
+
? (modal === null || modal === void 0 ? void 0 : modal.connectedLayout) === constants_1.CONSTANTS.CONNECTED.FULL
|
|
24
|
+
? '100vh'
|
|
25
|
+
: '675px'
|
|
26
|
+
: '100vh',
|
|
27
|
+
borderRadius: universalAddress ? '10px' : '0px',
|
|
28
|
+
}, onLoad: () => {
|
|
29
|
+
setIframeLoading(false);
|
|
30
|
+
sendWalletConfig();
|
|
31
|
+
} }) })] })] })] })) : null }));
|
|
32
|
+
};
|
|
33
|
+
exports.LoginModal = LoginModal;
|
|
34
|
+
const FrameContainer = styled_components_1.default.div `
|
|
35
|
+
position: ${({ universalAddress, accountMenuVariant }) => universalAddress
|
|
36
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
37
|
+
? 'fixed'
|
|
38
|
+
: 'absolute'
|
|
39
|
+
: 'fixed'};
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
background-image: url(${({ modalDefaults }) => modalDefaults === null || modalDefaults === void 0 ? void 0 : modalDefaults.bgImage});
|
|
43
|
+
background-size: cover;
|
|
44
|
+
background-color: var(--pw-int-bg-primary-color);
|
|
45
|
+
border-radius: 10px;
|
|
46
|
+
z-index: 9999;
|
|
47
|
+
|
|
48
|
+
width: ${({ universalAddress, isWalletMinimised, accountMenuVariant }) => isWalletMinimised
|
|
49
|
+
? '0px'
|
|
50
|
+
: universalAddress
|
|
51
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
52
|
+
? '100%'
|
|
53
|
+
: '450px'
|
|
54
|
+
: '100vw'};
|
|
55
|
+
height: ${({ universalAddress, isWalletMinimised, accountMenuVariant }) => isWalletMinimised
|
|
56
|
+
? '0px'
|
|
57
|
+
: universalAddress
|
|
58
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
59
|
+
? '100vw'
|
|
60
|
+
: '675px'
|
|
61
|
+
: '100vh'};
|
|
62
|
+
right: ${({ universalAddress, accountMenuVariant }) => universalAddress
|
|
63
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
64
|
+
? '0'
|
|
65
|
+
: '10px'
|
|
66
|
+
: '0'};
|
|
67
|
+
top: ${({ universalAddress, accountMenuVariant }) => universalAddress
|
|
68
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
69
|
+
? '0'
|
|
70
|
+
: '70px'
|
|
71
|
+
: '0'};
|
|
72
|
+
|
|
73
|
+
@media (max-width: 425px) {
|
|
74
|
+
width: ${({ universalAddress, isWalletMinimised }) => isWalletMinimised ? '0px' : universalAddress ? '96%' : '100%'};
|
|
75
|
+
right: ${({ universalAddress }) => (universalAddress ? '2%' : '0')};
|
|
76
|
+
top: ${({ universalAddress, accountMenuVariant }) => universalAddress
|
|
77
|
+
? accountMenuVariant === constants_1.CONSTANTS.CONNECTED.FULL
|
|
78
|
+
? '0'
|
|
79
|
+
: '8%'
|
|
80
|
+
: '0'};
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
const CloseButtonContainer = styled_components_1.default.div `
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: flex-end;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
padding: 0 16px;
|
|
89
|
+
`;
|
|
90
|
+
const DashButtonContainer = styled_components_1.default.div `
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
border-radius: 1000px;
|
|
96
|
+
height: 20px;
|
|
97
|
+
width: 20px;
|
|
98
|
+
padding: 2px;
|
|
99
|
+
background-color: #ff0000;
|
|
100
|
+
`;
|
|
101
|
+
const LoadingTextContainer = styled_components_1.default.div `
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
gap: 16px;
|
|
106
|
+
width: -webkit-fill-available;
|
|
107
|
+
height: -webkit-fill-available;
|
|
108
|
+
`;
|
|
109
|
+
const LoadingText = styled_components_1.default.p `
|
|
110
|
+
font-size: 18px;
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
line-height: 27px;
|
|
113
|
+
color: inherit;
|
|
114
|
+
font-family: FK Grotesk Neu;
|
|
115
|
+
margin: 0px;
|
|
116
|
+
width: auto;
|
|
117
|
+
`;
|
|
118
|
+
const FrameLoadingContainer = styled_components_1.default.div `
|
|
119
|
+
height: -webkit-fill-available;
|
|
120
|
+
width: -webkit-fill-available;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
display: flex;
|
|
123
|
+
padding: 8px;
|
|
124
|
+
color: ${({ themeMode }) => themeMode === constants_1.CONSTANTS.THEME.LIGHT ? '#17181b' : '#F5F6F8'};
|
|
125
|
+
background-color: ${({ themeMode }) => themeMode === constants_1.CONSTANTS.THEME.LIGHT ? '#F5F6F8' : '#17181b'};
|
|
126
|
+
`;
|
|
127
|
+
const FrameSubContainer = styled_components_1.default.div `
|
|
128
|
+
display: ${({ isWalletMinimised, isIframeLoading }) => isWalletMinimised || isIframeLoading ? 'none' : 'flex'};
|
|
129
|
+
width: -webkit-fill-available;
|
|
130
|
+
height: -webkit-fill-available;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
`;
|
|
133
|
+
const AccountContainer = styled_components_1.default.div `
|
|
134
|
+
width: -webkit-fill-available;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 4px;
|
|
139
|
+
right: 4px;
|
|
140
|
+
justify-content: flex-end;
|
|
141
|
+
padding: var(--spacing-xxs) var(--spacing-xxs);
|
|
142
|
+
border-top-right-radius: ${({ universalAddress }) => universalAddress ? '10px' : '0px'};
|
|
143
|
+
border-top-left-radius: ${({ universalAddress }) => universalAddress ? '10px' : '0px'};
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
`;
|
|
146
|
+
const SplitContainer = styled_components_1.default.div `
|
|
147
|
+
display: flex;
|
|
148
|
+
`;
|
|
149
|
+
const AppPreviewContainer = styled_components_1.default.div `
|
|
150
|
+
display: ${({ universalAddress }) => (universalAddress ? 'none' : 'flex')};
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
flex: 1;
|
|
154
|
+
padding: 100px 10px 10px 10px;
|
|
155
|
+
background-color: transparent;
|
|
156
|
+
`;
|
|
157
|
+
const AppContainer = styled_components_1.default.div `
|
|
158
|
+
width: 300px;
|
|
159
|
+
padding: 10px;
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
align-items: flex-start;
|
|
163
|
+
gap: 16px;
|
|
164
|
+
align-self: stretch;
|
|
165
|
+
height: 700px;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
`;
|
|
168
|
+
const MainFrameContainer = styled_components_1.default.div `
|
|
169
|
+
flex: 1;
|
|
170
|
+
`;
|
|
171
|
+
const ImageContainer = styled_components_1.default.div `
|
|
172
|
+
width: 64px;
|
|
173
|
+
height: 64px;
|
|
174
|
+
`;
|
|
175
|
+
const Image = styled_components_1.default.img `
|
|
176
|
+
width: inherit;
|
|
177
|
+
height: inherit;
|
|
178
|
+
border-radius: 16px;
|
|
179
|
+
border: 1px solid var(--stroke-secondary, #313338);
|
|
180
|
+
`;
|
|
181
|
+
const TextContainer = styled_components_1.default.div `
|
|
182
|
+
font-family: 'FK Grotesk Neu';
|
|
183
|
+
src: url('./assets/fonts/FKGroteskNeue-Regular.woff2') format('woff2'),
|
|
184
|
+
url('./assets/fonts/FKGroteskNeue-Regular.woff') format('woff');
|
|
185
|
+
font-style: normal;
|
|
186
|
+
font-size: 16px;
|
|
187
|
+
font-weight: 400;
|
|
188
|
+
line-height: 22px;
|
|
189
|
+
color: ${({ themeMode, textColor }) => themeMode === constants_1.CONSTANTS.THEME.LIGHT
|
|
190
|
+
? textColor
|
|
191
|
+
? textColor
|
|
192
|
+
: '#17181b'
|
|
193
|
+
: textColor
|
|
194
|
+
? textColor
|
|
195
|
+
: '#F5F6F8'};
|
|
196
|
+
`;
|
|
197
|
+
const Heading = styled_components_1.default.h1 `
|
|
198
|
+
font-size: var(--pw-int-text-heading-xsmall-size);
|
|
199
|
+
font-weight: 500;
|
|
200
|
+
line-height: 27px;
|
|
201
|
+
color: var(--pw-int-text-primary-color);
|
|
202
|
+
`;
|
|
203
|
+
const Description = styled_components_1.default.p `
|
|
204
|
+
font-size: var(--pw-int-text-body-large-size);
|
|
205
|
+
line-height: 22px;
|
|
206
|
+
font-weight: 400;
|
|
207
|
+
color: var(--pw-int-text-secondary-color);
|
|
208
|
+
`;
|
|
209
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/LoginModal/index.tsx"],"names":[],"mappings":";;;;;AACA,kFAAuC;AACvC,oDAA6D;AAC7D,+CAA+D;AAuB/D,MAAM,UAAU,GAAwB,CAAC,EACvC,SAAS,EACT,eAAe,EACf,eAAe,EACf,SAAS,GAAG,qBAAS,CAAC,KAAK,CAAC,IAAI,EAChC,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,GACP,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEzB,OAAO,CACL,2DACG,eAAe,CAAC,CAAC,CAAC,CACjB,wBAAC,cAAc,IACb,iBAAiB,EAAE,iBAAiB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ACW,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;CAM1E,CAAC;AAEF,MAAM,YAAY,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;CAU9B,CAAC;AAEF,MAAM,kBAAkB,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAEpC,CAAC;AACF,MAAM,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;;CAGhC,CAAC;AAEF,MAAM,KAAK,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;CAKvB,CAAC;AACF,MAAM,aAAa,GAAG,2BAAM,CAAC,GAAG,CAG9B;;;;;;;;WAQS,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,CACpC,SAAS,KAAK,qBAAS,CAAC,KAAK,CAAC,KAAK;IACjC,CAAC,CAAC,SAAS;QACT,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS;IACb,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS;CAChB,CAAC;AAEF,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;CAKxB,CAAC;AAEF,MAAM,WAAW,GAAG,2BAAM,CAAC,CAAC,CAAA;;;;;CAK3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
export type ConnectPushWalletButtonProps = {
|
|
3
|
+
uid?: string;
|
|
4
|
+
connectButtonText?: string;
|
|
5
|
+
loadingComponent?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const ConnectWalletButton: FC<ConnectPushWalletButtonProps>;
|
|
8
|
+
export { ConnectWalletButton };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectWalletButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
+
const usePushWallet_1 = require("../../hooks/usePushWallet");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const ConnectWalletButton = ({ uid, connectButtonText, loadingComponent, }) => {
|
|
10
|
+
const { connectionStatus, handleConnectToPushWallet } = (0, usePushWallet_1.usePushWalletContext)(uid);
|
|
11
|
+
const isConnectButtonDisbaled = connectionStatus === 'connected' ||
|
|
12
|
+
connectionStatus === 'authenticating' ||
|
|
13
|
+
connectionStatus === 'connecting';
|
|
14
|
+
const isLoading = connectionStatus === 'connecting' || connectionStatus === 'authenticating';
|
|
15
|
+
const handleConnectWalletButton = () => handleConnectToPushWallet();
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(common_1.Button, { bgColor: "var(--pwauth-btn-connect-bg-color)", textColor: "var(--pwauth-btn-connect-text-color)", borderRadius: "var(--pwauth-btn-connect-border-radius)", onClick: handleConnectWalletButton, disabled: isConnectButtonDisbaled || isLoading, children: [connectionStatus === 'notConnected'
|
|
17
|
+
? connectButtonText
|
|
18
|
+
: connectionStatus, isLoading &&
|
|
19
|
+
(loadingComponent ? (loadingComponent) : ((0, jsx_runtime_1.jsx)(SpinnerContainer, { children: (0, jsx_runtime_1.jsx)(common_1.Spinner, {}) })))] }));
|
|
20
|
+
};
|
|
21
|
+
exports.ConnectWalletButton = ConnectWalletButton;
|
|
22
|
+
const SpinnerContainer = styled_components_1.default.div `
|
|
23
|
+
padding: 4px;
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=ConnectWalletButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectWalletButton.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/PushUniversalAccountButton/ConnectWalletButton.tsx"],"names":[],"mappings":";;;;;AACA,kFAAuC;AACvC,6DAAiE;AACjE,sCAA4C;AAQ5C,MAAM,mBAAmB,GAAqC,CAAC,EAC7D,GAAG,EACH,iBAAiB,EACjB,gBAAgB,GACjB,EAAE,EAAE;IACH,MAAM,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,GACnD,IAAA,oCAAoB,EAAC,GAAG,CAAC,CAAC;IAE5B,MAAM,uBAAuB,GAC3B,gBAAgB,KAAK,WAAW;QAChC,gBAAgB,KAAK,gBAAgB;QACrC,gBAAgB,KAAK,YAAY,CAAC;IAEpC,MAAM,SAAS,GACb,gBAAgB,KAAK,YAAY,IAAI,gBAAgB,KAAK,gBAAgB,CAAC;IAE7E,MAAM,yBAAyB,GAAG,GAAG,EAAE,CAAC,yBAAyB,EAAE,CAAC;IAEpE,OAAO,CACL,wBAAC,eAAM,IACL,OAAO,EAAC,oCAAoC,EAC5C,SAAS,EAAC,sCAAsC,EAChD,YAAY,EAAC,yCAAyC,EACtD,OAAO,EAAE,yBAAyB,EAClC,QAAQ,EAAE,uBAAuB,IAAI,SAAS,aAE7C,gBAAgB,KAAK,cAAc;gBAClC,CAAC,CAAC,iBAAiB;gBACnB,CAAC,CAAC,gBAAgB,EACnB,SAAS;gBACR,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAClB,gBAAgB,CACjB,CAAC,CAAC,CAAC,CACF,uBAAC,gBAAgB,cACf,uBAAC,gBAAO,KAAG,GACM,CACpB,CAAC,IACG,CACV,CAAC;AACJ,CAAC,CAAC;AAEO,kDAAmB;AAE5B,MAAM,gBAAgB,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAElC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UniversalAddress } from '../../types';
|
|
3
|
+
type TogglePushWalletButtonProps = {
|
|
4
|
+
uid?: string;
|
|
5
|
+
universalAddress: UniversalAddress;
|
|
6
|
+
};
|
|
7
|
+
declare const TogglePushWalletButton: React.FC<TogglePushWalletButtonProps>;
|
|
8
|
+
export { TogglePushWalletButton };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TogglePushWalletButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const usePushWallet_1 = require("../../hooks/usePushWallet");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const helpers_1 = require("../../helpers");
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const TogglePushWalletButton = ({ uid, universalAddress, }) => {
|
|
10
|
+
const { setMinimiseWallet, isWalletMinimised } = (0, usePushWallet_1.usePushWalletContext)(uid);
|
|
11
|
+
const { chainId, address } = universalAddress;
|
|
12
|
+
function getChainIcon(chainId) {
|
|
13
|
+
if (!chainId) {
|
|
14
|
+
return (0, jsx_runtime_1.jsx)(common_1.PushMonotone, {});
|
|
15
|
+
}
|
|
16
|
+
const IconComponent = constants_1.CHAIN_LOGO[chainId];
|
|
17
|
+
if (IconComponent) {
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(IconComponent, {});
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(common_1.PushMonotone, {});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const maskedAddress = (0, helpers_1.centerMaskString)(address);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(common_1.Button, { onClick: () => setMinimiseWallet(!isWalletMinimised), bgColor: "var(--pwauth-btn-connected-bg-color)", textColor: "var(--pwauth-btn-connected-text-color)", borderRadius: "var(--pwauth-btn-connect-border-radius)", children: [getChainIcon(chainId), maskedAddress, (0, jsx_runtime_1.jsx)(common_1.PushLogo, {})] }) }));
|
|
26
|
+
};
|
|
27
|
+
exports.TogglePushWalletButton = TogglePushWalletButton;
|
|
28
|
+
//# sourceMappingURL=TogglePushWalletButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TogglePushWalletButton.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/PushUniversalAccountButton/TogglePushWalletButton.tsx"],"names":[],"mappings":";;;;AACA,6DAAiE;AAEjE,sCAA2D;AAC3D,2CAAiD;AACjD,+CAA6C;AAM7C,MAAM,sBAAsB,GAA0C,CAAC,EACrE,GAAG,EACH,gBAAgB,GACjB,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,IAAA,oCAAoB,EAAC,GAAG,CAAC,CAAC;IAC3E,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC;IAE9C,SAAS,YAAY,CAAC,OAAsB;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,uBAAC,qBAAY,KAAG,CAAC;QAC1B,CAAC;QACD,MAAM,aAAa,GAAG,sBAAU,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,uBAAC,aAAa,KAAG,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,OAAO,uBAAC,qBAAY,KAAG,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,MAAM,aAAa,GAAG,IAAA,0BAAgB,EAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,CACL,2DACE,wBAAC,eAAM,IACL,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,EACpD,OAAO,EAAC,sCAAsC,EAC9C,SAAS,EAAC,wCAAwC,EAClD,YAAY,EAAC,yCAAyC,aAErD,YAAY,CAAC,OAAO,CAAC,EACrB,aAAa,EACd,uBAAC,iBAAQ,KAAG,IACL,GACR,CACJ,CAAC;AACJ,CAAC,CAAC;AAEO,wDAAsB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { ButtonThemeOverrides } from '../../styles/token';
|
|
3
|
+
import { AppMetadata } from '../../types';
|
|
4
|
+
type PushUniversalAccountButtonProps = {
|
|
5
|
+
uid?: string;
|
|
6
|
+
connectButtonText?: string;
|
|
7
|
+
loadingComponent?: React.ReactNode;
|
|
8
|
+
modalAppOverride?: AppMetadata;
|
|
9
|
+
loginAppOverride?: AppMetadata;
|
|
10
|
+
themeOverrides?: ButtonThemeOverrides;
|
|
11
|
+
};
|
|
12
|
+
declare const PushUniversalAccountButton: FC<PushUniversalAccountButtonProps>;
|
|
13
|
+
export { PushUniversalAccountButton };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PushUniversalAccountButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const usePushWallet_1 = require("../../hooks/usePushWallet");
|
|
8
|
+
const ConnectWalletButton_1 = require("./ConnectWalletButton");
|
|
9
|
+
const TogglePushWalletButton_1 = require("./TogglePushWalletButton");
|
|
10
|
+
const styled_components_1 = require("styled-components");
|
|
11
|
+
const token_1 = require("../../styles/token");
|
|
12
|
+
const theme_1 = require("../../utils/theme");
|
|
13
|
+
const PushUniversalAccountButton = ({ uid = 'default', connectButtonText = 'Connect Push Wallet', loadingComponent, modalAppOverride, loginAppOverride, themeOverrides: ButtonThemeOverrides, }) => {
|
|
14
|
+
const { universalAddress, themeOverrides, themeMode, updateModalAppData, updateWalletAppData, } = (0, usePushWallet_1.usePushWalletContext)(uid);
|
|
15
|
+
const GlobalStyle = (0, styled_components_1.createGlobalStyle) `
|
|
16
|
+
:root{
|
|
17
|
+
${(props) => {
|
|
18
|
+
const { themeOverrides, themeMode } = props.theme;
|
|
19
|
+
const isLightMode = themeMode === 'light';
|
|
20
|
+
const { dark, light } = themeOverrides, globalOverrides = tslib_1.__rest(themeOverrides, ["dark", "light"]);
|
|
21
|
+
const newTokens = Object.assign(Object.assign(Object.assign({}, token_1.buttonThemeDefault), (0, theme_1.mapButtonCoreToInt)(globalOverrides)), (0, theme_1.mapButtonCoreToInt)(isLightMode ? light : dark));
|
|
22
|
+
return Object.entries(newTokens)
|
|
23
|
+
.map(([key, value]) => `${key}: ${value};`)
|
|
24
|
+
.join('\n');
|
|
25
|
+
}}
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
(0, react_1.useEffect)(() => {
|
|
29
|
+
if (modalAppOverride)
|
|
30
|
+
updateModalAppData(modalAppOverride);
|
|
31
|
+
if (loginAppOverride)
|
|
32
|
+
updateWalletAppData(loginAppOverride);
|
|
33
|
+
}, []);
|
|
34
|
+
const Component = () => {
|
|
35
|
+
if (universalAddress) {
|
|
36
|
+
// Merge props with buttonDefaults, giving priority to direct props
|
|
37
|
+
const toggleButtonProps = {
|
|
38
|
+
uid: uid,
|
|
39
|
+
universalAddress: universalAddress,
|
|
40
|
+
};
|
|
41
|
+
return (0, jsx_runtime_1.jsx)(TogglePushWalletButton_1.TogglePushWalletButton, Object.assign({}, toggleButtonProps));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// Merge props with buttonDefaults, giving priority to direct props
|
|
45
|
+
const connectButtonProps = {
|
|
46
|
+
uid: uid,
|
|
47
|
+
connectButtonText,
|
|
48
|
+
loadingComponent,
|
|
49
|
+
};
|
|
50
|
+
return (0, jsx_runtime_1.jsx)(ConnectWalletButton_1.ConnectWalletButton, Object.assign({}, connectButtonProps));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)(styled_components_1.ThemeProvider, { theme: {
|
|
54
|
+
themeMode,
|
|
55
|
+
themeOverrides: Object.assign(Object.assign({}, themeOverrides), ButtonThemeOverrides),
|
|
56
|
+
}, children: [(0, jsx_runtime_1.jsx)(GlobalStyle, {}), (0, jsx_runtime_1.jsx)(Component, {})] }));
|
|
57
|
+
};
|
|
58
|
+
exports.PushUniversalAccountButton = PushUniversalAccountButton;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/PushUniversalAccountButton/index.tsx"],"names":[],"mappings":";;;;;AAAA,iCAAsD;AACtD,6DAAiE;AACjE,+DAA4D;AAC5D,qEAAkE;AAClE,yDAAqE;AAErE,8CAAwD;AACxD,6CAAuD;AAYvD,MAAM,0BAA0B,GAAwC,CAAC,EACvE,GAAG,GAAG,SAAS,EACf,iBAAiB,GAAG,qBAAqB,EACzC,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EAAE,oBAAoB,GACrC,EAAE,EAAE;IACH,MAAM,EACJ,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,mBAAmB,GACpB,GAAG,IAAA,oCAAoB,EAAC,GAAG,CAAC,CAAC;IAE9B,MAAM,WAAW,GAAG,IAAA,qCAAiB,EAAA;;QAE/B,CAAC,KAAK,EAAE,EAAE;QACV,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;QAClD,MAAM,WAAW,GAAG,SAAS,KAAK,OAAO,CAAC;QAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,KAAyB,cAAc,EAAlC,eAAe,kBAAK,cAAc,EAApD,iBAAmC,CAAiB,CAAC;QAC3D,MAAM,SAAS,iDACV,0BAAkB,GAClB,IAAA,0BAAkB,EAAC,eAAe,CAAC,GACnC,IAAA,0BAAkB,EAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAClD,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aAC7B,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC;aAC1C,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;;GAEJ,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,gBAAgB;YAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;QAC3D,IAAI,gBAAgB;YAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC9D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,IAAI,gBAAgB,EAAE,CAAC;YACrB,mEAAmE;YACnE,MAAM,iBAAiB,GAAG;gBACxB,GAAG,EAAE,GAAG;gBACR,gBAAgB,EAAE,gBAAgB;aACnC,CAAC;YAEF,OAAO,uBAAC,+CAAsB,oBAAK,iBAAiB,EAAI,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,mEAAmE;YACnE,MAAM,kBAAkB,GAAG;gBACzB,GAAG,EAAE,GAAG;gBACR,iBAAiB;gBACjB,gBAAgB;aACjB,CAAC;YAEF,OAAO,uBAAC,yCAAmB,oBAAK,kBAAkB,EAAI,CAAC;QACzD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,wBAAC,iCAAa,IACZ,KAAK,EAAE;YACL,SAAS;YACT,cAAc,kCAAO,cAAc,GAAK,oBAAoB,CAAE;SAC/D,aAED,uBAAC,WAAW,KAAG,EACf,uBAAC,SAAS,KAAG,IACC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEO,gEAA0B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PushWalletToast = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
+
const common_1 = require("../../components/common");
|
|
8
|
+
const PushWalletToast = () => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(ToastContainer, { children: [(0, jsx_runtime_1.jsx)(common_1.Spinner, {}), (0, jsx_runtime_1.jsx)(TitleText, { children: "Sending Transaction" })] }));
|
|
10
|
+
};
|
|
11
|
+
exports.PushWalletToast = PushWalletToast;
|
|
12
|
+
const ToastContainer = styled_components_1.default.div `
|
|
13
|
+
position: fixed;
|
|
14
|
+
bottom: 40px;
|
|
15
|
+
right: 30px;
|
|
16
|
+
display:flex;
|
|
17
|
+
flex-direction:row;
|
|
18
|
+
gap:12px;
|
|
19
|
+
align-items:center;
|
|
20
|
+
border:1px solid whitesmoke;
|
|
21
|
+
padding:10px 20px;
|
|
22
|
+
border-radius:10px;
|
|
23
|
+
background-color:#fff;
|
|
24
|
+
`;
|
|
25
|
+
const TitleText = styled_components_1.default.h4 `
|
|
26
|
+
font-size:18px;
|
|
27
|
+
font-weight:400;
|
|
28
|
+
margin:0;
|
|
29
|
+
`;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/PushWalletToast/index.tsx"],"names":[],"mappings":";;;;;AACA,kFAAuC;AACvC,oDAAkD;AAElD,MAAM,eAAe,GAAG,GAAG,EAAE;IACzB,OAAO,CACH,wBAAC,cAAc,eACX,uBAAC,gBAAO,KAAG,EACX,uBAAC,SAAS,sCAAgC,IAC7B,CACpB,CAAC;AACN,CAAC,CAAC;AAEO,0CAAe;AAExB,MAAM,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAYhC,CAAA;AAED,MAAM,SAAS,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;CAI1B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type TransformedHTMLAttributes<T> = Omit<HTMLAttributes<T>, 'style' | 'color'>;
|
|
3
|
+
export type ButtonProps = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
bgColor?: React.CSSProperties['backgroundColor'];
|
|
6
|
+
textColor?: React.CSSProperties['color'];
|
|
7
|
+
borderRadius?: React.CSSProperties['borderRadius'];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
} & TransformedHTMLAttributes<HTMLButtonElement>;
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<{
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
bgColor?: React.CSSProperties["backgroundColor"];
|
|
13
|
+
textColor?: React.CSSProperties["color"];
|
|
14
|
+
borderRadius?: React.CSSProperties["borderRadius"];
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
} & TransformedHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export { Button };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Button = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
+
const StyledButton = styled_components_1.default.button `
|
|
9
|
+
/* Common Button CSS */
|
|
10
|
+
|
|
11
|
+
align-items: center;
|
|
12
|
+
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
|
13
|
+
background: ${(props) => (props.bgColor ? props.bgColor : '#d548ec')};
|
|
14
|
+
color: ${(props) => props.textColor ? props.textColor : 'rgba(255, 255, 255, 1)'};
|
|
15
|
+
display: flex;
|
|
16
|
+
font-family: FK Grotesk Neu;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
line-height: 16px;
|
|
24
|
+
padding: 16px 24px;
|
|
25
|
+
min-width: 100px;
|
|
26
|
+
width: inherit;
|
|
27
|
+
gap: 4px;
|
|
28
|
+
border: none;
|
|
29
|
+
border-radius: ${(props) => props.borderRadius ? props.borderRadius : '12px'};
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
`;
|
|
32
|
+
const Button = (0, react_1.forwardRef)((_a, ref) => {
|
|
33
|
+
var { disabled, bgColor, textColor, borderRadius, children } = _a, props = tslib_1.__rest(_a, ["disabled", "bgColor", "textColor", "borderRadius", "children"]);
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(StyledButton, Object.assign({}, (disabled ? { 'aria-disabled': true } : {}), { disabled: disabled, role: "button", ref: ref, bgColor: bgColor, textColor: textColor, borderRadius: borderRadius }, props, { children: children })));
|
|
35
|
+
});
|
|
36
|
+
exports.Button = Button;
|
|
37
|
+
Button.displayName = 'Button';
|
|
38
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/common/Button.tsx"],"names":[],"mappings":";;;;;AAAA,iCAAqE;AACrE,kFAAuC;AAoBvC,MAAM,YAAY,GAAG,2BAAM,CAAC,MAAM,CAAa;;;;YAInC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;gBACnD,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;WAC3D,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,wBAAwB;;;;;;;;;;;;;;;mBAe7C,CAAC,KAAK,EAAE,EAAE,CACzB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM;;CAEnD,CAAC;AAEF,MAAM,MAAM,GAAG,IAAA,kBAAU,EACvB,CAAC,EAAkE,EAAE,GAAG,EAAE,EAAE;QAA3E,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAAhE,gEAAkE,CAAF;IAAY,OAAA,CAC3E,uBAAC,YAAY,oBACP,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAC/C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,IACtB,KAAK,cAER,QAAQ,IACI,CAChB,CAAA;CAAA,CACF,CAAC;AAIO,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
+
const icons_1 = require("./icons");
|
|
7
|
+
// Keyframes for the spinning animation
|
|
8
|
+
const spin = (0, styled_components_1.keyframes) `
|
|
9
|
+
from {
|
|
10
|
+
transform: rotate(0deg);
|
|
11
|
+
}
|
|
12
|
+
to {
|
|
13
|
+
transform: rotate(360deg);
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
// Styled container for the Spinner
|
|
17
|
+
const Container = styled_components_1.default.div `
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
animation: ${spin} 1s linear infinite;
|
|
22
|
+
width: 20px;
|
|
23
|
+
height: 20px;
|
|
24
|
+
color: #d548ec;
|
|
25
|
+
`;
|
|
26
|
+
// Spinner functional component
|
|
27
|
+
const Spinner = () => {
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(Container, { children: (0, jsx_runtime_1.jsx)(icons_1.Ellipse, {}) }));
|
|
29
|
+
};
|
|
30
|
+
exports.default = Spinner;
|
|
31
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../../../../packages/ui-kit/src/lib/components/common/Spinner.tsx"],"names":[],"mappings":";;;;AACA,+EAAsD;AACtD,mCAAkC;AAElC,uCAAuC;AACvC,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;;;;;;CAOrB,CAAC;AAEF,mCAAmC;AACnC,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;eAIb,IAAI;;;;CAIlB,CAAC;AAEF,+BAA+B;AAC/B,MAAM,OAAO,GAAG,GAAG,EAAE;IACjB,OAAO,CACH,uBAAC,SAAS,cACN,uBAAC,eAAO,KAAG,GACH,CACf,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const ArbitrumMonotone = () => {
|
|
5
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: "24px", height: "24px", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("g", { "clip-path": "url(#clip0_8547_11033)", children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 8C0 3.58172 3.58172 0 8 0H12C16.4183 0 20 3.58172 20 8V12C20 16.4183 16.4183 20 12 20H8C3.58172 20 0 16.4183 0 12V8Z", fill: "#EAEBF2" }), (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.02206 6.4834L9.44362 3.92956C9.61165 3.83254 9.80225 3.78223 9.99629 3.78223C10.1903 3.78223 10.381 3.8333 10.549 3.93032L14.9757 6.48939C15.1435 6.58639 15.2828 6.7258 15.3797 6.89359C15.4766 7.06144 15.5277 7.25176 15.5278 7.44557L15.5306 12.5588C15.5307 12.753 15.4796 12.9437 15.3826 13.1118C15.2856 13.2799 15.146 13.4195 14.9779 13.5165L10.5564 16.0696C10.3883 16.1666 10.1977 16.2177 10.0036 16.2177C9.80959 16.2177 9.61899 16.1666 9.45096 16.0696L5.02425 13.5106C4.85647 13.4136 4.71714 13.2742 4.62023 13.1064C4.52333 12.9385 4.47225 12.7482 4.47213 12.5544L4.46936 7.44107C4.46929 7.24698 4.52033 7.05628 4.61735 6.88816C4.71437 6.72004 4.85396 6.58044 5.02206 6.4834ZM7.99995 14.168C7.97838 14.194 7.96364 14.2249 7.95686 14.2579C7.9817 14.2923 8.01585 14.3188 8.05526 14.3345C8.62735 14.6613 9.19839 14.9896 9.76841 15.3193C9.8304 15.3593 9.90262 15.3806 9.97641 15.3806C10.0502 15.3806 10.1224 15.3593 10.1844 15.3193C10.5714 15.095 10.9582 14.8704 11.3448 14.6454C11.4687 14.5854 11.586 14.5125 11.6946 14.428C11.7122 14.386 11.691 14.3537 11.6706 14.3225C11.6678 14.3182 11.665 14.3138 11.6623 14.3095C11.5758 14.1708 11.4876 14.0332 11.3995 13.8956C11.372 13.8528 11.3446 13.81 11.3172 13.7671C11.1769 13.5475 11.0371 13.3275 10.8974 13.1075C10.625 12.6788 10.3527 12.2501 10.0762 11.824C10.0581 11.8012 10.0477 11.7733 10.0463 11.7442C10.0449 11.7151 10.0527 11.6863 10.0686 11.6619C10.2379 11.3781 10.4057 11.0934 10.5735 10.8087C10.7135 10.5711 10.8536 10.3335 10.9945 10.0964C11.0375 10.0245 11.0447 10.025 11.0904 10.0964C11.309 10.4385 11.5264 10.7816 11.7438 11.1245C11.8805 11.3403 12.0171 11.5559 12.1541 11.7713C12.2684 11.9513 12.3826 12.1315 12.4967 12.3116C12.7266 12.6746 12.9566 13.0376 13.1885 13.3994C13.193 13.4063 13.1972 13.4135 13.2015 13.4208C13.2219 13.4554 13.2428 13.4908 13.2877 13.502C13.3883 13.4667 13.4833 13.4172 13.5697 13.3548C13.5806 13.349 13.5921 13.3438 13.6035 13.3385C13.6473 13.3184 13.6919 13.2979 13.716 13.2501C13.7151 13.2069 13.6993 13.1653 13.6711 13.1325C13.5194 12.8879 13.3679 12.6431 13.2166 12.398L12.0956 10.5847C11.877 10.2301 11.6579 9.87582 11.4385 9.52172C11.4192 9.5001 11.4072 9.47287 11.4043 9.44402C11.4013 9.41512 11.4076 9.38608 11.4222 9.36101C11.6884 8.90994 11.9547 8.45892 12.2212 8.00804C12.2624 7.93799 12.2699 7.93895 12.3111 8.00417C12.4266 8.18709 12.544 8.36903 12.6613 8.55095C12.7232 8.64707 12.7852 8.74318 12.8469 8.83943C13.3781 9.66321 13.9076 10.4881 14.4352 11.314C14.4513 11.3392 14.4672 11.3644 14.4831 11.3897C14.5326 11.4681 14.582 11.5466 14.6357 11.622C14.6383 11.6258 14.641 11.6302 14.6438 11.6348C14.6589 11.6599 14.6773 11.6905 14.7172 11.6519C14.7271 11.6197 14.7308 11.5858 14.728 11.5521C14.7291 10.1853 14.7291 8.81832 14.728 7.45139C14.7324 7.37267 14.7141 7.29432 14.6754 7.22564C14.6366 7.15693 14.5791 7.10079 14.5094 7.06378C14.4862 7.0508 14.4634 7.03721 14.4405 7.02361C14.4212 7.01215 14.402 7.00069 14.3825 6.98958C13.787 6.6482 13.1918 6.30627 12.5969 5.9637C12.3723 5.83444 12.1475 5.70551 11.9226 5.57658C11.3579 5.2527 10.793 4.92878 10.2318 4.5994C10.1515 4.54554 10.057 4.51678 9.96032 4.51678C9.86367 4.51678 9.76919 4.54554 9.68891 4.5994C9.36314 4.79296 9.03477 4.98212 8.70638 5.17129C8.6046 5.22992 8.50281 5.28855 8.40111 5.34731C8.07769 5.53416 7.75463 5.72166 7.43158 5.90915C6.7925 6.28006 6.15342 6.65097 5.51155 7.01686C5.41343 7.06304 5.33134 7.13762 5.27603 7.2309C5.22071 7.32423 5.19469 7.43198 5.20129 7.54024C5.2074 8.47384 5.20657 9.40749 5.20574 10.3411C5.20546 10.6641 5.20517 10.9871 5.20517 11.31C5.2032 11.3468 5.20407 11.3836 5.2078 11.4202C5.20848 11.4245 5.20885 11.4291 5.20923 11.4338C5.21098 11.4557 5.21288 11.4793 5.24762 11.4793C5.25164 11.4733 5.25571 11.4673 5.25978 11.4613C5.26775 11.4496 5.27571 11.4379 5.28335 11.426C6.01958 10.2898 6.75299 9.15195 7.48367 8.01228C7.62991 7.77986 7.84878 7.60214 8.10632 7.50678C8.38908 7.40382 8.68888 7.35552 8.9897 7.36442C9.14399 7.36578 9.29843 7.37097 9.45289 7.37616C9.51279 7.37817 9.57269 7.38019 9.63259 7.38198C9.63497 7.38207 9.63748 7.38194 9.64005 7.38181C9.65211 7.38119 9.66538 7.38051 9.67245 7.40202L5.67341 13.8158C5.71601 13.8403 5.75801 13.8644 5.79955 13.8882C5.90249 13.9471 6.00261 14.0044 6.10194 14.0631C6.1342 14.0818 6.15227 14.077 6.16812 14.0463C6.17336 14.0364 6.17927 14.0267 6.18519 14.0171C6.1873 14.0137 6.18941 14.0103 6.19149 14.0068C7.09012 12.5246 7.98866 11.0423 8.88711 9.55993C9.31121 8.86072 9.73481 8.16128 10.1579 7.46171C10.1666 7.43936 10.1819 7.42023 10.2019 7.40686C10.2218 7.3935 10.2453 7.38658 10.2693 7.387C10.6803 7.38751 11.0912 7.38571 11.5019 7.38392C11.652 7.38327 11.8021 7.38261 11.9521 7.38207C11.9537 7.38207 11.9554 7.38198 11.957 7.3819C11.967 7.38138 11.9781 7.3808 11.9879 7.39806C11.9831 7.40662 11.9782 7.41557 11.9732 7.42476C11.9619 7.44531 11.9499 7.46707 11.9373 7.48844C10.6246 9.71488 9.31218 11.9414 7.99995 14.168Z", fill: "#202124" })] }), (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_8547_11033", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 8C0 3.58172 3.58172 0 8 0H12C16.4183 0 20 3.58172 20 8V12C20 16.4183 16.4183 20 12 20H8C3.58172 20 0 16.4183 0 12V8Z", fill: "white" }) }) })] }));
|
|
6
|
+
};
|
|
7
|
+
exports.default = ArbitrumMonotone;
|
|
8
|
+
//# sourceMappingURL=ArbitrumMonotone.js.map
|