@directcryptopay/sdk 0.2.3 → 0.3.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.
Files changed (127) hide show
  1. package/README.md +51 -87
  2. package/dist/core/config.d.ts +9 -46
  3. package/dist/core/iframe.d.ts +16 -0
  4. package/dist/dcp-sdk.umd.js +1 -12811
  5. package/dist/dcp.d.ts +12 -5
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +219 -2
  8. package/dist/types.d.ts +26 -164
  9. package/package.json +3 -13
  10. package/dist/ExchangeController-CPMQq6Q-.js +0 -217
  11. package/dist/HelpersUtil-DfMFC7Bf.js +0 -120
  12. package/dist/NavigationUtil-kj9LEOOd.js +0 -8
  13. package/dist/PhArrowCircleDown-lsK25DCk.js +0 -73
  14. package/dist/PhArrowClockwise-NeKHZ1co.js +0 -73
  15. package/dist/PhArrowDown-C9AkNvLs.js +0 -73
  16. package/dist/PhArrowLeft-RNfIQP1X.js +0 -73
  17. package/dist/PhArrowRight-DM1tna0G.js +0 -73
  18. package/dist/PhArrowSquareOut-S5XYbAZj.js +0 -73
  19. package/dist/PhArrowUp-DmktzOWy.js +0 -73
  20. package/dist/PhArrowUpRight-BkNeW_5i.js +0 -73
  21. package/dist/PhArrowsClockwise-CQ4pG76b.js +0 -73
  22. package/dist/PhArrowsDownUp-H6gxaNM6.js +0 -73
  23. package/dist/PhArrowsLeftRight-DZSsfMR6.js +0 -73
  24. package/dist/PhBank-4_9QzqIB.js +0 -73
  25. package/dist/PhBrowser-B-JSznId.js +0 -73
  26. package/dist/PhCaretDown-vV5oHMNi.js +0 -73
  27. package/dist/PhCaretLeft-BLo6Y_f4.js +0 -73
  28. package/dist/PhCaretRight-CqQN4TT3.js +0 -73
  29. package/dist/PhCaretUp-Df7UCAHy.js +0 -73
  30. package/dist/PhCheck-gtpfK4ed.js +0 -73
  31. package/dist/PhCircleHalf-Uq7dwDYw.js +0 -73
  32. package/dist/PhClock-SDCW-NmF.js +0 -73
  33. package/dist/PhCompass-B7hgtdx-.js +0 -73
  34. package/dist/PhCopy-BcnhyXCy.js +0 -73
  35. package/dist/PhCreditCard-BJjByVgu.js +0 -73
  36. package/dist/PhCurrencyDollar-B7ZXqXBy.js +0 -73
  37. package/dist/PhDesktop-B3VKPuJx.js +0 -73
  38. package/dist/PhDeviceMobile-Bnd0TYEH.js +0 -73
  39. package/dist/PhDotsThree-yyMWyZ-R.js +0 -73
  40. package/dist/PhEnvelope-67uzHbI9.js +0 -73
  41. package/dist/PhFunnelSimple-B-DCsloI.js +0 -73
  42. package/dist/PhGlobe-TMm_6qGk.js +0 -73
  43. package/dist/PhIdentificationCard-CePPD2xc.js +0 -73
  44. package/dist/PhImage-gY96WtHR.js +0 -73
  45. package/dist/PhInfo-DRQM_ZDP.js +0 -73
  46. package/dist/PhLightbulb-B0TxPfZ1.js +0 -73
  47. package/dist/PhMagnifyingGlass-B8si5_6W.js +0 -73
  48. package/dist/PhPaperPlaneRight-DVu5PLYd.js +0 -73
  49. package/dist/PhPlus-BfTsQnUz.js +0 -73
  50. package/dist/PhPower-CxYUGOWn.js +0 -73
  51. package/dist/PhPuzzlePiece-CQ4wh0gV.js +0 -73
  52. package/dist/PhQrCode-BuJ97NYJ.js +0 -73
  53. package/dist/PhQuestion-kJoP8Mja.js +0 -73
  54. package/dist/PhQuestionMark-C46ZkFpu.js +0 -73
  55. package/dist/PhSealCheck-Eh8jVqSN.js +0 -73
  56. package/dist/PhSignOut-jk97OSVt.js +0 -73
  57. package/dist/PhSpinner-CiYOhwMg.js +0 -73
  58. package/dist/PhTrash-pxerMqzd.js +0 -73
  59. package/dist/PhUser-BMg0VV4A.js +0 -73
  60. package/dist/PhVault-DYQvx5A-.js +0 -73
  61. package/dist/PhWarning-NLC5Mj87.js +0 -73
  62. package/dist/PhWarningCircle-Ch2jU9fA.js +0 -73
  63. package/dist/PhX-Bx4wpwm3.js +0 -73
  64. package/dist/SwapController-Cti0Cyxa.js +0 -457
  65. package/dist/ccip-CKZd2XJ7.js +0 -150
  66. package/dist/core/api.d.ts +0 -39
  67. package/dist/core/logic.d.ts +0 -2
  68. package/dist/core/wallet.d.ts +0 -55
  69. package/dist/data-capture-7D5CL385.js +0 -490
  70. package/dist/email-AmK0INbZ.js +0 -344
  71. package/dist/embedded-wallet-Pn0I_XLn.js +0 -820
  72. package/dist/features-x8XNprEe.js +0 -274
  73. package/dist/hashTypedData-B50-z0AA.js +0 -197
  74. package/dist/if-defined-CdZSZ6UL.js +0 -10
  75. package/dist/index-4ewUtPPp.js +0 -7981
  76. package/dist/index-51l86yqx.js +0 -276
  77. package/dist/index-B6K56LF_.js +0 -85
  78. package/dist/index-BAmv9PxJ.js +0 -257
  79. package/dist/index-BEswjY9r.js +0 -117
  80. package/dist/index-BSKRq56S.js +0 -355
  81. package/dist/index-BaygXQxx.js +0 -172
  82. package/dist/index-BcPxaHr5.js +0 -118
  83. package/dist/index-Bjt7nGaJ.js +0 -199
  84. package/dist/index-BkTSyAJb.js +0 -21991
  85. package/dist/index-Bmnl7l2U.js +0 -555
  86. package/dist/index-BvPvouSq.js +0 -56
  87. package/dist/index-C-6iznUO.js +0 -174
  88. package/dist/index-C1QEJL-2.js +0 -572
  89. package/dist/index-C4M5s_AM.js +0 -228
  90. package/dist/index-CEqcN8QP.js +0 -1175
  91. package/dist/index-CM3YaYca.js +0 -8189
  92. package/dist/index-CclBLA5r.js +0 -517
  93. package/dist/index-ChTxJOiF.js +0 -46
  94. package/dist/index-CmAv0Tzr.js +0 -86
  95. package/dist/index-CmvoKY4x.js +0 -125
  96. package/dist/index-D7PmdQ9B.js +0 -1750
  97. package/dist/index-D7k2Pc4e.js +0 -1083
  98. package/dist/index-D7lmgqUR.js +0 -153
  99. package/dist/index-DG_-qYze.js +0 -107
  100. package/dist/index-DHot9Fdb.js +0 -218
  101. package/dist/index-DV2LrPtU.js +0 -123
  102. package/dist/index-DYBaJQ2W.js +0 -65
  103. package/dist/index-D_8VUmn1.js +0 -41543
  104. package/dist/index-D_gLn3rT.js +0 -100
  105. package/dist/index-DqcVUSC9.js +0 -62
  106. package/dist/index-I7VDqINw.js +0 -128
  107. package/dist/index-Oz72I9VP.js +0 -209
  108. package/dist/index-UclsHkJ0.js +0 -118
  109. package/dist/index-X8zir_1j.js +0 -110
  110. package/dist/index-XvlWKGCu.js +0 -1281
  111. package/dist/index-dO97xPlt.js +0 -171
  112. package/dist/index-uBeF6OAB.js +0 -387
  113. package/dist/index-zeA_RiCV.js +0 -159
  114. package/dist/localBatchGatewayRequest-BUZHGdjw.js +0 -91
  115. package/dist/onramp-CdnBuF0r.js +0 -855
  116. package/dist/parseSignature-CcyTNGr4.js +0 -3304
  117. package/dist/pay-with-exchange-CSM6WCOV.js +0 -525
  118. package/dist/property-Bd8U3_QP.js +0 -618
  119. package/dist/receive-DooMu4Dx.js +0 -232
  120. package/dist/ref-CpgjXAw7.js +0 -107
  121. package/dist/send-3T7CyYic.js +0 -1166
  122. package/dist/socials-Dt-iHL17.js +0 -620
  123. package/dist/swaps-CjA9Es42.js +0 -1760
  124. package/dist/transactions-nRm9DVzn.js +0 -37
  125. package/dist/ui/Modal.d.ts +0 -9
  126. package/dist/ui/index.d.ts +0 -6
  127. package/dist/w3m-modal-NV25AXhM.js +0 -1706
