@dcl/governance-site 2.0.0 → 2.0.1-20995780683.commit-d6baf5e
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/assets/BlockOverrides-9837a6f9.js +5 -0
- package/assets/ConstantsUtil-298f7898.js +1 -0
- package/assets/ExchangeController-d2354ec6.js +1 -0
- package/assets/HelpersUtil-8cddb046.js +62 -0
- package/assets/MathUtil-b514a570.js +1 -0
- package/assets/NavigationUtil-a0d0ce87.js +1 -0
- package/assets/NetworkUtil-220ea128.js +1 -0
- package/assets/PhWallet-fd2006d2.js +14 -0
- package/assets/{features-b72c9430.js → ReownAuthentication-468828df.js} +4 -4
- package/assets/SwapController-7bfd6ce7.js +1 -0
- package/assets/{UserAvatar-78751cb5.js → UserAvatar-456716f1.js} +1 -1
- package/assets/ccip-ddcec720.js +1 -0
- package/assets/data-capture-3e424a2c.js +242 -0
- package/assets/email-ea617f9c.js +90 -0
- package/assets/embedded-wallet-814bf005.js +410 -0
- package/assets/features-fd521597.js +1 -0
- package/assets/fortmatic-f3cb4aa6.js +13 -0
- package/assets/if-defined-0a35f675.js +5 -0
- package/assets/index-034d22a0.js +138 -0
- package/assets/{index-a8255d1c.css → index-05771666.css} +4 -4
- package/assets/index-07a61b45.js +51 -0
- package/assets/index-1039ded0.js +132 -0
- package/assets/index-123c1362.js +224 -0
- package/assets/index-15bbaaa0.js +7 -0
- package/assets/{index-073512a1.js → index-206e3e77.js} +1 -1
- package/assets/index-27a991e4.js +53 -0
- package/assets/index-2d0efdd2.js +210 -0
- package/assets/index-32d53c87.js +189 -0
- package/assets/index-3b861a37.js +102 -0
- package/assets/index-4207595b.js +100 -0
- package/assets/index-4243d275.js +43 -0
- package/assets/index-42ce7246.js +63 -0
- package/assets/index-47e87339.js +152 -0
- package/assets/index-48bd3fca.js +277 -0
- package/assets/index-49cc5044.js +46 -0
- package/assets/index-5788a0d6.js +468 -0
- package/assets/index-5824c226.js +81 -0
- package/assets/index-5da565ce.js +78 -0
- package/assets/index-685e7949.js +425 -0
- package/assets/index-84e8ecf6.js +647 -0
- package/assets/index-965fdf98.js +3425 -0
- package/assets/index-9d970383.js +152 -0
- package/assets/index-a59b6662.js +68 -0
- package/assets/index-b457d047.js +1062 -0
- package/assets/index-b65e06cc.js +27 -0
- package/assets/{index-2ef9f1d1.js → index-d70e4ab8.js} +66 -66
- package/assets/index-d7a6ceea.js +30 -0
- package/assets/index-d9c55c27.js +77 -0
- package/assets/index-db5b7889.js +77 -0
- package/assets/index-e3222791.js +78 -0
- package/assets/index-eb060c20.js +1 -0
- package/assets/index-f3f03959.js +90 -0
- package/assets/index-fcda68c9.js +19 -0
- package/assets/index-ff4dea43.js +85 -0
- package/assets/networks-14f3c0d2.js +1 -0
- package/assets/onramp-dcdb1a34.js +422 -0
- package/assets/pay-with-exchange-a64f18a3.js +280 -0
- package/assets/receive-ca7bc867.js +131 -0
- package/assets/ref-88e1be05.js +13 -0
- package/assets/send-8739c9fb.js +554 -0
- package/assets/socials-ccc593f5.js +250 -0
- package/assets/swaps-0a90eb06.js +1050 -0
- package/assets/transactions-bb8cb277.js +16 -0
- package/assets/{tslib.es6-82b9ba96.js → tslib.es6-db2ec995.js} +2 -2
- package/assets/w3m-modal-869dafbc.js +891 -0
- package/assets/zoraTestnet-adc7b76b.js +36 -0
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/basic-ca749c4c.js +0 -1435
- package/assets/core-806d78ea.js +0 -249
- package/assets/fortmatic-12e0f2e5.js +0 -13
- package/assets/index-372705ba.js +0 -1321
- package/assets/index-4be588a0.js +0 -94
- package/assets/index-74e34dfb.js +0 -39
- package/assets/index-bbb36593.js +0 -7
- package/assets/index-c1c8440f.js +0 -47
- package/assets/w3m-modal-26eff9d9.js +0 -1209
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{n as p,r as d,l as m,v as r,m as g}from"./index-48bd3fca.js";import{n as h,c as x}from"./index-84e8ecf6.js";const v=p`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host([data-size='sm']) > svg {
|
|
7
|
+
width: 12px;
|
|
8
|
+
height: 12px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([data-size='md']) > svg {
|
|
12
|
+
width: 16px;
|
|
13
|
+
height: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([data-size='lg']) > svg {
|
|
17
|
+
width: 24px;
|
|
18
|
+
height: 24px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([data-size='xl']) > svg {
|
|
22
|
+
width: 32px;
|
|
23
|
+
height: 32px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
svg {
|
|
27
|
+
animation: rotate 1.4s linear infinite;
|
|
28
|
+
color: var(--local-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([data-size='md']) > svg > circle {
|
|
32
|
+
stroke-width: 6px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([data-size='sm']) > svg > circle {
|
|
36
|
+
stroke-width: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes rotate {
|
|
40
|
+
100% {
|
|
41
|
+
transform: rotate(360deg);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;var c=globalThis&&globalThis.__decorate||function(i,t,o,C){var n=arguments.length,e=n<3?t:C===null?C=Object.getOwnPropertyDescriptor(t,o):C,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(i,t,o,C);else for(var l=i.length-1;l>=0;l--)(a=i[l])&&(e=(n<3?a(e):n>3?a(t,o,e):a(t,o))||e);return n>3&&e&&Object.defineProperty(t,o,e),e};let s=class extends m{constructor(){super(...arguments),this.color="primary",this.size="lg"}render(){const t={primary:r.tokens.theme.textPrimary,secondary:r.tokens.theme.textSecondary,tertiary:r.tokens.theme.textTertiary,invert:r.tokens.theme.textInvert,error:r.tokens.core.textError,warning:r.tokens.core.textWarning,"accent-primary":r.tokens.core.textAccentPrimary};return this.style.cssText=`
|
|
45
|
+
--local-color: ${this.color==="inherit"?"inherit":t[this.color]};
|
|
46
|
+
`,this.dataset.size=this.size,g`<svg viewBox="0 0 16 17" fill="none">
|
|
47
|
+
<path
|
|
48
|
+
d="M8.75 2.65625V4.65625C8.75 4.85516 8.67098 5.04593 8.53033 5.18658C8.38968 5.32723 8.19891 5.40625 8 5.40625C7.80109 5.40625 7.61032 5.32723 7.46967 5.18658C7.32902 5.04593 7.25 4.85516 7.25 4.65625V2.65625C7.25 2.45734 7.32902 2.26657 7.46967 2.12592C7.61032 1.98527 7.80109 1.90625 8 1.90625C8.19891 1.90625 8.38968 1.98527 8.53033 2.12592C8.67098 2.26657 8.75 2.45734 8.75 2.65625ZM14 7.90625H12C11.8011 7.90625 11.6103 7.98527 11.4697 8.12592C11.329 8.26657 11.25 8.45734 11.25 8.65625C11.25 8.85516 11.329 9.04593 11.4697 9.18658C11.6103 9.32723 11.8011 9.40625 12 9.40625H14C14.1989 9.40625 14.3897 9.32723 14.5303 9.18658C14.671 9.04593 14.75 8.85516 14.75 8.65625C14.75 8.45734 14.671 8.26657 14.5303 8.12592C14.3897 7.98527 14.1989 7.90625 14 7.90625ZM11.3588 10.9544C11.289 10.8846 11.2062 10.8293 11.115 10.7915C11.0239 10.7538 10.9262 10.7343 10.8275 10.7343C10.7288 10.7343 10.6311 10.7538 10.54 10.7915C10.4488 10.8293 10.366 10.8846 10.2963 10.9544C10.2265 11.0241 10.1711 11.107 10.1334 11.1981C10.0956 11.2893 10.0762 11.387 10.0762 11.4856C10.0762 11.5843 10.0956 11.682 10.1334 11.7731C10.1711 11.8643 10.2265 11.9471 10.2963 12.0169L11.7106 13.4312C11.8515 13.5721 12.0426 13.6513 12.2419 13.6513C12.4411 13.6513 12.6322 13.5721 12.7731 13.4312C12.914 13.2904 12.9932 13.0993 12.9932 12.9C12.9932 12.7007 12.914 12.5096 12.7731 12.3687L11.3588 10.9544ZM8 11.9062C7.80109 11.9062 7.61032 11.9853 7.46967 12.1259C7.32902 12.2666 7.25 12.4573 7.25 12.6562V14.6562C7.25 14.8552 7.32902 15.0459 7.46967 15.1866C7.61032 15.3272 7.80109 15.4062 8 15.4062C8.19891 15.4062 8.38968 15.3272 8.53033 15.1866C8.67098 15.0459 8.75 14.8552 8.75 14.6562V12.6562C8.75 12.4573 8.67098 12.2666 8.53033 12.1259C8.38968 11.9853 8.19891 11.9062 8 11.9062ZM4.64125 10.9544L3.22688 12.3687C3.08598 12.5096 3.00682 12.7007 3.00682 12.9C3.00682 13.0993 3.08598 13.2904 3.22688 13.4312C3.36777 13.5721 3.55887 13.6513 3.75813 13.6513C3.95738 13.6513 4.14848 13.5721 4.28937 13.4312L5.70375 12.0169C5.84465 11.876 5.9238 11.6849 5.9238 11.4856C5.9238 11.2864 5.84465 11.0953 5.70375 10.9544C5.56285 10.8135 5.37176 10.7343 5.1725 10.7343C4.97324 10.7343 4.78215 10.8135 4.64125 10.9544ZM4.75 8.65625C4.75 8.45734 4.67098 8.26657 4.53033 8.12592C4.38968 7.98527 4.19891 7.90625 4 7.90625H2C1.80109 7.90625 1.61032 7.98527 1.46967 8.12592C1.32902 8.26657 1.25 8.45734 1.25 8.65625C1.25 8.85516 1.32902 9.04593 1.46967 9.18658C1.61032 9.32723 1.80109 9.40625 2 9.40625H4C4.19891 9.40625 4.38968 9.32723 4.53033 9.18658C4.67098 9.04593 4.75 8.85516 4.75 8.65625ZM4.2875 3.88313C4.1466 3.74223 3.95551 3.66307 3.75625 3.66307C3.55699 3.66307 3.3659 3.74223 3.225 3.88313C3.0841 4.02402 3.00495 4.21512 3.00495 4.41438C3.00495 4.61363 3.0841 4.80473 3.225 4.94562L4.64125 6.35813C4.78215 6.49902 4.97324 6.57818 5.1725 6.57818C5.37176 6.57818 5.56285 6.49902 5.70375 6.35813C5.84465 6.21723 5.9238 6.02613 5.9238 5.82688C5.9238 5.62762 5.84465 5.43652 5.70375 5.29563L4.2875 3.88313Z"
|
|
49
|
+
fill="currentColor"
|
|
50
|
+
/>
|
|
51
|
+
</svg>`}};s.styles=[d,v];c([h()],s.prototype,"color",void 0);c([h()],s.prototype,"size",void 0);s=c([x("wui-loading-spinner")],s);
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import{j as C,r as O,k as P,l as w,m as a,n as E,K as g,R as S,o as x,h as R,S as $}from"./index-48bd3fca.js";import{n as h,c as v,r as d,U as T}from"./index-84e8ecf6.js";import"./index-a59b6662.js";import"./index-07a61b45.js";const L=C`
|
|
2
|
+
:host {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
input {
|
|
8
|
+
width: 48px;
|
|
9
|
+
height: 48px;
|
|
10
|
+
background: ${({tokens:n})=>n.theme.foregroundPrimary};
|
|
11
|
+
border-radius: ${({borderRadius:n})=>n[4]};
|
|
12
|
+
border: 1px solid ${({tokens:n})=>n.theme.borderPrimary};
|
|
13
|
+
font-family: ${({fontFamily:n})=>n.regular};
|
|
14
|
+
font-size: ${({textSize:n})=>n.large};
|
|
15
|
+
line-height: 18px;
|
|
16
|
+
letter-spacing: -0.16px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
color: ${({tokens:n})=>n.theme.textPrimary};
|
|
19
|
+
caret-color: ${({tokens:n})=>n.core.textAccentPrimary};
|
|
20
|
+
transition:
|
|
21
|
+
background-color ${({durations:n})=>n.lg}
|
|
22
|
+
${({easings:n})=>n["ease-out-power-2"]},
|
|
23
|
+
border-color ${({durations:n})=>n.lg}
|
|
24
|
+
${({easings:n})=>n["ease-out-power-2"]},
|
|
25
|
+
box-shadow ${({durations:n})=>n.lg}
|
|
26
|
+
${({easings:n})=>n["ease-out-power-2"]};
|
|
27
|
+
will-change: background-color, border-color, box-shadow;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
-webkit-appearance: none;
|
|
30
|
+
-moz-appearance: textfield;
|
|
31
|
+
padding: ${({spacing:n})=>n[4]};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
input::-webkit-outer-spin-button,
|
|
35
|
+
input::-webkit-inner-spin-button {
|
|
36
|
+
-webkit-appearance: none;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
input[type='number'] {
|
|
41
|
+
-moz-appearance: textfield;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input:disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
opacity: 0.5;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
input:focus-visible:enabled {
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
border: 1px solid ${({tokens:n})=>n.theme.borderSecondary};
|
|
52
|
+
box-shadow: 0px 0px 0px 4px ${({tokens:n})=>n.core.foregroundAccent040};
|
|
53
|
+
}
|
|
54
|
+
`;var y=globalThis&&globalThis.__decorate||function(n,t,e,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,i);else for(var l=n.length-1;l>=0;l--)(r=n[l])&&(o=(s<3?r(o):s>3?r(t,e,o):r(t,e))||o);return s>3&&o&&Object.defineProperty(t,e,o),o};let c=class extends w{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return a`<input
|
|
55
|
+
type="number"
|
|
56
|
+
maxlength="1"
|
|
57
|
+
inputmode="numeric"
|
|
58
|
+
autofocus
|
|
59
|
+
?disabled=${this.disabled}
|
|
60
|
+
value=${this.value}
|
|
61
|
+
/> `}};c.styles=[O,P,L];y([h({type:Boolean})],c.prototype,"disabled",void 0);y([h({type:String})],c.prototype,"value",void 0);c=y([v("wui-input-numeric")],c);const _=E`
|
|
62
|
+
:host {
|
|
63
|
+
position: relative;
|
|
64
|
+
display: block;
|
|
65
|
+
}
|
|
66
|
+
`;var m=globalThis&&globalThis.__decorate||function(n,t,e,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,i);else for(var l=n.length-1;l>=0;l--)(r=n[l])&&(o=(s<3?r(o):s>3?r(t,e,o):r(t,e))||o);return s>3&&o&&Object.defineProperty(t,e,o),o};let p=class extends w{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=t=>this.values.slice(0,t).every(i=>i!==""),this.handleKeyDown=(t,e)=>{const i=t.target,s=this.getInputElement(i),o=["ArrowLeft","ArrowRight","Shift","Delete"];if(!s)return;o.includes(t.key)&&t.preventDefault();const r=s.selectionStart;switch(t.key){case"ArrowLeft":r&&s.setSelectionRange(r+1,r+1),this.focusInputField("prev",e);break;case"ArrowRight":this.focusInputField("next",e);break;case"Shift":this.focusInputField("next",e);break;case"Delete":s.value===""?this.focusInputField("prev",e):this.updateInput(s,e,"");break;case"Backspace":s.value===""?this.focusInputField("prev",e):this.updateInput(s,e,"");break}},this.focusInputField=(t,e)=>{if(t==="next"){const i=e+1;if(!this.shouldInputBeEnabled(i))return;const s=this.numerics[i<this.length?i:e],o=s?this.getInputElement(s):void 0;o&&(o.disabled=!1,o.focus())}if(t==="prev"){const i=e-1,s=this.numerics[i>-1?i:e],o=s?this.getInputElement(s):void 0;o&&o.focus()}}}firstUpdated(){var e,i;this.otp&&(this.values=this.otp.split(""));const t=(e=this.shadowRoot)==null?void 0:e.querySelectorAll("wui-input-numeric");t&&(this.numerics=Array.from(t)),(i=this.numerics[0])==null||i.focus()}render(){return a`
|
|
67
|
+
<wui-flex gap="1" data-testid="wui-otp-input">
|
|
68
|
+
${Array.from({length:this.length}).map((t,e)=>a`
|
|
69
|
+
<wui-input-numeric
|
|
70
|
+
@input=${i=>this.handleInput(i,e)}
|
|
71
|
+
@click=${i=>this.selectInput(i)}
|
|
72
|
+
@keydown=${i=>this.handleKeyDown(i,e)}
|
|
73
|
+
.disabled=${!this.shouldInputBeEnabled(e)}
|
|
74
|
+
.value=${this.values[e]||""}
|
|
75
|
+
>
|
|
76
|
+
</wui-input-numeric>
|
|
77
|
+
`)}
|
|
78
|
+
</wui-flex>
|
|
79
|
+
`}updateInput(t,e,i){const s=this.numerics[e],o=t||(s?this.getInputElement(s):void 0);o&&(o.value=i,this.values=this.values.map((r,l)=>l===e?i:r))}selectInput(t){const e=t.target;if(e){const i=this.getInputElement(e);i==null||i.select()}}handleInput(t,e){const i=t.target,s=this.getInputElement(i);if(s){const o=s.value;t.inputType==="insertFromPaste"?this.handlePaste(s,o,e):T.isNumber(o)&&t.data?(this.updateInput(s,e,t.data),this.focusInputField("next",e)):this.updateInput(s,e,"")}this.dispatchInputChangeEvent()}handlePaste(t,e,i){const s=e[0];if(s&&T.isNumber(s)){this.updateInput(t,i,s);const r=e.substring(1);if(i+1<this.length&&r.length){const l=this.numerics[i+1],I=l?this.getInputElement(l):void 0;I&&this.handlePaste(I,r,i+1)}else this.focusInputField("next",i)}else this.updateInput(t,i,"")}getInputElement(t){var e;return(e=t.shadowRoot)!=null&&e.querySelector("input")?t.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const t=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:t,bubbles:!0,composed:!0}))}};p.styles=[O,_];m([h({type:Number})],p.prototype,"length",void 0);m([h({type:String})],p.prototype,"otp",void 0);m([d()],p.prototype,"values",void 0);p=m([v("wui-otp")],p);const k=E`
|
|
80
|
+
wui-loading-spinner {
|
|
81
|
+
margin: 9px auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.email-display,
|
|
85
|
+
.email-display wui-text {
|
|
86
|
+
max-width: 100%;
|
|
87
|
+
}
|
|
88
|
+
`;var f=globalThis&&globalThis.__decorate||function(n,t,e,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,i);else for(var l=n.length-1;l>=0;l--)(r=n[l])&&(o=(s<3?r(o):s>3?r(t,e,o):r(t,e))||o);return s>3&&o&&Object.defineProperty(t,e,o),o},b;let u=b=class extends w{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){var t;super(),this.loading=!1,this.timeoutTimeLeft=g.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=(t=S.state.data)==null?void 0:t.email,this.authConnector=x.getAuthConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const t=!!this.timeoutTimeLeft,e=this.getFooterLabels(t);return a`
|
|
89
|
+
<wui-flex
|
|
90
|
+
flexDirection="column"
|
|
91
|
+
alignItems="center"
|
|
92
|
+
.padding=${["4","0","4","0"]}
|
|
93
|
+
gap="4"
|
|
94
|
+
>
|
|
95
|
+
<wui-flex
|
|
96
|
+
class="email-display"
|
|
97
|
+
flexDirection="column"
|
|
98
|
+
alignItems="center"
|
|
99
|
+
.padding=${["0","5","0","5"]}
|
|
100
|
+
>
|
|
101
|
+
<wui-text variant="md-regular" color="primary" align="center">
|
|
102
|
+
Enter the code we sent to
|
|
103
|
+
</wui-text>
|
|
104
|
+
<wui-text variant="md-medium" color="primary" lineClamp="1" align="center">
|
|
105
|
+
${this.email}
|
|
106
|
+
</wui-text>
|
|
107
|
+
</wui-flex>
|
|
108
|
+
|
|
109
|
+
<wui-text variant="sm-regular" color="secondary">The code expires in 20 minutes</wui-text>
|
|
110
|
+
|
|
111
|
+
${this.loading?a`<wui-loading-spinner size="xl" color="accent-primary"></wui-loading-spinner>`:a` <wui-flex flexDirection="column" alignItems="center" gap="2">
|
|
112
|
+
<wui-otp
|
|
113
|
+
dissabled
|
|
114
|
+
length="6"
|
|
115
|
+
@inputChange=${this.onOtpInputChange.bind(this)}
|
|
116
|
+
.otp=${this.otp}
|
|
117
|
+
></wui-otp>
|
|
118
|
+
${this.error?a`
|
|
119
|
+
<wui-text variant="sm-regular" align="center" color="error">
|
|
120
|
+
${this.error}. Try Again
|
|
121
|
+
</wui-text>
|
|
122
|
+
`:null}
|
|
123
|
+
</wui-flex>`}
|
|
124
|
+
|
|
125
|
+
<wui-flex alignItems="center" gap="2">
|
|
126
|
+
<wui-text variant="sm-regular" color="secondary">${e.title}</wui-text>
|
|
127
|
+
<wui-link @click=${this.onResendCode.bind(this)} .disabled=${t}>
|
|
128
|
+
${e.action}
|
|
129
|
+
</wui-link>
|
|
130
|
+
</wui-flex>
|
|
131
|
+
</wui-flex>
|
|
132
|
+
`}startOTPTimeout(){this.timeoutTimeLeft=g.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=g.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(t){var e;try{this.loading||(this.otp=t.detail,this.shouldSubmitOnOtpChange()&&(this.loading=!0,await((e=this.onOtpSubmit)==null?void 0:e.call(this,this.otp))))}catch(i){this.error=R.parseError(i),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!x.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),$.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(t){$.showError(t)}finally{this.loading=!1}}getFooterLabels(t){return this.onStartOver?{title:"Something wrong?",action:`Try again ${t?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${t?`in ${this.timeoutTimeLeft}s`:"Code"}`}}shouldSubmitOnOtpChange(){return this.authConnector&&this.otp.length===b.OTP_LENGTH}};u.OTP_LENGTH=6;u.styles=k;f([d()],u.prototype,"loading",void 0);f([d()],u.prototype,"timeoutTimeLeft",void 0);f([d()],u.prototype,"error",void 0);u=b=f([v("w3m-email-otp-widget")],u);export{u as W};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import{U as f,j as w,r as v,l as b,m as n,k as y}from"./index-48bd3fca.js";import{n as o,c as x,U as $}from"./index-84e8ecf6.js";import"./index-42ce7246.js";import"./index-ff4dea43.js";import{o as z}from"./if-defined-0a35f675.js";const S=f`<svg width="86" height="96" fill="none">
|
|
2
|
+
<path
|
|
3
|
+
d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
|
|
4
|
+
/>
|
|
5
|
+
</svg>`,k=f`<svg viewBox="0 0 48 54" fill="none">
|
|
6
|
+
<path
|
|
7
|
+
d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
|
|
8
|
+
/>
|
|
9
|
+
</svg>`,I=f`
|
|
10
|
+
<svg fill="none" viewBox="0 0 36 40">
|
|
11
|
+
<path
|
|
12
|
+
d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
`,T=w`
|
|
16
|
+
:host {
|
|
17
|
+
position: relative;
|
|
18
|
+
border-radius: inherit;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
width: var(--local-width);
|
|
23
|
+
height: var(--local-height);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([data-round='true']) {
|
|
27
|
+
background: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
28
|
+
border-radius: 100%;
|
|
29
|
+
outline: 1px solid ${({tokens:e})=>e.core.glass010};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
svg {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
svg > path {
|
|
42
|
+
stroke: var(--local-stroke);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
wui-image {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
-webkit-clip-path: var(--local-path);
|
|
49
|
+
clip-path: var(--local-path);
|
|
50
|
+
background: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
wui-icon {
|
|
54
|
+
transform: translateY(-5%);
|
|
55
|
+
width: var(--local-icon-size);
|
|
56
|
+
height: var(--local-icon-size);
|
|
57
|
+
}
|
|
58
|
+
`;var m=globalThis&&globalThis.__decorate||function(e,t,r,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var h=e.length-1;h>=0;h--)(l=e[h])&&(i=(s<3?l(i):s>3?l(t,r,i):l(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};let p=class extends b{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:I,md:k,lg:S},this.selected=!1,this.round=!1}render(){const t={sm:"4",md:"6",lg:"10"};return this.round?(this.dataset.round="true",this.style.cssText=`
|
|
59
|
+
--local-width: var(--apkt-spacing-10);
|
|
60
|
+
--local-height: var(--apkt-spacing-10);
|
|
61
|
+
--local-icon-size: var(--apkt-spacing-4);
|
|
62
|
+
`):this.style.cssText=`
|
|
63
|
+
|
|
64
|
+
--local-path: var(--apkt-path-network-${this.size});
|
|
65
|
+
--local-width: var(--apkt-width-network-${this.size});
|
|
66
|
+
--local-height: var(--apkt-height-network-${this.size});
|
|
67
|
+
--local-icon-size: var(--apkt-spacing-${t[this.size]});
|
|
68
|
+
`,n`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?n`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:n`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`}};p.styles=[v,T];m([o()],p.prototype,"size",void 0);m([o()],p.prototype,"name",void 0);m([o({type:Object})],p.prototype,"networkImagesBySize",void 0);m([o()],p.prototype,"imageSrc",void 0);m([o({type:Boolean})],p.prototype,"selected",void 0);m([o({type:Boolean})],p.prototype,"round",void 0);p=m([x("wui-network-image")],p);const C=w`
|
|
69
|
+
:host {
|
|
70
|
+
position: relative;
|
|
71
|
+
background-color: ${({tokens:e})=>e.theme.foregroundTertiary};
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
border-radius: inherit;
|
|
76
|
+
border-radius: var(--local-border-radius);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([data-image='true']) {
|
|
80
|
+
background-color: transparent;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host > wui-flex {
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
border-radius: inherit;
|
|
86
|
+
border-radius: var(--local-border-radius);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([data-size='sm']) {
|
|
90
|
+
width: 32px;
|
|
91
|
+
height: 32px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([data-size='md']) {
|
|
95
|
+
width: 40px;
|
|
96
|
+
height: 40px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host([data-size='lg']) {
|
|
100
|
+
width: 56px;
|
|
101
|
+
height: 56px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([name='Extension'])::after {
|
|
105
|
+
border: 1px solid ${({colors:e})=>e.accent010};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([data-wallet-icon='allWallets'])::after {
|
|
109
|
+
border: 1px solid ${({colors:e})=>e.accent010};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
wui-icon[data-parent-size='inherit'] {
|
|
113
|
+
width: 75%;
|
|
114
|
+
height: 75%;
|
|
115
|
+
align-items: center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
wui-icon {
|
|
119
|
+
color: ${({tokens:e})=>e.theme.iconDefault};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
wui-icon[data-parent-size='sm'] {
|
|
123
|
+
width: 24px;
|
|
124
|
+
height: 24px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
wui-icon[data-parent-size='md'] {
|
|
128
|
+
width: 32px;
|
|
129
|
+
height: 32px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host > wui-icon-box {
|
|
133
|
+
position: absolute;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
right: -1px;
|
|
136
|
+
bottom: -2px;
|
|
137
|
+
z-index: 1;
|
|
138
|
+
border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
139
|
+
padding: 1px;
|
|
140
|
+
}
|
|
141
|
+
`;var g=globalThis&&globalThis.__decorate||function(e,t,r,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var h=e.length-1;h>=0;h--)(l=e[h])&&(i=(s<3?l(i):s>3?l(t,r,i):l(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};let u=class extends b{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let t="1";return this.size==="lg"?t="4":this.size==="md"?t="2":this.size==="sm"&&(t="1"),this.style.cssText=`
|
|
142
|
+
--local-border-radius: var(--apkt-borderRadius-${t});
|
|
143
|
+
`,this.dataset.size=this.size,this.imageSrc&&(this.dataset.image="true"),this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),n`
|
|
144
|
+
<wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
|
|
145
|
+
`}templateVisual(){return this.imageSrc?n`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?n`<wui-icon size="md" color="default" name=${this.walletIcon}></wui-icon>`:n`<wui-icon
|
|
146
|
+
data-parent-size=${this.size}
|
|
147
|
+
size="inherit"
|
|
148
|
+
color="inherit"
|
|
149
|
+
name="wallet"
|
|
150
|
+
></wui-icon>`}};u.styles=[v,C];g([o()],u.prototype,"size",void 0);g([o()],u.prototype,"name",void 0);g([o()],u.prototype,"imageSrc",void 0);g([o()],u.prototype,"walletIcon",void 0);g([o({type:Boolean})],u.prototype,"installed",void 0);g([o()],u.prototype,"badgeSize",void 0);u=g([x("wui-wallet-image")],u);const j=w`
|
|
151
|
+
button {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
height: 40px;
|
|
155
|
+
padding: ${({spacing:e})=>e[2]};
|
|
156
|
+
border-radius: ${({borderRadius:e})=>e[4]};
|
|
157
|
+
column-gap: ${({spacing:e})=>e[1]};
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
transition: background-color ${({durations:e})=>e.lg}
|
|
160
|
+
${({easings:e})=>e["ease-out-power-2"]};
|
|
161
|
+
will-change: background-color;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
wui-image,
|
|
165
|
+
.icon-box {
|
|
166
|
+
width: ${({spacing:e})=>e[6]};
|
|
167
|
+
height: ${({spacing:e})=>e[6]};
|
|
168
|
+
border-radius: ${({borderRadius:e})=>e[4]};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
wui-text {
|
|
172
|
+
flex: 1;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.icon-box {
|
|
176
|
+
position: relative;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.icon-box[data-active='true'] {
|
|
180
|
+
background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.circle {
|
|
184
|
+
position: absolute;
|
|
185
|
+
left: 16px;
|
|
186
|
+
top: 15px;
|
|
187
|
+
width: 8px;
|
|
188
|
+
height: 8px;
|
|
189
|
+
background-color: ${({tokens:e})=>e.core.textSuccess};
|
|
190
|
+
box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
191
|
+
border-radius: 50%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* -- Hover & Active states ----------------------------------------------------------- */
|
|
195
|
+
@media (hover: hover) {
|
|
196
|
+
button:hover:enabled,
|
|
197
|
+
button:active:enabled {
|
|
198
|
+
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`;var d=globalThis&&globalThis.__decorate||function(e,t,r,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,a);else for(var h=e.length-1;h>=0;h--)(l=e[h])&&(i=(s<3?l(i):s>3?l(t,r,i):l(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};let c=class extends b{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.enableGreenCircle=!0,this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return n`
|
|
202
|
+
<button>
|
|
203
|
+
${this.leftImageTemplate()} ${this.textTemplate()} ${this.rightImageTemplate()}
|
|
204
|
+
</button>
|
|
205
|
+
`}leftImageTemplate(){const t=this.icon?n`<wui-icon
|
|
206
|
+
size=${z(this.iconSize)}
|
|
207
|
+
color="default"
|
|
208
|
+
name=${this.icon}
|
|
209
|
+
class="icon"
|
|
210
|
+
></wui-icon>`:n`<wui-image src=${this.imageSrc} alt=${this.alt}></wui-image>`;return n`
|
|
211
|
+
<wui-flex
|
|
212
|
+
alignItems="center"
|
|
213
|
+
justifyContent="center"
|
|
214
|
+
class="icon-box"
|
|
215
|
+
data-active=${!!this.icon}
|
|
216
|
+
>
|
|
217
|
+
${t}
|
|
218
|
+
${this.enableGreenCircle?n`<wui-flex class="circle"></wui-flex>`:null}
|
|
219
|
+
</wui-flex>
|
|
220
|
+
`}textTemplate(){return n`
|
|
221
|
+
<wui-text variant="lg-regular" color="primary">
|
|
222
|
+
${$.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})}
|
|
223
|
+
</wui-text>
|
|
224
|
+
`}rightImageTemplate(){return n`<wui-icon name="chevronBottom" size="sm" color="default"></wui-icon>`}};c.styles=[v,y,j];d([o()],c.prototype,"address",void 0);d([o()],c.prototype,"profileName",void 0);d([o()],c.prototype,"alt",void 0);d([o()],c.prototype,"imageSrc",void 0);d([o()],c.prototype,"icon",void 0);d([o()],c.prototype,"iconSize",void 0);d([o({type:Boolean})],c.prototype,"enableGreenCircle",void 0);d([o({type:Boolean})],c.prototype,"loading",void 0);d([o({type:Number})],c.prototype,"charsStart",void 0);d([o({type:Number})],c.prototype,"charsEnd",void 0);c=d([x("wui-wallet-switch")],c);export{k as n};
|