@skip-go/widget-web-component 3.14.4 → 3.17.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/build/1125.index.js +3 -0
- package/build/1133.index.js +8 -0
- package/build/1136.index.js +9 -0
- package/build/1139.index.js +18 -0
- package/build/1171.index.js +1 -1
- package/build/1189.index.js +1 -1
- package/build/1203.index.js +1 -1
- package/build/1207.index.js +1 -1
- package/build/1211.index.js +8 -0
- package/build/1226.index.js +8 -0
- package/build/1349.index.js +1 -1
- package/build/1361.index.js +1 -1
- package/build/1363.index.js +1 -1
- package/build/1370.index.js +1 -1
- package/build/1415.index.js +8 -0
- package/build/1426.index.js +3 -0
- package/build/1470.index.js +1 -1
- package/build/1572.index.js +11 -0
- package/build/1716.index.js +1 -1
- package/build/1776.index.js +8 -0
- package/build/1852.index.js +1 -1
- package/build/1881.index.js +1 -1
- package/build/1894.index.js +1 -1
- package/build/1911.index.js +1 -1
- package/build/1951.index.js +18 -0
- package/build/1979.index.js +30 -0
- package/build/2034.index.js +1 -1
- package/build/2131.index.js +1 -1
- package/build/2166.index.js +1 -1
- package/build/2202.index.js +61 -0
- package/build/2242.index.js +1 -1
- package/build/2289.index.js +8 -0
- package/build/2301.index.js +1 -1
- package/build/2410.index.js +1 -1
- package/build/2422.index.js +1 -0
- package/build/245.index.js +1 -1
- package/build/2496.index.js +1 -1
- package/build/2557.index.js +17 -0
- package/build/2699.index.js +1 -1
- package/build/2715.index.js +8 -0
- package/build/283.index.js +8 -0
- package/build/2844.index.js +13 -0
- package/build/2851.index.js +1 -0
- package/build/2902.index.js +15 -0
- package/build/3070.index.js +1 -1
- package/build/3099.index.js +8 -0
- package/build/3105.index.js +8 -0
- package/build/3131.index.js +6 -0
- package/build/3148.index.js +1 -1
- package/build/3472.index.js +1 -1
- package/build/3550.index.js +8 -0
- package/build/3574.index.js +1 -1
- package/build/362.index.js +12 -0
- package/build/3646.index.js +32 -0
- package/build/3726.index.js +1 -1
- package/build/3828.index.js +14 -0
- package/build/385.index.js +1 -1
- package/build/3857.index.js +14 -0
- package/build/3874.index.js +17 -0
- package/build/4028.index.js +1 -1
- package/build/4150.index.js +620 -0
- package/build/4194.index.js +317 -0
- package/build/4203.index.js +1 -1
- package/build/4226.index.js +14 -0
- package/build/4249.index.js +8 -0
- package/build/4264.index.js +1 -0
- package/build/428.index.js +1 -0
- package/build/4289.index.js +1 -1
- package/build/4319.index.js +1 -1
- package/build/4379.index.js +2069 -0
- package/build/4446.index.js +2 -0
- package/build/4683.index.js +1 -1
- package/build/4693.index.js +2 -2
- package/build/4729.index.js +1 -1
- package/build/4733.index.js +12 -0
- package/build/4857.index.js +12 -0
- package/build/4969.index.js +1 -1
- package/build/5069.index.js +1 -1
- package/build/5090.index.js +8 -0
- package/build/5193.index.js +1 -1
- package/build/5206.index.js +14 -0
- package/build/5218.index.js +6 -0
- package/build/5330.index.js +8 -0
- package/build/537.index.js +1 -1
- package/build/5438.index.js +9 -0
- package/build/5526.index.js +1 -1
- package/build/5572.index.js +1 -1
- package/build/5619.index.js +1 -1
- package/build/5642.index.js +2 -0
- package/build/5647.index.js +1 -1
- package/build/5737.index.js +1 -1
- package/build/577.index.js +8 -0
- package/build/5880.index.js +1 -1
- package/build/590.index.js +1 -1
- package/build/5972.index.js +622 -0
- package/build/602.index.js +9 -0
- package/build/6024.index.js +1 -1
- package/build/6036.index.js +8 -0
- package/build/6075.index.js +1 -1
- package/build/6123.index.js +1 -1
- package/build/6127.index.js +1 -1
- package/build/6138.index.js +18 -0
- package/build/6148.index.js +1 -1
- package/build/6151.index.js +1 -1
- package/build/6175.index.js +4 -0
- package/build/631.index.js +18 -0
- package/build/6323.index.js +1 -1
- package/build/6442.index.js +1 -1
- package/build/6484.index.js +1 -1
- package/build/6543.index.js +1 -1
- package/build/6553.index.js +8 -0
- package/build/6558.index.js +1 -0
- package/build/6573.index.js +1 -1
- package/build/6611.index.js +12 -0
- package/build/6639.index.js +8 -0
- package/build/6654.index.js +1 -0
- package/build/6705.index.js +12 -0
- package/build/6715.index.js +12 -0
- package/build/674.index.js +317 -0
- package/build/674.index.js.LICENSE.txt +17 -0
- package/build/6753.index.js +1 -1
- package/build/6811.index.js +8 -0
- package/build/6813.index.js +4 -0
- package/build/6869.index.js +1 -1
- package/build/6969.index.js +12 -0
- package/build/7172.index.js +1 -1
- package/build/7176.index.js +16 -0
- package/build/7201.index.js +878 -0
- package/build/7272.index.js +6 -0
- package/build/7311.index.js +11 -0
- package/build/7409.index.js +1 -0
- package/build/7428.index.js +4 -0
- package/build/7540.index.js +8 -0
- package/build/7618.index.js +1 -1
- package/build/7762.index.js +1 -1
- package/build/7780.index.js +3 -0
- package/build/7981.index.js +1 -1
- package/build/8000.index.js +1 -1
- package/build/8029.index.js +8 -0
- package/build/8036.index.js +1 -1
- package/build/8147.index.js +16 -0
- package/build/8249.index.js +8 -0
- package/build/8318.index.js +1 -1
- package/build/8367.index.js +1 -1
- package/build/8373.index.js +2082 -0
- package/build/8373.index.js.LICENSE.txt +5 -0
- package/build/8467.index.js +1 -1
- package/build/8483.index.js +1 -1
- package/build/8631.index.js +8 -0
- package/build/8645.index.js +2 -0
- package/build/8645.index.js.LICENSE.txt +11 -0
- package/build/8714.index.js +8 -0
- package/build/8717.index.js +6 -0
- package/build/8904.index.js +1 -1
- package/build/896.index.js +1 -1
- package/build/8964.index.js +26 -0
- package/build/897.index.js +11 -0
- package/build/9081.index.js +8 -0
- package/build/9120.index.js +8 -0
- package/build/913.index.js +15 -0
- package/build/9192.index.js +1 -0
- package/build/9194.index.js +878 -4
- package/build/9309.index.js +15 -0
- package/build/9313.index.js +8 -0
- package/build/9372.index.js +1 -1
- package/build/9396.index.js +12 -0
- package/build/9476.index.js +1 -1
- package/build/9607.index.js +8 -0
- package/build/967.index.js +5 -0
- package/build/984.index.js +8 -0
- package/build/9850.index.js +14 -0
- package/build/9884.index.js +1 -1
- package/build/index.js +769 -1633
- package/build/index.js.LICENSE.txt +6 -16
- package/package.json +1 -1
- package/build/1179.index.js +0 -2
- package/build/1256.index.js +0 -317
- package/build/1934.index.js +0 -2
- package/build/1934.index.js.LICENSE.txt +0 -17
- package/build/4619.index.js +0 -622
- package/build/4833.index.js +0 -2
- package/build/5902.index.js +0 -2
- package/build/6319.index.js +0 -2069
- package/build/6700.index.js +0 -1
- package/build/7084.index.js +0 -2
- package/build/7544.index.js +0 -1
- package/build/7591.index.js +0 -1
- package/build/8780.index.js +0 -1
- /package/build/{1256.index.js.LICENSE.txt → 4194.index.js.LICENSE.txt} +0 -0
- /package/build/{6319.index.js.LICENSE.txt → 4379.index.js.LICENSE.txt} +0 -0
- /package/build/{4833.index.js.LICENSE.txt → 4446.index.js.LICENSE.txt} +0 -0
- /package/build/{1179.index.js.LICENSE.txt → 5642.index.js.LICENSE.txt} +0 -0
- /package/build/{5902.index.js.LICENSE.txt → 7201.index.js.LICENSE.txt} +0 -0
- /package/build/{7084.index.js.LICENSE.txt → 9194.index.js.LICENSE.txt} +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Lodash <https://lodash.com/>
|
|
4
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
-
* Released under MIT license <https://lodash.com/license>
|
|
6
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
12
|
-
*
|
|
13
|
-
* @version 0.8.0
|
|
14
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
15
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
16
|
-
* @license MIT
|
|
17
|
-
*/
|
package/build/4619.index.js
DELETED
|
@@ -1,622 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=4619;export const __webpack_ids__=[4619];export const __webpack_modules__={94619:(e,t,i)=>{i.r(t),i.d(t,{W3mModal:()=>ue});var o=i(94062),a=i(639),r=i(29658),s=i(72269),n=i(36976),c=i(88759),l=i(96528),w=i(40565),d=i(93474),p=i(72397),u=i(36507),h=i(49951),m=i(92492),v=i(22143),g=i(32084),y=i(67232),f=i(13679);const b=o.AH`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
5
|
-
box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
|
|
6
|
-
background-color: var(--wui-color-modal-bg);
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:host([data-embedded='true']) {
|
|
11
|
-
box-shadow:
|
|
12
|
-
0 0 0 1px var(--wui-color-gray-glass-005),
|
|
13
|
-
0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
|
|
14
|
-
}
|
|
15
|
-
`;let k=class extends o.WF{render(){return o.qy`<slot></slot>`}};k.styles=[y.W5,b],k=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(0,f.E)("wui-card")],k),i(85017);var x=i(31100);i(59851),i(68146),i(77164);const C=o.AH`
|
|
16
|
-
:host {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
padding: var(--wui-spacing-s);
|
|
21
|
-
border-radius: var(--wui-border-radius-s);
|
|
22
|
-
border: 1px solid var(--wui-color-dark-glass-100);
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
background-color: var(--wui-color-bg-325);
|
|
25
|
-
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
wui-flex {
|
|
29
|
-
width: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
wui-text {
|
|
33
|
-
word-break: break-word;
|
|
34
|
-
flex: 1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.close {
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.icon-box {
|
|
42
|
-
height: 40px;
|
|
43
|
-
width: 40px;
|
|
44
|
-
border-radius: var(--wui-border-radius-3xs);
|
|
45
|
-
background-color: var(--local-icon-bg-value);
|
|
46
|
-
}
|
|
47
|
-
`;var W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let S=class extends o.WF{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=`\n --local-icon-bg-value: var(--wui-color-${this.backgroundColor});\n `,o.qy`
|
|
48
|
-
<wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
|
|
49
|
-
<wui-flex columnGap="xs" flexDirection="row" alignItems="center">
|
|
50
|
-
<wui-flex
|
|
51
|
-
flexDirection="row"
|
|
52
|
-
alignItems="center"
|
|
53
|
-
justifyContent="center"
|
|
54
|
-
class="icon-box"
|
|
55
|
-
>
|
|
56
|
-
<wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon>
|
|
57
|
-
</wui-flex>
|
|
58
|
-
<wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text"
|
|
59
|
-
>${this.message}</wui-text
|
|
60
|
-
>
|
|
61
|
-
</wui-flex>
|
|
62
|
-
<wui-icon
|
|
63
|
-
class="close"
|
|
64
|
-
color="bg-350"
|
|
65
|
-
size="sm"
|
|
66
|
-
name="close"
|
|
67
|
-
@click=${this.onClose}
|
|
68
|
-
></wui-icon>
|
|
69
|
-
</wui-flex>
|
|
70
|
-
`}onClose(){x.h.close()}};S.styles=[y.W5,C],W([(0,a.MZ)()],S.prototype,"message",void 0),W([(0,a.MZ)()],S.prototype,"backgroundColor",void 0),W([(0,a.MZ)()],S.prototype,"iconColor",void 0),W([(0,a.MZ)()],S.prototype,"icon",void 0),S=W([(0,f.E)("wui-alertbar")],S);const q=o.AH`
|
|
71
|
-
:host {
|
|
72
|
-
display: block;
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: var(--wui-spacing-s);
|
|
75
|
-
left: var(--wui-spacing-l);
|
|
76
|
-
right: var(--wui-spacing-l);
|
|
77
|
-
opacity: 0;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
}
|
|
80
|
-
`;var I=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const R={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"exclamationTriangle"}};let N=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=x.h.state.open,this.onOpen(!0),this.unsubscribe.push(x.h.subscribeKey("open",(e=>{this.open=e,this.onOpen(!1)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{message:e,variant:t}=x.h.state,i=R[t];return o.qy`
|
|
81
|
-
<wui-alertbar
|
|
82
|
-
message=${e}
|
|
83
|
-
backgroundColor=${i?.backgroundColor}
|
|
84
|
-
iconColor=${i?.iconColor}
|
|
85
|
-
icon=${i?.icon}
|
|
86
|
-
></wui-alertbar>
|
|
87
|
-
`}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};N.styles=q,I([(0,a.wk)()],N.prototype,"open",void 0),N=I([(0,g.EM)("w3m-alertbar")],N);var A=i(23981),E=i(86454),O=i(6262),T=i(48812),$=i(47981);const P=o.AH`
|
|
88
|
-
button {
|
|
89
|
-
border-radius: var(--local-border-radius);
|
|
90
|
-
color: var(--wui-color-fg-100);
|
|
91
|
-
padding: var(--local-padding);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@media (max-width: 700px) {
|
|
95
|
-
button {
|
|
96
|
-
padding: var(--wui-spacing-s);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
button > wui-icon {
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
button:disabled > wui-icon {
|
|
105
|
-
color: var(--wui-color-bg-300) !important;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
button:disabled {
|
|
109
|
-
background-color: transparent;
|
|
110
|
-
}
|
|
111
|
-
`;var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let j=class extends o.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){const e="lg"===this.size?"--wui-border-radius-xs":"--wui-border-radius-xxs",t="lg"===this.size?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`\n --local-border-radius: var(${e});\n --local-padding: var(${t});\n`,o.qy`
|
|
112
|
-
<button ?disabled=${this.disabled}>
|
|
113
|
-
<wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
|
|
114
|
-
</button>
|
|
115
|
-
`}};j.styles=[y.W5,y.fD,y.ck,P],D([(0,a.MZ)()],j.prototype,"size",void 0),D([(0,a.MZ)({type:Boolean})],j.prototype,"disabled",void 0),D([(0,a.MZ)()],j.prototype,"icon",void 0),D([(0,a.MZ)()],j.prototype,"iconColor",void 0),j=D([(0,f.E)("wui-icon-link")],j),i(71878),i(79828);const H=o.AH`
|
|
116
|
-
button {
|
|
117
|
-
display: block;
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
padding: var(--wui-spacing-xxs);
|
|
121
|
-
gap: var(--wui-spacing-xxs);
|
|
122
|
-
transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);
|
|
123
|
-
border-radius: var(--wui-border-radius-xxs);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
wui-image {
|
|
127
|
-
border-radius: 100%;
|
|
128
|
-
width: var(--wui-spacing-xl);
|
|
129
|
-
height: var(--wui-spacing-xl);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
wui-icon-box {
|
|
133
|
-
width: var(--wui-spacing-xl);
|
|
134
|
-
height: var(--wui-spacing-xl);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
button:hover {
|
|
138
|
-
background-color: var(--wui-color-gray-glass-002);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
button:active {
|
|
142
|
-
background-color: var(--wui-color-gray-glass-005);
|
|
143
|
-
}
|
|
144
|
-
`;var B=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let M=class extends o.WF{constructor(){super(...arguments),this.imageSrc=""}render(){return o.qy`<button>
|
|
145
|
-
${this.imageTemplate()}
|
|
146
|
-
<wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
|
|
147
|
-
</button>`}imageTemplate(){return this.imageSrc?o.qy`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:o.qy`<wui-icon-box
|
|
148
|
-
size="xxs"
|
|
149
|
-
iconColor="fg-200"
|
|
150
|
-
backgroundColor="fg-100"
|
|
151
|
-
background="opaque"
|
|
152
|
-
icon="networkPlaceholder"
|
|
153
|
-
></wui-icon-box>`}};M.styles=[y.W5,y.fD,y.ck,H],B([(0,a.MZ)()],M.prototype,"imageSrc",void 0),M=B([(0,f.E)("wui-select")],M),i(47301),i(3389);var z=i(42177);const L=o.AH`
|
|
154
|
-
:host {
|
|
155
|
-
height: 64px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
wui-text {
|
|
159
|
-
text-transform: capitalize;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
wui-flex.w3m-header-title {
|
|
163
|
-
transform: translateY(0);
|
|
164
|
-
opacity: 1;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
wui-flex.w3m-header-title[view-direction='prev'] {
|
|
168
|
-
animation:
|
|
169
|
-
slide-down-out 120ms forwards var(--wui-ease-out-power-2),
|
|
170
|
-
slide-down-in 120ms forwards var(--wui-ease-out-power-2);
|
|
171
|
-
animation-delay: 0ms, 200ms;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
wui-flex.w3m-header-title[view-direction='next'] {
|
|
175
|
-
animation:
|
|
176
|
-
slide-up-out 120ms forwards var(--wui-ease-out-power-2),
|
|
177
|
-
slide-up-in 120ms forwards var(--wui-ease-out-power-2);
|
|
178
|
-
animation-delay: 0ms, 200ms;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
wui-icon-link[data-hidden='true'] {
|
|
182
|
-
opacity: 0 !important;
|
|
183
|
-
pointer-events: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@keyframes slide-up-out {
|
|
187
|
-
from {
|
|
188
|
-
transform: translateY(0px);
|
|
189
|
-
opacity: 1;
|
|
190
|
-
}
|
|
191
|
-
to {
|
|
192
|
-
transform: translateY(3px);
|
|
193
|
-
opacity: 0;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@keyframes slide-up-in {
|
|
198
|
-
from {
|
|
199
|
-
transform: translateY(-3px);
|
|
200
|
-
opacity: 0;
|
|
201
|
-
}
|
|
202
|
-
to {
|
|
203
|
-
transform: translateY(0);
|
|
204
|
-
opacity: 1;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
@keyframes slide-down-out {
|
|
209
|
-
from {
|
|
210
|
-
transform: translateY(0px);
|
|
211
|
-
opacity: 1;
|
|
212
|
-
}
|
|
213
|
-
to {
|
|
214
|
-
transform: translateY(-3px);
|
|
215
|
-
opacity: 0;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
@keyframes slide-down-in {
|
|
220
|
-
from {
|
|
221
|
-
transform: translateY(3px);
|
|
222
|
-
opacity: 0;
|
|
223
|
-
}
|
|
224
|
-
to {
|
|
225
|
-
transform: translateY(0);
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
`;var U=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const _=["SmartSessionList"];function K(){const e=p.I.state.data?.connector?.name,t=p.I.state.data?.wallet?.name,i=p.I.state.data?.network?.name,o=t??e,a=w.a.getConnectors();return{Connect:`Connect ${1===a.length&&"w3m-email"===a[0]?.id?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Profile:void 0,SwitchNetwork:i??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:A.U.state.socialProvider?A.U.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In"}}let F=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.heading=K()[p.I.state.view],this.network=l.W.state.activeCaipNetwork,this.networkImage=E.$.getNetworkImage(this.network),this.buffering=!1,this.showBack=!1,this.prevHistoryLength=1,this.view=p.I.state.view,this.viewDirection="",this.headerText=K()[p.I.state.view],this.unsubscribe.push(O.j.subscribeNetworkImages((()=>{this.networkImage=E.$.getNetworkImage(this.network)})),p.I.subscribeKey("view",(e=>{setTimeout((()=>{this.view=e,this.headerText=K()[e]}),z.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()})),T.x.subscribeKey("buffering",(e=>this.buffering=e)),l.W.subscribeKey("activeCaipNetwork",(e=>{this.network=e,this.networkImage=E.$.getNetworkImage(this.network)})))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){return o.qy`
|
|
230
|
-
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
231
|
-
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
232
|
-
</wui-flex>
|
|
233
|
-
`}onWalletHelp(){$.E.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),p.I.push("WhatIsAWallet")}async onClose(){"UnsupportedChain"===p.I.state.view||await u.U.isSIWXCloseDisabled()?c.W.shake():c.W.close()}rightHeaderTemplate(){const e=n.H?.state?.features?.smartSessions;return"Account"===p.I.state.view&&e?o.qy`<wui-flex>
|
|
234
|
-
<wui-icon-link
|
|
235
|
-
icon="clock"
|
|
236
|
-
@click=${()=>p.I.push("SmartSessionList")}
|
|
237
|
-
data-testid="w3m-header-smart-sessions"
|
|
238
|
-
></wui-icon-link>
|
|
239
|
-
${this.closeButtonTemplate()}
|
|
240
|
-
</wui-flex> `:this.closeButtonTemplate()}closeButtonTemplate(){return o.qy`
|
|
241
|
-
<wui-icon-link
|
|
242
|
-
?disabled=${this.buffering}
|
|
243
|
-
icon="close"
|
|
244
|
-
@click=${this.onClose.bind(this)}
|
|
245
|
-
data-testid="w3m-header-close"
|
|
246
|
-
></wui-icon-link>
|
|
247
|
-
`}titleTemplate(){const e=_.includes(this.view);return o.qy`
|
|
248
|
-
<wui-flex
|
|
249
|
-
view-direction="${this.viewDirection}"
|
|
250
|
-
class="w3m-header-title"
|
|
251
|
-
alignItems="center"
|
|
252
|
-
gap="xs"
|
|
253
|
-
>
|
|
254
|
-
<wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text"
|
|
255
|
-
>${this.headerText}</wui-text
|
|
256
|
-
>
|
|
257
|
-
${e?o.qy`<wui-tag variant="main">Beta</wui-tag>`:null}
|
|
258
|
-
</wui-flex>
|
|
259
|
-
`}leftHeaderTemplate(){const{view:e}=p.I.state,t="Connect"===e,i=n.H.state.enableEmbedded,a="ApproveTransaction"===e,s="ConnectingSiwe"===e,c="Account"===e,l=n.H.state.enableNetworkSwitch,w=a||s||t&&i;return c&&l?o.qy`<wui-select
|
|
260
|
-
id="dynamic"
|
|
261
|
-
data-testid="w3m-account-select-network"
|
|
262
|
-
active-network=${(0,r.J)(this.network?.name)}
|
|
263
|
-
@click=${this.onNetworks.bind(this)}
|
|
264
|
-
imageSrc=${(0,r.J)(this.networkImage)}
|
|
265
|
-
></wui-select>`:this.showBack&&!w?o.qy`<wui-icon-link
|
|
266
|
-
data-testid="header-back"
|
|
267
|
-
id="dynamic"
|
|
268
|
-
icon="chevronLeft"
|
|
269
|
-
?disabled=${this.buffering}
|
|
270
|
-
@click=${this.onGoBack.bind(this)}
|
|
271
|
-
></wui-icon-link>`:o.qy`<wui-icon-link
|
|
272
|
-
data-hidden=${!t}
|
|
273
|
-
id="dynamic"
|
|
274
|
-
icon="helpCircle"
|
|
275
|
-
@click=${this.onWalletHelp.bind(this)}
|
|
276
|
-
></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&($.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),p.I.push("Networks"))}isAllowedNetworkSwitch(){const e=l.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find((({id:e})=>e===this.network?.id));return t||!i}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=p.I.state;let t=z.o.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=z.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){const{history:e}=p.I.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){p.I.goBack()}};F.styles=L,U([(0,a.wk)()],F.prototype,"heading",void 0),U([(0,a.wk)()],F.prototype,"network",void 0),U([(0,a.wk)()],F.prototype,"networkImage",void 0),U([(0,a.wk)()],F.prototype,"buffering",void 0),U([(0,a.wk)()],F.prototype,"showBack",void 0),U([(0,a.wk)()],F.prototype,"prevHistoryLength",void 0),U([(0,a.wk)()],F.prototype,"view",void 0),U([(0,a.wk)()],F.prototype,"viewDirection",void 0),U([(0,a.wk)()],F.prototype,"headerText",void 0),F=U([(0,g.EM)("w3m-header")],F),i(31117);const X=o.AH`
|
|
277
|
-
:host {
|
|
278
|
-
display: flex;
|
|
279
|
-
column-gap: var(--wui-spacing-s);
|
|
280
|
-
align-items: center;
|
|
281
|
-
padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
|
|
282
|
-
border-radius: var(--wui-border-radius-s);
|
|
283
|
-
border: 1px solid var(--wui-color-gray-glass-005);
|
|
284
|
-
box-sizing: border-box;
|
|
285
|
-
background-color: var(--wui-color-bg-175);
|
|
286
|
-
box-shadow:
|
|
287
|
-
0px 14px 64px -4px rgba(0, 0, 0, 0.15),
|
|
288
|
-
0px 8px 22px -6px rgba(0, 0, 0, 0.15);
|
|
289
|
-
|
|
290
|
-
max-width: 300px;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
:host wui-loading-spinner {
|
|
294
|
-
margin-left: var(--wui-spacing-3xs);
|
|
295
|
-
}
|
|
296
|
-
`;var Z=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let V=class extends o.WF{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return o.qy`
|
|
297
|
-
${this.templateIcon()}
|
|
298
|
-
<wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
|
|
299
|
-
>${this.message}</wui-text
|
|
300
|
-
>
|
|
301
|
-
`}templateIcon(){return this.loading?o.qy`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:"default"===this.iconType?o.qy`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:o.qy`<wui-icon-box
|
|
302
|
-
size="sm"
|
|
303
|
-
iconSize="xs"
|
|
304
|
-
iconColor=${this.iconColor}
|
|
305
|
-
backgroundColor=${this.backgroundColor}
|
|
306
|
-
icon=${this.icon}
|
|
307
|
-
background="opaque"
|
|
308
|
-
></wui-icon-box>`}};V.styles=[y.W5,X],Z([(0,a.MZ)()],V.prototype,"backgroundColor",void 0),Z([(0,a.MZ)()],V.prototype,"iconColor",void 0),Z([(0,a.MZ)()],V.prototype,"icon",void 0),Z([(0,a.MZ)()],V.prototype,"message",void 0),Z([(0,a.MZ)()],V.prototype,"loading",void 0),Z([(0,a.MZ)()],V.prototype,"iconType",void 0),V=Z([(0,f.E)("wui-snackbar")],V);const Y=o.AH`
|
|
309
|
-
:host {
|
|
310
|
-
display: block;
|
|
311
|
-
position: absolute;
|
|
312
|
-
opacity: 0;
|
|
313
|
-
pointer-events: none;
|
|
314
|
-
top: 11px;
|
|
315
|
-
left: 50%;
|
|
316
|
-
width: max-content;
|
|
317
|
-
}
|
|
318
|
-
`;var G=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const J={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let Q=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=m.P.state.open,this.unsubscribe.push(m.P.subscribeKey("open",(e=>{this.open=e,this.onOpen()})))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach((e=>e()))}render(){const{message:e,variant:t,svg:i}=m.P.state,a=J[t],{icon:r,iconColor:s}=i??a??{};return o.qy`
|
|
319
|
-
<wui-snackbar
|
|
320
|
-
message=${e}
|
|
321
|
-
backgroundColor=${a?.backgroundColor}
|
|
322
|
-
iconColor=${s}
|
|
323
|
-
icon=${r}
|
|
324
|
-
.loading=${"loading"===t}
|
|
325
|
-
></wui-snackbar>
|
|
326
|
-
`}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),m.P.state.autoClose&&(this.timeout=setTimeout((()=>m.P.hide()),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Q.styles=Y,G([(0,a.wk)()],Q.prototype,"open",void 0),Q=G([(0,g.EM)("w3m-snackbar")],Q);var ee=i(86806),te=i(39150);const ie=(0,ee.BX)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),oe={state:ie,subscribe:e=>(0,ee.B1)(ie,(()=>e(ie))),subscribeKey:(e,t)=>(0,te.u$)(ie,e,t),showTooltip({message:e,triggerRect:t,variant:i}){ie.open=!0,ie.message=e,ie.triggerRect=t,ie.variant=i},hide(){ie.open=!1,ie.message="",ie.triggerRect={width:0,height:0,top:0,left:0}}};i(22835);const ae=o.AH`
|
|
327
|
-
:host {
|
|
328
|
-
pointer-events: none;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
:host > wui-flex {
|
|
332
|
-
display: var(--w3m-tooltip-display);
|
|
333
|
-
opacity: var(--w3m-tooltip-opacity);
|
|
334
|
-
padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
|
|
335
|
-
border-radius: var(--wui-border-radius-xxs);
|
|
336
|
-
color: var(--wui-color-bg-100);
|
|
337
|
-
position: fixed;
|
|
338
|
-
top: var(--w3m-tooltip-top);
|
|
339
|
-
left: var(--w3m-tooltip-left);
|
|
340
|
-
transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
|
|
341
|
-
max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl));
|
|
342
|
-
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
|
343
|
-
will-change: opacity;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
:host([data-variant='shade']) > wui-flex {
|
|
347
|
-
background-color: var(--wui-color-bg-150);
|
|
348
|
-
border: 1px solid var(--wui-color-gray-glass-005);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
:host([data-variant='shade']) > wui-flex > wui-text {
|
|
352
|
-
color: var(--wui-color-fg-150);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
:host([data-variant='fill']) > wui-flex {
|
|
356
|
-
background-color: var(--wui-color-fg-100);
|
|
357
|
-
border: none;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
wui-icon {
|
|
361
|
-
position: absolute;
|
|
362
|
-
width: 12px !important;
|
|
363
|
-
height: 4px !important;
|
|
364
|
-
color: var(--wui-color-bg-150);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
wui-icon[data-placement='top'] {
|
|
368
|
-
bottom: 0px;
|
|
369
|
-
left: 50%;
|
|
370
|
-
transform: translate(-50%, 95%);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
wui-icon[data-placement='bottom'] {
|
|
374
|
-
top: 0;
|
|
375
|
-
left: 50%;
|
|
376
|
-
transform: translate(-50%, -95%) rotate(180deg);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
wui-icon[data-placement='right'] {
|
|
380
|
-
top: 50%;
|
|
381
|
-
left: 0;
|
|
382
|
-
transform: translate(-65%, -50%) rotate(90deg);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
wui-icon[data-placement='left'] {
|
|
386
|
-
top: 50%;
|
|
387
|
-
right: 0%;
|
|
388
|
-
transform: translate(65%, -50%) rotate(270deg);
|
|
389
|
-
}
|
|
390
|
-
`;var re=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let se=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=oe.state.open,this.message=oe.state.message,this.triggerRect=oe.state.triggerRect,this.variant=oe.state.variant,this.unsubscribe.push(oe.subscribe((e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=`\n --w3m-tooltip-top: ${e}px;\n --w3m-tooltip-left: ${t}px;\n --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;\n --w3m-tooltip-display: ${this.open?"flex":"none"};\n --w3m-tooltip-opacity: ${this.open?1:0};\n `,o.qy`<wui-flex>
|
|
391
|
-
<wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon>
|
|
392
|
-
<wui-text color="inherit" variant="small-500">${this.message}</wui-text>
|
|
393
|
-
</wui-flex>`}};se.styles=[ae],re([(0,a.wk)()],se.prototype,"open",void 0),re([(0,a.wk)()],se.prototype,"message",void 0),re([(0,a.wk)()],se.prototype,"triggerRect",void 0),re([(0,a.wk)()],se.prototype,"variant",void 0),se=re([(0,g.EM)("w3m-tooltip"),(0,g.EM)("w3m-tooltip")],se);const ne=o.AH`
|
|
394
|
-
:host {
|
|
395
|
-
--prev-height: 0px;
|
|
396
|
-
--new-height: 0px;
|
|
397
|
-
display: block;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
div.w3m-router-container {
|
|
401
|
-
transform: translateY(0);
|
|
402
|
-
opacity: 1;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
div.w3m-router-container[view-direction='prev'] {
|
|
406
|
-
animation:
|
|
407
|
-
slide-left-out 150ms forwards ease,
|
|
408
|
-
slide-left-in 150ms forwards ease;
|
|
409
|
-
animation-delay: 0ms, 200ms;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
div.w3m-router-container[view-direction='next'] {
|
|
413
|
-
animation:
|
|
414
|
-
slide-right-out 150ms forwards ease,
|
|
415
|
-
slide-right-in 150ms forwards ease;
|
|
416
|
-
animation-delay: 0ms, 200ms;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
@keyframes slide-left-out {
|
|
420
|
-
from {
|
|
421
|
-
transform: translateX(0px);
|
|
422
|
-
opacity: 1;
|
|
423
|
-
}
|
|
424
|
-
to {
|
|
425
|
-
transform: translateX(10px);
|
|
426
|
-
opacity: 0;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
@keyframes slide-left-in {
|
|
431
|
-
from {
|
|
432
|
-
transform: translateX(-10px);
|
|
433
|
-
opacity: 0;
|
|
434
|
-
}
|
|
435
|
-
to {
|
|
436
|
-
transform: translateX(0);
|
|
437
|
-
opacity: 1;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
@keyframes slide-right-out {
|
|
442
|
-
from {
|
|
443
|
-
transform: translateX(0px);
|
|
444
|
-
opacity: 1;
|
|
445
|
-
}
|
|
446
|
-
to {
|
|
447
|
-
transform: translateX(-10px);
|
|
448
|
-
opacity: 0;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
@keyframes slide-right-in {
|
|
453
|
-
from {
|
|
454
|
-
transform: translateX(10px);
|
|
455
|
-
opacity: 0;
|
|
456
|
-
}
|
|
457
|
-
to {
|
|
458
|
-
transform: translateX(0);
|
|
459
|
-
opacity: 1;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
`;var ce=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let le=class extends o.WF{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=p.I.state.view,this.viewDirection="",this.unsubscribe.push(p.I.subscribeKey("view",(e=>this.onViewChange(e))))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e?.contentRect.height}px`;"0px"!==this.prevHeight&&(this.style.setProperty("--prev-height",this.prevHeight),this.style.setProperty("--new-height",t),this.style.animation="w3m-view-height 150ms forwards ease",this.style.height="auto"),setTimeout((()=>{this.prevHeight=t,this.style.animation="unset"}),z.o.ANIMATION_DURATIONS.ModalHeight)})),this.resizeObserver?.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach((e=>e()))}render(){return o.qy`<div class="w3m-router-container" view-direction="${this.viewDirection}">
|
|
463
|
-
${this.viewTemplate()}
|
|
464
|
-
</div>`}viewTemplate(){switch(this.view){case"AccountSettings":return o.qy`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return o.qy`<w3m-account-view></w3m-account-view>`;case"AllWallets":return o.qy`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return o.qy`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return o.qy`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return o.qy`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return o.qy`<w3m-connect-view></w3m-connect-view>`;case"Create":return o.qy`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return o.qy`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return o.qy`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return o.qy`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return o.qy`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return o.qy`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return o.qy`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return o.qy`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return o.qy`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return o.qy`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return o.qy`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return o.qy`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return o.qy`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return o.qy`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return o.qy`<w3m-network-switch-view></w3m-network-switch-view>`;case"Profile":return o.qy`<w3m-profile-view></w3m-profile-view>`;case"SwitchAddress":return o.qy`<w3m-switch-address-view></w3m-switch-address-view>`;case"Transactions":return o.qy`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return o.qy`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return o.qy`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return o.qy`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return o.qy`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return o.qy`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return o.qy`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return o.qy`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return o.qy`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return o.qy`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return o.qy`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return o.qy`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return o.qy`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return o.qy`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return o.qy`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return o.qy`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return o.qy`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return o.qy`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return o.qy`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return o.qy`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return o.qy`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return o.qy`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return o.qy`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return o.qy`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return o.qy`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return o.qy`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return o.qy`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return o.qy`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return o.qy`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`}}onViewChange(e){oe.hide();let t=z.o.VIEW_DIRECTION.Next;const{history:i}=p.I.state;i.length<this.prevHistoryLength&&(t=z.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=i.length,this.viewDirection=t,setTimeout((()=>{this.view=e}),z.o.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){return this.shadowRoot?.querySelector("div")}};le.styles=ne,ce([(0,a.wk)()],le.prototype,"view",void 0),ce([(0,a.wk)()],le.prototype,"viewDirection",void 0),le=ce([(0,g.EM)("w3m-router")],le);const we=o.AH`
|
|
465
|
-
:host {
|
|
466
|
-
z-index: var(--w3m-z-index);
|
|
467
|
-
display: block;
|
|
468
|
-
backface-visibility: hidden;
|
|
469
|
-
will-change: opacity;
|
|
470
|
-
position: fixed;
|
|
471
|
-
top: 0;
|
|
472
|
-
left: 0;
|
|
473
|
-
right: 0;
|
|
474
|
-
bottom: 0;
|
|
475
|
-
pointer-events: none;
|
|
476
|
-
opacity: 0;
|
|
477
|
-
background-color: var(--wui-cover);
|
|
478
|
-
transition: opacity 0.2s var(--wui-ease-out-power-2);
|
|
479
|
-
will-change: opacity;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
:host(.open) {
|
|
483
|
-
opacity: 1;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
:host(.embedded) {
|
|
487
|
-
position: relative;
|
|
488
|
-
pointer-events: unset;
|
|
489
|
-
background: none;
|
|
490
|
-
width: 100%;
|
|
491
|
-
opacity: 1;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
wui-card {
|
|
495
|
-
max-width: var(--w3m-modal-width);
|
|
496
|
-
width: 100%;
|
|
497
|
-
position: relative;
|
|
498
|
-
animation: zoom-in 0.2s var(--wui-ease-out-power-2);
|
|
499
|
-
animation-fill-mode: backwards;
|
|
500
|
-
outline: none;
|
|
501
|
-
transition:
|
|
502
|
-
border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),
|
|
503
|
-
background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);
|
|
504
|
-
will-change: border-radius, background-color;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
:host(.embedded) wui-card {
|
|
508
|
-
max-width: 400px;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
wui-card[shake='true'] {
|
|
512
|
-
animation:
|
|
513
|
-
zoom-in 0.2s var(--wui-ease-out-power-2),
|
|
514
|
-
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
wui-flex {
|
|
518
|
-
overflow-x: hidden;
|
|
519
|
-
overflow-y: auto;
|
|
520
|
-
display: flex;
|
|
521
|
-
align-items: center;
|
|
522
|
-
justify-content: center;
|
|
523
|
-
width: 100%;
|
|
524
|
-
height: 100%;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
@media (max-height: 700px) and (min-width: 431px) {
|
|
528
|
-
wui-flex {
|
|
529
|
-
align-items: flex-start;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
wui-card {
|
|
533
|
-
margin: var(--wui-spacing-xxl) 0px;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
@media (max-width: 430px) {
|
|
538
|
-
wui-flex {
|
|
539
|
-
align-items: flex-end;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
wui-card {
|
|
543
|
-
max-width: 100%;
|
|
544
|
-
border-bottom-left-radius: var(--local-border-bottom-mobile-radius);
|
|
545
|
-
border-bottom-right-radius: var(--local-border-bottom-mobile-radius);
|
|
546
|
-
border-bottom: none;
|
|
547
|
-
animation: slide-in 0.2s var(--wui-ease-out-power-2);
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
wui-card[shake='true'] {
|
|
551
|
-
animation:
|
|
552
|
-
slide-in 0.2s var(--wui-ease-out-power-2),
|
|
553
|
-
w3m-shake 0.5s var(--wui-ease-out-power-2);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
@keyframes zoom-in {
|
|
558
|
-
0% {
|
|
559
|
-
transform: scale(0.95) translateY(0);
|
|
560
|
-
}
|
|
561
|
-
100% {
|
|
562
|
-
transform: scale(1) translateY(0);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
@keyframes slide-in {
|
|
567
|
-
0% {
|
|
568
|
-
transform: scale(1) translateY(50px);
|
|
569
|
-
}
|
|
570
|
-
100% {
|
|
571
|
-
transform: scale(1) translateY(0);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
@keyframes w3m-shake {
|
|
576
|
-
0% {
|
|
577
|
-
transform: scale(1) rotate(0deg);
|
|
578
|
-
}
|
|
579
|
-
20% {
|
|
580
|
-
transform: scale(1) rotate(-1deg);
|
|
581
|
-
}
|
|
582
|
-
40% {
|
|
583
|
-
transform: scale(1) rotate(1.5deg);
|
|
584
|
-
}
|
|
585
|
-
60% {
|
|
586
|
-
transform: scale(1) rotate(-1.5deg);
|
|
587
|
-
}
|
|
588
|
-
80% {
|
|
589
|
-
transform: scale(1) rotate(1deg);
|
|
590
|
-
}
|
|
591
|
-
100% {
|
|
592
|
-
transform: scale(1) rotate(0deg);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
@keyframes w3m-view-height {
|
|
597
|
-
from {
|
|
598
|
-
height: var(--prev-height);
|
|
599
|
-
}
|
|
600
|
-
to {
|
|
601
|
-
height: var(--new-height);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
`;var de=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const pe="scroll-lock";let ue=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=n.H.state.enableEmbedded,this.open=c.W.state.open,this.caipAddress=l.W.state.activeCaipAddress,this.caipNetwork=l.W.state.activeCaipNetwork,this.shake=c.W.state.shake,this.filterByNamespace=w.a.state.filterByNamespace,this.initializeTheming(),d.N.prefetchAnalyticsConfig(),this.unsubscribe.push(c.W.subscribeKey("open",(e=>e?this.onOpen():this.onClose())),c.W.subscribeKey("shake",(e=>this.shake=e)),l.W.subscribeKey("activeCaipNetwork",(e=>this.onNewNetwork(e))),l.W.subscribeKey("activeCaipAddress",(e=>this.onNewAddress(e))),n.H.subscribeKey("enableEmbedded",(e=>this.enableEmbedded=e)),w.a.subscribeKey("filterByNamespace",(e=>{this.filterByNamespace===e||l.W.getAccountData(e)?.caipAddress||(d.N.fetchRecommendedWallets(),this.filterByNamespace=e)})))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded)return c.W.close(),void this.prefetch();this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.onRemoveKeyboardListener()}render(){return this.style.cssText=`\n --local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"};\n `,this.enableEmbedded?o.qy`${this.contentTemplate()}
|
|
605
|
-
<w3m-tooltip></w3m-tooltip> `:this.open?o.qy`
|
|
606
|
-
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
607
|
-
${this.contentTemplate()}
|
|
608
|
-
</wui-flex>
|
|
609
|
-
<w3m-tooltip></w3m-tooltip>
|
|
610
|
-
`:null}contentTemplate(){return o.qy` <wui-card
|
|
611
|
-
shake="${this.shake}"
|
|
612
|
-
data-embedded="${(0,r.J)(this.enableEmbedded)}"
|
|
613
|
-
role="alertdialog"
|
|
614
|
-
aria-modal="true"
|
|
615
|
-
tabindex="0"
|
|
616
|
-
data-testid="w3m-modal-card"
|
|
617
|
-
>
|
|
618
|
-
<w3m-header></w3m-header>
|
|
619
|
-
<w3m-router></w3m-router>
|
|
620
|
-
<w3m-snackbar></w3m-snackbar>
|
|
621
|
-
<w3m-alertbar></w3m-alertbar>
|
|
622
|
-
</wui-card>`}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){"UnsupportedChain"===p.I.state.view||await u.U.isSIWXCloseDisabled()?c.W.shake():c.W.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=h.W.state,i=g.Zv.getColorTheme(t);(0,g.RF)(e,i)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),m.P.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=pe,e.textContent="\n body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${pe}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",(t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:i}=t.target;!i||i.includes("W3M-")||i.includes("WUI-")||e?.focus()}}),this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){const t=l.W.state.isSwitchingNamespace,i=v.w.getPlainAddress(e);i||t?t&&i&&p.I.goBack():c.W.close(),await u.U.initializeIfEnabled(),this.caipAddress=e,l.W.setIsSwitchingNamespace(!1)}onNewNetwork(e){const t=this.caipNetwork?.caipNetworkId?.toString(),i=e?.caipNetworkId?.toString(),o=t&&i&&t!==i,a=l.W.state.isSwitchingNamespace,r=this.caipNetwork?.name===s.o.UNSUPPORTED_NETWORK_NAME,n="ConnectingExternal"===p.I.state.view,w=!this.caipAddress,d=o&&!r&&!a,u="UnsupportedChain"===p.I.state.view;c.W.state.open&&!n&&(w||u||d)&&p.I.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(d.N.prefetch(),d.N.fetchWallets({page:1}),this.hasPrefetched=!0)}};ue.styles=we,de([(0,a.MZ)({type:Boolean})],ue.prototype,"enableEmbedded",void 0),de([(0,a.wk)()],ue.prototype,"open",void 0),de([(0,a.wk)()],ue.prototype,"caipAddress",void 0),de([(0,a.wk)()],ue.prototype,"caipNetwork",void 0),de([(0,a.wk)()],ue.prototype,"shake",void 0),de([(0,a.wk)()],ue.prototype,"filterByNamespace",void 0),ue=de([(0,g.EM)("w3m-modal")],ue)}};
|