@@ -1,555 +0,0 @@
1
- import { cU as g, cX as f, d0 as u, cY as e, cF as P, cV as k, cW as A } from "./index-D_8VUmn1.js";
2
- import { r as y, c as b, n as w } from "./index-CEqcN8QP.js";
3
- import "./index-dO97xPlt.js";
4
- import { H as x } from "./HelpersUtil-DfMFC7Bf.js";
5
- import { o as v } from "./if-defined-CdZSZ6UL.js";
6
- import "./index-UclsHkJ0.js";
7
- import "./index-DV2LrPtU.js";
8
- const I = g`
9
- :host {
10
- display: block;
11
- }
12
-
13
- div.container {
14
- position: absolute;
15
- bottom: 0;
16
- left: 0;
17
- right: 0;
18
- overflow: hidden;
19
- height: auto;
20
- display: block;
21
- }
22
-
23
- div.container[status='hide'] {
24
- animation: fade-out;
25
- animation-duration: var(--apkt-duration-dynamic);
26
- animation-timing-function: ${({ easings: t }) => t["ease-out-power-2"]};
27
- animation-fill-mode: both;
28
- animation-delay: 0s;
29
- }
30
-
31
- div.container[status='show'] {
32
- animation: fade-in;
33
- animation-duration: var(--apkt-duration-dynamic);
34
- animation-timing-function: ${({ easings: t }) => t["ease-out-power-2"]};
35
- animation-fill-mode: both;
36
- animation-delay: var(--apkt-duration-dynamic);
37
- }
38
-
39
- @keyframes fade-in {
40
- from {
41
- opacity: 0;
42
- filter: blur(6px);
43
- }
44
- to {
45
- opacity: 1;
46
- filter: blur(0px);
47
- }
48
- }
49
-
50
- @keyframes fade-out {
51
- from {
52
- opacity: 1;
53
- filter: blur(0px);
54
- }
55
- to {
56
- opacity: 0;
57
- filter: blur(6px);
58
- }
59
- }
60
- `;
61
- var $ = function(t, i, n, r) {
62
- var o = arguments.length, a = o < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, n) : r, s;
63
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, i, n, r);
64
- else for (var c = t.length - 1; c >= 0; c--) (s = t[c]) && (a = (o < 3 ? s(a) : o > 3 ? s(i, n, a) : s(i, n)) || a);
65
- return o > 3 && a && Object.defineProperty(i, n, a), a;
66
- };
67
- let p = class extends f {
68
- constructor() {
69
- super(...arguments), this.resizeObserver = void 0, this.unsubscribe = [], this.status = "hide", this.view = u.state.view;
70
- }
71
- firstUpdated() {
72
- this.status = x.hasFooter() ? "show" : "hide", this.unsubscribe.push(u.subscribeKey("view", (i) => {
73
- this.view = i, this.status = x.hasFooter() ? "show" : "hide", this.status === "hide" && document.documentElement.style.setProperty("--apkt-footer-height", "0px");
74
- })), this.resizeObserver = new ResizeObserver((i) => {
75
- for (const n of i)
76
- if (n.target === this.getWrapper()) {
77
- const r = `${n.contentRect.height}px`;
78
- document.documentElement.style.setProperty("--apkt-footer-height", r);
79
- }
80
- }), this.resizeObserver.observe(this.getWrapper());
81
- }
82
- render() {
83
- return e`
84
- <div class="container" status=${this.status}>${this.templatePageContainer()}</div>
85
- `;
86
- }
87
- templatePageContainer() {
88
- return x.hasFooter() ? e` ${this.templateFooter()}` : null;
89
- }
90
- templateFooter() {
91
- switch (this.view) {
92
- case "Networks":
93
- return this.templateNetworksFooter();
94
- case "Connect":
95
- case "ConnectWallets":
96
- case "OnRampFiatSelect":
97
- case "OnRampTokenSelect":
98
- return e`<w3m-legal-footer></w3m-legal-footer>`;
99
- case "OnRampProviders":
100
- return e`<w3m-onramp-providers-footer></w3m-onramp-providers-footer>`;
101
- default:
102
- return null;
103
- }
104
- }
105
- templateNetworksFooter() {
106
- return e` <wui-flex
107
- class="footer-in"
108
- padding="3"
109
- flexDirection="column"
110
- gap="3"
111
- alignItems="center"
112
- >
113
- <wui-text variant="md-regular" color="secondary" align="center">
114
- Your connected wallet may not support some of the networks available for this dApp
115
- </wui-text>
116
- <wui-link @click=${this.onNetworkHelp.bind(this)}>
117
- <wui-icon size="sm" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon>
118
- What is a network
119
- </wui-link>
120
- </wui-flex>`;
121
- }
122
- onNetworkHelp() {
123
- P.sendEvent({ type: "track", event: "CLICK_NETWORK_HELP" }), u.push("WhatIsANetwork");
124
- }
125
- getWrapper() {
126
- var i;
127
- return (i = this.shadowRoot) == null ? void 0 : i.querySelector("div.container");
128
- }
129
- };
130
- p.styles = [I];
131
- $([
132
- y()
133
- ], p.prototype, "status", void 0);
134
- $([
135
- y()
136
- ], p.prototype, "view", void 0);
137
- p = $([
138
- b("w3m-footer")
139
- ], p);
140
- const O = g`
141
- :host {
142
- display: block;
143
- width: inherit;
144
- }
145
- `;
146
- var W = function(t, i, n, r) {
147
- var o = arguments.length, a = o < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, n) : r, s;
148
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, i, n, r);
149
- else for (var c = t.length - 1; c >= 0; c--) (s = t[c]) && (a = (o < 3 ? s(a) : o > 3 ? s(i, n, a) : s(i, n)) || a);
150
- return o > 3 && a && Object.defineProperty(i, n, a), a;
151
- };
152
- let d = class extends f {
153
- constructor() {
154
- super(), this.unsubscribe = [], this.viewState = u.state.view, this.history = u.state.history.join(","), this.unsubscribe.push(u.subscribeKey("view", () => {
155
- this.history = u.state.history.join(","), document.documentElement.style.setProperty("--apkt-duration-dynamic", "var(--apkt-durations-lg)");
156
- }));
157
- }
158
- disconnectedCallback() {
159
- this.unsubscribe.forEach((i) => i()), document.documentElement.style.setProperty("--apkt-duration-dynamic", "0s");
160
- }
161
- render() {
162
- return e`${this.templatePageContainer()}`;
163
- }
164
- templatePageContainer() {
165
- return e`<w3m-router-container
166
- history=${this.history}
167
- .setView=${() => {
168
- this.viewState = u.state.view;
169
- }}
170
- >
171
- ${this.viewTemplate(this.viewState)}
172
- </w3m-router-container>`;
173
- }
174
- viewTemplate(i) {
175
- switch (i) {
176
- case "AccountSettings":
177
- return e`<w3m-account-settings-view></w3m-account-settings-view>`;
178
- case "Account":
179
- return e`<w3m-account-view></w3m-account-view>`;
180
- case "AllWallets":
181
- return e`<w3m-all-wallets-view></w3m-all-wallets-view>`;
182
- case "ApproveTransaction":
183
- return e`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;
184
- case "BuyInProgress":
185
- return e`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;
186
- case "ChooseAccountName":
187
- return e`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;
188
- case "Connect":
189
- return e`<w3m-connect-view></w3m-connect-view>`;
190
- case "Create":
191
- return e`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;
192
- case "ConnectingWalletConnect":
193
- return e`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;
194
- case "ConnectingWalletConnectBasic":
195
- return e`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
196
- case "ConnectingExternal":
197
- return e`<w3m-connecting-external-view></w3m-connecting-external-view>`;
198
- case "ConnectingSiwe":
199
- return e`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;
200
- case "ConnectWallets":
201
- return e`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;
202
- case "ConnectSocials":
203
- return e`<w3m-connect-socials-view></w3m-connect-socials-view>`;
204
- case "ConnectingSocial":
205
- return e`<w3m-connecting-social-view></w3m-connecting-social-view>`;
206
- case "DataCapture":
207
- return e`<w3m-data-capture-view></w3m-data-capture-view>`;
208
- case "DataCaptureOtpConfirm":
209
- return e`<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;
210
- case "Downloads":
211
- return e`<w3m-downloads-view></w3m-downloads-view>`;
212
- case "EmailLogin":
213
- return e`<w3m-email-login-view></w3m-email-login-view>`;
214
- case "EmailVerifyOtp":
215
- return e`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;
216
- case "EmailVerifyDevice":
217
- return e`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;
218
- case "GetWallet":
219
- return e`<w3m-get-wallet-view></w3m-get-wallet-view>`;
220
- case "Networks":
221
- return e`<w3m-networks-view></w3m-networks-view>`;
222
- case "SwitchNetwork":
223
- return e`<w3m-network-switch-view></w3m-network-switch-view>`;
224
- case "ProfileWallets":
225
- return e`<w3m-profile-wallets-view></w3m-profile-wallets-view>`;
226
- case "Transactions":
227
- return e`<w3m-transactions-view></w3m-transactions-view>`;
228
- case "OnRampProviders":
229
- return e`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;
230
- case "OnRampTokenSelect":
231
- return e`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;
232
- case "OnRampFiatSelect":
233
- return e`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;
234
- case "UpgradeEmailWallet":
235
- return e`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;
236
- case "UpdateEmailWallet":
237
- return e`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;
238
- case "UpdateEmailPrimaryOtp":
239
- return e`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;
240
- case "UpdateEmailSecondaryOtp":
241
- return e`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;
242
- case "UnsupportedChain":
243
- return e`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;
244
- case "Swap":
245
- return e`<w3m-swap-view></w3m-swap-view>`;
246
- case "SwapSelectToken":
247
- return e`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;
248
- case "SwapPreview":
249
- return e`<w3m-swap-preview-view></w3m-swap-preview-view>`;
250
- case "WalletSend":
251
- return e`<w3m-wallet-send-view></w3m-wallet-send-view>`;
252
- case "WalletSendSelectToken":
253
- return e`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;
254
- case "WalletSendPreview":
255
- return e`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;
256
- case "WalletSendConfirmed":
257
- return e`<w3m-send-confirmed-view></w3m-send-confirmed-view>`;
258
- case "WhatIsABuy":
259
- return e`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;
260
- case "WalletReceive":
261
- return e`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;
262
- case "WalletCompatibleNetworks":
263
- return e`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;
264
- case "WhatIsAWallet":
265
- return e`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;
266
- case "ConnectingMultiChain":
267
- return e`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;
268
- case "WhatIsANetwork":
269
- return e`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;
270
- case "ConnectingFarcaster":
271
- return e`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;
272
- case "SwitchActiveChain":
273
- return e`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;
274
- case "RegisterAccountName":
275
- return e`<w3m-register-account-name-view></w3m-register-account-name-view>`;
276
- case "RegisterAccountNameSuccess":
277
- return e`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;
278
- case "SmartSessionCreated":
279
- return e`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;
280
- case "SmartSessionList":
281
- return e`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;
282
- case "SIWXSignMessage":
283
- return e`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;
284
- case "Pay":
285
- return e`<w3m-pay-view></w3m-pay-view>`;
286
- case "PayLoading":
287
- return e`<w3m-pay-loading-view></w3m-pay-loading-view>`;
288
- case "FundWallet":
289
- return e`<w3m-fund-wallet-view></w3m-fund-wallet-view>`;
290
- case "PayWithExchange":
291
- return e`<w3m-deposit-from-exchange-view></w3m-deposit-from-exchange-view>`;
292
- case "PayWithExchangeSelectAsset":
293
- return e`<w3m-deposit-from-exchange-select-asset-view></w3m-deposit-from-exchange-select-asset-view>`;
294
- case "UsageExceeded":
295
- return e`<w3m-usage-exceeded-view></w3m-usage-exceeded-view>`;
296
- case "SmartAccountSettings":
297
- return e`<w3m-smart-account-settings-view></w3m-smart-account-settings-view>`;
298
- default:
299
- return e`<w3m-connect-view></w3m-connect-view>`;
300
- }
301
- }
302
- };
303
- d.styles = [O];
304
- W([
305
- y()
306
- ], d.prototype, "viewState", void 0);
307
- W([
308
- y()
309
- ], d.prototype, "history", void 0);
310
- d = W([
311
- b("w3m-router")
312
- ], d);
313
- const R = g`
314
- :host {
315
- position: relative;
316
- border-radius: ${({ borderRadius: t }) => t[2]};
317
- width: 40px;
318
- height: 40px;
319
- overflow: hidden;
320
- background: ${({ tokens: t }) => t.theme.foregroundPrimary};
321
- display: flex;
322
- justify-content: center;
323
- align-items: center;
324
- flex-wrap: wrap;
325
- column-gap: ${({ spacing: t }) => t[1]};
326
- padding: ${({ spacing: t }) => t[1]};
327
- }
328
-
329
- :host > wui-wallet-image {
330
- width: 14px;
331
- height: 14px;
332
- border-radius: 2px;
333
- }
334
- `;
335
- var C = function(t, i, n, r) {
336
- var o = arguments.length, a = o < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, n) : r, s;
337
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, i, n, r);
338
- else for (var c = t.length - 1; c >= 0; c--) (s = t[c]) && (a = (o < 3 ? s(a) : o > 3 ? s(i, n, a) : s(i, n)) || a);
339
- return o > 3 && a && Object.defineProperty(i, n, a), a;
340
- };
341
- const S = 4;
342
- let h = class extends f {
343
- constructor() {
344
- super(...arguments), this.walletImages = [];
345
- }
346
- render() {
347
- const i = this.walletImages.length < S;
348
- return e`${this.walletImages.slice(0, S).map(({ src: n, walletName: r }) => e`
349
- <wui-wallet-image
350
- size="sm"
351
- imageSrc=${n}
352
- name=${v(r)}
353
- ></wui-wallet-image>
354
- `)}
355
- ${i ? [...Array(S - this.walletImages.length)].map(() => e` <wui-wallet-image size="sm" name=""></wui-wallet-image>`) : null} `;
356
- }
357
- };
358
- h.styles = [k, R];
359
- C([
360
- w({ type: Array })
361
- ], h.prototype, "walletImages", void 0);
362
- h = C([
363
- b("wui-all-wallets-image")
364
- ], h);
365
- const E = g`
366
- :host {
367
- width: 100%;
368
- }
369
-
370
- button {
371
- column-gap: ${({ spacing: t }) => t[2]};
372
- padding: ${({ spacing: t }) => t[3]};
373
- width: 100%;
374
- background-color: transparent;
375
- border-radius: ${({ borderRadius: t }) => t[4]};
376
- color: ${({ tokens: t }) => t.theme.textPrimary};
377
- }
378
-
379
- button > wui-wallet-image {
380
- background: ${({ tokens: t }) => t.theme.foregroundSecondary};
381
- }
382
-
383
- button > wui-text:nth-child(2) {
384
- display: flex;
385
- flex: 1;
386
- }
387
-
388
- button:hover:enabled {
389
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
390
- }
391
-
392
- button[data-all-wallets='true'] {
393
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
394
- }
395
-
396
- button[data-all-wallets='true']:hover:enabled {
397
- background-color: ${({ tokens: t }) => t.theme.foregroundSecondary};
398
- }
399
-
400
- button:focus-visible:enabled {
401
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
402
- box-shadow: 0 0 0 4px ${({ tokens: t }) => t.core.foregroundAccent020};
403
- }
404
-
405
- button:disabled {
406
- background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
407
- opacity: 0.5;
408
- cursor: not-allowed;
409
- }
410
-
411
- button:disabled > wui-tag {
412
- background-color: ${({ tokens: t }) => t.core.glass010};
413
- color: ${({ tokens: t }) => t.theme.foregroundTertiary};
414
- }
415
-
416
- wui-flex.namespace-icon {
417
- width: 16px;
418
- height: 16px;
419
- border-radius: ${({ borderRadius: t }) => t.round};
420
- background-color: ${({ tokens: t }) => t.theme.foregroundSecondary};
421
- box-shadow: 0 0 0 2px ${({ tokens: t }) => t.theme.backgroundPrimary};
422
- transition: box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2);
423
- }
424
-
425
- button:hover:enabled wui-flex.namespace-icon {
426
- box-shadow: 0 0 0 2px ${({ tokens: t }) => t.theme.foregroundPrimary};
427
- }
428
-
429
- wui-flex.namespace-icon > wui-icon {
430
- width: 10px;
431
- height: 10px;
432
- }
433
-
434
- wui-flex.namespace-icon:not(:first-child) {
435
- margin-left: -4px;
436
- }
437
- `;
438
- var m = function(t, i, n, r) {
439
- var o = arguments.length, a = o < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, n) : r, s;
440
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, i, n, r);
441
- else for (var c = t.length - 1; c >= 0; c--) (s = t[c]) && (a = (o < 3 ? s(a) : o > 3 ? s(i, n, a) : s(i, n)) || a);
442
- return o > 3 && a && Object.defineProperty(i, n, a), a;
443
- };
444
- const z = {
445
- eip155: "ethereum",
446
- solana: "solana",
447
- bip122: "bitcoin",
448
- polkadot: void 0,
449
- cosmos: void 0,
450
- sui: void 0,
451
- stacks: void 0,
452
- ton: "ton"
453
- };
454
- let l = class extends f {
455
- constructor() {
456
- super(...arguments), this.walletImages = [], this.imageSrc = "", this.name = "", this.size = "md", this.tabIdx = void 0, this.namespaces = [], this.disabled = !1, this.showAllWallets = !1, this.loading = !1, this.loadingSpinnerColor = "accent-100";
457
- }
458
- render() {
459
- return this.dataset.size = this.size, e`
460
- <button
461
- ?disabled=${this.disabled}
462
- data-all-wallets=${this.showAllWallets}
463
- tabindex=${v(this.tabIdx)}
464
- >
465
- ${this.templateAllWallets()} ${this.templateWalletImage()}
466
- <wui-flex flexDirection="column" justifyContent="center" alignItems="flex-start" gap="1">
467
- <wui-text variant="lg-regular" color="inherit">${this.name}</wui-text>
468
- ${this.templateNamespaces()}
469
- </wui-flex>
470
- ${this.templateStatus()}
471
- <wui-icon name="chevronRight" size="lg" color="default"></wui-icon>
472
- </button>
473
- `;
474
- }
475
- templateNamespaces() {
476
- var i;
477
- return (i = this.namespaces) != null && i.length ? e`<wui-flex alignItems="center" gap="0">
478
- ${this.namespaces.map((n, r) => {
479
- var o;
480
- return e`<wui-flex
481
- alignItems="center"
482
- justifyContent="center"
483
- zIndex=${(((o = this.namespaces) == null ? void 0 : o.length) ?? 0) * 2 - r}
484
- class="namespace-icon"
485
- >
486
- <wui-icon
487
- name=${v(z[n])}
488
- size="sm"
489
- color="default"
490
- ></wui-icon>
491
- </wui-flex>`;
492
- })}
493
- </wui-flex>` : null;
494
- }
495
- templateAllWallets() {
496
- return this.showAllWallets && this.imageSrc ? e` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> ` : this.showAllWallets && this.walletIcon ? e` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> ` : null;
497
- }
498
- templateWalletImage() {
499
- return !this.showAllWallets && this.imageSrc ? e`<wui-wallet-image
500
- size=${v(this.size === "sm" ? "sm" : "md")}
501
- imageSrc=${this.imageSrc}
502
- name=${this.name}
503
- ></wui-wallet-image>` : !this.showAllWallets && !this.imageSrc ? e`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>` : null;
504
- }
505
- templateStatus() {
506
- return this.loading ? e`<wui-loading-spinner size="lg" color="accent-primary"></wui-loading-spinner>` : this.tagLabel && this.tagVariant ? e`<wui-tag size="sm" variant=${this.tagVariant}>${this.tagLabel}</wui-tag>` : null;
507
- }
508
- };
509
- l.styles = [k, A, E];
510
- m([
511
- w({ type: Array })
512
- ], l.prototype, "walletImages", void 0);
513
- m([
514
- w()
515
- ], l.prototype, "imageSrc", void 0);
516
- m([
517
- w()
518
- ], l.prototype, "name", void 0);
519
- m([
520
- w()
521
- ], l.prototype, "size", void 0);
522
- m([
523
- w()
524
- ], l.prototype, "tagLabel", void 0);
525
- m([
526
- w()
527
- ], l.prototype, "tagVariant", void 0);
528
- m([
529
- w()
530
- ], l.prototype, "walletIcon", void 0);
531
- m([
532
- w()
533
- ], l.prototype, "tabIdx", void 0);
534
- m([
535
- w({ type: Array })
536
- ], l.prototype, "namespaces", void 0);
537
- m([
538
- w({ type: Boolean })
539
- ], l.prototype, "disabled", void 0);
540
- m([
541
- w({ type: Boolean })
542
- ], l.prototype, "showAllWallets", void 0);
543
- m([
544
- w({ type: Boolean })
545
- ], l.prototype, "loading", void 0);
546
- m([
547
- w({ type: String })
548
- ], l.prototype, "loadingSpinnerColor", void 0);
549
- l = m([
550
- b("wui-list-wallet")
551
- ], l);
552
- export {
553
- d as W,
554
- p as a
555
- };
@@ -1,56 +0,0 @@
1
- import { c_ as c, cV as m, cX as f, cY as d } from "./index-D_8VUmn1.js";
2
- import { n as u, c as h } from "./index-CEqcN8QP.js";
3
- import { o as v } from "./if-defined-CdZSZ6UL.js";
4
- import "./index-C4M5s_AM.js";
5
- const b = c`
6
- :host {
7
- position: relative;
8
- display: inline-block;
9
- width: 100%;
10
- }
11
- `;
12
- var o = function(l, i, r, s) {
13
- var a = arguments.length, e = a < 3 ? i : s === null ? s = Object.getOwnPropertyDescriptor(i, r) : s, n;
14
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") e = Reflect.decorate(l, i, r, s);
15
- else for (var p = l.length - 1; p >= 0; p--) (n = l[p]) && (e = (a < 3 ? n(e) : a > 3 ? n(i, r, e) : n(i, r)) || e);
16
- return a > 3 && e && Object.defineProperty(i, r, e), e;
17
- };
18
- let t = class extends f {
19
- constructor() {
20
- super(...arguments), this.disabled = !1;
21
- }
22
- render() {
23
- return d`
24
- <wui-input-text
25
- type="email"
26
- placeholder="Email"
27
- icon="mail"
28
- size="lg"
29
- .disabled=${this.disabled}
30
- .value=${this.value}
31
- data-testid="wui-email-input"
32
- tabIdx=${v(this.tabIdx)}
33
- ></wui-input-text>
34
- ${this.templateError()}
35
- `;
36
- }
37
- templateError() {
38
- return this.errorMessage ? d`<wui-text variant="sm-regular" color="error">${this.errorMessage}</wui-text>` : null;
39
- }
40
- };
41
- t.styles = [m, b];
42
- o([
43
- u()
44
- ], t.prototype, "errorMessage", void 0);
45
- o([
46
- u({ type: Boolean })
47
- ], t.prototype, "disabled", void 0);
48
- o([
49
- u()
50
- ], t.prototype, "value", void 0);
51
- o([
52
- u()
53
- ], t.prototype, "tabIdx", void 0);
54
- t = o([
55
- h("wui-email-input")
56
- ], t);