@m0-foundation/swap-component 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/m0-swap-component/ConstantsUtil-btJ3XIXu.js +28 -0
- package/dist/m0-swap-component/ConstantsUtil-btJ3XIXu.js.map +1 -0
- package/dist/m0-swap-component/HelpersUtil-5wkO4kIW.js +142 -0
- package/dist/m0-swap-component/HelpersUtil-5wkO4kIW.js.map +1 -0
- package/dist/m0-swap-component/PhArrowCircleDown-BiDIiYXi.js +76 -0
- package/dist/m0-swap-component/PhArrowCircleDown-BiDIiYXi.js.map +1 -0
- package/dist/m0-swap-component/PhArrowClockwise-BRnlxNUR.js +76 -0
- package/dist/m0-swap-component/PhArrowClockwise-BRnlxNUR.js.map +1 -0
- package/dist/m0-swap-component/PhArrowDown-Co2hyXIs.js +76 -0
- package/dist/m0-swap-component/PhArrowDown-Co2hyXIs.js.map +1 -0
- package/dist/m0-swap-component/PhArrowLeft-Cb8ijwK6.js +76 -0
- package/dist/m0-swap-component/PhArrowLeft-Cb8ijwK6.js.map +1 -0
- package/dist/m0-swap-component/PhArrowRight-B9t--Gmh.js +76 -0
- package/dist/m0-swap-component/PhArrowRight-B9t--Gmh.js.map +1 -0
- package/dist/m0-swap-component/PhArrowSquareOut-eGBMEr5T.js +76 -0
- package/dist/m0-swap-component/PhArrowSquareOut-eGBMEr5T.js.map +1 -0
- package/dist/m0-swap-component/PhArrowUp-CjSpT-xh.js +76 -0
- package/dist/m0-swap-component/PhArrowUp-CjSpT-xh.js.map +1 -0
- package/dist/m0-swap-component/PhArrowUpRight-B8u6wk-A.js +76 -0
- package/dist/m0-swap-component/PhArrowUpRight-B8u6wk-A.js.map +1 -0
- package/dist/m0-swap-component/PhArrowsClockwise-CBcfV6j6.js +76 -0
- package/dist/m0-swap-component/PhArrowsClockwise-CBcfV6j6.js.map +1 -0
- package/dist/m0-swap-component/PhArrowsDownUp-CMVR84b1.js +76 -0
- package/dist/m0-swap-component/PhArrowsDownUp-CMVR84b1.js.map +1 -0
- package/dist/m0-swap-component/PhArrowsLeftRight-CmXk8rs2.js +76 -0
- package/dist/m0-swap-component/PhArrowsLeftRight-CmXk8rs2.js.map +1 -0
- package/dist/m0-swap-component/PhBank-BigtjnS8.js +76 -0
- package/dist/m0-swap-component/PhBank-BigtjnS8.js.map +1 -0
- package/dist/m0-swap-component/PhBrowser-BOulLD8D.js +76 -0
- package/dist/m0-swap-component/PhBrowser-BOulLD8D.js.map +1 -0
- package/dist/m0-swap-component/PhCaretDown-BvvZ65ad.js +76 -0
- package/dist/m0-swap-component/PhCaretDown-BvvZ65ad.js.map +1 -0
- package/dist/m0-swap-component/PhCaretLeft-DtwjZbZ7.js +76 -0
- package/dist/m0-swap-component/PhCaretLeft-DtwjZbZ7.js.map +1 -0
- package/dist/m0-swap-component/PhCaretRight-C8LuSZkO.js +76 -0
- package/dist/m0-swap-component/PhCaretRight-C8LuSZkO.js.map +1 -0
- package/dist/m0-swap-component/PhCaretUp-B2lAObip.js +76 -0
- package/dist/m0-swap-component/PhCaretUp-B2lAObip.js.map +1 -0
- package/dist/m0-swap-component/PhCheck-DQtuVrQf.js +76 -0
- package/dist/m0-swap-component/PhCheck-DQtuVrQf.js.map +1 -0
- package/dist/m0-swap-component/PhCircleHalf-CXfZ0QZv.js +76 -0
- package/dist/m0-swap-component/PhCircleHalf-CXfZ0QZv.js.map +1 -0
- package/dist/m0-swap-component/PhClock-CXsmuc_a.js +76 -0
- package/dist/m0-swap-component/PhClock-CXsmuc_a.js.map +1 -0
- package/dist/m0-swap-component/PhCompass-Cg-qnMon.js +76 -0
- package/dist/m0-swap-component/PhCompass-Cg-qnMon.js.map +1 -0
- package/dist/m0-swap-component/PhCopy-kGRKcvb4.js +76 -0
- package/dist/m0-swap-component/PhCopy-kGRKcvb4.js.map +1 -0
- package/dist/m0-swap-component/PhCreditCard-jYFausLO.js +76 -0
- package/dist/m0-swap-component/PhCreditCard-jYFausLO.js.map +1 -0
- package/dist/m0-swap-component/PhCurrencyDollar-C8vSY3fy.js +76 -0
- package/dist/m0-swap-component/PhCurrencyDollar-C8vSY3fy.js.map +1 -0
- package/dist/m0-swap-component/PhDesktop-AczlBCho.js +76 -0
- package/dist/m0-swap-component/PhDesktop-AczlBCho.js.map +1 -0
- package/dist/m0-swap-component/PhDeviceMobile-3rFbdWLA.js +76 -0
- package/dist/m0-swap-component/PhDeviceMobile-3rFbdWLA.js.map +1 -0
- package/dist/m0-swap-component/PhDotsThree-cJsXXsvY.js +76 -0
- package/dist/m0-swap-component/PhDotsThree-cJsXXsvY.js.map +1 -0
- package/dist/m0-swap-component/PhEnvelope-C1bxHVXw.js +76 -0
- package/dist/m0-swap-component/PhEnvelope-C1bxHVXw.js.map +1 -0
- package/dist/m0-swap-component/PhFunnelSimple-DhqB9fsu.js +76 -0
- package/dist/m0-swap-component/PhFunnelSimple-DhqB9fsu.js.map +1 -0
- package/dist/m0-swap-component/PhGlobe-BFp6kx95.js +76 -0
- package/dist/m0-swap-component/PhGlobe-BFp6kx95.js.map +1 -0
- package/dist/m0-swap-component/PhIdentificationCard-BdYxckWB.js +76 -0
- package/dist/m0-swap-component/PhIdentificationCard-BdYxckWB.js.map +1 -0
- package/dist/m0-swap-component/PhImage-CXxX5oq3.js +76 -0
- package/dist/m0-swap-component/PhImage-CXxX5oq3.js.map +1 -0
- package/dist/m0-swap-component/PhInfo-BcuP36hY.js +76 -0
- package/dist/m0-swap-component/PhInfo-BcuP36hY.js.map +1 -0
- package/dist/m0-swap-component/PhLightbulb-DkWwRl94.js +76 -0
- package/dist/m0-swap-component/PhLightbulb-DkWwRl94.js.map +1 -0
- package/dist/m0-swap-component/PhMagnifyingGlass-B_fFjslY.js +76 -0
- package/dist/m0-swap-component/PhMagnifyingGlass-B_fFjslY.js.map +1 -0
- package/dist/m0-swap-component/PhPaperPlaneRight-BIzGG3QW.js +76 -0
- package/dist/m0-swap-component/PhPaperPlaneRight-BIzGG3QW.js.map +1 -0
- package/dist/m0-swap-component/PhPlus-BGosT2zu.js +76 -0
- package/dist/m0-swap-component/PhPlus-BGosT2zu.js.map +1 -0
- package/dist/m0-swap-component/PhPower-BMqDnP1n.js +76 -0
- package/dist/m0-swap-component/PhPower-BMqDnP1n.js.map +1 -0
- package/dist/m0-swap-component/PhPuzzlePiece-DNMpiJNU.js +76 -0
- package/dist/m0-swap-component/PhPuzzlePiece-DNMpiJNU.js.map +1 -0
- package/dist/m0-swap-component/PhQrCode-DrHkqrU4.js +76 -0
- package/dist/m0-swap-component/PhQrCode-DrHkqrU4.js.map +1 -0
- package/dist/m0-swap-component/PhQuestion-zTfvwqNz.js +76 -0
- package/dist/m0-swap-component/PhQuestion-zTfvwqNz.js.map +1 -0
- package/dist/m0-swap-component/PhQuestionMark-h3Nk1Yf1.js +76 -0
- package/dist/m0-swap-component/PhQuestionMark-h3Nk1Yf1.js.map +1 -0
- package/dist/m0-swap-component/PhSealCheck-DPPqSt6G.js +76 -0
- package/dist/m0-swap-component/PhSealCheck-DPPqSt6G.js.map +1 -0
- package/dist/m0-swap-component/PhSignOut-CJgnrE_v.js +76 -0
- package/dist/m0-swap-component/PhSignOut-CJgnrE_v.js.map +1 -0
- package/dist/m0-swap-component/PhSpinner-CMTEIWbw.js +76 -0
- package/dist/m0-swap-component/PhSpinner-CMTEIWbw.js.map +1 -0
- package/dist/m0-swap-component/PhTrash-CeDVW4am.js +76 -0
- package/dist/m0-swap-component/PhTrash-CeDVW4am.js.map +1 -0
- package/dist/m0-swap-component/PhUser-lQ9WUtAV.js +76 -0
- package/dist/m0-swap-component/PhUser-lQ9WUtAV.js.map +1 -0
- package/dist/m0-swap-component/PhVault-EnLnS_IQ.js +76 -0
- package/dist/m0-swap-component/PhVault-EnLnS_IQ.js.map +1 -0
- package/dist/m0-swap-component/PhWallet-CUeDZydd.js +76 -0
- package/dist/m0-swap-component/PhWallet-CUeDZydd.js.map +1 -0
- package/dist/m0-swap-component/PhWarning-CokeGZs2.js +76 -0
- package/dist/m0-swap-component/PhWarning-CokeGZs2.js.map +1 -0
- package/dist/m0-swap-component/PhWarningCircle-vWtA7S0R.js +76 -0
- package/dist/m0-swap-component/PhWarningCircle-vWtA7S0R.js.map +1 -0
- package/dist/m0-swap-component/PhX-DwCRIvoc.js +76 -0
- package/dist/m0-swap-component/PhX-DwCRIvoc.js.map +1 -0
- package/dist/m0-swap-component/data-capture-BmovBbKV.js +573 -0
- package/dist/m0-swap-component/data-capture-BmovBbKV.js.map +1 -0
- package/dist/m0-swap-component/email-B4niz3Ms.js +445 -0
- package/dist/m0-swap-component/email-B4niz3Ms.js.map +1 -0
- package/dist/m0-swap-component/embedded-wallet-D6bzjX_K.js +988 -0
- package/dist/m0-swap-component/embedded-wallet-D6bzjX_K.js.map +1 -0
- package/dist/m0-swap-component/features-EhJNVE-M.js +355 -0
- package/dist/m0-swap-component/features-EhJNVE-M.js.map +1 -0
- package/dist/m0-swap-component/if-defined-2CMpVr2R.js +12 -0
- package/dist/m0-swap-component/if-defined-2CMpVr2R.js.map +1 -0
- package/dist/m0-swap-component/index-B4xuj7uR.js +965 -0
- package/dist/m0-swap-component/index-B4xuj7uR.js.map +1 -0
- package/dist/m0-swap-component/index-BVZ66GYf.js +206 -0
- package/dist/m0-swap-component/index-BVZ66GYf.js.map +1 -0
- package/dist/m0-swap-component/index-BZXyMieH.js +150 -0
- package/dist/m0-swap-component/index-BZXyMieH.js.map +1 -0
- package/dist/m0-swap-component/index-Bj5sA_Ri.js +252 -0
- package/dist/m0-swap-component/index-Bj5sA_Ri.js.map +1 -0
- package/dist/m0-swap-component/index-Bs-pPJYj.js +129 -0
- package/dist/m0-swap-component/index-Bs-pPJYj.js.map +1 -0
- package/dist/m0-swap-component/index-CMS76VPf.js +474 -0
- package/dist/m0-swap-component/index-CMS76VPf.js.map +1 -0
- package/dist/m0-swap-component/index-CoMTkqee.js +95 -0
- package/dist/m0-swap-component/index-CoMTkqee.js.map +1 -0
- package/dist/m0-swap-component/index-DE0OtbL2.js +3566 -0
- package/dist/m0-swap-component/index-DE0OtbL2.js.map +1 -0
- package/dist/m0-swap-component/index-DEG-YczD.js +231 -0
- package/dist/m0-swap-component/index-DEG-YczD.js.map +1 -0
- package/dist/m0-swap-component/index-DY_Ijq_4.js +4345 -0
- package/dist/m0-swap-component/index-DY_Ijq_4.js.map +1 -0
- package/dist/m0-swap-component/index-IRpGhIhy.js +9394 -0
- package/dist/m0-swap-component/index-IRpGhIhy.js.map +1 -0
- package/dist/m0-swap-component/index-Z70nBYWG.js +113 -0
- package/dist/m0-swap-component/index-Z70nBYWG.js.map +1 -0
- package/dist/m0-swap-component/index-iNFotRMa.js +73 -0
- package/dist/m0-swap-component/index-iNFotRMa.js.map +1 -0
- package/dist/m0-swap-component/index-n1fooC-v.js +37757 -0
- package/dist/m0-swap-component/index-n1fooC-v.js.map +1 -0
- package/dist/m0-swap-component/index.esm.js +2 -0
- package/dist/m0-swap-component/index.esm.js.map +1 -0
- package/dist/m0-swap-component/loader.esm.js.map +1 -0
- package/dist/m0-swap-component/m0-swap-component.esm.js +48 -0
- package/dist/m0-swap-component/m0-swap-component.esm.js.map +1 -0
- package/dist/m0-swap-component/native-CPtqJIn7.js +18 -0
- package/dist/m0-swap-component/native-CPtqJIn7.js.map +1 -0
- package/dist/m0-swap-component/onramp-BppY2eDR.js +1003 -0
- package/dist/m0-swap-component/onramp-BppY2eDR.js.map +1 -0
- package/dist/m0-swap-component/pay-with-exchange-BJYQgTMB.js +639 -0
- package/dist/m0-swap-component/pay-with-exchange-BJYQgTMB.js.map +1 -0
- package/dist/m0-swap-component/property-BN-VaT99.js +625 -0
- package/dist/m0-swap-component/property-BN-VaT99.js.map +1 -0
- package/dist/m0-swap-component/receive-BptRM_5_.js +281 -0
- package/dist/m0-swap-component/receive-BptRM_5_.js.map +1 -0
- package/dist/m0-swap-component/ref-3xALOvo5.js +25 -0
- package/dist/m0-swap-component/ref-3xALOvo5.js.map +1 -0
- package/dist/m0-swap-component/send-BCyHM4Zr.js +1408 -0
- package/dist/m0-swap-component/send-BCyHM4Zr.js.map +1 -0
- package/dist/m0-swap-component/socials-BbajCSWV.js +824 -0
- package/dist/m0-swap-component/socials-BbajCSWV.js.map +1 -0
- package/dist/m0-swap-component/swap-module-5ZLM-vAV.js +140887 -0
- package/dist/m0-swap-component/swap-module-5ZLM-vAV.js.map +1 -0
- package/dist/m0-swap-component/swap-module.entry.esm.js.map +1 -0
- package/dist/m0-swap-component/swap-module.entry.js +15 -0
- package/dist/m0-swap-component/swaps-DyGe65DR.js +2121 -0
- package/dist/m0-swap-component/swaps-DyGe65DR.js.map +1 -0
- package/dist/m0-swap-component/transactions-BZ9l4zt5.js +60 -0
- package/dist/m0-swap-component/transactions-BZ9l4zt5.js.map +1 -0
- package/dist/m0-swap-component/utils-RCeZbvdb.js +95 -0
- package/dist/m0-swap-component/utils-RCeZbvdb.js.map +1 -0
- package/dist/m0-swap-component/w3m-modal-D0HWVPsj.js +2097 -0
- package/dist/m0-swap-component/w3m-modal-D0HWVPsj.js.map +1 -0
- package/dist/m0-swap-component/wui-button-BeTWD3Va.js +223 -0
- package/dist/m0-swap-component/wui-button-BeTWD3Va.js.map +1 -0
- package/dist/m0-swap-component/wui-email-input-CgnfUH0c.js +65 -0
- package/dist/m0-swap-component/wui-email-input-CgnfUH0c.js.map +1 -0
- package/dist/m0-swap-component/wui-icon-B0uTDhW-.js +4 -0
- package/dist/m0-swap-component/wui-icon-B0uTDhW-.js.map +1 -0
- package/dist/m0-swap-component/wui-icon-box-s87lODBB.js +4 -0
- package/dist/m0-swap-component/wui-icon-box-s87lODBB.js.map +1 -0
- package/dist/m0-swap-component/wui-icon-link-BFpV9kPE.js +127 -0
- package/dist/m0-swap-component/wui-icon-link-BFpV9kPE.js.map +1 -0
- package/dist/m0-swap-component/wui-image-BvjxoR51.js +4 -0
- package/dist/m0-swap-component/wui-image-BvjxoR51.js.map +1 -0
- package/dist/m0-swap-component/wui-input-amount-CWQfP3RO.js +182 -0
- package/dist/m0-swap-component/wui-input-amount-CWQfP3RO.js.map +1 -0
- package/dist/m0-swap-component/wui-input-text-g0sN4B2y.js +4 -0
- package/dist/m0-swap-component/wui-input-text-g0sN4B2y.js.map +1 -0
- package/dist/m0-swap-component/wui-link-VqM3wLny.js +123 -0
- package/dist/m0-swap-component/wui-link-VqM3wLny.js.map +1 -0
- package/dist/m0-swap-component/wui-list-item-BIijofqN.js +170 -0
- package/dist/m0-swap-component/wui-list-item-BIijofqN.js.map +1 -0
- package/dist/m0-swap-component/wui-list-social-C7GhkRc8.js +119 -0
- package/dist/m0-swap-component/wui-list-social-C7GhkRc8.js.map +1 -0
- package/dist/m0-swap-component/wui-list-token-C94lmAbT.js +134 -0
- package/dist/m0-swap-component/wui-list-token-C94lmAbT.js.map +1 -0
- package/dist/m0-swap-component/wui-list-wallet-C7fnQvCW.js +622 -0
- package/dist/m0-swap-component/wui-list-wallet-C7fnQvCW.js.map +1 -0
- package/dist/m0-swap-component/wui-loading-spinner-CW2_5SKA.js +4 -0
- package/dist/m0-swap-component/wui-loading-spinner-CW2_5SKA.js.map +1 -0
- package/dist/m0-swap-component/wui-loading-thumbnail-y3sGkT5j.js +337 -0
- package/dist/m0-swap-component/wui-loading-thumbnail-y3sGkT5j.js.map +1 -0
- package/dist/m0-swap-component/wui-qr-code-DekJTDGf.js +3412 -0
- package/dist/m0-swap-component/wui-qr-code-DekJTDGf.js.map +1 -0
- package/dist/m0-swap-component/wui-separator-DMZIL_Av.js +67 -0
- package/dist/m0-swap-component/wui-separator-DMZIL_Av.js.map +1 -0
- package/dist/m0-swap-component/wui-shimmer-CVFC8fMx.js +4 -0
- package/dist/m0-swap-component/wui-shimmer-CVFC8fMx.js.map +1 -0
- package/dist/m0-swap-component/wui-text-BS_lZKY4.js +1127 -0
- package/dist/m0-swap-component/wui-text-BS_lZKY4.js.map +1 -0
- package/dist/m0-swap-component/wui-token-button-CsOFoNJG.js +214 -0
- package/dist/m0-swap-component/wui-token-button-CsOFoNJG.js.map +1 -0
- package/dist/m0-swap-component/wui-visual-hU2Mkyrv.js +565 -0
- package/dist/m0-swap-component/wui-visual-hU2Mkyrv.js.map +1 -0
- package/dist/m0-swap-component/wui-wallet-switch-CWbdtfbN.js +459 -0
- package/dist/m0-swap-component/wui-wallet-switch-CWbdtfbN.js.map +1 -0
- package/dist/types/components/swap-module/balances.d.ts +16 -0
- package/dist/types/components/swap-module/chains.d.ts +16 -0
- package/dist/types/components/swap-module/store.d.ts +34 -0
- package/dist/types/components/swap-module/swap-module.d.ts +113 -0
- package/dist/types/components/swap-module/utils/constants.d.ts +7 -0
- package/dist/types/components/swap-module/utils/formatters.d.ts +23 -0
- package/dist/types/components/swap-module/utils/reown.d.ts +59 -0
- package/dist/types/components/swap-module/utils/wallet.d.ts +83 -0
- package/dist/types/components.d.ts +165 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1732 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +60 -0
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
import { d as css, a as i, R as RouterController, b, o as EventsController, c as customElement, r as resetStyles, e as elementStyles } from './swap-module-5ZLM-vAV.js';
|
|
2
|
+
import { r, n } from './wui-text-BS_lZKY4.js';
|
|
3
|
+
import './index-BVZ66GYf.js';
|
|
4
|
+
import { H as HelpersUtil } from './HelpersUtil-5wkO4kIW.js';
|
|
5
|
+
import { o } from './if-defined-2CMpVr2R.js';
|
|
6
|
+
import './index-Bs-pPJYj.js';
|
|
7
|
+
import './wui-wallet-switch-CWbdtfbN.js';
|
|
8
|
+
|
|
9
|
+
var styles$3 = css `
|
|
10
|
+
:host {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
div.container {
|
|
15
|
+
position: absolute;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
height: auto;
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
div.container[status='hide'] {
|
|
25
|
+
animation: fade-out;
|
|
26
|
+
animation-duration: var(--apkt-duration-dynamic);
|
|
27
|
+
animation-timing-function: ${({ easings }) => easings['ease-out-power-2']};
|
|
28
|
+
animation-fill-mode: both;
|
|
29
|
+
animation-delay: 0s;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
div.container[status='show'] {
|
|
33
|
+
animation: fade-in;
|
|
34
|
+
animation-duration: var(--apkt-duration-dynamic);
|
|
35
|
+
animation-timing-function: ${({ easings }) => easings['ease-out-power-2']};
|
|
36
|
+
animation-fill-mode: both;
|
|
37
|
+
animation-delay: var(--apkt-duration-dynamic);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes fade-in {
|
|
41
|
+
from {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
filter: blur(6px);
|
|
44
|
+
}
|
|
45
|
+
to {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
filter: blur(0px);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes fade-out {
|
|
52
|
+
from {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
filter: blur(0px);
|
|
55
|
+
}
|
|
56
|
+
to {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
filter: blur(6px);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
64
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
65
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
66
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
|
+
};
|
|
69
|
+
let W3mFooter = class W3mFooter extends i {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments);
|
|
72
|
+
this.resizeObserver = undefined;
|
|
73
|
+
this.unsubscribe = [];
|
|
74
|
+
this.status = 'hide';
|
|
75
|
+
this.view = RouterController.state.view;
|
|
76
|
+
}
|
|
77
|
+
firstUpdated() {
|
|
78
|
+
this.status = HelpersUtil.hasFooter() ? 'show' : 'hide';
|
|
79
|
+
this.unsubscribe.push(RouterController.subscribeKey('view', val => {
|
|
80
|
+
this.view = val;
|
|
81
|
+
this.status = HelpersUtil.hasFooter() ? 'show' : 'hide';
|
|
82
|
+
if (this.status === 'hide') {
|
|
83
|
+
const globalStyles = document.documentElement.style;
|
|
84
|
+
globalStyles.setProperty('--apkt-footer-height', '0px');
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
88
|
+
for (const entry of entries) {
|
|
89
|
+
if (entry.target === this.getWrapper()) {
|
|
90
|
+
const newHeight = `${entry.contentRect.height}px`;
|
|
91
|
+
const globalStyles = document.documentElement.style;
|
|
92
|
+
globalStyles.setProperty('--apkt-footer-height', newHeight);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
this.resizeObserver.observe(this.getWrapper());
|
|
97
|
+
}
|
|
98
|
+
render() {
|
|
99
|
+
return b `
|
|
100
|
+
<div class="container" status=${this.status}>${this.templatePageContainer()}</div>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
templatePageContainer() {
|
|
104
|
+
if (HelpersUtil.hasFooter()) {
|
|
105
|
+
return b ` ${this.templateFooter()}`;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
templateFooter() {
|
|
110
|
+
switch (this.view) {
|
|
111
|
+
case 'Networks':
|
|
112
|
+
return this.templateNetworksFooter();
|
|
113
|
+
case 'Connect':
|
|
114
|
+
case 'ConnectWallets':
|
|
115
|
+
case 'OnRampFiatSelect':
|
|
116
|
+
case 'OnRampTokenSelect':
|
|
117
|
+
return b `<w3m-legal-footer></w3m-legal-footer>`;
|
|
118
|
+
case 'OnRampProviders':
|
|
119
|
+
return b `<w3m-onramp-providers-footer></w3m-onramp-providers-footer>`;
|
|
120
|
+
default:
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
templateNetworksFooter() {
|
|
125
|
+
return b ` <wui-flex
|
|
126
|
+
class="footer-in"
|
|
127
|
+
padding="3"
|
|
128
|
+
flexDirection="column"
|
|
129
|
+
gap="3"
|
|
130
|
+
alignItems="center"
|
|
131
|
+
>
|
|
132
|
+
<wui-text variant="md-regular" color="secondary" align="center">
|
|
133
|
+
Your connected wallet may not support some of the networks available for this dApp
|
|
134
|
+
</wui-text>
|
|
135
|
+
<wui-link @click=${this.onNetworkHelp.bind(this)}>
|
|
136
|
+
<wui-icon size="sm" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon>
|
|
137
|
+
What is a network
|
|
138
|
+
</wui-link>
|
|
139
|
+
</wui-flex>`;
|
|
140
|
+
}
|
|
141
|
+
onNetworkHelp() {
|
|
142
|
+
EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORK_HELP' });
|
|
143
|
+
RouterController.push('WhatIsANetwork');
|
|
144
|
+
}
|
|
145
|
+
getWrapper() {
|
|
146
|
+
return this.shadowRoot?.querySelector('div.container');
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
W3mFooter.styles = [styles$3];
|
|
150
|
+
__decorate$3([
|
|
151
|
+
r()
|
|
152
|
+
], W3mFooter.prototype, "status", void 0);
|
|
153
|
+
__decorate$3([
|
|
154
|
+
r()
|
|
155
|
+
], W3mFooter.prototype, "view", void 0);
|
|
156
|
+
W3mFooter = __decorate$3([
|
|
157
|
+
customElement('w3m-footer')
|
|
158
|
+
], W3mFooter);
|
|
159
|
+
|
|
160
|
+
var styles$2 = css `
|
|
161
|
+
:host {
|
|
162
|
+
display: block;
|
|
163
|
+
width: inherit;
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
168
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
169
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
170
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
171
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
172
|
+
};
|
|
173
|
+
let W3mRouter = class W3mRouter extends i {
|
|
174
|
+
constructor() {
|
|
175
|
+
super();
|
|
176
|
+
this.unsubscribe = [];
|
|
177
|
+
this.viewState = RouterController.state.view;
|
|
178
|
+
this.history = RouterController.state.history.join(',');
|
|
179
|
+
this.unsubscribe.push(RouterController.subscribeKey('view', () => {
|
|
180
|
+
this.history = RouterController.state.history.join(',');
|
|
181
|
+
document.documentElement.style.setProperty('--apkt-duration-dynamic', 'var(--apkt-durations-lg)');
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
disconnectedCallback() {
|
|
185
|
+
this.unsubscribe.forEach(unsubscribe => unsubscribe());
|
|
186
|
+
document.documentElement.style.setProperty('--apkt-duration-dynamic', '0s');
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
return b `${this.templatePageContainer()}`;
|
|
190
|
+
}
|
|
191
|
+
templatePageContainer() {
|
|
192
|
+
return b `<w3m-router-container
|
|
193
|
+
history=${this.history}
|
|
194
|
+
.setView=${() => {
|
|
195
|
+
this.viewState = RouterController.state.view;
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
${this.viewTemplate(this.viewState)}
|
|
199
|
+
</w3m-router-container>`;
|
|
200
|
+
}
|
|
201
|
+
viewTemplate(view) {
|
|
202
|
+
switch (view) {
|
|
203
|
+
case 'AccountSettings':
|
|
204
|
+
return b `<w3m-account-settings-view></w3m-account-settings-view>`;
|
|
205
|
+
case 'Account':
|
|
206
|
+
return b `<w3m-account-view></w3m-account-view>`;
|
|
207
|
+
case 'AllWallets':
|
|
208
|
+
return b `<w3m-all-wallets-view></w3m-all-wallets-view>`;
|
|
209
|
+
case 'ApproveTransaction':
|
|
210
|
+
return b `<w3m-approve-transaction-view></w3m-approve-transaction-view>`;
|
|
211
|
+
case 'BuyInProgress':
|
|
212
|
+
return b `<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;
|
|
213
|
+
case 'ChooseAccountName':
|
|
214
|
+
return b `<w3m-choose-account-name-view></w3m-choose-account-name-view>`;
|
|
215
|
+
case 'Connect':
|
|
216
|
+
return b `<w3m-connect-view></w3m-connect-view>`;
|
|
217
|
+
case 'Create':
|
|
218
|
+
return b `<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;
|
|
219
|
+
case 'ConnectingWalletConnect':
|
|
220
|
+
return b `<w3m-connecting-wc-view></w3m-connecting-wc-view>`;
|
|
221
|
+
case 'ConnectingWalletConnectBasic':
|
|
222
|
+
return b `<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
|
|
223
|
+
case 'ConnectingExternal':
|
|
224
|
+
return b `<w3m-connecting-external-view></w3m-connecting-external-view>`;
|
|
225
|
+
case 'ConnectingSiwe':
|
|
226
|
+
return b `<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;
|
|
227
|
+
case 'ConnectWallets':
|
|
228
|
+
return b `<w3m-connect-wallets-view></w3m-connect-wallets-view>`;
|
|
229
|
+
case 'ConnectSocials':
|
|
230
|
+
return b `<w3m-connect-socials-view></w3m-connect-socials-view>`;
|
|
231
|
+
case 'ConnectingSocial':
|
|
232
|
+
return b `<w3m-connecting-social-view></w3m-connecting-social-view>`;
|
|
233
|
+
case 'DataCapture':
|
|
234
|
+
return b `<w3m-data-capture-view></w3m-data-capture-view>`;
|
|
235
|
+
case 'DataCaptureOtpConfirm':
|
|
236
|
+
return b `<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;
|
|
237
|
+
case 'Downloads':
|
|
238
|
+
return b `<w3m-downloads-view></w3m-downloads-view>`;
|
|
239
|
+
case 'EmailLogin':
|
|
240
|
+
return b `<w3m-email-login-view></w3m-email-login-view>`;
|
|
241
|
+
case 'EmailVerifyOtp':
|
|
242
|
+
return b `<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;
|
|
243
|
+
case 'EmailVerifyDevice':
|
|
244
|
+
return b `<w3m-email-verify-device-view></w3m-email-verify-device-view>`;
|
|
245
|
+
case 'GetWallet':
|
|
246
|
+
return b `<w3m-get-wallet-view></w3m-get-wallet-view>`;
|
|
247
|
+
case 'Networks':
|
|
248
|
+
return b `<w3m-networks-view></w3m-networks-view>`;
|
|
249
|
+
case 'SwitchNetwork':
|
|
250
|
+
return b `<w3m-network-switch-view></w3m-network-switch-view>`;
|
|
251
|
+
case 'ProfileWallets':
|
|
252
|
+
return b `<w3m-profile-wallets-view></w3m-profile-wallets-view>`;
|
|
253
|
+
case 'Transactions':
|
|
254
|
+
return b `<w3m-transactions-view></w3m-transactions-view>`;
|
|
255
|
+
case 'OnRampProviders':
|
|
256
|
+
return b `<w3m-onramp-providers-view></w3m-onramp-providers-view>`;
|
|
257
|
+
case 'OnRampTokenSelect':
|
|
258
|
+
return b `<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;
|
|
259
|
+
case 'OnRampFiatSelect':
|
|
260
|
+
return b `<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;
|
|
261
|
+
case 'UpgradeEmailWallet':
|
|
262
|
+
return b `<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;
|
|
263
|
+
case 'UpdateEmailWallet':
|
|
264
|
+
return b `<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;
|
|
265
|
+
case 'UpdateEmailPrimaryOtp':
|
|
266
|
+
return b `<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;
|
|
267
|
+
case 'UpdateEmailSecondaryOtp':
|
|
268
|
+
return b `<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;
|
|
269
|
+
case 'UnsupportedChain':
|
|
270
|
+
return b `<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;
|
|
271
|
+
case 'Swap':
|
|
272
|
+
return b `<w3m-swap-view></w3m-swap-view>`;
|
|
273
|
+
case 'SwapSelectToken':
|
|
274
|
+
return b `<w3m-swap-select-token-view></w3m-swap-select-token-view>`;
|
|
275
|
+
case 'SwapPreview':
|
|
276
|
+
return b `<w3m-swap-preview-view></w3m-swap-preview-view>`;
|
|
277
|
+
case 'WalletSend':
|
|
278
|
+
return b `<w3m-wallet-send-view></w3m-wallet-send-view>`;
|
|
279
|
+
case 'WalletSendSelectToken':
|
|
280
|
+
return b `<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;
|
|
281
|
+
case 'WalletSendPreview':
|
|
282
|
+
return b `<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;
|
|
283
|
+
case 'WalletSendConfirmed':
|
|
284
|
+
return b `<w3m-send-confirmed-view></w3m-send-confirmed-view>`;
|
|
285
|
+
case 'WhatIsABuy':
|
|
286
|
+
return b `<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;
|
|
287
|
+
case 'WalletReceive':
|
|
288
|
+
return b `<w3m-wallet-receive-view></w3m-wallet-receive-view>`;
|
|
289
|
+
case 'WalletCompatibleNetworks':
|
|
290
|
+
return b `<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;
|
|
291
|
+
case 'WhatIsAWallet':
|
|
292
|
+
return b `<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;
|
|
293
|
+
case 'ConnectingMultiChain':
|
|
294
|
+
return b `<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;
|
|
295
|
+
case 'WhatIsANetwork':
|
|
296
|
+
return b `<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;
|
|
297
|
+
case 'ConnectingFarcaster':
|
|
298
|
+
return b `<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;
|
|
299
|
+
case 'SwitchActiveChain':
|
|
300
|
+
return b `<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;
|
|
301
|
+
case 'RegisterAccountName':
|
|
302
|
+
return b `<w3m-register-account-name-view></w3m-register-account-name-view>`;
|
|
303
|
+
case 'RegisterAccountNameSuccess':
|
|
304
|
+
return b `<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;
|
|
305
|
+
case 'SmartSessionCreated':
|
|
306
|
+
return b `<w3m-smart-session-created-view></w3m-smart-session-created-view>`;
|
|
307
|
+
case 'SmartSessionList':
|
|
308
|
+
return b `<w3m-smart-session-list-view></w3m-smart-session-list-view>`;
|
|
309
|
+
case 'SIWXSignMessage':
|
|
310
|
+
return b `<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;
|
|
311
|
+
case 'Pay':
|
|
312
|
+
return b `<w3m-pay-view></w3m-pay-view>`;
|
|
313
|
+
case 'PayLoading':
|
|
314
|
+
return b `<w3m-pay-loading-view></w3m-pay-loading-view>`;
|
|
315
|
+
case 'PayQuote':
|
|
316
|
+
return b `<w3m-pay-quote-view></w3m-pay-quote-view>`;
|
|
317
|
+
case 'FundWallet':
|
|
318
|
+
return b `<w3m-fund-wallet-view></w3m-fund-wallet-view>`;
|
|
319
|
+
case 'PayWithExchange':
|
|
320
|
+
return b `<w3m-deposit-from-exchange-view></w3m-deposit-from-exchange-view>`;
|
|
321
|
+
case 'PayWithExchangeSelectAsset':
|
|
322
|
+
return b `<w3m-deposit-from-exchange-select-asset-view></w3m-deposit-from-exchange-select-asset-view>`;
|
|
323
|
+
case 'UsageExceeded':
|
|
324
|
+
return b `<w3m-usage-exceeded-view></w3m-usage-exceeded-view>`;
|
|
325
|
+
case 'SmartAccountSettings':
|
|
326
|
+
return b `<w3m-smart-account-settings-view></w3m-smart-account-settings-view>`;
|
|
327
|
+
default:
|
|
328
|
+
return b `<w3m-connect-view></w3m-connect-view>`;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
W3mRouter.styles = [styles$2];
|
|
333
|
+
__decorate$2([
|
|
334
|
+
r()
|
|
335
|
+
], W3mRouter.prototype, "viewState", void 0);
|
|
336
|
+
__decorate$2([
|
|
337
|
+
r()
|
|
338
|
+
], W3mRouter.prototype, "history", void 0);
|
|
339
|
+
W3mRouter = __decorate$2([
|
|
340
|
+
customElement('w3m-router')
|
|
341
|
+
], W3mRouter);
|
|
342
|
+
|
|
343
|
+
var styles$1 = css `
|
|
344
|
+
:host {
|
|
345
|
+
position: relative;
|
|
346
|
+
border-radius: ${({ borderRadius }) => borderRadius[2]};
|
|
347
|
+
width: 40px;
|
|
348
|
+
height: 40px;
|
|
349
|
+
overflow: hidden;
|
|
350
|
+
background: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
351
|
+
display: flex;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
align-items: center;
|
|
354
|
+
flex-wrap: wrap;
|
|
355
|
+
column-gap: ${({ spacing }) => spacing[1]};
|
|
356
|
+
padding: ${({ spacing }) => spacing[1]};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
:host > wui-wallet-image {
|
|
360
|
+
width: 14px;
|
|
361
|
+
height: 14px;
|
|
362
|
+
border-radius: 2px;
|
|
363
|
+
}
|
|
364
|
+
`;
|
|
365
|
+
|
|
366
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
367
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
368
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
369
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
370
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
371
|
+
};
|
|
372
|
+
const TOTAL_IMAGES = 4;
|
|
373
|
+
let WuiAllWalletsImage = class WuiAllWalletsImage extends i {
|
|
374
|
+
constructor() {
|
|
375
|
+
super(...arguments);
|
|
376
|
+
this.walletImages = [];
|
|
377
|
+
}
|
|
378
|
+
render() {
|
|
379
|
+
const isPlaceholders = this.walletImages.length < TOTAL_IMAGES;
|
|
380
|
+
return b `${this.walletImages
|
|
381
|
+
.slice(0, TOTAL_IMAGES)
|
|
382
|
+
.map(({ src, walletName }) => b `
|
|
383
|
+
<wui-wallet-image
|
|
384
|
+
size="sm"
|
|
385
|
+
imageSrc=${src}
|
|
386
|
+
name=${o(walletName)}
|
|
387
|
+
></wui-wallet-image>
|
|
388
|
+
`)}
|
|
389
|
+
${isPlaceholders
|
|
390
|
+
? [...Array(TOTAL_IMAGES - this.walletImages.length)].map(() => b ` <wui-wallet-image size="sm" name=""></wui-wallet-image>`)
|
|
391
|
+
: null} `;
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
WuiAllWalletsImage.styles = [resetStyles, styles$1];
|
|
395
|
+
__decorate$1([
|
|
396
|
+
n({ type: Array })
|
|
397
|
+
], WuiAllWalletsImage.prototype, "walletImages", void 0);
|
|
398
|
+
WuiAllWalletsImage = __decorate$1([
|
|
399
|
+
customElement('wui-all-wallets-image')
|
|
400
|
+
], WuiAllWalletsImage);
|
|
401
|
+
|
|
402
|
+
var styles = css `
|
|
403
|
+
:host {
|
|
404
|
+
width: 100%;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
button {
|
|
408
|
+
column-gap: ${({ spacing }) => spacing[2]};
|
|
409
|
+
padding: ${({ spacing }) => spacing[3]};
|
|
410
|
+
width: 100%;
|
|
411
|
+
background-color: transparent;
|
|
412
|
+
border-radius: ${({ borderRadius }) => borderRadius[4]};
|
|
413
|
+
color: ${({ tokens }) => tokens.theme.textPrimary};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
button > wui-wallet-image {
|
|
417
|
+
background: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
button > wui-text:nth-child(2) {
|
|
421
|
+
display: flex;
|
|
422
|
+
flex: 1;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
button:hover:enabled {
|
|
426
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
button[data-all-wallets='true'] {
|
|
430
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
button[data-all-wallets='true']:hover:enabled {
|
|
434
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
button:focus-visible:enabled {
|
|
438
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
439
|
+
box-shadow: 0 0 0 4px ${({ tokens }) => tokens.core.foregroundAccent020};
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
button:disabled {
|
|
443
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
444
|
+
opacity: 0.5;
|
|
445
|
+
cursor: not-allowed;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
button:disabled > wui-tag {
|
|
449
|
+
background-color: ${({ tokens }) => tokens.core.glass010};
|
|
450
|
+
color: ${({ tokens }) => tokens.theme.foregroundTertiary};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
wui-flex.namespace-icon {
|
|
454
|
+
width: 16px;
|
|
455
|
+
height: 16px;
|
|
456
|
+
border-radius: ${({ borderRadius }) => borderRadius.round};
|
|
457
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
458
|
+
box-shadow: 0 0 0 2px ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
459
|
+
transition: box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
button:hover:enabled wui-flex.namespace-icon {
|
|
463
|
+
box-shadow: 0 0 0 2px ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
wui-flex.namespace-icon > wui-icon {
|
|
467
|
+
width: 10px;
|
|
468
|
+
height: 10px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
wui-flex.namespace-icon:not(:first-child) {
|
|
472
|
+
margin-left: -4px;
|
|
473
|
+
}
|
|
474
|
+
`;
|
|
475
|
+
|
|
476
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
477
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
478
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
479
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
480
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
481
|
+
};
|
|
482
|
+
const NAMESPACE_ICONS = {
|
|
483
|
+
eip155: 'ethereum',
|
|
484
|
+
solana: 'solana',
|
|
485
|
+
bip122: 'bitcoin',
|
|
486
|
+
polkadot: undefined,
|
|
487
|
+
cosmos: undefined,
|
|
488
|
+
sui: undefined,
|
|
489
|
+
stacks: undefined,
|
|
490
|
+
ton: 'ton'
|
|
491
|
+
};
|
|
492
|
+
let WuiListWallet = class WuiListWallet extends i {
|
|
493
|
+
constructor() {
|
|
494
|
+
super(...arguments);
|
|
495
|
+
this.walletImages = [];
|
|
496
|
+
this.imageSrc = '';
|
|
497
|
+
this.name = '';
|
|
498
|
+
this.size = 'md';
|
|
499
|
+
this.tabIdx = undefined;
|
|
500
|
+
this.namespaces = [];
|
|
501
|
+
this.disabled = false;
|
|
502
|
+
this.showAllWallets = false;
|
|
503
|
+
this.loading = false;
|
|
504
|
+
this.loadingSpinnerColor = 'accent-100';
|
|
505
|
+
}
|
|
506
|
+
render() {
|
|
507
|
+
this.dataset['size'] = this.size;
|
|
508
|
+
return b `
|
|
509
|
+
<button
|
|
510
|
+
?disabled=${this.disabled}
|
|
511
|
+
data-all-wallets=${this.showAllWallets}
|
|
512
|
+
tabindex=${o(this.tabIdx)}
|
|
513
|
+
>
|
|
514
|
+
${this.templateAllWallets()} ${this.templateWalletImage()}
|
|
515
|
+
<wui-flex flexDirection="column" justifyContent="center" alignItems="flex-start" gap="1">
|
|
516
|
+
<wui-text variant="lg-regular" color="inherit">${this.name}</wui-text>
|
|
517
|
+
${this.templateNamespaces()}
|
|
518
|
+
</wui-flex>
|
|
519
|
+
${this.templateStatus()}
|
|
520
|
+
<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>
|
|
521
|
+
</button>
|
|
522
|
+
`;
|
|
523
|
+
}
|
|
524
|
+
templateNamespaces() {
|
|
525
|
+
if (this.namespaces?.length) {
|
|
526
|
+
return b `<wui-flex alignItems="center" gap="0">
|
|
527
|
+
${this.namespaces.map((namespace, index) => b `<wui-flex
|
|
528
|
+
alignItems="center"
|
|
529
|
+
justifyContent="center"
|
|
530
|
+
zIndex=${(this.namespaces?.length ?? 0) * 2 - index}
|
|
531
|
+
class="namespace-icon"
|
|
532
|
+
>
|
|
533
|
+
<wui-icon
|
|
534
|
+
name=${o(NAMESPACE_ICONS[namespace])}
|
|
535
|
+
size="sm"
|
|
536
|
+
color="default"
|
|
537
|
+
></wui-icon>
|
|
538
|
+
</wui-flex>`)}
|
|
539
|
+
</wui-flex>`;
|
|
540
|
+
}
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
templateAllWallets() {
|
|
544
|
+
if (this.showAllWallets && this.imageSrc) {
|
|
545
|
+
return b ` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `;
|
|
546
|
+
}
|
|
547
|
+
else if (this.showAllWallets && this.walletIcon) {
|
|
548
|
+
return b ` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `;
|
|
549
|
+
}
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
552
|
+
templateWalletImage() {
|
|
553
|
+
if (!this.showAllWallets && this.imageSrc) {
|
|
554
|
+
return b `<wui-wallet-image
|
|
555
|
+
size=${o(this.size === 'sm' ? 'sm' : 'md')}
|
|
556
|
+
imageSrc=${this.imageSrc}
|
|
557
|
+
name=${this.name}
|
|
558
|
+
></wui-wallet-image>`;
|
|
559
|
+
}
|
|
560
|
+
else if (!this.showAllWallets && !this.imageSrc) {
|
|
561
|
+
return b `<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`;
|
|
562
|
+
}
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
templateStatus() {
|
|
566
|
+
if (this.loading) {
|
|
567
|
+
return b `<wui-loading-spinner size="lg" color="accent-primary"></wui-loading-spinner>`;
|
|
568
|
+
}
|
|
569
|
+
else if (this.tagLabel && this.tagVariant) {
|
|
570
|
+
return b `<wui-tag size="sm" variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`;
|
|
571
|
+
}
|
|
572
|
+
return null;
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
WuiListWallet.styles = [resetStyles, elementStyles, styles];
|
|
576
|
+
__decorate([
|
|
577
|
+
n({ type: Array })
|
|
578
|
+
], WuiListWallet.prototype, "walletImages", void 0);
|
|
579
|
+
__decorate([
|
|
580
|
+
n()
|
|
581
|
+
], WuiListWallet.prototype, "imageSrc", void 0);
|
|
582
|
+
__decorate([
|
|
583
|
+
n()
|
|
584
|
+
], WuiListWallet.prototype, "name", void 0);
|
|
585
|
+
__decorate([
|
|
586
|
+
n()
|
|
587
|
+
], WuiListWallet.prototype, "size", void 0);
|
|
588
|
+
__decorate([
|
|
589
|
+
n()
|
|
590
|
+
], WuiListWallet.prototype, "tagLabel", void 0);
|
|
591
|
+
__decorate([
|
|
592
|
+
n()
|
|
593
|
+
], WuiListWallet.prototype, "tagVariant", void 0);
|
|
594
|
+
__decorate([
|
|
595
|
+
n()
|
|
596
|
+
], WuiListWallet.prototype, "walletIcon", void 0);
|
|
597
|
+
__decorate([
|
|
598
|
+
n()
|
|
599
|
+
], WuiListWallet.prototype, "tabIdx", void 0);
|
|
600
|
+
__decorate([
|
|
601
|
+
n({ type: Array })
|
|
602
|
+
], WuiListWallet.prototype, "namespaces", void 0);
|
|
603
|
+
__decorate([
|
|
604
|
+
n({ type: Boolean })
|
|
605
|
+
], WuiListWallet.prototype, "disabled", void 0);
|
|
606
|
+
__decorate([
|
|
607
|
+
n({ type: Boolean })
|
|
608
|
+
], WuiListWallet.prototype, "showAllWallets", void 0);
|
|
609
|
+
__decorate([
|
|
610
|
+
n({ type: Boolean })
|
|
611
|
+
], WuiListWallet.prototype, "loading", void 0);
|
|
612
|
+
__decorate([
|
|
613
|
+
n({ type: String })
|
|
614
|
+
], WuiListWallet.prototype, "loadingSpinnerColor", void 0);
|
|
615
|
+
WuiListWallet = __decorate([
|
|
616
|
+
customElement('wui-list-wallet')
|
|
617
|
+
], WuiListWallet);
|
|
618
|
+
|
|
619
|
+
export { W3mRouter as W, W3mFooter as a };
|
|
620
|
+
//# sourceMappingURL=wui-list-wallet-C7fnQvCW.js.map
|
|
621
|
+
|
|
622
|
+
//# sourceMappingURL=wui-list-wallet-C7fnQvCW.js.map
|