@directcryptopay/sdk 0.2.1 → 0.2.3
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/ExchangeController-CPMQq6Q-.js +217 -0
- package/dist/HelpersUtil-DfMFC7Bf.js +120 -0
- package/dist/NavigationUtil-kj9LEOOd.js +8 -0
- package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
- package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
- package/dist/PhArrowDown-C9AkNvLs.js +73 -0
- package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
- package/dist/PhArrowRight-DM1tna0G.js +73 -0
- package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
- package/dist/PhArrowUp-DmktzOWy.js +73 -0
- package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
- package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
- package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
- package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
- package/dist/PhBank-4_9QzqIB.js +73 -0
- package/dist/PhBrowser-B-JSznId.js +73 -0
- package/dist/PhCaretDown-vV5oHMNi.js +73 -0
- package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
- package/dist/PhCaretRight-CqQN4TT3.js +73 -0
- package/dist/PhCaretUp-Df7UCAHy.js +73 -0
- package/dist/PhCheck-gtpfK4ed.js +73 -0
- package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
- package/dist/PhClock-SDCW-NmF.js +73 -0
- package/dist/PhCompass-B7hgtdx-.js +73 -0
- package/dist/PhCopy-BcnhyXCy.js +73 -0
- package/dist/PhCreditCard-BJjByVgu.js +73 -0
- package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
- package/dist/PhDesktop-B3VKPuJx.js +73 -0
- package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
- package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
- package/dist/PhEnvelope-67uzHbI9.js +73 -0
- package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
- package/dist/PhGlobe-TMm_6qGk.js +73 -0
- package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
- package/dist/PhImage-gY96WtHR.js +73 -0
- package/dist/PhInfo-DRQM_ZDP.js +73 -0
- package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
- package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
- package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
- package/dist/PhPlus-BfTsQnUz.js +73 -0
- package/dist/PhPower-CxYUGOWn.js +73 -0
- package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
- package/dist/PhQrCode-BuJ97NYJ.js +73 -0
- package/dist/PhQuestion-kJoP8Mja.js +73 -0
- package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
- package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
- package/dist/PhSignOut-jk97OSVt.js +73 -0
- package/dist/PhSpinner-CiYOhwMg.js +73 -0
- package/dist/PhTrash-pxerMqzd.js +73 -0
- package/dist/PhUser-BMg0VV4A.js +73 -0
- package/dist/PhVault-DYQvx5A-.js +73 -0
- package/dist/PhWarning-NLC5Mj87.js +73 -0
- package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
- package/dist/PhX-Bx4wpwm3.js +73 -0
- package/dist/SwapController-Cti0Cyxa.js +457 -0
- package/dist/{ccip-BIGqktC1.js → ccip-CKZd2XJ7.js} +4 -4
- package/dist/data-capture-7D5CL385.js +490 -0
- package/dist/dcp-sdk.umd.js +7400 -6589
- package/dist/email-AmK0INbZ.js +344 -0
- package/dist/embedded-wallet-Pn0I_XLn.js +820 -0
- package/dist/features-x8XNprEe.js +274 -0
- package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-B50-z0AA.js} +6 -6
- package/dist/if-defined-CdZSZ6UL.js +10 -0
- package/dist/index-4ewUtPPp.js +7981 -0
- package/dist/{index-D6h-qfpt.js → index-51l86yqx.js} +5 -5
- package/dist/index-B6K56LF_.js +85 -0
- package/dist/index-BAmv9PxJ.js +257 -0
- package/dist/index-BEswjY9r.js +117 -0
- package/dist/index-BSKRq56S.js +355 -0
- package/dist/index-BaygXQxx.js +172 -0
- package/dist/index-BcPxaHr5.js +118 -0
- package/dist/index-Bjt7nGaJ.js +199 -0
- package/dist/{index-D5r0iSq4.js → index-BkTSyAJb.js} +1 -1
- package/dist/index-Bmnl7l2U.js +555 -0
- package/dist/index-BvPvouSq.js +56 -0
- package/dist/index-C-6iznUO.js +174 -0
- package/dist/index-C4M5s_AM.js +228 -0
- package/dist/index-CEqcN8QP.js +1175 -0
- package/dist/{index-CPTcEPbD.js → index-CM3YaYca.js} +296 -298
- package/dist/{index-f3LXSfM5.js → index-CclBLA5r.js} +56 -142
- package/dist/index-ChTxJOiF.js +46 -0
- package/dist/index-CmAv0Tzr.js +86 -0
- package/dist/index-CmvoKY4x.js +125 -0
- package/dist/{index-BdSIrl-R.js → index-D7PmdQ9B.js} +578 -570
- package/dist/{index-DobBVPe4.js → index-D7k2Pc4e.js} +481 -236
- package/dist/index-D7lmgqUR.js +153 -0
- package/dist/index-DG_-qYze.js +107 -0
- package/dist/{index-Dy4NyE6l.js → index-DHot9Fdb.js} +7 -7
- package/dist/index-DV2LrPtU.js +123 -0
- package/dist/index-DYBaJQ2W.js +65 -0
- package/dist/{index-BJ7cbG3N.js → index-D_8VUmn1.js} +36688 -40208
- package/dist/index-D_gLn3rT.js +100 -0
- package/dist/index-DqcVUSC9.js +62 -0
- package/dist/index-I7VDqINw.js +128 -0
- package/dist/index-Oz72I9VP.js +209 -0
- package/dist/index-UclsHkJ0.js +118 -0
- package/dist/index-X8zir_1j.js +110 -0
- package/dist/index-XvlWKGCu.js +1281 -0
- package/dist/index-dO97xPlt.js +171 -0
- package/dist/{index-5mp7WkhV.js → index-uBeF6OAB.js} +2 -2
- package/dist/index-zeA_RiCV.js +159 -0
- package/dist/index.js +1 -1
- package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-BUZHGdjw.js} +1 -1
- package/dist/onramp-CdnBuF0r.js +855 -0
- package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CcyTNGr4.js} +2312 -2313
- package/dist/pay-with-exchange-CSM6WCOV.js +525 -0
- package/dist/property-Bd8U3_QP.js +618 -0
- package/dist/receive-DooMu4Dx.js +232 -0
- package/dist/ref-CpgjXAw7.js +107 -0
- package/dist/send-3T7CyYic.js +1166 -0
- package/dist/socials-Dt-iHL17.js +620 -0
- package/dist/swaps-CjA9Es42.js +1760 -0
- package/dist/{transactions-DujFkB-M.js → transactions-nRm9DVzn.js} +10 -10
- package/dist/w3m-modal-NV25AXhM.js +1706 -0
- package/package.json +3 -3
- package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
- package/dist/add-sji6scSD.js +0 -19
- package/dist/all-wallets-B4H-890E.js +0 -10
- package/dist/app-store-Z433s97G.js +0 -21
- package/dist/apple-b8Lxj7nb.js +0 -22
- package/dist/arrow-bottom-M9oWWo_9.js +0 -12
- package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
- package/dist/arrow-left-Dw8AKfwf.js +0 -12
- package/dist/arrow-right-DwLQZSC_.js +0 -12
- package/dist/arrow-top-zhUjkBe1.js +0 -12
- package/dist/bank-CbQdnILK.js +0 -18
- package/dist/browser-xAqNwt7z.js +0 -18
- package/dist/card-Dr1QBmWp.js +0 -18
- package/dist/checkmark-BhT1dTgG.js +0 -15
- package/dist/checkmark-bold-CPB29wqQ.js +0 -12
- package/dist/chevron-bottom-BhNyx2II.js +0 -12
- package/dist/chevron-left-CGuEjQlY.js +0 -12
- package/dist/chevron-right-CvIRRsqZ.js +0 -12
- package/dist/chevron-top-RSzCqjBd.js +0 -12
- package/dist/chrome-store-Cs8dAgs0.js +0 -65
- package/dist/clock-fhZO5otC.js +0 -12
- package/dist/close-BPuztrdR.js +0 -12
- package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
- package/dist/compass-WMc5huk0.js +0 -12
- package/dist/copy-DVAeT17y.js +0 -19
- package/dist/cursor-BJ4YLXfy.js +0 -7
- package/dist/cursor-transparent-DN2fLQN4.js +0 -16
- package/dist/desktop-6avxisBw.js +0 -13
- package/dist/disconnect-AReVI8Gk.js +0 -12
- package/dist/discord-CxrI30BZ.js +0 -21
- package/dist/email-B8dIIaay.js +0 -696
- package/dist/embedded-wallet-C_5hF7rM.js +0 -468
- package/dist/etherscan-BnAy8cIF.js +0 -10
- package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
- package/dist/extension-F0LIhvcf.js +0 -12
- package/dist/external-link-CP6phyaM.js +0 -12
- package/dist/facebook-BtQ-Io2y.js +0 -30
- package/dist/farcaster-BmaN1ugd.js +0 -16
- package/dist/filters-DpEwoOmy.js +0 -12
- package/dist/github-q7qO9V-b.js +0 -22
- package/dist/google-DH_ZE8bW.js +0 -22
- package/dist/help-circle-BAQVmKas.js +0 -16
- package/dist/id-Cj68Zwgo.js +0 -16
- package/dist/if-defined-CNte9B3N.js +0 -744
- package/dist/image-BKJDw6N-.js +0 -8
- package/dist/index-7toZMdtG.js +0 -573
- package/dist/index-B1uKzdvN.js +0 -170
- package/dist/index-BHFZVF-b.js +0 -257
- package/dist/index-BKwa5JSA.js +0 -559
- package/dist/index-BP4B9VUt.js +0 -54
- package/dist/index-BVdzXHpO.js +0 -181
- package/dist/index-BYND0GJ9.js +0 -146
- package/dist/index-BaJ0zEbh.js +0 -97
- package/dist/index-Bh0MPFwP.js +0 -58
- package/dist/index-Bsh7_qTp.js +0 -511
- package/dist/index-BwnXTNNg.js +0 -199
- package/dist/index-C0kPDbg_.js +0 -77
- package/dist/index-CKikVKe2.js +0 -75
- package/dist/index-ChVh0Hkp.js +0 -243
- package/dist/index-Cle_NnnS.js +0 -305
- package/dist/index-CmWdvIFT.js +0 -51
- package/dist/index-D2AMA8Bu.js +0 -65
- package/dist/index-DAUM8CO4.js +0 -65
- package/dist/index-DGjZW6uR.js +0 -78
- package/dist/index-DQe94z7X.js +0 -265
- package/dist/index-DTo6w99t.js +0 -7864
- package/dist/index-DYdXjap2.js +0 -320
- package/dist/index-DceCxNV5.js +0 -181
- package/dist/index-Uw9cSw0q.js +0 -294
- package/dist/index-qiuyrukh.js +0 -45
- package/dist/index-zddvaohA.js +0 -78
- package/dist/info-RfPsmroW.js +0 -7
- package/dist/info-circle-DFKHB_ZN.js +0 -16
- package/dist/lightbulb-B-Bykj9X.js +0 -7
- package/dist/mail-mBAgGuw5.js +0 -12
- package/dist/mobile-Dhh3ndkf.js +0 -13
- package/dist/more-D1h7UTvg.js +0 -15
- package/dist/network-placeholder-Dqynvc-t.js +0 -18
- package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
- package/dist/off-BmG3cHTX.js +0 -12
- package/dist/onramp-C401Aenb.js +0 -1279
- package/dist/play-store-4q1fzL_P.js +0 -36
- package/dist/plus-603Gs3yG.js +0 -17
- package/dist/qr-code-Dgwhf6M1.js +0 -10
- package/dist/receive-CYXbbEUR.js +0 -186
- package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
- package/dist/ref-DpmKRWBK.js +0 -41
- package/dist/refresh-BMZFu0mu.js +0 -12
- package/dist/reown-logo-BXph7ThY.js +0 -16
- package/dist/search-Cm_V42Y_.js +0 -12
- package/dist/secp256k1-C0iX1TUr.js +0 -1510
- package/dist/secp256k1-DOQBqE4Z.js +0 -1302
- package/dist/send-BSMYxDuP.js +0 -19
- package/dist/send-C8EeIzRB.js +0 -1038
- package/dist/socials-DQrHQajs.js +0 -574
- package/dist/swapHorizontal-98rnJewS.js +0 -12
- package/dist/swapHorizontalBold-C299FjEt.js +0 -12
- package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
- package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
- package/dist/swapVertical-DSL75l8L.js +0 -12
- package/dist/swaps-BuTNp65Y.js +0 -1637
- package/dist/telegram-cJP7hgUb.js +0 -20
- package/dist/three-dots-DHnEh28O.js +0 -9
- package/dist/twitch-CR2iGcBo.js +0 -22
- package/dist/twitterIcon-E5TAQjOn.js +0 -10
- package/dist/verify-DEukUJp0.js +0 -12
- package/dist/verify-filled-BXsx1i_p.js +0 -12
- package/dist/w3m-modal-Bm7BqVng.js +0 -1037
- package/dist/wallet-CzyyvdrT.js +0 -12
- package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
- package/dist/walletconnect-BSYogWiE.js +0 -36
- package/dist/warning-circle-Cgp2BW3m.js +0 -16
- package/dist/x-BJinLpTw.js +0 -16
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { cE as l, cF as g, d0 as h, d8 as m, cH as w, cG as s, dm as E, dn as _, d2 as R, cU as y, cV as b, cX as v, cY as C, cW as O } from "./index-D_8VUmn1.js";
|
|
2
|
+
import { n as d, c as x } from "./index-CEqcN8QP.js";
|
|
3
|
+
import { o as $ } from "./if-defined-CdZSZ6UL.js";
|
|
4
|
+
function U() {
|
|
5
|
+
try {
|
|
6
|
+
return s.returnOpenHref(`${R.SECURE_SITE_SDK_ORIGIN}/loading`, "popupWindow", "width=600,height=800,scrollbars=yes");
|
|
7
|
+
} catch {
|
|
8
|
+
throw new Error("Could not open social popup");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
async function I() {
|
|
12
|
+
h.push("ConnectingFarcaster");
|
|
13
|
+
const e = m.getAuthConnector();
|
|
14
|
+
if (e) {
|
|
15
|
+
const o = l.getAccountData();
|
|
16
|
+
if (!(o != null && o.farcasterUrl))
|
|
17
|
+
try {
|
|
18
|
+
const { url: t } = await e.provider.getFarcasterUri();
|
|
19
|
+
l.setAccountProp("farcasterUrl", t, l.state.activeChain);
|
|
20
|
+
} catch (t) {
|
|
21
|
+
h.goBack(), w.showError(t);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function L(e) {
|
|
26
|
+
h.push("ConnectingSocial");
|
|
27
|
+
const o = m.getAuthConnector();
|
|
28
|
+
let t = null;
|
|
29
|
+
try {
|
|
30
|
+
const i = setTimeout(() => {
|
|
31
|
+
throw new Error("Social login timed out. Please try again.");
|
|
32
|
+
}, 45e3);
|
|
33
|
+
if (o && e) {
|
|
34
|
+
if (s.isTelegram() || (t = U()), t)
|
|
35
|
+
l.setAccountProp("socialWindow", E(t), l.state.activeChain);
|
|
36
|
+
else if (!s.isTelegram())
|
|
37
|
+
throw new Error("Could not create social popup");
|
|
38
|
+
const { uri: n } = await o.provider.getSocialRedirectUri({
|
|
39
|
+
provider: e
|
|
40
|
+
});
|
|
41
|
+
if (!n)
|
|
42
|
+
throw t == null || t.close(), new Error("Could not fetch the social redirect uri");
|
|
43
|
+
if (t && (t.location.href = n), s.isTelegram()) {
|
|
44
|
+
_.setTelegramSocialProvider(e);
|
|
45
|
+
const r = s.formatTelegramSocialLoginUrl(n);
|
|
46
|
+
s.openHref(r, "_top");
|
|
47
|
+
}
|
|
48
|
+
clearTimeout(i);
|
|
49
|
+
}
|
|
50
|
+
} catch (i) {
|
|
51
|
+
t == null || t.close();
|
|
52
|
+
const n = s.parseError(i);
|
|
53
|
+
w.showError(n), g.sendEvent({
|
|
54
|
+
type: "track",
|
|
55
|
+
event: "SOCIAL_LOGIN_ERROR",
|
|
56
|
+
properties: { provider: e, message: n }
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function D(e) {
|
|
61
|
+
l.setAccountProp("socialProvider", e, l.state.activeChain), g.sendEvent({
|
|
62
|
+
type: "track",
|
|
63
|
+
event: "SOCIAL_LOGIN_STARTED",
|
|
64
|
+
properties: { provider: e }
|
|
65
|
+
}), e === "farcaster" ? await I() : await L(e);
|
|
66
|
+
}
|
|
67
|
+
const T = y`
|
|
68
|
+
:host {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
width: 40px;
|
|
73
|
+
height: 40px;
|
|
74
|
+
border-radius: ${({ borderRadius: e }) => e[20]};
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
wui-icon {
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
var S = function(e, o, t, i) {
|
|
84
|
+
var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
|
|
85
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
|
|
86
|
+
else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
|
|
87
|
+
return n > 3 && r && Object.defineProperty(o, t, r), r;
|
|
88
|
+
};
|
|
89
|
+
let p = class extends v {
|
|
90
|
+
constructor() {
|
|
91
|
+
super(...arguments), this.logo = "google";
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return C`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
p.styles = [b, T];
|
|
98
|
+
S([
|
|
99
|
+
d()
|
|
100
|
+
], p.prototype, "logo", void 0);
|
|
101
|
+
p = S([
|
|
102
|
+
x("wui-logo")
|
|
103
|
+
], p);
|
|
104
|
+
const A = y`
|
|
105
|
+
:host {
|
|
106
|
+
width: 100%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
button {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
padding: ${({ spacing: e }) => e[3]};
|
|
114
|
+
width: 100%;
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
border-radius: ${({ borderRadius: e }) => e[4]};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
wui-text {
|
|
120
|
+
text-transform: capitalize;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (hover: hover) {
|
|
124
|
+
button:hover:enabled {
|
|
125
|
+
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
button:disabled {
|
|
130
|
+
opacity: 0.5;
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
134
|
+
var f = function(e, o, t, i) {
|
|
135
|
+
var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
|
|
136
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
|
|
137
|
+
else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
|
|
138
|
+
return n > 3 && r && Object.defineProperty(o, t, r), r;
|
|
139
|
+
};
|
|
140
|
+
let u = class extends v {
|
|
141
|
+
constructor() {
|
|
142
|
+
super(...arguments), this.logo = "google", this.name = "Continue with google", this.disabled = !1;
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
return C`
|
|
146
|
+
<button ?disabled=${this.disabled} tabindex=${$(this.tabIdx)}>
|
|
147
|
+
<wui-flex gap="2" alignItems="center">
|
|
148
|
+
<wui-image ?boxed=${!0} logo=${this.logo}></wui-image>
|
|
149
|
+
<wui-text variant="lg-regular" color="primary">${this.name}</wui-text>
|
|
150
|
+
</wui-flex>
|
|
151
|
+
<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>
|
|
152
|
+
</button>
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
u.styles = [b, O, A];
|
|
157
|
+
f([
|
|
158
|
+
d()
|
|
159
|
+
], u.prototype, "logo", void 0);
|
|
160
|
+
f([
|
|
161
|
+
d()
|
|
162
|
+
], u.prototype, "name", void 0);
|
|
163
|
+
f([
|
|
164
|
+
d()
|
|
165
|
+
], u.prototype, "tabIdx", void 0);
|
|
166
|
+
f([
|
|
167
|
+
d({ type: Boolean })
|
|
168
|
+
], u.prototype, "disabled", void 0);
|
|
169
|
+
u = f([
|
|
170
|
+
x("wui-list-social")
|
|
171
|
+
], u);
|
|
172
|
+
export {
|
|
173
|
+
D as e
|
|
174
|
+
};
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { cU as c, cV as h, cW as m, cX as b, cY as a } from "./index-D_8VUmn1.js";
|
|
2
|
+
import { n as o, c as x } from "./index-CEqcN8QP.js";
|
|
3
|
+
import { o as f } from "./if-defined-CdZSZ6UL.js";
|
|
4
|
+
import { e as $, n as g } from "./ref-CpgjXAw7.js";
|
|
5
|
+
const w = c`
|
|
6
|
+
:host {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: ${({ spacing: t }) => t[3]};
|
|
12
|
+
color: ${({ tokens: t }) => t.theme.textPrimary};
|
|
13
|
+
caret-color: ${({ tokens: t }) => t.core.textAccentPrimary};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.wui-input-text-container {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
input {
|
|
22
|
+
width: 100%;
|
|
23
|
+
border-radius: ${({ borderRadius: t }) => t[4]};
|
|
24
|
+
color: inherit;
|
|
25
|
+
background: transparent;
|
|
26
|
+
border: 1px solid ${({ tokens: t }) => t.theme.borderPrimary};
|
|
27
|
+
caret-color: ${({ tokens: t }) => t.core.textAccentPrimary};
|
|
28
|
+
padding: ${({ spacing: t }) => t[3]} ${({ spacing: t }) => t[3]}
|
|
29
|
+
${({ spacing: t }) => t[3]} ${({ spacing: t }) => t[10]};
|
|
30
|
+
font-size: ${({ textSize: t }) => t.large};
|
|
31
|
+
line-height: ${({ typography: t }) => t["lg-regular"].lineHeight};
|
|
32
|
+
letter-spacing: ${({ typography: t }) => t["lg-regular"].letterSpacing};
|
|
33
|
+
font-weight: ${({ fontWeight: t }) => t.regular};
|
|
34
|
+
font-family: ${({ fontFamily: t }) => t.regular};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
input[data-size='lg'] {
|
|
38
|
+
padding: ${({ spacing: t }) => t[4]} ${({ spacing: t }) => t[3]}
|
|
39
|
+
${({ spacing: t }) => t[4]} ${({ spacing: t }) => t[10]};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (hover: hover) and (pointer: fine) {
|
|
43
|
+
input:hover:enabled {
|
|
44
|
+
border: 1px solid ${({ tokens: t }) => t.theme.borderSecondary};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
input:disabled {
|
|
49
|
+
cursor: unset;
|
|
50
|
+
border: 1px solid ${({ tokens: t }) => t.theme.borderPrimary};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input::placeholder {
|
|
54
|
+
color: ${({ tokens: t }) => t.theme.textSecondary};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
input:focus:enabled {
|
|
58
|
+
border: 1px solid ${({ tokens: t }) => t.theme.borderSecondary};
|
|
59
|
+
background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
|
|
60
|
+
-webkit-box-shadow: 0px 0px 0px 4px ${({ tokens: t }) => t.core.foregroundAccent040};
|
|
61
|
+
-moz-box-shadow: 0px 0px 0px 4px ${({ tokens: t }) => t.core.foregroundAccent040};
|
|
62
|
+
box-shadow: 0px 0px 0px 4px ${({ tokens: t }) => t.core.foregroundAccent040};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
div.wui-input-text-container:has(input:disabled) {
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
wui-icon.wui-input-text-left-icon {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 50%;
|
|
72
|
+
transform: translateY(-50%);
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
left: ${({ spacing: t }) => t[4]};
|
|
75
|
+
color: ${({ tokens: t }) => t.theme.iconDefault};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
button.wui-input-text-submit-button {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 50%;
|
|
81
|
+
transform: translateY(-50%);
|
|
82
|
+
right: ${({ spacing: t }) => t[3]};
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
border: none;
|
|
86
|
+
background: transparent;
|
|
87
|
+
border-radius: ${({ borderRadius: t }) => t[2]};
|
|
88
|
+
color: ${({ tokens: t }) => t.core.textAccentPrimary};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
button.wui-input-text-submit-button:disabled {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
button.wui-input-text-submit-button.loading wui-icon {
|
|
96
|
+
animation: spin 1s linear infinite;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
button.wui-input-text-submit-button:hover {
|
|
100
|
+
background: ${({ tokens: t }) => t.core.foregroundAccent010};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
input:has(+ .wui-input-text-submit-button) {
|
|
104
|
+
padding-right: ${({ spacing: t }) => t[12]};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
input[type='number'] {
|
|
108
|
+
-moz-appearance: textfield;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
input[type='search']::-webkit-search-decoration,
|
|
112
|
+
input[type='search']::-webkit-search-cancel-button,
|
|
113
|
+
input[type='search']::-webkit-search-results-button,
|
|
114
|
+
input[type='search']::-webkit-search-results-decoration {
|
|
115
|
+
-webkit-appearance: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* -- Keyframes --------------------------------------------------- */
|
|
119
|
+
@keyframes spin {
|
|
120
|
+
from {
|
|
121
|
+
transform: rotate(0deg);
|
|
122
|
+
}
|
|
123
|
+
to {
|
|
124
|
+
transform: rotate(360deg);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
var n = function(t, i, s, u) {
|
|
129
|
+
var p = arguments.length, r = p < 3 ? i : u === null ? u = Object.getOwnPropertyDescriptor(i, s) : u, l;
|
|
130
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(t, i, s, u);
|
|
131
|
+
else for (var d = t.length - 1; d >= 0; d--) (l = t[d]) && (r = (p < 3 ? l(r) : p > 3 ? l(i, s, r) : l(i, s)) || r);
|
|
132
|
+
return p > 3 && r && Object.defineProperty(i, s, r), r;
|
|
133
|
+
};
|
|
134
|
+
let e = class extends b {
|
|
135
|
+
constructor() {
|
|
136
|
+
super(...arguments), this.inputElementRef = $(), this.disabled = !1, this.loading = !1, this.placeholder = "", this.type = "text", this.value = "", this.size = "md";
|
|
137
|
+
}
|
|
138
|
+
render() {
|
|
139
|
+
return a` <div class="wui-input-text-container">
|
|
140
|
+
${this.templateLeftIcon()}
|
|
141
|
+
<input
|
|
142
|
+
data-size=${this.size}
|
|
143
|
+
${g(this.inputElementRef)}
|
|
144
|
+
data-testid="wui-input-text"
|
|
145
|
+
type=${this.type}
|
|
146
|
+
enterkeyhint=${f(this.enterKeyHint)}
|
|
147
|
+
?disabled=${this.disabled}
|
|
148
|
+
placeholder=${this.placeholder}
|
|
149
|
+
@input=${this.dispatchInputChangeEvent.bind(this)}
|
|
150
|
+
@keydown=${this.onKeyDown}
|
|
151
|
+
.value=${this.value || ""}
|
|
152
|
+
/>
|
|
153
|
+
${this.templateSubmitButton()}
|
|
154
|
+
<slot class="wui-input-text-slot"></slot>
|
|
155
|
+
</div>
|
|
156
|
+
${this.templateError()} ${this.templateWarning()}`;
|
|
157
|
+
}
|
|
158
|
+
templateLeftIcon() {
|
|
159
|
+
return this.icon ? a`<wui-icon
|
|
160
|
+
class="wui-input-text-left-icon"
|
|
161
|
+
size="md"
|
|
162
|
+
data-size=${this.size}
|
|
163
|
+
color="inherit"
|
|
164
|
+
name=${this.icon}
|
|
165
|
+
></wui-icon>` : null;
|
|
166
|
+
}
|
|
167
|
+
templateSubmitButton() {
|
|
168
|
+
var i;
|
|
169
|
+
return this.onSubmit ? a`<button
|
|
170
|
+
class="wui-input-text-submit-button ${this.loading ? "loading" : ""}"
|
|
171
|
+
@click=${(i = this.onSubmit) == null ? void 0 : i.bind(this)}
|
|
172
|
+
?disabled=${this.disabled || this.loading}
|
|
173
|
+
>
|
|
174
|
+
${this.loading ? a`<wui-icon name="spinner" size="md"></wui-icon>` : a`<wui-icon name="chevronRight" size="md"></wui-icon>`}
|
|
175
|
+
</button>` : null;
|
|
176
|
+
}
|
|
177
|
+
templateError() {
|
|
178
|
+
return this.errorText ? a`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>` : null;
|
|
179
|
+
}
|
|
180
|
+
templateWarning() {
|
|
181
|
+
return this.warningText ? a`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>` : null;
|
|
182
|
+
}
|
|
183
|
+
dispatchInputChangeEvent() {
|
|
184
|
+
var i;
|
|
185
|
+
this.dispatchEvent(new CustomEvent("inputChange", {
|
|
186
|
+
detail: (i = this.inputElementRef.value) == null ? void 0 : i.value,
|
|
187
|
+
bubbles: !0,
|
|
188
|
+
composed: !0
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
e.styles = [h, m, w];
|
|
193
|
+
n([
|
|
194
|
+
o()
|
|
195
|
+
], e.prototype, "icon", void 0);
|
|
196
|
+
n([
|
|
197
|
+
o({ type: Boolean })
|
|
198
|
+
], e.prototype, "disabled", void 0);
|
|
199
|
+
n([
|
|
200
|
+
o({ type: Boolean })
|
|
201
|
+
], e.prototype, "loading", void 0);
|
|
202
|
+
n([
|
|
203
|
+
o()
|
|
204
|
+
], e.prototype, "placeholder", void 0);
|
|
205
|
+
n([
|
|
206
|
+
o()
|
|
207
|
+
], e.prototype, "type", void 0);
|
|
208
|
+
n([
|
|
209
|
+
o()
|
|
210
|
+
], e.prototype, "value", void 0);
|
|
211
|
+
n([
|
|
212
|
+
o()
|
|
213
|
+
], e.prototype, "errorText", void 0);
|
|
214
|
+
n([
|
|
215
|
+
o()
|
|
216
|
+
], e.prototype, "warningText", void 0);
|
|
217
|
+
n([
|
|
218
|
+
o()
|
|
219
|
+
], e.prototype, "onSubmit", void 0);
|
|
220
|
+
n([
|
|
221
|
+
o()
|
|
222
|
+
], e.prototype, "size", void 0);
|
|
223
|
+
n([
|
|
224
|
+
o({ attribute: !1 })
|
|
225
|
+
], e.prototype, "onKeyDown", void 0);
|
|
226
|
+
e = n([
|
|
227
|
+
x("wui-input-text")
|
|
228
|
+
], e);
|