@trustwallet/connect-react 0.0.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/LICENSE.md +76 -0
- package/README.md +567 -0
- package/cli.js +144 -0
- package/dist/global-NUJAOJRO.css +132 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +705 -0
- package/dist/styles.module-27BC6Q35.module.css +7 -0
- package/dist/styles.module-2IXPYHX5.module.css +33 -0
- package/dist/styles.module-4I5UVTXZ.module.css +34 -0
- package/dist/styles.module-4QHLSLTJ.module.css +9 -0
- package/dist/styles.module-5C4YIUDE.module.css +26 -0
- package/dist/styles.module-5FM5SDSC.module.css +8 -0
- package/dist/styles.module-5L4UXGVZ.module.css +62 -0
- package/dist/styles.module-5S7A3MI3.module.css +6 -0
- package/dist/styles.module-5TDOAM3X.module.css +5 -0
- package/dist/styles.module-BH6BB6HX.module.css +23 -0
- package/dist/styles.module-FMH4FUT5.module.css +35 -0
- package/dist/styles.module-GCRMKZIZ.module.css +9 -0
- package/dist/styles.module-GSNHG7ET.module.css +92 -0
- package/dist/styles.module-HR3VQZUH.module.css +44 -0
- package/dist/styles.module-IZSJLNB4.module.css +9 -0
- package/dist/styles.module-JFMC6A5G.module.css +6 -0
- package/dist/styles.module-KIOD6JAJ.module.css +5 -0
- package/dist/styles.module-NDDQJHO2.module.css +21 -0
- package/dist/styles.module-PXUDS327.module.css +7 -0
- package/dist/styles.module-RKS6GYHN.module.css +6 -0
- package/dist/styles.module-U5TRY5PT.module.css +123 -0
- package/dist/styles.module-U6N4VKTA.module.css +72 -0
- package/dist/styles.module-VWMJAIVE.module.css +20 -0
- package/dist/styles.module-WGWNXHEK.module.css +5 -0
- package/dist/styles.module-Y3MUWEOL.module.css +5 -0
- package/dist/styles.module-YJSZIZTZ.module.css +32 -0
- package/dist/styles.module-ZISFY5AO.module.css +15 -0
- package/dist/styles.module-ZPYBUUD6.module.css +8 -0
- package/package.json +53 -0
- package/src/context/index.tsx +25 -0
- package/src/index.ts +9 -0
- package/src/styles/global.css +132 -0
- package/src/types/css-modules.d.ts +4 -0
- package/src/ui/TrustModal.tsx +31 -0
- package/src/ui/buttons/GetTrustButton/components/GetTrustMessage/index.tsx +10 -0
- package/src/ui/buttons/GetTrustButton/components/GetTrustMessage/styles.module.css +7 -0
- package/src/ui/buttons/GetTrustButton/components/GetTrustWrapper/index.tsx +10 -0
- package/src/ui/buttons/GetTrustButton/components/GetTrustWrapper/styles.module.css +5 -0
- package/src/ui/buttons/GetTrustButton/index.tsx +21 -0
- package/src/ui/buttons/NamespaceButton/index.tsx +62 -0
- package/src/ui/buttons/NamespaceButton/styles.module.css +72 -0
- package/src/ui/buttons/WalletButton/index.tsx +76 -0
- package/src/ui/buttons/WalletButton/styles.module.css +123 -0
- package/src/ui/buttons/WalletConnectButton/components/WCGrid/index.tsx +10 -0
- package/src/ui/buttons/WalletConnectButton/components/WCGrid/styles.module.css +5 -0
- package/src/ui/buttons/WalletConnectButton/components/WCTitle/index.tsx +5 -0
- package/src/ui/buttons/WalletConnectButton/components/WCTitle/styles.module.css +8 -0
- package/src/ui/buttons/WalletConnectButton/index.tsx +16 -0
- package/src/ui/components/Footer/components/FooterDescription/index.tsx +10 -0
- package/src/ui/components/Footer/components/FooterDescription/styles.module.css +6 -0
- package/src/ui/components/Footer/components/FooterLink/index.tsx +15 -0
- package/src/ui/components/Footer/components/FooterLink/styles.module.css +20 -0
- package/src/ui/components/Footer/components/FooterWrapper/index.tsx +10 -0
- package/src/ui/components/Footer/components/FooterWrapper/styles.module.css +21 -0
- package/src/ui/components/Footer/index.tsx +16 -0
- package/src/ui/icons/BackIcon.tsx +14 -0
- package/src/ui/icons/CheckIcon.tsx +17 -0
- package/src/ui/icons/ClearIcon.tsx +13 -0
- package/src/ui/icons/CloseIcon.tsx +14 -0
- package/src/ui/icons/CopyIcon.tsx +16 -0
- package/src/ui/icons/SearchIcon.tsx +20 -0
- package/src/ui/icons/Spinner.tsx +7 -0
- package/src/ui/inputs/SearchBar/index.tsx +44 -0
- package/src/ui/inputs/SearchBar/styles.module.css +62 -0
- package/src/ui/layout/ModalBody/index.tsx +15 -0
- package/src/ui/layout/ModalBody/styles.module.css +15 -0
- package/src/ui/layout/ModalError/index.tsx +9 -0
- package/src/ui/layout/ModalError/styles.module.css +9 -0
- package/src/ui/layout/ModalHeader/index.tsx +26 -0
- package/src/ui/layout/ModalHeader/styles.module.css +92 -0
- package/src/ui/layout/ModalOverlay/index.tsx +15 -0
- package/src/ui/layout/ModalOverlay/styles.module.css +33 -0
- package/src/ui/layout/ModalWrapper/index.tsx +23 -0
- package/src/ui/layout/ModalWrapper/styles.module.css +26 -0
- package/src/ui/views/MobileWalletsView/components/MobileEmptyState/index.tsx +13 -0
- package/src/ui/views/MobileWalletsView/components/MobileEmptyState/styles.module.css +9 -0
- package/src/ui/views/MobileWalletsView/components/MobileLoading/index.tsx +5 -0
- package/src/ui/views/MobileWalletsView/components/MobileLoading/styles.module.css +9 -0
- package/src/ui/views/MobileWalletsView/components/MobileSearch/index.tsx +36 -0
- package/src/ui/views/MobileWalletsView/components/MobileSearch/styles.module.css +44 -0
- package/src/ui/views/MobileWalletsView/components/MobileWalletsList/index.tsx +46 -0
- package/src/ui/views/MobileWalletsView/components/MobileWalletsList/styles.module.css +35 -0
- package/src/ui/views/MobileWalletsView/components/MobileWrapper/index.tsx +10 -0
- package/src/ui/views/MobileWalletsView/components/MobileWrapper/styles.module.css +6 -0
- package/src/ui/views/MobileWalletsView/index.tsx +22 -0
- package/src/ui/views/NamespaceView/components/NamespaceGrid/index.tsx +10 -0
- package/src/ui/views/NamespaceView/components/NamespaceGrid/styles.module.css +5 -0
- package/src/ui/views/NamespaceView/components/NamespaceHeader/index.tsx +20 -0
- package/src/ui/views/NamespaceView/components/NamespaceHeader/styles.module.css +34 -0
- package/src/ui/views/NamespaceView/index.tsx +16 -0
- package/src/ui/views/QRView/components/QRActions/index.tsx +11 -0
- package/src/ui/views/QRView/components/QRActions/styles.module.css +8 -0
- package/src/ui/views/QRView/components/QRButton/index.tsx +15 -0
- package/src/ui/views/QRView/components/QRButton/styles.module.css +32 -0
- package/src/ui/views/QRView/components/QRError/index.tsx +9 -0
- package/src/ui/views/QRView/components/QRError/styles.module.css +5 -0
- package/src/ui/views/QRView/components/QRPlaceholder/index.tsx +10 -0
- package/src/ui/views/QRView/components/QRPlaceholder/styles.module.css +7 -0
- package/src/ui/views/QRView/components/QRWrapper/index.tsx +14 -0
- package/src/ui/views/QRView/components/QRWrapper/styles.module.css +23 -0
- package/src/ui/views/QRView/index.tsx +24 -0
- package/src/ui/views/WalletsView/components/WalletsGrid/index.tsx +10 -0
- package/src/ui/views/WalletsView/components/WalletsGrid/styles.module.css +5 -0
- package/src/ui/views/WalletsView/components/WalletsHeader/index.tsx +9 -0
- package/src/ui/views/WalletsView/components/WalletsHeader/styles.module.css +6 -0
- package/src/ui/views/WalletsView/index.tsx +20 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
useTrustModal,
|
|
4
|
+
useTheme,
|
|
5
|
+
useConnection,
|
|
6
|
+
useConnections,
|
|
7
|
+
useConnect
|
|
8
|
+
} from "@trustwallet/connect-ui-logic";
|
|
9
|
+
|
|
10
|
+
// src/context/index.tsx
|
|
11
|
+
import {
|
|
12
|
+
TrustModalProvider,
|
|
13
|
+
TrustConnectProvider as _TrustConnectProvider
|
|
14
|
+
} from "@trustwallet/connect-ui-logic";
|
|
15
|
+
|
|
16
|
+
// src/ui/TrustModal.tsx
|
|
17
|
+
import "./global-NUJAOJRO.css";
|
|
18
|
+
import { TrustModalLogic } from "@trustwallet/connect-ui-logic";
|
|
19
|
+
|
|
20
|
+
// src/ui/views/MobileWalletsView/index.tsx
|
|
21
|
+
import { MobileWalletsViewLogic } from "@trustwallet/connect-ui-logic/walletConnect";
|
|
22
|
+
|
|
23
|
+
// src/ui/views/MobileWalletsView/components/MobileEmptyState/index.tsx
|
|
24
|
+
import styles from "./styles.module-IZSJLNB4.module.css";
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
function MobileEmptyState({ searchQuery }) {
|
|
27
|
+
if (searchQuery) {
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.empty, children: [
|
|
29
|
+
'No wallets found for "',
|
|
30
|
+
searchQuery,
|
|
31
|
+
'"'
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx("div", { className: styles.empty, children: "No wallets available" });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/ui/views/MobileWalletsView/components/MobileLoading/index.tsx
|
|
38
|
+
import styles2 from "./styles.module-GCRMKZIZ.module.css";
|
|
39
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
40
|
+
function MobileLoading() {
|
|
41
|
+
return /* @__PURE__ */ jsx2("div", { className: styles2.loading, children: "Loading wallets..." });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/ui/views/MobileWalletsView/components/MobileSearch/index.tsx
|
|
45
|
+
import { useCopyToClipboard } from "@trustwallet/connect-ui-logic";
|
|
46
|
+
|
|
47
|
+
// src/ui/inputs/SearchBar/index.tsx
|
|
48
|
+
import { useState } from "react";
|
|
49
|
+
import styles3 from "./styles.module-5L4UXGVZ.module.css";
|
|
50
|
+
|
|
51
|
+
// src/ui/icons/SearchIcon.tsx
|
|
52
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
53
|
+
function SearchIcon() {
|
|
54
|
+
return /* @__PURE__ */ jsxs2("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
55
|
+
/* @__PURE__ */ jsx3(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
d: "M7.33333 12.6667C10.2789 12.6667 12.6667 10.2789 12.6667 7.33333C12.6667 4.38781 10.2789 2 7.33333 2C4.38781 2 2 4.38781 2 7.33333C2 10.2789 4.38781 12.6667 7.33333 12.6667Z",
|
|
59
|
+
stroke: "currentColor",
|
|
60
|
+
strokeWidth: "1.5",
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
strokeLinejoin: "round"
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx3(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
d: "M14 14L11.1 11.1",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
strokeWidth: "1.5",
|
|
71
|
+
strokeLinecap: "round",
|
|
72
|
+
strokeLinejoin: "round"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// src/ui/icons/CloseIcon.tsx
|
|
79
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
80
|
+
function CloseIcon() {
|
|
81
|
+
return /* @__PURE__ */ jsx4(
|
|
82
|
+
"svg",
|
|
83
|
+
{
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
fill: "none",
|
|
87
|
+
width: "16",
|
|
88
|
+
height: "16",
|
|
89
|
+
stroke: "currentColor",
|
|
90
|
+
children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 6l12 12M6 18L18 6" })
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// src/ui/inputs/SearchBar/index.tsx
|
|
96
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
97
|
+
function SearchBar({ value, onChange, placeholder = "Search..." }) {
|
|
98
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
99
|
+
const handleChange = (e) => {
|
|
100
|
+
onChange(e.target.value);
|
|
101
|
+
};
|
|
102
|
+
const handleClear = () => {
|
|
103
|
+
onChange("");
|
|
104
|
+
};
|
|
105
|
+
return /* @__PURE__ */ jsxs3("div", { className: `${styles3.searchBar} ${isFocused ? styles3.focused : ""}`, children: [
|
|
106
|
+
/* @__PURE__ */ jsx5("div", { className: styles3.searchIcon, children: /* @__PURE__ */ jsx5(SearchIcon, {}) }),
|
|
107
|
+
/* @__PURE__ */ jsx5(
|
|
108
|
+
"input",
|
|
109
|
+
{
|
|
110
|
+
type: "text",
|
|
111
|
+
value,
|
|
112
|
+
onChange: handleChange,
|
|
113
|
+
onFocus: () => setIsFocused(true),
|
|
114
|
+
onBlur: () => setIsFocused(false),
|
|
115
|
+
placeholder,
|
|
116
|
+
className: styles3.input
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
value && /* @__PURE__ */ jsx5("button", { type: "button", onClick: handleClear, className: styles3.clearButton, "aria-label": "Clear search", children: /* @__PURE__ */ jsx5(CloseIcon, {}) })
|
|
120
|
+
] });
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// src/ui/views/MobileWalletsView/components/MobileSearch/index.tsx
|
|
124
|
+
import styles4 from "./styles.module-HR3VQZUH.module.css";
|
|
125
|
+
|
|
126
|
+
// src/ui/icons/CheckIcon.tsx
|
|
127
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
128
|
+
function CheckIcon() {
|
|
129
|
+
return /* @__PURE__ */ jsx6(
|
|
130
|
+
"svg",
|
|
131
|
+
{
|
|
132
|
+
className: "tcui-check-icon",
|
|
133
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
134
|
+
width: "14",
|
|
135
|
+
height: "14",
|
|
136
|
+
viewBox: "0 0 14 14",
|
|
137
|
+
fill: "none",
|
|
138
|
+
children: /* @__PURE__ */ jsx6(
|
|
139
|
+
"path",
|
|
140
|
+
{
|
|
141
|
+
d: "M6.66667 0C2.98667 0 0 2.98667 0 6.66667C0 10.3467 2.98667 13.3333 6.66667 13.3333C10.3467 13.3333 13.3333 10.3467 13.3333 6.66667C13.3333 2.98667 10.3467 0 6.66667 0ZM9.8 5.05333L6.45333 9.12667C6.34 9.26667 6.16667 9.35333 5.98667 9.36667C5.96667 9.37333 5.95333 9.37333 5.94 9.37333C5.77333 9.37333 5.61333 9.30667 5.48667 9.19333L3.59333 7.44667C3.32667 7.2 3.30667 6.77333 3.56 6.50667C3.80667 6.23333 4.22667 6.22 4.5 6.46667L5.87333 7.73333L8.77333 4.20667C9.00667 3.92 9.42667 3.88 9.70667 4.11333C9.99333 4.34667 10.0333 4.76667 9.8 5.05333Z",
|
|
142
|
+
fill: "currentColor"
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/ui/icons/CopyIcon.tsx
|
|
150
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
151
|
+
function CopyIcon() {
|
|
152
|
+
return /* @__PURE__ */ jsxs4(
|
|
153
|
+
"svg",
|
|
154
|
+
{
|
|
155
|
+
className: "tcui-copy-icon",
|
|
156
|
+
width: "16",
|
|
157
|
+
height: "16",
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
fill: "none",
|
|
160
|
+
stroke: "currentColor",
|
|
161
|
+
strokeWidth: "2",
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ jsx7("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
164
|
+
/* @__PURE__ */ jsx7("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// src/ui/views/MobileWalletsView/components/MobileSearch/index.tsx
|
|
171
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
172
|
+
function MobileSearch({ searchQuery, setSearchQuery, uri }) {
|
|
173
|
+
const { copied, copy } = useCopyToClipboard();
|
|
174
|
+
const handleCopyUri = async () => {
|
|
175
|
+
if (!uri) return;
|
|
176
|
+
await copy(uri);
|
|
177
|
+
};
|
|
178
|
+
return /* @__PURE__ */ jsxs5("div", { className: styles4.searchContainer, children: [
|
|
179
|
+
/* @__PURE__ */ jsx8(SearchBar, { value: searchQuery, onChange: setSearchQuery, placeholder: "Search wallets..." }),
|
|
180
|
+
/* @__PURE__ */ jsx8(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
type: "button",
|
|
184
|
+
onClick: handleCopyUri,
|
|
185
|
+
className: styles4.copyButton,
|
|
186
|
+
"aria-label": "Copy WalletConnect URI",
|
|
187
|
+
disabled: !uri,
|
|
188
|
+
"data-copied": copied,
|
|
189
|
+
children: copied ? /* @__PURE__ */ jsx8(CheckIcon, {}) : /* @__PURE__ */ jsx8(CopyIcon, {})
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
] });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// src/ui/views/MobileWalletsView/components/MobileWalletsList/index.tsx
|
|
196
|
+
import styles6 from "./styles.module-FMH4FUT5.module.css";
|
|
197
|
+
|
|
198
|
+
// src/ui/buttons/WalletButton/index.tsx
|
|
199
|
+
import styles5 from "./styles.module-U5TRY5PT.module.css";
|
|
200
|
+
|
|
201
|
+
// src/ui/icons/Spinner.tsx
|
|
202
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
203
|
+
function Spinner() {
|
|
204
|
+
return /* @__PURE__ */ jsx9("span", { className: "tcui-spinner", "aria-hidden": true });
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// src/ui/buttons/WalletButton/index.tsx
|
|
208
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
209
|
+
function WalletButton({
|
|
210
|
+
name,
|
|
211
|
+
icon,
|
|
212
|
+
variant = "default",
|
|
213
|
+
active = false,
|
|
214
|
+
actionLabel = "Connect",
|
|
215
|
+
onClick,
|
|
216
|
+
disabled,
|
|
217
|
+
loading,
|
|
218
|
+
error,
|
|
219
|
+
supportedNamespaceIcons
|
|
220
|
+
}) {
|
|
221
|
+
const handleClick = () => {
|
|
222
|
+
if (!disabled && !loading) {
|
|
223
|
+
onClick?.();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
return /* @__PURE__ */ jsxs6(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
className: styles5.walletButton,
|
|
230
|
+
"data-variant": variant,
|
|
231
|
+
"data-active": active,
|
|
232
|
+
"data-disabled": disabled,
|
|
233
|
+
"data-loading": loading,
|
|
234
|
+
role: "button",
|
|
235
|
+
tabIndex: 0,
|
|
236
|
+
onClick: handleClick,
|
|
237
|
+
onKeyDown: (event) => {
|
|
238
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
239
|
+
event.preventDefault();
|
|
240
|
+
handleClick();
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ jsx10("span", { className: styles5.icon, "aria-hidden": true, children: /* @__PURE__ */ jsx10("img", { src: icon, alt: name }) }),
|
|
245
|
+
/* @__PURE__ */ jsxs6("span", { className: styles5.meta, children: [
|
|
246
|
+
/* @__PURE__ */ jsxs6("span", { className: styles5.name, children: [
|
|
247
|
+
name,
|
|
248
|
+
active && /* @__PURE__ */ jsx10(CheckIcon, {})
|
|
249
|
+
] }),
|
|
250
|
+
supportedNamespaceIcons && supportedNamespaceIcons.length > 0 && /* @__PURE__ */ jsx10("span", { className: styles5.namespaces, children: supportedNamespaceIcons.map((nsIcon, i) => /* @__PURE__ */ jsx10("img", { src: nsIcon, alt: "" }, i)) }),
|
|
251
|
+
error && /* @__PURE__ */ jsx10("span", { className: styles5.error, children: error })
|
|
252
|
+
] }),
|
|
253
|
+
/* @__PURE__ */ jsx10("span", { className: `tcui-button ${active ? "" : "tcui-button-primary"}`, "data-loading": loading, children: loading ? /* @__PURE__ */ jsx10(Spinner, {}) : actionLabel })
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// src/ui/views/MobileWalletsView/components/MobileWalletsList/index.tsx
|
|
260
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
261
|
+
function MobileWalletsList({
|
|
262
|
+
wallets,
|
|
263
|
+
connectingWalletId,
|
|
264
|
+
connectionError,
|
|
265
|
+
isLoadingMore,
|
|
266
|
+
scrollRef,
|
|
267
|
+
onWalletClick
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ jsxs7("div", { className: styles6.grid, ref: scrollRef, children: [
|
|
270
|
+
wallets.map((wallet) => /* @__PURE__ */ jsx11(
|
|
271
|
+
WalletButton,
|
|
272
|
+
{
|
|
273
|
+
name: wallet.name,
|
|
274
|
+
icon: wallet.iconUrl,
|
|
275
|
+
active: false,
|
|
276
|
+
variant: "default",
|
|
277
|
+
actionLabel: "Connect",
|
|
278
|
+
onClick: () => onWalletClick(wallet),
|
|
279
|
+
loading: connectingWalletId === wallet.id,
|
|
280
|
+
error: connectionError ?? void 0
|
|
281
|
+
},
|
|
282
|
+
wallet.id
|
|
283
|
+
)),
|
|
284
|
+
isLoadingMore && /* @__PURE__ */ jsx11("div", { className: styles6.loadingMore, children: /* @__PURE__ */ jsx11(Spinner, {}) })
|
|
285
|
+
] });
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// src/ui/views/MobileWalletsView/components/MobileWrapper/index.tsx
|
|
289
|
+
import styles7 from "./styles.module-RKS6GYHN.module.css";
|
|
290
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
291
|
+
function MobileWrapper({ children }) {
|
|
292
|
+
return /* @__PURE__ */ jsx12("div", { className: styles7.container, children });
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// src/ui/components/Footer/index.tsx
|
|
296
|
+
import { FooterLogic } from "@trustwallet/connect-ui-logic";
|
|
297
|
+
|
|
298
|
+
// src/ui/components/Footer/components/FooterWrapper/index.tsx
|
|
299
|
+
import styles8 from "./styles.module-NDDQJHO2.module.css";
|
|
300
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
301
|
+
function FooterWrapper({ children }) {
|
|
302
|
+
return /* @__PURE__ */ jsx13("div", { className: styles8.container, children });
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// src/ui/components/Footer/components/FooterDescription/index.tsx
|
|
306
|
+
import styles9 from "./styles.module-JFMC6A5G.module.css";
|
|
307
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
308
|
+
function FooterDescription({ children }) {
|
|
309
|
+
return /* @__PURE__ */ jsx14("div", { className: styles9.description, children });
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// src/ui/components/Footer/components/FooterLink/index.tsx
|
|
313
|
+
import styles10 from "./styles.module-VWMJAIVE.module.css";
|
|
314
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
315
|
+
function FooterLink({ onClick, children }) {
|
|
316
|
+
return /* @__PURE__ */ jsx15("button", { className: styles10.link, onClick, children });
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// src/ui/components/Footer/index.tsx
|
|
320
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
321
|
+
function Footer() {
|
|
322
|
+
return /* @__PURE__ */ jsx16(
|
|
323
|
+
FooterLogic,
|
|
324
|
+
{
|
|
325
|
+
components: {
|
|
326
|
+
wrapper: FooterWrapper,
|
|
327
|
+
description: FooterDescription,
|
|
328
|
+
link: FooterLink
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// src/ui/views/MobileWalletsView/index.tsx
|
|
335
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
336
|
+
function MobileWalletsView() {
|
|
337
|
+
return /* @__PURE__ */ jsx17(
|
|
338
|
+
MobileWalletsViewLogic,
|
|
339
|
+
{
|
|
340
|
+
components: {
|
|
341
|
+
wrapper: MobileWrapper,
|
|
342
|
+
search: MobileSearch,
|
|
343
|
+
loading: MobileLoading,
|
|
344
|
+
emptyState: MobileEmptyState,
|
|
345
|
+
walletsList: MobileWalletsList,
|
|
346
|
+
footer: Footer
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// src/ui/views/WalletsView/index.tsx
|
|
353
|
+
import { WalletsViewLogic } from "@trustwallet/connect-ui-logic";
|
|
354
|
+
|
|
355
|
+
// src/ui/buttons/WalletConnectButton/index.tsx
|
|
356
|
+
import { WalletConnectButtonLogic } from "@trustwallet/connect-ui-logic/walletConnect";
|
|
357
|
+
|
|
358
|
+
// src/ui/buttons/WalletConnectButton/components/WCTitle/index.tsx
|
|
359
|
+
import styles11 from "./styles.module-5FM5SDSC.module.css";
|
|
360
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
361
|
+
function WCTitle() {
|
|
362
|
+
return /* @__PURE__ */ jsx18("p", { className: styles11.wcTitle, children: "Scan QR with your wallet" });
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// src/ui/buttons/WalletConnectButton/components/WCGrid/index.tsx
|
|
366
|
+
import styles12 from "./styles.module-Y3MUWEOL.module.css";
|
|
367
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
368
|
+
function WCGrid({ children }) {
|
|
369
|
+
return /* @__PURE__ */ jsx19("div", { className: styles12.grid, children });
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/ui/buttons/WalletConnectButton/index.tsx
|
|
373
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
374
|
+
function WalletConnectButton() {
|
|
375
|
+
return /* @__PURE__ */ jsx20(
|
|
376
|
+
WalletConnectButtonLogic,
|
|
377
|
+
{
|
|
378
|
+
components: {
|
|
379
|
+
title: WCTitle,
|
|
380
|
+
grid: WCGrid,
|
|
381
|
+
walletButton: WalletButton
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// src/ui/buttons/GetTrustButton/index.tsx
|
|
388
|
+
import { GetTrustButtonLogic } from "@trustwallet/connect-ui-logic";
|
|
389
|
+
|
|
390
|
+
// src/ui/buttons/GetTrustButton/components/GetTrustWrapper/index.tsx
|
|
391
|
+
import styles13 from "./styles.module-WGWNXHEK.module.css";
|
|
392
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
393
|
+
function GetTrustWrapper({ children }) {
|
|
394
|
+
return /* @__PURE__ */ jsx21("div", { className: styles13.container, children });
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// src/ui/buttons/GetTrustButton/components/GetTrustMessage/index.tsx
|
|
398
|
+
import styles14 from "./styles.module-27BC6Q35.module.css";
|
|
399
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
400
|
+
function GetTrustMessage({ children }) {
|
|
401
|
+
return /* @__PURE__ */ jsx22("div", { className: styles14.message, children });
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// src/ui/buttons/GetTrustButton/index.tsx
|
|
405
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
406
|
+
function GetTrustButton({ message }) {
|
|
407
|
+
return /* @__PURE__ */ jsx23(
|
|
408
|
+
GetTrustButtonLogic,
|
|
409
|
+
{
|
|
410
|
+
message,
|
|
411
|
+
components: {
|
|
412
|
+
wrapper: GetTrustWrapper,
|
|
413
|
+
message: GetTrustMessage,
|
|
414
|
+
walletButton: WalletButton
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// src/ui/views/WalletsView/components/WalletsHeader/index.tsx
|
|
421
|
+
import styles15 from "./styles.module-5S7A3MI3.module.css";
|
|
422
|
+
import { jsxs as jsxs8 } from "react/jsx-runtime";
|
|
423
|
+
function WalletsHeader({ namespaceName }) {
|
|
424
|
+
return /* @__PURE__ */ jsxs8("p", { className: styles15.sectionSub, children: [
|
|
425
|
+
"Connect to ",
|
|
426
|
+
namespaceName
|
|
427
|
+
] });
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// src/ui/views/WalletsView/components/WalletsGrid/index.tsx
|
|
431
|
+
import styles16 from "./styles.module-KIOD6JAJ.module.css";
|
|
432
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
433
|
+
function WalletsGrid({ children }) {
|
|
434
|
+
return /* @__PURE__ */ jsx24("div", { className: styles16.grid, children });
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// src/ui/views/WalletsView/index.tsx
|
|
438
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
439
|
+
function WalletsView() {
|
|
440
|
+
return /* @__PURE__ */ jsx25(
|
|
441
|
+
WalletsViewLogic,
|
|
442
|
+
{
|
|
443
|
+
components: {
|
|
444
|
+
emptyState: GetTrustButton,
|
|
445
|
+
header: WalletsHeader,
|
|
446
|
+
grid: WalletsGrid,
|
|
447
|
+
walletButton: WalletButton,
|
|
448
|
+
walletConnectButton: WalletConnectButton
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// src/ui/views/NamespaceView/index.tsx
|
|
455
|
+
import { NamespaceViewLogic } from "@trustwallet/connect-ui-logic";
|
|
456
|
+
|
|
457
|
+
// src/ui/buttons/NamespaceButton/index.tsx
|
|
458
|
+
import styles17 from "./styles.module-U6N4VKTA.module.css";
|
|
459
|
+
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
460
|
+
function NamespaceButton({
|
|
461
|
+
icon,
|
|
462
|
+
label,
|
|
463
|
+
onClick,
|
|
464
|
+
actionLabel,
|
|
465
|
+
loading,
|
|
466
|
+
disabled,
|
|
467
|
+
connectedWallet
|
|
468
|
+
}) {
|
|
469
|
+
const handleClick = () => {
|
|
470
|
+
if (!disabled && !loading) {
|
|
471
|
+
onClick?.();
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
return /* @__PURE__ */ jsxs9(
|
|
475
|
+
"div",
|
|
476
|
+
{
|
|
477
|
+
className: styles17.namespaceButton,
|
|
478
|
+
role: "button",
|
|
479
|
+
tabIndex: 0,
|
|
480
|
+
onClick: handleClick,
|
|
481
|
+
onKeyDown: (event) => {
|
|
482
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
483
|
+
event.preventDefault();
|
|
484
|
+
handleClick();
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"data-disabled": disabled,
|
|
488
|
+
"data-loading": loading,
|
|
489
|
+
children: [
|
|
490
|
+
/* @__PURE__ */ jsx26("img", { width: 28, src: icon }),
|
|
491
|
+
/* @__PURE__ */ jsxs9("span", { className: styles17.meta, children: [
|
|
492
|
+
/* @__PURE__ */ jsx26("span", { className: styles17.name, children: label }),
|
|
493
|
+
connectedWallet && /* @__PURE__ */ jsxs9("span", { className: styles17.connectedWith, children: [
|
|
494
|
+
/* @__PURE__ */ jsx26("img", { src: connectedWallet.icon, alt: "", className: styles17.connectedWalletIcon }),
|
|
495
|
+
connectedWallet.name
|
|
496
|
+
] })
|
|
497
|
+
] }),
|
|
498
|
+
actionLabel && /* @__PURE__ */ jsx26("span", { className: "tcui-button tcui-button-primary", "data-loading": loading, children: loading ? /* @__PURE__ */ jsx26(Spinner, {}) : actionLabel })
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// src/ui/views/NamespaceView/components/NamespaceHeader/index.tsx
|
|
505
|
+
import styles18 from "./styles.module-4I5UVTXZ.module.css";
|
|
506
|
+
import { jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
507
|
+
function NamespaceHeader({ targetWallet }) {
|
|
508
|
+
return /* @__PURE__ */ jsxs10("div", { className: styles18.spacer, children: [
|
|
509
|
+
/* @__PURE__ */ jsx27("h3", { className: styles18.sectionTitle, children: "Namespaces" }),
|
|
510
|
+
targetWallet && /* @__PURE__ */ jsxs10("span", { className: styles18.badge, children: [
|
|
511
|
+
/* @__PURE__ */ jsx27("img", { src: targetWallet.icon, alt: targetWallet.name, className: styles18.badgeIcon }),
|
|
512
|
+
targetWallet.name
|
|
513
|
+
] })
|
|
514
|
+
] });
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// src/ui/views/NamespaceView/components/NamespaceGrid/index.tsx
|
|
518
|
+
import styles19 from "./styles.module-KIOD6JAJ.module.css";
|
|
519
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
520
|
+
function NamespaceGrid({ children }) {
|
|
521
|
+
return /* @__PURE__ */ jsx28("div", { className: styles19.grid, children });
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// src/ui/views/NamespaceView/index.tsx
|
|
525
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
526
|
+
function NamespaceView() {
|
|
527
|
+
return /* @__PURE__ */ jsx29(
|
|
528
|
+
NamespaceViewLogic,
|
|
529
|
+
{
|
|
530
|
+
components: {
|
|
531
|
+
header: NamespaceHeader,
|
|
532
|
+
grid: NamespaceGrid,
|
|
533
|
+
namespaceButton: NamespaceButton
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// src/ui/views/QRView/index.tsx
|
|
540
|
+
import { QRViewLogic } from "@trustwallet/connect-ui-logic/walletConnect";
|
|
541
|
+
|
|
542
|
+
// src/ui/views/QRView/components/QRWrapper/index.tsx
|
|
543
|
+
import styles20 from "./styles.module-BH6BB6HX.module.css";
|
|
544
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
545
|
+
function QRWrapper({ children }) {
|
|
546
|
+
return /* @__PURE__ */ jsx30("div", { className: styles20.qr, role: "region", "aria-label": "WalletConnect QR code", children });
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// src/ui/views/QRView/components/QRPlaceholder/index.tsx
|
|
550
|
+
import styles21 from "./styles.module-PXUDS327.module.css";
|
|
551
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
552
|
+
function QRPlaceholder({ children }) {
|
|
553
|
+
return /* @__PURE__ */ jsx31("div", { className: styles21.placeholder, children });
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// src/ui/views/QRView/components/QRActions/index.tsx
|
|
557
|
+
import styles22 from "./styles.module-ZPYBUUD6.module.css";
|
|
558
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
559
|
+
function QRActions({ children }) {
|
|
560
|
+
return /* @__PURE__ */ jsx32("div", { className: styles22.actions, children });
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// src/ui/views/QRView/components/QRButton/index.tsx
|
|
564
|
+
import styles23 from "./styles.module-YJSZIZTZ.module.css";
|
|
565
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
566
|
+
function QRButton({ onClick, disabled, children }) {
|
|
567
|
+
return /* @__PURE__ */ jsx33("button", { className: styles23.button, type: "button", onClick, disabled, children });
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// src/ui/views/QRView/components/QRError/index.tsx
|
|
571
|
+
import styles24 from "./styles.module-5TDOAM3X.module.css";
|
|
572
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
573
|
+
function QRError({ message }) {
|
|
574
|
+
return /* @__PURE__ */ jsx34("div", { className: styles24.error, children: message });
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// src/ui/views/QRView/index.tsx
|
|
578
|
+
import { Cuer } from "cuer";
|
|
579
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
580
|
+
function QRView() {
|
|
581
|
+
return /* @__PURE__ */ jsx35(
|
|
582
|
+
QRViewLogic,
|
|
583
|
+
{
|
|
584
|
+
components: {
|
|
585
|
+
wrapper: QRWrapper,
|
|
586
|
+
placeholder: QRPlaceholder,
|
|
587
|
+
qrCode: Cuer,
|
|
588
|
+
actions: QRActions,
|
|
589
|
+
button: QRButton,
|
|
590
|
+
error: QRError,
|
|
591
|
+
spinner: Spinner
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// src/ui/layout/ModalOverlay/index.tsx
|
|
598
|
+
import styles25 from "./styles.module-2IXPYHX5.module.css";
|
|
599
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
600
|
+
function ModalOverlay({ onClick, children }) {
|
|
601
|
+
return /* @__PURE__ */ jsx36("div", { className: styles25.overlay, role: "presentation", onClick, children });
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// src/ui/layout/ModalWrapper/index.tsx
|
|
605
|
+
import styles26 from "./styles.module-5C4YIUDE.module.css";
|
|
606
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
607
|
+
function ModalWrapper({ children, onClick, wrapperRef }) {
|
|
608
|
+
return /* @__PURE__ */ jsx37(
|
|
609
|
+
"div",
|
|
610
|
+
{
|
|
611
|
+
ref: wrapperRef,
|
|
612
|
+
className: styles26.modal,
|
|
613
|
+
role: "dialog",
|
|
614
|
+
"aria-modal": "true",
|
|
615
|
+
"aria-label": "TrustConnect modal",
|
|
616
|
+
onClick,
|
|
617
|
+
children
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// src/ui/icons/BackIcon.tsx
|
|
623
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
624
|
+
function BackIcon() {
|
|
625
|
+
return /* @__PURE__ */ jsx38(
|
|
626
|
+
"svg",
|
|
627
|
+
{
|
|
628
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
629
|
+
viewBox: "0 0 24 24",
|
|
630
|
+
fill: "none",
|
|
631
|
+
width: "20",
|
|
632
|
+
height: "20",
|
|
633
|
+
stroke: "currentColor",
|
|
634
|
+
children: /* @__PURE__ */ jsx38("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 18l-6-6 6-6" })
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// src/ui/layout/ModalHeader/index.tsx
|
|
640
|
+
import styles27 from "./styles.module-GSNHG7ET.module.css";
|
|
641
|
+
import { jsx as jsx39, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
642
|
+
function ModalHeader({ title, showBack, onBack, onClose }) {
|
|
643
|
+
return /* @__PURE__ */ jsxs11("header", { className: styles27.header, children: [
|
|
644
|
+
showBack && onBack && /* @__PURE__ */ jsx39("button", { type: "button", className: styles27.back, onClick: onBack, "aria-label": "Go back", children: /* @__PURE__ */ jsx39(BackIcon, {}) }),
|
|
645
|
+
/* @__PURE__ */ jsx39("h2", { className: styles27.title, children: title }),
|
|
646
|
+
/* @__PURE__ */ jsx39("button", { type: "button", className: styles27.close, onClick: onClose, "aria-label": "Close modal", children: /* @__PURE__ */ jsx39(CloseIcon, {}) })
|
|
647
|
+
] });
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// src/ui/layout/ModalBody/index.tsx
|
|
651
|
+
import styles28 from "./styles.module-ZISFY5AO.module.css";
|
|
652
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
653
|
+
function ModalBody({ children, bodyRef }) {
|
|
654
|
+
return /* @__PURE__ */ jsx40("div", { ref: bodyRef, className: styles28.body, children });
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// src/ui/layout/ModalError/index.tsx
|
|
658
|
+
import styles29 from "./styles.module-4QHLSLTJ.module.css";
|
|
659
|
+
import { jsxs as jsxs12 } from "react/jsx-runtime";
|
|
660
|
+
function ModalError({ message }) {
|
|
661
|
+
return /* @__PURE__ */ jsxs12("div", { className: styles29.error, children: [
|
|
662
|
+
"Error: ",
|
|
663
|
+
message
|
|
664
|
+
] });
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// src/ui/TrustModal.tsx
|
|
668
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
669
|
+
function TrustModal() {
|
|
670
|
+
return /* @__PURE__ */ jsx41(
|
|
671
|
+
TrustModalLogic,
|
|
672
|
+
{
|
|
673
|
+
layout: {
|
|
674
|
+
overlay: ModalOverlay,
|
|
675
|
+
wrapper: ModalWrapper,
|
|
676
|
+
header: ModalHeader,
|
|
677
|
+
body: ModalBody,
|
|
678
|
+
error: ModalError
|
|
679
|
+
},
|
|
680
|
+
views: [
|
|
681
|
+
{ title: "Connect a wallet", tag: "wallets", node: WalletsView },
|
|
682
|
+
{ title: "Select a network", tag: "networks", node: NamespaceView },
|
|
683
|
+
{ title: "Scan with mobile wallet", tag: "qr", node: QRView }
|
|
684
|
+
],
|
|
685
|
+
mobileViews: [{ title: "Connect a wallet", tag: "wallets", node: MobileWalletsView }]
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// src/context/index.tsx
|
|
691
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
692
|
+
function TrustConnectProvider({ children, config, theme }) {
|
|
693
|
+
return /* @__PURE__ */ jsx42(_TrustConnectProvider, { config, children: /* @__PURE__ */ jsxs13(TrustModalProvider, { theme, children: [
|
|
694
|
+
children,
|
|
695
|
+
/* @__PURE__ */ jsx42(TrustModal, {})
|
|
696
|
+
] }) });
|
|
697
|
+
}
|
|
698
|
+
export {
|
|
699
|
+
TrustConnectProvider,
|
|
700
|
+
useConnect,
|
|
701
|
+
useConnection,
|
|
702
|
+
useConnections,
|
|
703
|
+
useTheme,
|
|
704
|
+
useTrustModal
|
|
705
|
+
};
|