@wc-kit/vue 0.0.2 → 0.0.4
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/index.cjs.js +871 -277
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3809 -1675
- package/dist/index.es.js.map +1 -1
- package/package.json +15 -2
- package/dist/index.test.d.ts +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lit"),a=require("lit/decorators.js"),no=require("lit/directives/unsafe-svg.js"),d=s.css`
|
|
2
2
|
*,
|
|
3
3
|
*::before,
|
|
4
4
|
*::after {
|
|
@@ -26,7 +26,76 @@
|
|
|
26
26
|
:focus:not(:focus-visible) {
|
|
27
27
|
outline: none;
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,ot=new Map,it=new Map,Ge=new Map,Qe=new Set;function kt(o){return Qe.add(o),()=>Qe.delete(o)}function zt(){for(const o of[...Qe])o()}function $t(o,e){ot.set(o,e),zt()}function lo(o){return ot.get(o)}function Ct(o,e){it.set(o,e),zt()}function co(o){return it.get(o)}function i(o,e,t="0 0 24 24"){return{name:o,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${t}" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${e}</svg>`}}Ct("default",{resolver:o=>ot.get(o)??""});async function Et(o,e){const t=it.get(o);if(!t)return"";const l=`${o}:${e}`;let r=Ge.get(l);r||(r=Promise.resolve(t.resolver(e)).catch(c=>""),Ge.set(l,r));const n=await r;if(!n)return Ge.delete(l),"";if(t.mutator&&typeof DOMParser<"u"){const c=new DOMParser().parseFromString(n,"text/html").querySelector("svg");if(c)return t.mutator(c),c.outerHTML}return n}const ho=s.css`
|
|
30
|
+
:host {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
/*
|
|
33
|
+
* 覆盖 baseStyles 的 :host { color: var(--wc-color-text) }——组件自身 :host
|
|
34
|
+
* 声明的优先级高于继承,不改为 inherit 的话,图标放进实色按钮等深色上下文
|
|
35
|
+
* 时会被强制成文字色而非跟随 currentColor(currentColor → stroke 继承链断裂)。
|
|
36
|
+
*/
|
|
37
|
+
color: inherit;
|
|
38
|
+
/* 尺寸默认 1em,跟随 font-size 缩放;颜色继承 currentColor */
|
|
39
|
+
width: 1em;
|
|
40
|
+
height: 1em;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
line-height: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part='base'] {
|
|
46
|
+
display: flex;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
svg {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
/* 不设 fill:描边图标由 SVG 根的 fill="none" 决定(CSS 会覆盖 presentation attribute,
|
|
58
|
+
设 fill: currentColor 会把闭合形状整体填充导致发糊);填充型图标由各自 SVG 声明。
|
|
59
|
+
颜色统一走 color → stroke="currentColor" 继承。 */
|
|
60
|
+
color: currentColor;
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([spin]) svg,
|
|
65
|
+
:host([pulse]) svg {
|
|
66
|
+
transform-origin: center;
|
|
67
|
+
animation: wc-spin var(--wc-duration-slow, 1s) linear infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* pulse:旋转 + 缓动呼吸感,用于加载中区分度更高的场景 */
|
|
71
|
+
:host([pulse]) svg {
|
|
72
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@keyframes wc-spin {
|
|
76
|
+
from {
|
|
77
|
+
rotate: 0deg;
|
|
78
|
+
}
|
|
79
|
+
to {
|
|
80
|
+
rotate: 360deg;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (prefers-reduced-motion: reduce) {
|
|
85
|
+
:host([spin]) svg,
|
|
86
|
+
:host([pulse]) svg {
|
|
87
|
+
animation: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`;var po=Object.defineProperty,K=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&po(e,t,r),r};const Mt=class extends s.LitElement{constructor(){super(...arguments),this.name="",this.src="",this.library="default",this.label="",this.spin=!1,this.pulse=!1,this.svg="",this.requestId=0}willUpdate(e){(e.has("src")||e.has("name")||e.has("library"))&&this.loadIcon()}disconnectedCallback(){this.unwatchRegister?.()}async loadIcon(){this.unwatchRegister?.(),this.unwatchRegister=void 0;const e=++this.requestId,t=this.name&&!this.src?kt(()=>{this.loadIcon()}):null;let l="";if(this.src?l=await this.fetchSrc(this.src):this.name&&(l=await Et(this.library,this.name)),e!==this.requestId){t?.();return}l||!t?t?.():this.unwatchRegister=t,this.svg=l}async fetchSrc(e){if(typeof fetch!="function")return"";try{const t=await fetch(e);return t.ok?await t.text():""}catch{return""}}render(){return s.html`
|
|
91
|
+
<span
|
|
92
|
+
part="base"
|
|
93
|
+
role=${this.label?"img":"presentation"}
|
|
94
|
+
aria-label=${this.label||s.nothing}
|
|
95
|
+
aria-hidden=${this.label?s.nothing:"true"}
|
|
96
|
+
>${this.svg?no.unsafeSVG(this.svg):s.nothing}</span
|
|
97
|
+
>
|
|
98
|
+
`}};Mt.styles=[d,ho];let I=Mt;K([a.property()],I.prototype,"name");K([a.property()],I.prototype,"src");K([a.property()],I.prototype,"library");K([a.property()],I.prototype,"label");K([a.property({type:Boolean,reflect:!0})],I.prototype,"spin");K([a.property({type:Boolean,reflect:!0})],I.prototype,"pulse");K([a.state()],I.prototype,"svg");customElements.get("wc-icon")||customElements.define("wc-icon",I);const uo=s.css`
|
|
30
99
|
:host {
|
|
31
100
|
display: inline-block;
|
|
32
101
|
/* component 层令牌:引用 semantic 层,允许按实例覆盖 */
|
|
@@ -54,6 +123,9 @@
|
|
|
54
123
|
}
|
|
55
124
|
|
|
56
125
|
.button {
|
|
126
|
+
/* 波纹 span 需按按钮定位且裁剪在圆角内;outline 聚焦环不受 overflow 影响 */
|
|
127
|
+
position: relative;
|
|
128
|
+
overflow: hidden;
|
|
57
129
|
display: inline-flex;
|
|
58
130
|
align-items: center;
|
|
59
131
|
justify-content: center;
|
|
@@ -74,10 +146,34 @@
|
|
|
74
146
|
color var(--wc-duration-fast) var(--wc-easing-standard);
|
|
75
147
|
}
|
|
76
148
|
|
|
149
|
+
/* 聚焦环 offset 可被外层上下文覆写(如 button-group 内改为 -2px 内嵌,
|
|
150
|
+
避免光环叠在相邻按钮上);同名规则晚于 baseStyles 生效 */
|
|
151
|
+
:focus-visible {
|
|
152
|
+
outline-offset: var(--wc-button-focus-ring-offset, 2px);
|
|
153
|
+
}
|
|
154
|
+
|
|
77
155
|
.button:disabled {
|
|
78
156
|
cursor: not-allowed;
|
|
79
157
|
}
|
|
80
158
|
|
|
159
|
+
/*
|
|
160
|
+
* 图标容器必须显式 flex 居中:默认 inline 的 span 内部按行内盒基线摆放
|
|
161
|
+
* inline-flex 图标,基线取图标底边,行盒被字体 descent 撑高 → 图标偏移 1-2px。
|
|
162
|
+
* z-index: 1 保证内容在波纹之上。
|
|
163
|
+
*/
|
|
164
|
+
.icon {
|
|
165
|
+
position: relative;
|
|
166
|
+
z-index: 1;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.content {
|
|
173
|
+
position: relative;
|
|
174
|
+
z-index: 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
81
177
|
.icon[hidden] {
|
|
82
178
|
display: none;
|
|
83
179
|
}
|
|
@@ -111,78 +207,144 @@
|
|
|
111
207
|
}
|
|
112
208
|
|
|
113
209
|
/* ---- theme: default ---- */
|
|
114
|
-
:host([
|
|
210
|
+
:host([type='base']) .button {
|
|
115
211
|
background-color: var(--wc-color-bg-container);
|
|
116
212
|
border-color: var(--wc-color-border);
|
|
117
213
|
color: var(--wc-color-text);
|
|
118
214
|
}
|
|
119
|
-
:host([theme='default'][
|
|
215
|
+
:host([theme='default'][type='base']) .button:hover:not(:disabled) {
|
|
120
216
|
border-color: var(--wc-button-theme-color);
|
|
121
217
|
color: var(--wc-button-theme-color);
|
|
122
218
|
}
|
|
123
219
|
|
|
124
220
|
/* ---- theme: primary / success / warning / danger 的 base 变体:实色底 ---- */
|
|
125
|
-
:host([theme='primary'][
|
|
126
|
-
:host([theme='success'][
|
|
127
|
-
:host([theme='warning'][
|
|
128
|
-
:host([theme='danger'][
|
|
221
|
+
:host([theme='primary'][type='base']) .button,
|
|
222
|
+
:host([theme='success'][type='base']) .button,
|
|
223
|
+
:host([theme='warning'][type='base']) .button,
|
|
224
|
+
:host([theme='danger'][type='base']) .button {
|
|
129
225
|
background-color: var(--wc-button-theme-color);
|
|
130
226
|
border-color: var(--wc-button-theme-color);
|
|
131
227
|
color: var(--wc-color-text-anti);
|
|
132
228
|
}
|
|
133
|
-
:host([theme='primary'][
|
|
134
|
-
:host([theme='success'][
|
|
135
|
-
:host([theme='warning'][
|
|
136
|
-
:host([theme='danger'][
|
|
229
|
+
:host([theme='primary'][type='base']) .button:hover:not(:disabled),
|
|
230
|
+
:host([theme='success'][type='base']) .button:hover:not(:disabled),
|
|
231
|
+
:host([theme='warning'][type='base']) .button:hover:not(:disabled),
|
|
232
|
+
:host([theme='danger'][type='base']) .button:hover:not(:disabled) {
|
|
137
233
|
background-color: var(--wc-button-theme-hover);
|
|
138
234
|
border-color: var(--wc-button-theme-hover);
|
|
139
235
|
color: var(--wc-color-text-anti);
|
|
140
236
|
}
|
|
141
|
-
:host([theme='primary'][
|
|
142
|
-
:host([theme='success'][
|
|
143
|
-
:host([theme='warning'][
|
|
144
|
-
:host([theme='danger'][
|
|
237
|
+
:host([theme='primary'][type='base']) .button:active:not(:disabled),
|
|
238
|
+
:host([theme='success'][type='base']) .button:active:not(:disabled),
|
|
239
|
+
:host([theme='warning'][type='base']) .button:active:not(:disabled),
|
|
240
|
+
:host([theme='danger'][type='base']) .button:active:not(:disabled) {
|
|
145
241
|
background-color: var(--wc-button-theme-active);
|
|
146
242
|
border-color: var(--wc-button-theme-active);
|
|
147
243
|
color: var(--wc-color-text-anti);
|
|
148
244
|
}
|
|
149
245
|
|
|
150
|
-
/* ----
|
|
151
|
-
:host([
|
|
152
|
-
:host([
|
|
246
|
+
/* ---- type: outline / dashed(继承 theme 色) ---- */
|
|
247
|
+
:host([type='outline']) .button,
|
|
248
|
+
:host([type='dashed']) .button {
|
|
153
249
|
background-color: transparent;
|
|
154
250
|
border-color: var(--wc-button-theme-color);
|
|
155
251
|
color: var(--wc-button-theme-color);
|
|
156
252
|
}
|
|
157
|
-
:host([
|
|
253
|
+
:host([type='dashed']) .button {
|
|
158
254
|
border-style: dashed;
|
|
159
255
|
}
|
|
160
|
-
:host([
|
|
161
|
-
:host([
|
|
256
|
+
:host([type='outline']) .button:hover:not(:disabled),
|
|
257
|
+
:host([type='dashed']) .button:hover:not(:disabled) {
|
|
162
258
|
background-color: var(--wc-button-theme-hover);
|
|
163
259
|
border-color: var(--wc-button-theme-hover);
|
|
164
260
|
color: var(--wc-color-text-anti);
|
|
165
261
|
}
|
|
166
262
|
|
|
167
|
-
/* ----
|
|
168
|
-
:host([
|
|
263
|
+
/* ---- type: text ---- */
|
|
264
|
+
:host([type='text']) .button {
|
|
169
265
|
background-color: transparent;
|
|
170
266
|
border-color: transparent;
|
|
171
267
|
color: var(--wc-button-theme-color);
|
|
172
268
|
}
|
|
173
|
-
:host([
|
|
269
|
+
:host([type='text']) .button:hover:not(:disabled) {
|
|
174
270
|
background-color: var(--wc-color-bg);
|
|
175
271
|
}
|
|
176
272
|
|
|
177
|
-
/* ----
|
|
178
|
-
:host([
|
|
273
|
+
/* ---- type: link ---- */
|
|
274
|
+
:host([type='link']) .button {
|
|
179
275
|
background-color: transparent;
|
|
180
276
|
border-color: transparent;
|
|
181
277
|
color: var(--wc-button-theme-color);
|
|
182
278
|
}
|
|
183
|
-
:host([
|
|
279
|
+
:host([type='link']) .button:hover:not(:disabled) {
|
|
184
280
|
color: var(--wc-button-theme-hover);
|
|
185
|
-
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* ---- ghost 幽灵模式(透明底 + 主题色边框/文字,用于深色背景) ----
|
|
284
|
+
base 变体换透明底;outline/dashed 本就透明,仅把悬停实色填充换成半透明淡底;
|
|
285
|
+
:not 链保证禁用态不受影响 */
|
|
286
|
+
:host([ghost][type='base']:not([disabled]):not([loading])) .button {
|
|
287
|
+
background-color: transparent;
|
|
288
|
+
border-color: var(--wc-button-theme-color);
|
|
289
|
+
color: var(--wc-button-theme-color);
|
|
290
|
+
}
|
|
291
|
+
:host([ghost][type='base']:not([disabled]):not([loading])) .button:hover:not(:disabled),
|
|
292
|
+
:host([ghost][type='outline']:not([disabled]):not([loading])) .button:hover:not(:disabled),
|
|
293
|
+
:host([ghost][type='dashed']:not([disabled]):not([loading])) .button:hover:not(:disabled) {
|
|
294
|
+
background-color: var(
|
|
295
|
+
--wc-button-ghost-hover-bg,
|
|
296
|
+
color-mix(in srgb, var(--wc-button-theme-color) 12%, transparent)
|
|
297
|
+
);
|
|
298
|
+
border-color: var(--wc-button-theme-color);
|
|
299
|
+
color: var(--wc-button-theme-color);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* ---- gradient 渐变底(仅 base 变体且非 default 主题) ----
|
|
303
|
+
主题色与 hover 色明度相差太小(肉眼近似纯色),端点改用 color-mix 混白提亮
|
|
304
|
+
拉开对比;background-image 不可 transition,与 antd 一致不做渐变过渡 */
|
|
305
|
+
:host([gradient][type='base']:not([theme='default']):not([disabled]):not([loading])) .button {
|
|
306
|
+
background-image: linear-gradient(
|
|
307
|
+
135deg,
|
|
308
|
+
color-mix(in srgb, var(--wc-button-theme-color) 65%, #fff),
|
|
309
|
+
var(--wc-button-theme-color)
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
:host([gradient][type='base']:not([theme='default']):not([disabled]):not([loading]))
|
|
313
|
+
.button:hover:not(:disabled) {
|
|
314
|
+
background-image: linear-gradient(
|
|
315
|
+
135deg,
|
|
316
|
+
color-mix(in srgb, var(--wc-button-theme-hover) 65%, #fff),
|
|
317
|
+
var(--wc-button-theme-hover)
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* ---- ripple 点击波纹(span.ripple 由 handleClick 动态插入) ---- */
|
|
322
|
+
.ripple {
|
|
323
|
+
position: absolute;
|
|
324
|
+
z-index: 0;
|
|
325
|
+
border-radius: 50%;
|
|
326
|
+
pointer-events: none;
|
|
327
|
+
background-color: var(
|
|
328
|
+
--wc-button-ripple-color,
|
|
329
|
+
color-mix(in srgb, currentColor 45%, transparent)
|
|
330
|
+
);
|
|
331
|
+
transform: scale(0);
|
|
332
|
+
opacity: 0.6;
|
|
333
|
+
animation: wc-ripple var(--wc-button-ripple-duration, 600ms) var(--wc-easing-standard) forwards;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@keyframes wc-ripple {
|
|
337
|
+
to {
|
|
338
|
+
transform: scale(1);
|
|
339
|
+
opacity: 0;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* 减弱动态效果:不渲染波纹动画(span 停留在 scale(0) 不可见) */
|
|
344
|
+
@media (prefers-reduced-motion: reduce) {
|
|
345
|
+
.ripple {
|
|
346
|
+
animation: none;
|
|
347
|
+
}
|
|
186
348
|
}
|
|
187
349
|
|
|
188
350
|
/* ---- 禁用态 ---- */
|
|
@@ -196,14 +358,15 @@
|
|
|
196
358
|
.button[aria-busy='true'] .content {
|
|
197
359
|
opacity: 0.7;
|
|
198
360
|
}
|
|
199
|
-
`;var
|
|
200
|
-
|
|
201
|
-
</span>`,t=
|
|
361
|
+
`;var wo=Object.defineProperty,x=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&wo(e,t,r),r};const Lt=class extends s.LitElement{constructor(){super(...arguments),this.theme="default",this.type="base",this.htmlType="button",this.size="medium",this.iconPosition="start",this.block=!1,this.disabled=!1,this.loading=!1,this.ghost=!1,this.gradient=!1,this.ripple=!1,this._hasIcon=!1,this._hasText=!1}handleClick(e){if(this.loading){e.preventDefault(),e.stopImmediatePropagation();return}this.ripple&&this._spawnRipple(e)}_spawnRipple(e){const t=this.shadowRoot.querySelector(".button");if(!t)return;const l=t.getBoundingClientRect(),r=Math.max(l.width,l.height)*2,n=e.clientX||l.left+l.width/2,c=e.clientY||l.top+l.height/2,h=document.createElement("span");h.className="ripple",h.style.width=`${r}px`,h.style.height=`${r}px`,h.style.left=`${n-l.left-r/2}px`,h.style.top=`${c-l.top-r/2}px`,h.addEventListener("animationend",()=>h.remove()),t.appendChild(h)}render(){const e=s.html`<span class="icon" part="icon" ?hidden=${!this._hasIcon&&!this.loading}>
|
|
362
|
+
${this.loading?s.html`<wc-icon class="spinner" name="loader" spin></wc-icon>`:s.html`<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>`}
|
|
363
|
+
</span>`,t=s.html`<span class="content" part="content"
|
|
202
364
|
><slot @slotchange=${this._onTextSlotChange}></slot
|
|
203
|
-
></span>`;return
|
|
365
|
+
></span>`;return s.html`
|
|
204
366
|
<button
|
|
205
367
|
part="base"
|
|
206
368
|
class="button"
|
|
369
|
+
type=${this.htmlType}
|
|
207
370
|
?disabled=${this.disabled||this.loading}
|
|
208
371
|
aria-disabled=${this.disabled||this.loading}
|
|
209
372
|
aria-busy=${this.loading}
|
|
@@ -211,7 +374,7 @@
|
|
|
211
374
|
>
|
|
212
375
|
${this.iconPosition==="end"?[t,e]:[e,t]}
|
|
213
376
|
</button>
|
|
214
|
-
`}_onIconSlotChange(e){this._hasIcon=e.target.assignedElements({flatten:!0}).length>0,this._syncIconOnly(),this.requestUpdate()}_onTextSlotChange(e){const t=e.target.assignedNodes({flatten:!0});this._hasText=t.some(
|
|
377
|
+
`}_onIconSlotChange(e){this._hasIcon=e.target.assignedElements({flatten:!0}).length>0,this._syncIconOnly(),this.requestUpdate()}_onTextSlotChange(e){const t=e.target.assignedNodes({flatten:!0});this._hasText=t.some(l=>(l.textContent??"").trim().length>0),this._syncIconOnly(),this.requestUpdate()}_syncIconOnly(){this.classList.toggle("wc-button--icon-only",this._hasIcon&&!this._hasText)}};Lt.styles=[d,uo];let g=Lt;x([a.property({reflect:!0})],g.prototype,"theme");x([a.property({reflect:!0})],g.prototype,"type");x([a.property({reflect:!0,attribute:"html-type"})],g.prototype,"htmlType");x([a.property({reflect:!0})],g.prototype,"size");x([a.property({reflect:!0,attribute:"icon-position"})],g.prototype,"iconPosition");x([a.property({type:Boolean,reflect:!0})],g.prototype,"block");x([a.property({type:Boolean,reflect:!0})],g.prototype,"disabled");x([a.property({type:Boolean,reflect:!0})],g.prototype,"loading");x([a.property({type:Boolean,reflect:!0})],g.prototype,"ghost");x([a.property({type:Boolean,reflect:!0})],g.prototype,"gradient");x([a.property({type:Boolean,reflect:!0})],g.prototype,"ripple");customElements.get("wc-button")||customElements.define("wc-button",g);const vo=s.css`
|
|
215
378
|
:host {
|
|
216
379
|
display: inline-block;
|
|
217
380
|
|
|
@@ -232,13 +395,12 @@
|
|
|
232
395
|
*/
|
|
233
396
|
::slotted(wc-button) {
|
|
234
397
|
--wc-button-radius: 0;
|
|
398
|
+
/* 聚焦环内嵌:光环画在按钮边缘内侧,避免叠在相邻按钮上造成割裂感 */
|
|
399
|
+
--wc-button-focus-ring-offset: -2px;
|
|
235
400
|
position: relative;
|
|
236
401
|
}
|
|
237
402
|
|
|
238
|
-
/*
|
|
239
|
-
::slotted(wc-button:not(:first-child)) {
|
|
240
|
-
margin-left: -1px;
|
|
241
|
-
}
|
|
403
|
+
/* 边距合并由组件用内联样式实现(见 _syncMargins),CSS 声明会被外层 reset 压过 */
|
|
242
404
|
|
|
243
405
|
/* 悬停/聚焦的上层按钮边框完整可见 */
|
|
244
406
|
::slotted(wc-button:hover),
|
|
@@ -257,70 +419,9 @@
|
|
|
257
419
|
::slotted(wc-button:only-child) {
|
|
258
420
|
--wc-button-radius: var(--wc-button-group-radius);
|
|
259
421
|
}
|
|
260
|
-
`,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
/* 尺寸默认 1em,跟随 font-size 缩放;颜色继承 currentColor */
|
|
264
|
-
width: 1em;
|
|
265
|
-
height: 1em;
|
|
266
|
-
flex-shrink: 0;
|
|
267
|
-
line-height: 1;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
[part='base'] {
|
|
271
|
-
display: flex;
|
|
272
|
-
width: 100%;
|
|
273
|
-
height: 100%;
|
|
274
|
-
align-items: center;
|
|
275
|
-
justify-content: center;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
svg {
|
|
279
|
-
display: block;
|
|
280
|
-
width: 100%;
|
|
281
|
-
height: 100%;
|
|
282
|
-
/* 不设 fill:描边图标由 SVG 根的 fill="none" 决定(CSS 会覆盖 presentation attribute,
|
|
283
|
-
设 fill: currentColor 会把闭合形状整体填充导致发糊);填充型图标由各自 SVG 声明。
|
|
284
|
-
颜色统一走 color → stroke="currentColor" 继承。 */
|
|
285
|
-
color: currentColor;
|
|
286
|
-
pointer-events: none;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
:host([spin]) svg,
|
|
290
|
-
:host([pulse]) svg {
|
|
291
|
-
transform-origin: center;
|
|
292
|
-
animation: wc-spin var(--wc-duration-slow, 1s) linear infinite;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/* pulse:旋转 + 缓动呼吸感,用于加载中区分度更高的场景 */
|
|
296
|
-
:host([pulse]) svg {
|
|
297
|
-
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
@keyframes wc-spin {
|
|
301
|
-
from {
|
|
302
|
-
rotate: 0deg;
|
|
303
|
-
}
|
|
304
|
-
to {
|
|
305
|
-
rotate: 360deg;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
@media (prefers-reduced-motion: reduce) {
|
|
310
|
-
:host([spin]) svg,
|
|
311
|
-
:host([pulse]) svg {
|
|
312
|
-
animation: none;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
`;var Gr=Object.defineProperty,V=(o,e,t,n)=>{for(var r=void 0,a=o.length-1,c;a>=0;a--)(c=o[a])&&(r=c(e,t,r)||r);return r&&Gr(e,t,r),r};const bt=class extends i.LitElement{constructor(){super(...arguments),this.name="",this.src="",this.library="default",this.label="",this.spin=!1,this.pulse=!1,this.svg="",this.requestId=0}willUpdate(e){(e.has("src")||e.has("name")||e.has("library"))&&this.loadIcon()}disconnectedCallback(){this.unwatchRegister?.()}async loadIcon(){this.unwatchRegister?.(),this.unwatchRegister=void 0;const e=++this.requestId,t=this.name&&!this.src?ut(()=>{this.loadIcon()}):null;let n="";if(this.src?n=await this.fetchSrc(this.src):this.name&&(n=await gt(this.library,this.name)),e!==this.requestId){t?.();return}n||!t?t?.():this.unwatchRegister=t,this.svg=n}async fetchSrc(e){if(typeof fetch!="function")return"";try{const t=await fetch(e);return t.ok?await t.text():""}catch{return""}}render(){return i.html`
|
|
316
|
-
<span
|
|
317
|
-
part="base"
|
|
318
|
-
role=${this.label?"img":"presentation"}
|
|
319
|
-
aria-label=${this.label||i.nothing}
|
|
320
|
-
aria-hidden=${this.label?i.nothing:"true"}
|
|
321
|
-
>${this.svg?Vr.unsafeSVG(this.svg):i.nothing}</span
|
|
322
|
-
>
|
|
323
|
-
`}};bt.styles=[l,Xr];let O=bt;V([s.property()],O.prototype,"name");V([s.property()],O.prototype,"src");V([s.property()],O.prototype,"library");V([s.property()],O.prototype,"label");V([s.property({type:Boolean,reflect:!0})],O.prototype,"spin");V([s.property({type:Boolean,reflect:!0})],O.prototype,"pulse");V([s.state()],O.prototype,"svg");customElements.get("wc-icon")||customElements.define("wc-icon",O);function x(o){const e=class extends o{constructor(...r){super(...r),this.name="",this.disabled=!1,this.internals=this.attachInternals()}get value(){}set value(r){}formResetCallback(){this.value=this.defaultValue}get defaultValue(){}};return e.formAssociated=!0,e.properties={name:{type:String},disabled:{type:Boolean,reflect:!0}},e}const Jr={"select.placeholder":"Select","select.empty":"No data","pagination.total":"{total} items in total","pagination.prev":"Previous page","pagination.next":"Next page","pagination.label":"Pagination","pagination.page":"Page {page}","pagination.jumpTo":"Go to","pagination.pageUnit":"Page","dialog.confirm":"Confirm","dialog.cancel":"Cancel","empty.noData":"No data","table.empty":"No data in table","input.clear":"Clear","inputNumber.increment":"Increment","inputNumber.decrement":"Decrement","datePicker.placeholder":"Select date","datePicker.today":"Today","datePicker.prevYear":"Previous year","datePicker.prevMonth":"Previous month","datePicker.nextMonth":"Next month","datePicker.nextYear":"Next year","form.required":"{name} is required","form.min":"{name} must be no less than {min}","form.max":"{name} must be no greater than {max}","form.minLength":"{name} must be at least {minLength} characters","form.maxLength":"{name} must be at most {maxLength} characters","form.pattern":"{name} format is invalid","form.invalid":"{name} is invalid","tag.close":"Remove","dialog.close":"Close","message.close":"Close","breadcrumb.label":"Breadcrumb","image.loadError":"Failed to load image","image.preview":"Preview","image.zoomIn":"Zoom in","image.zoomOut":"Zoom out","image.rotate":"Rotate","image.reset":"Reset","image.close":"Close","upload.upload":"Upload","upload.clickOrDrag":"Click or drag file here to upload","upload.failed":"Upload failed","upload.retry":"Retry","upload.remove":"Remove","upload.preview":"Preview"},Zr={"select.placeholder":"请选择","select.empty":"暂无数据","pagination.total":"共 {total} 条","pagination.prev":"上一页","pagination.next":"下一页","pagination.label":"分页导航","pagination.page":"第 {page} 页","pagination.jumpTo":"跳至","pagination.pageUnit":"页","dialog.confirm":"确认","dialog.cancel":"取消","empty.noData":"暂无数据","table.empty":"表格暂无数据","input.clear":"清空","inputNumber.increment":"增加","inputNumber.decrement":"减少","datePicker.placeholder":"请选择日期","datePicker.today":"今天","datePicker.prevYear":"上一年","datePicker.prevMonth":"上个月","datePicker.nextMonth":"下个月","datePicker.nextYear":"下一年","form.required":"{name}不能为空","form.min":"{name}不能小于{min}","form.max":"{name}不能大于{max}","form.minLength":"{name}至少{minLength}个字符","form.maxLength":"{name}最多{maxLength}个字符","form.pattern":"{name}格式不正确","form.invalid":"{name}校验不通过","tag.close":"删除","dialog.close":"关闭","message.close":"关闭","breadcrumb.label":"面包屑导航","image.loadError":"图片加载失败","image.preview":"预览","image.zoomIn":"放大","image.zoomOut":"缩小","image.rotate":"旋转","image.reset":"重置","image.close":"关闭","upload.upload":"上传文件","upload.clickOrDrag":"点击或拖拽文件到此处上传","upload.failed":"上传失败","upload.retry":"重新上传","upload.remove":"移除","upload.preview":"预览"},ze="wc-language-change",F=new Map([["zh-CN",{...Zr}],["en-US",{...Jr}]]);let ge="zh-CN";function Qr(o,e){const t=F.get(o);F.set(o,Object.assign({},t,e)),o===ge&&xt()}function eo(o){if(!/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]+)*$/.test(o))throw new Error(`[wc] 无效的语言标识: "${o}",需符合 BCP 47 格式,如 zh-CN`);o!==ge&&(ge=o,xt())}function ft(){return ge}function Xe(o){if(F.has(o))return o;const e=o.split("-")[0]?.toLowerCase();for(const t of F.keys())if(t.split("-")[0]?.toLowerCase()===e)return t;return"zh-CN"}function yt(o,e,t){const n=F.get(Xe(o)),r=F.get("zh-CN");let a=n?.[e]??r?.[e]??e;return t&&(a=a.replace(/\{(\w+)\}/g,(c,m)=>m in t?String(t[m]):c)),a}function to(){return[...F.keys()]}function xt(){document.dispatchEvent(new CustomEvent(ze,{detail:{locale:ge},bubbles:!0,composed:!0}))}class u{constructor(e){this.handleLanguageChange=()=>{this.host.requestUpdate()},this.host=e,e.addController(this)}hostConnected(){document.addEventListener(ze,this.handleLanguageChange)}hostDisconnected(){document.removeEventListener(ze,this.handleLanguageChange)}term(e,t){return yt(this.resolvedLocale,e,t)}date(e,t){const{locale:n,...r}=t??{};return new Intl.DateTimeFormat(n??this.resolvedLocale,r).format(e)}number(e,t){const{locale:n,...r}=t??{};return new Intl.NumberFormat(n??this.resolvedLocale,r).format(e)}get resolvedLocale(){const e=this.host.getAttribute("lang");return e?Xe(e):ft()}}const ro=i.css`
|
|
422
|
+
`,St=class extends s.LitElement{render(){return s.html`<div class="group" part="base">
|
|
423
|
+
<slot @slotchange=${this._syncMargins}></slot>
|
|
424
|
+
</div>`}_syncMargins(e){const t=e.target.assignedElements({flatten:!0});for(let l=0;l<t.length;l++)t[l].style.marginLeft=l>0?"-1px":""}};St.styles=[d,vo];let Ot=St;customElements.get("wc-button-group")||customElements.define("wc-button-group",Ot);function M(o){const e=class extends o{constructor(...r){super(...r),this.name="",this.disabled=!1,this.internals=this.attachInternals()}get value(){}set value(r){}formResetCallback(){this.value=this.defaultValue}get defaultValue(){}};return e.formAssociated=!0,e.properties={name:{type:String},disabled:{type:Boolean,reflect:!0}},e}const yo={"select.placeholder":"Select","select.empty":"No data","pagination.total":"{total} items in total","pagination.prev":"Previous page","pagination.next":"Next page","pagination.label":"Pagination","pagination.page":"Page {page}","pagination.jumpTo":"Go to","pagination.pageUnit":"Page","dialog.confirm":"Confirm","dialog.cancel":"Cancel","empty.noData":"No data","table.empty":"No data in table","input.clear":"Clear","inputNumber.increment":"Increment","inputNumber.decrement":"Decrement","datePicker.placeholder":"Select date","datePicker.today":"Today","datePicker.prevYear":"Previous year","datePicker.prevMonth":"Previous month","datePicker.nextMonth":"Next month","datePicker.nextYear":"Next year","form.required":"{name} is required","form.min":"{name} must be no less than {min}","form.max":"{name} must be no greater than {max}","form.minLength":"{name} must be at least {minLength} characters","form.maxLength":"{name} must be at most {maxLength} characters","form.pattern":"{name} format is invalid","form.invalid":"{name} is invalid","tag.close":"Remove","dropdown.more":"More options","floatbutton.backtop":"Back to top","floatbutton.menu":"More actions","dialog.close":"Close","message.close":"Close","breadcrumb.label":"Breadcrumb","image.loadError":"Failed to load image","image.preview":"Preview","image.zoomIn":"Zoom in","image.zoomOut":"Zoom out","image.rotate":"Rotate","image.reset":"Reset","image.close":"Close","upload.upload":"Upload","upload.clickOrDrag":"Click or drag file here to upload","upload.failed":"Upload failed","upload.retry":"Retry","upload.remove":"Remove","upload.preview":"Preview"},mo={"select.placeholder":"请选择","select.empty":"暂无数据","pagination.total":"共 {total} 条","pagination.prev":"上一页","pagination.next":"下一页","pagination.label":"分页导航","pagination.page":"第 {page} 页","pagination.jumpTo":"跳至","pagination.pageUnit":"页","dialog.confirm":"确认","dialog.cancel":"取消","empty.noData":"暂无数据","table.empty":"表格暂无数据","input.clear":"清空","inputNumber.increment":"增加","inputNumber.decrement":"减少","datePicker.placeholder":"请选择日期","datePicker.today":"今天","datePicker.prevYear":"上一年","datePicker.prevMonth":"上个月","datePicker.nextMonth":"下个月","datePicker.nextYear":"下一年","form.required":"{name}不能为空","form.min":"{name}不能小于{min}","form.max":"{name}不能大于{max}","form.minLength":"{name}至少{minLength}个字符","form.maxLength":"{name}最多{maxLength}个字符","form.pattern":"{name}格式不正确","form.invalid":"{name}校验不通过","tag.close":"删除","dropdown.more":"更多选项","floatbutton.backtop":"回到顶部","floatbutton.menu":"更多操作","dialog.close":"关闭","message.close":"关闭","breadcrumb.label":"面包屑导航","image.loadError":"图片加载失败","image.preview":"预览","image.zoomIn":"放大","image.zoomOut":"缩小","image.rotate":"旋转","image.reset":"重置","image.close":"关闭","upload.upload":"上传文件","upload.clickOrDrag":"点击或拖拽文件到此处上传","upload.failed":"上传失败","upload.retry":"重新上传","upload.remove":"移除","upload.preview":"预览"},Te="wc-language-change",Y=new Map([["zh-CN",{...mo}],["en-US",{...yo}]]);let ze="zh-CN";function go(o,e){const t=Y.get(o);Y.set(o,Object.assign({},t,e)),o===ze&&At()}function bo(o){if(!/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]+)*$/.test(o))throw new Error(`[wc] 无效的语言标识: "${o}",需符合 BCP 47 格式,如 zh-CN`);o!==ze&&(ze=o,At())}function It(){return ze}function at(o){if(Y.has(o))return o;const e=o.split("-")[0]?.toLowerCase();for(const t of Y.keys())if(t.split("-")[0]?.toLowerCase()===e)return t;return"zh-CN"}function Tt(o,e,t){const l=Y.get(at(o)),r=Y.get("zh-CN");let n=l?.[e]??r?.[e]??e;return t&&(n=n.replace(/\{(\w+)\}/g,(c,h)=>h in t?String(t[h]):c)),n}function fo(){return[...Y.keys()]}function At(){document.dispatchEvent(new CustomEvent(Te,{detail:{locale:ze},bubbles:!0,composed:!0}))}class u{constructor(e){this.handleLanguageChange=()=>{this.host.requestUpdate()},this.host=e,e.addController(this)}hostConnected(){document.addEventListener(Te,this.handleLanguageChange)}hostDisconnected(){document.removeEventListener(Te,this.handleLanguageChange)}term(e,t){return Tt(this.resolvedLocale,e,t)}date(e,t){const{locale:l,...r}=t??{};return new Intl.DateTimeFormat(l??this.resolvedLocale,r).format(e)}number(e,t){const{locale:l,...r}=t??{};return new Intl.NumberFormat(l??this.resolvedLocale,r).format(e)}get resolvedLocale(){const e=this.host.getAttribute("lang");return e?at(e):It()}}const xo=s.css`
|
|
324
425
|
:host {
|
|
325
426
|
display: inline-block;
|
|
326
427
|
width: 240px;
|
|
@@ -451,7 +552,7 @@
|
|
|
451
552
|
:host([readonly]) .input {
|
|
452
553
|
border-style: dashed;
|
|
453
554
|
}
|
|
454
|
-
`;var
|
|
555
|
+
`;var ko=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,T=(o,e,t,l)=>{for(var r=l>1?void 0:l?zo(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&ko(e,t,r),r};const Pt=class extends M(s.LitElement){constructor(){super(...arguments),this._value="",this.type="text",this.size="medium",this.placeholder="",this.label="",this.readonly=!1,this.clearable=!1,this.status="default",this.localize=new u(this),this._hasPrefix=!1,this._hasSuffix=!1}get value(){return this._value}set value(e){const t=this._value;this._value=e??"",this.requestUpdate("value",t)}get defaultValue(){return this.getAttribute("value")??""}updated(e){super.updated(e),e.has("value")&&this.internals.setFormValue(this.value||null)}formResetCallback(){super.formResetCallback(),this.internals.setFormValue(this.value||null)}handleInput(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("wc-input",{detail:{value:this.value},bubbles:!0,composed:!0}))}handleChange(){this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0}))}handleClear(e){e.preventDefault(),this.value="",this.dispatchEvent(new CustomEvent("wc-clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:""},bubbles:!0,composed:!0})),this.requestUpdate(),this.shadowRoot.querySelector("input")?.focus()}render(){const e=this.clearable&&this.value&&!this.disabled&&!this.readonly;return s.html`
|
|
455
556
|
<div class="input" part="base">
|
|
456
557
|
<span class="affix prefix" part="prefix" ?hidden=${!this._hasPrefix}>
|
|
457
558
|
<slot name="prefix" @slotchange=${this._onPrefixSlotChange}></slot>
|
|
@@ -469,7 +570,7 @@
|
|
|
469
570
|
@input=${this.handleInput}
|
|
470
571
|
@change=${this.handleChange}
|
|
471
572
|
/>
|
|
472
|
-
${e?
|
|
573
|
+
${e?s.html`
|
|
473
574
|
<button
|
|
474
575
|
type="button"
|
|
475
576
|
class="affix clear"
|
|
@@ -485,7 +586,7 @@
|
|
|
485
586
|
<slot name="suffix" @slotchange=${this._onSuffixSlotChange}></slot>
|
|
486
587
|
</span>
|
|
487
588
|
</div>
|
|
488
|
-
`}_onPrefixSlotChange(e){this._hasPrefix=e.target.assignedElements({flatten:!0}).length>0,this.requestUpdate()}_onSuffixSlotChange(e){this._hasSuffix=e.target.assignedElements({flatten:!0}).length>0,this.requestUpdate()}};
|
|
589
|
+
`}_onPrefixSlotChange(e){this._hasPrefix=e.target.assignedElements({flatten:!0}).length>0,this.requestUpdate()}_onSuffixSlotChange(e){this._hasSuffix=e.target.assignedElements({flatten:!0}).length>0,this.requestUpdate()}};Pt.styles=[d,xo];let k=Pt;T([a.property()],k.prototype,"value",1);T([a.property()],k.prototype,"type",2);T([a.property({reflect:!0})],k.prototype,"size",2);T([a.property()],k.prototype,"placeholder",2);T([a.property()],k.prototype,"label",2);T([a.property({type:Number})],k.prototype,"maxlength",2);T([a.property({type:Boolean,reflect:!0})],k.prototype,"readonly",2);T([a.property({type:Boolean,reflect:!0})],k.prototype,"clearable",2);T([a.property({reflect:!0})],k.prototype,"status",2);customElements.get("wc-input")||customElements.define("wc-input",k);const $o=s.css`
|
|
489
590
|
:host {
|
|
490
591
|
display: inline-block;
|
|
491
592
|
width: 320px;
|
|
@@ -586,7 +687,7 @@
|
|
|
586
687
|
:host([readonly]) .textarea {
|
|
587
688
|
border-style: dashed;
|
|
588
689
|
}
|
|
589
|
-
`;var
|
|
690
|
+
`;var Co=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,q=(o,e,t,l)=>{for(var r=l>1?void 0:l?Eo(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&Co(e,t,r),r};const Dt=class extends M(s.LitElement){constructor(){super(...arguments),this._value="",this.placeholder="",this.label="",this.rows=3,this.autosize=!1,this.readonly=!1,this.status="default"}get value(){return this._value}set value(e){const t=this._value;this._value=e??"",this.requestUpdate("value",t)}get defaultValue(){return this.getAttribute("value")??""}updated(e){super.updated(e),e.has("value")&&this.internals.setFormValue(this.value||null),e.has("value")&&this.autosize&&this.autoResize()}formResetCallback(){super.formResetCallback(),this.internals.setFormValue(this.value||null)}handleInput(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("wc-input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.autosize&&this.autoResize()}handleChange(){this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0}))}autoResize(){const e=this.shadowRoot.querySelector("textarea");e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)}render(){return s.html`
|
|
590
691
|
<div class="textarea" part="base">
|
|
591
692
|
<textarea
|
|
592
693
|
part="textarea"
|
|
@@ -601,9 +702,9 @@
|
|
|
601
702
|
@input=${this.handleInput}
|
|
602
703
|
@change=${this.handleChange}
|
|
603
704
|
></textarea>
|
|
604
|
-
${this.maxlength?
|
|
705
|
+
${this.maxlength?s.html`<span class="count" part="count">${this.value.length}/${this.maxlength}</span>`:""}
|
|
605
706
|
</div>
|
|
606
|
-
`}}
|
|
707
|
+
`}};Dt.styles=[d,$o];let L=Dt;q([a.property()],L.prototype,"value",1);q([a.property()],L.prototype,"placeholder",2);q([a.property()],L.prototype,"label",2);q([a.property({type:Number})],L.prototype,"maxlength",2);q([a.property({type:Number})],L.prototype,"rows",2);q([a.property({type:Boolean,reflect:!0})],L.prototype,"autosize",2);q([a.property({type:Boolean,reflect:!0})],L.prototype,"readonly",2);q([a.property({reflect:!0})],L.prototype,"status",2);customElements.get("wc-textarea")||customElements.define("wc-textarea",L);const Mo=s.css`
|
|
607
708
|
:host {
|
|
608
709
|
display: inline-block;
|
|
609
710
|
|
|
@@ -729,7 +830,7 @@
|
|
|
729
830
|
.label {
|
|
730
831
|
line-height: var(--wc-line-height-base);
|
|
731
832
|
}
|
|
732
|
-
`;var
|
|
833
|
+
`;var Lo=Object.defineProperty,Ae=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Lo(e,t,r),r};const Vt=class extends M(s.LitElement){constructor(){super(),this.checked=!1,this.indeterminate=!1,this.value="on",this.label="",this.initialChecked=!1,this.initialChecked=this.hasAttribute("checked")}get defaultValue(){return this.initialChecked?this.value:null}updated(e){super.updated(e),(e.has("checked")||e.has("value"))&&this.internals.setFormValue(this.checked?this.value:null)}formResetCallback(){super.formResetCallback(),this.checked=this.initialChecked,this.internals.setFormValue(this.checked?this.value:null)}handleChange(e){const t=e.target;this.indeterminate=!1,this.checked=t.checked,this.dispatchEvent(new CustomEvent("wc-change",{detail:{checked:this.checked,value:this.value},bubbles:!0,composed:!0}))}render(){return s.html`
|
|
733
834
|
<label class="checkbox" part="base">
|
|
734
835
|
<input
|
|
735
836
|
type="checkbox"
|
|
@@ -754,7 +855,7 @@
|
|
|
754
855
|
</span>
|
|
755
856
|
<span class="label" part="label"><slot></slot></span>
|
|
756
857
|
</label>
|
|
757
|
-
`}};
|
|
858
|
+
`}};Vt.styles=[d,Mo];let se=Vt;Ae([a.property({type:Boolean,reflect:!0})],se.prototype,"checked");Ae([a.property({type:Boolean,reflect:!0})],se.prototype,"indeterminate");Ae([a.property()],se.prototype,"value");Ae([a.property()],se.prototype,"label");customElements.get("wc-checkbox")||customElements.define("wc-checkbox",se);const So=s.css`
|
|
758
859
|
:host {
|
|
759
860
|
display: inline-block;
|
|
760
861
|
|
|
@@ -846,7 +947,7 @@
|
|
|
846
947
|
.label {
|
|
847
948
|
line-height: var(--wc-line-height-base);
|
|
848
949
|
}
|
|
849
|
-
`;var
|
|
950
|
+
`;var Oo=Object.defineProperty,st=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Oo(e,t,r),r};const jt=class extends M(s.LitElement){constructor(){super(),this.checked=!1,this.value="",this.label="",this.initialChecked=!1,this.initialChecked=this.hasAttribute("checked")}get defaultValue(){return this.initialChecked?this.value:null}updated(e){super.updated(e),(e.has("checked")||e.has("value"))&&this.internals.setFormValue(this.checked?this.value:null)}formResetCallback(){super.formResetCallback(),this.checked=this.initialChecked,this.internals.setFormValue(this.checked?this.value:null)}handleChange(e){const t=e.target;this.checked=t.checked,this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return s.html`
|
|
850
951
|
<label class="radio" part="base">
|
|
851
952
|
<input
|
|
852
953
|
type="radio"
|
|
@@ -859,7 +960,7 @@
|
|
|
859
960
|
<span class="dot" part="dot" aria-hidden="true"><span class="inner"></span></span>
|
|
860
961
|
<span class="label" part="label"><slot></slot></span>
|
|
861
962
|
</label>
|
|
862
|
-
`}};
|
|
963
|
+
`}};jt.styles=[d,So];let $e=jt;st([a.property({type:Boolean,reflect:!0})],$e.prototype,"checked");st([a.property()],$e.prototype,"value");st([a.property()],$e.prototype,"label");customElements.get("wc-radio")||customElements.define("wc-radio",$e);const Io=s.css`
|
|
863
964
|
:host {
|
|
864
965
|
display: inline-block;
|
|
865
966
|
|
|
@@ -949,7 +1050,7 @@
|
|
|
949
1050
|
.label {
|
|
950
1051
|
line-height: var(--wc-line-height-base);
|
|
951
1052
|
}
|
|
952
|
-
`;var
|
|
1053
|
+
`;var To=Object.defineProperty,Pe=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&To(e,t,r),r};const Bt=class extends M(s.LitElement){constructor(){super(),this.checked=!1,this.checkedValue="on",this.uncheckedValue="",this.label="",this.initialChecked=!1,this.initialChecked=this.hasAttribute("checked")}get defaultValue(){return this.initialChecked?this.checkedValue:this.uncheckedValue||null}updated(e){super.updated(e),(e.has("checked")||e.has("checkedValue")||e.has("uncheckedValue"))&&this.internals.setFormValue(this.checked?this.checkedValue:this.uncheckedValue||null)}formResetCallback(){super.formResetCallback(),this.checked=this.initialChecked,this.internals.setFormValue(this.checked?this.checkedValue:this.uncheckedValue||null)}handleChange(e){const t=e.target;this.checked=t.checked,this.dispatchEvent(new CustomEvent("wc-change",{detail:{checked:this.checked},bubbles:!0,composed:!0}))}render(){return s.html`
|
|
953
1054
|
<label class="switch" part="base">
|
|
954
1055
|
<input
|
|
955
1056
|
type="checkbox"
|
|
@@ -965,7 +1066,7 @@
|
|
|
965
1066
|
</span>
|
|
966
1067
|
<span class="label" part="label"><slot></slot></span>
|
|
967
1068
|
</label>
|
|
968
|
-
`}};
|
|
1069
|
+
`}};Bt.styles=[d,Io];let ne=Bt;Pe([a.property({type:Boolean,reflect:!0})],ne.prototype,"checked");Pe([a.property()],ne.prototype,"checkedValue");Pe([a.property()],ne.prototype,"uncheckedValue");Pe([a.property()],ne.prototype,"label");customElements.get("wc-switch")||customElements.define("wc-switch",ne);const Ao=s.css`
|
|
969
1070
|
:host {
|
|
970
1071
|
display: block;
|
|
971
1072
|
}
|
|
@@ -1018,7 +1119,7 @@
|
|
|
1018
1119
|
color: var(--wc-color-text-disabled);
|
|
1019
1120
|
cursor: not-allowed;
|
|
1020
1121
|
}
|
|
1021
|
-
`;var
|
|
1122
|
+
`;var Po=Object.defineProperty,De=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Po(e,t,r),r};const Ht=class extends s.LitElement{constructor(){super(...arguments),this.value="",this.disabled=!1,this.selected=!1,this.active=!1}get label(){return(this.textContent??"").trim()}render(){return s.html`
|
|
1022
1123
|
<div class="option" part="base" role="option" aria-selected=${this.selected}>
|
|
1023
1124
|
<span class="text"><slot></slot></span>
|
|
1024
1125
|
<svg class="check" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
@@ -1031,7 +1132,7 @@
|
|
|
1031
1132
|
/>
|
|
1032
1133
|
</svg>
|
|
1033
1134
|
</div>
|
|
1034
|
-
`}};
|
|
1135
|
+
`}};Ht.styles=[Ao];let le=Ht;De([a.property({reflect:!0})],le.prototype,"value");De([a.property({type:Boolean,reflect:!0})],le.prototype,"disabled");De([a.property({type:Boolean,reflect:!0})],le.prototype,"selected");De([a.property({type:Boolean,reflect:!0})],le.prototype,"active");customElements.get("wc-option")||customElements.define("wc-option",le);const Do=s.css`
|
|
1035
1136
|
:host {
|
|
1036
1137
|
display: inline-block;
|
|
1037
1138
|
width: 240px;
|
|
@@ -1196,7 +1297,7 @@
|
|
|
1196
1297
|
:host([disabled]) .value {
|
|
1197
1298
|
color: var(--wc-color-text-disabled);
|
|
1198
1299
|
}
|
|
1199
|
-
`;var
|
|
1300
|
+
`;var Vo=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,ce=(o,e,t,l)=>{for(var r=l>1?void 0:l?jo(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&Vo(e,t,r),r};const Nt=class extends M(s.LitElement){constructor(){super(),this._value="",this.placeholder="",this.size="medium",this.status="default",this.clearable=!1,this.open=!1,this.activeIndex=-1,this.localize=new u(this),this.uid=`wc-select-${Math.random().toString(36).slice(2,8)}`,this.assignedOptions=[],this.onDocumentClick=e=>{e.composedPath().includes(this)||this.hide()},this.handleKeydown=e=>{if(!this.disabled)switch(e.key){case"Enter":case" ":if(e.preventDefault(),this.open&&this.activeIndex>=0){const t=this.enabledOptions[this.activeIndex];t&&this.selectOption(t)}else this.show();break;case"Escape":e.preventDefault(),this.hide();break;case"ArrowDown":e.preventDefault(),this.open?this.enabledOptions.length&&(this.activeIndex=(this.activeIndex+1)%this.enabledOptions.length,this.scrollToActive()):this.show();break;case"ArrowUp":if(e.preventDefault(),!this.open)this.show();else if(this.enabledOptions.length){const t=this.enabledOptions.length;this.activeIndex=(this.activeIndex-1+t)%t,this.scrollToActive()}break;case"Home":this.open&&this.enabledOptions.length&&(e.preventDefault(),this.activeIndex=0,this.scrollToActive());break;case"End":this.open&&this.enabledOptions.length&&(e.preventDefault(),this.activeIndex=this.enabledOptions.length-1,this.scrollToActive());break;case"Tab":this.hide();break}},this.addEventListener("keydown",this.handleKeydown)}get value(){return this._value}set value(e){const t=this._value;this._value=e??"",this.requestUpdate("value",t)}get defaultValue(){return this.getAttribute("value")??""}updated(e){super.updated(e),e.has("value")&&(this.syncOptions(),this.internals.setFormValue(this.value||null))}formResetCallback(){super.formResetCallback(),this.value=String(this.defaultValue??""),this.internals.setFormValue(this.value||null)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick),super.disconnectedCallback()}get enabledOptions(){return this.assignedOptions.filter(e=>!e.disabled)}get selectedLabel(){return this.assignedOptions.find(e=>e.value===this.value)?.label??""}get displayText(){return this.value?this.selectedLabel:this.placeholder||this.localize.term("select.placeholder")}onSlotChange(e){this.assignedOptions=e.target.assignedElements().filter(t=>t.tagName==="WC-OPTION"),this.assignedOptions.forEach((t,l)=>t.setAttribute("id",`${this.uid}-opt-${l}`)),this.syncOptions(),this.requestUpdate()}syncOptions(){for(const e of this.assignedOptions)e.selected=!e.disabled&&e.value===this.value}show(){if(this.disabled||this.open)return;this.open=!0;const e=this.enabledOptions.findIndex(t=>t.value===this.value);this.activeIndex=e>=0?e:this.enabledOptions.length?0:-1,this.scrollToActive()}hide(){this.open&&(this.open=!1,this.activeIndex=-1)}toggle(){this.open?this.hide():this.show()}onTriggerClick(){this.toggle()}onPanelClick(e){const t=e.target.closest("wc-option");t&&!t.disabled&&this.selectOption(t)}selectOption(e){this.value=e.value,this.hide(),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value,label:e.label},bubbles:!0,composed:!0}))}handleClear(e){e.preventDefault(),e.stopPropagation(),this.value="",this.hide(),this.dispatchEvent(new CustomEvent("wc-clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:"",label:""},bubbles:!0,composed:!0}))}scrollToActive(){for(const t of this.assignedOptions)t.active=!1;const e=this.enabledOptions[this.activeIndex];e&&(e.active=!0),this.updateComplete.then(()=>{e&&typeof e.scrollIntoView=="function"&&e.scrollIntoView({block:"nearest"})})}render(){const e=this.activeIndex>=0?this.enabledOptions[this.activeIndex]:void 0,t=e?`${this.uid}-opt-${this.assignedOptions.indexOf(e)}`:"",l=this.clearable&&this.value&&!this.disabled;return s.html`
|
|
1200
1301
|
<div class="select" part="base">
|
|
1201
1302
|
<div
|
|
1202
1303
|
class="trigger"
|
|
@@ -1213,7 +1314,7 @@
|
|
|
1213
1314
|
<span class="value ${this.value?"":"placeholder"}" part="value"
|
|
1214
1315
|
>${this.displayText}</span
|
|
1215
1316
|
>
|
|
1216
|
-
${
|
|
1317
|
+
${l?s.html`
|
|
1217
1318
|
<span
|
|
1218
1319
|
class="clear"
|
|
1219
1320
|
part="clear-button"
|
|
@@ -1236,10 +1337,10 @@
|
|
|
1236
1337
|
@click=${this.onPanelClick}
|
|
1237
1338
|
>
|
|
1238
1339
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
1239
|
-
${this.assignedOptions.length===0?
|
|
1340
|
+
${this.assignedOptions.length===0?s.html`<div class="empty">${this.localize.term("select.empty")}</div>`:""}
|
|
1240
1341
|
</div>
|
|
1241
1342
|
</div>
|
|
1242
|
-
`}};
|
|
1343
|
+
`}};Nt.styles=[d,Do];let _=Nt;ce([a.property()],_.prototype,"value",1);ce([a.property()],_.prototype,"placeholder",2);ce([a.property({reflect:!0})],_.prototype,"size",2);ce([a.property({reflect:!0})],_.prototype,"status",2);ce([a.property({type:Boolean,reflect:!0})],_.prototype,"clearable",2);ce([a.property({type:Boolean,reflect:!0})],_.prototype,"open",2);customElements.get("wc-select")||customElements.define("wc-select",_);const Bo=s.css`
|
|
1243
1344
|
:host {
|
|
1244
1345
|
display: inline-block;
|
|
1245
1346
|
width: 240px;
|
|
@@ -1319,7 +1420,7 @@
|
|
|
1319
1420
|
border-color: var(--wc-color-border);
|
|
1320
1421
|
box-shadow: none;
|
|
1321
1422
|
}
|
|
1322
|
-
`;var
|
|
1423
|
+
`;var Ho=Object.defineProperty,No=Object.getOwnPropertyDescriptor,Ce=(o,e,t,l)=>{for(var r=l>1?void 0:l?No(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&Ho(e,t,r),r};const qt=class extends M(s.LitElement){constructor(){super(...arguments),this._value=0,this.min=0,this.max=100,this.step=1,this.label=""}get value(){return this._value}set value(e){const t=this._value;this._value=this.clamp(e),this.requestUpdate("value",t)}clamp(e){if(Number.isNaN(e))return this._value;const t=Math.round((e-this.min)/this.step)*this.step+this.min,l=Number(t.toFixed(10));return Math.min(this.max,Math.max(this.min,l))}get percent(){return this.max===this.min?0:(this.value-this.min)/(this.max-this.min)*100}get defaultValue(){const e=this.getAttribute("value");return e?Number(e):0}updated(e){super.updated(e),e.has("value")&&this.internals.setFormValue(String(this.value))}formResetCallback(){super.formResetCallback(),this.value=Number(this.defaultValue??0),this.internals.setFormValue(String(this.value))}handleInput(e){const t=e.target;this.value=Number(t.value),this.dispatchEvent(new CustomEvent("wc-input",{detail:{value:this.value},bubbles:!0,composed:!0}))}handleChange(){this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return s.html`
|
|
1323
1424
|
<div class="slider" part="base">
|
|
1324
1425
|
<div class="track" part="track">
|
|
1325
1426
|
<div class="fill" part="fill" style="width: ${this.percent}%"></div>
|
|
@@ -1338,7 +1439,7 @@
|
|
|
1338
1439
|
@change=${this.handleChange}
|
|
1339
1440
|
/>
|
|
1340
1441
|
</div>
|
|
1341
|
-
`}};
|
|
1442
|
+
`}};qt.styles=[d,Bo];let W=qt;Ce([a.property({type:Number})],W.prototype,"value",1);Ce([a.property({type:Number})],W.prototype,"min",2);Ce([a.property({type:Number})],W.prototype,"max",2);Ce([a.property({type:Number})],W.prototype,"step",2);Ce([a.property()],W.prototype,"label",2);customElements.get("wc-slider")||customElements.define("wc-slider",W);const qo=s.css`
|
|
1342
1443
|
:host {
|
|
1343
1444
|
display: inline-block;
|
|
1344
1445
|
width: 144px;
|
|
@@ -1505,7 +1606,7 @@
|
|
|
1505
1606
|
:host([readonly]) .number {
|
|
1506
1607
|
border-style: dashed;
|
|
1507
1608
|
}
|
|
1508
|
-
`;var
|
|
1609
|
+
`;var _o=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,S=(o,e,t,l)=>{for(var r=l>1?void 0:l?Fo(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&_o(e,t,r),r};const _t=class extends M(s.LitElement){constructor(){super(...arguments),this._value=0,this.min=-1/0,this.max=1/0,this.step=1,this.theme="row",this.size="medium",this.placeholder="",this.label="",this.readonly=!1,this.status="default",this.localize=new u(this),this._editing=!1,this._text=""}get value(){return this._value}set value(e){const t=this._value;this._value=this.clamp(e),this.requestUpdate("value",t)}clamp(e){if(Number.isNaN(e))return this._value;const t=Number.isFinite(this.min)?Math.round((e-this.min)/this.step)*this.step+this.min:Math.round(e/this.step)*this.step,l=Number(t.toFixed(10));return Math.min(this.max,Math.max(this.min,l))}formatValue(){return String(this._value)}get defaultValue(){const e=this.getAttribute("value");return e?Number(e):0}updated(e){super.updated(e),e.has("value")&&this.internals.setFormValue(String(this.value))}formResetCallback(){super.formResetCallback(),this.value=Number(this.defaultValue??0),this.internals.setFormValue(String(this.value))}stepBy(e){if(this.disabled||this.readonly)return;const t=this.clamp(this.value+e*this.step);t!==this.value&&(this.value=t,this.internals.setFormValue(String(this.value)),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0})))}commit(){if(!this._editing)return;this._editing=!1,this._text="";const e=this.shadowRoot.querySelector(".inner").value.trim(),t=Number(e),l=e===""||Number.isNaN(t)?this._value:this.clamp(t);this.requestUpdate(),l!==this._value&&(this.value=l,this.internals.setFormValue(String(this.value)),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:this.value},bubbles:!0,composed:!0})))}handleFocus(){this._editing=!0,this._text=this.formatValue(),this.requestUpdate()}handleBlur(){this.commit()}handleInput(e){const t=e.target;this._text=t.value,this.dispatchEvent(new CustomEvent("wc-input",{detail:{value:Number(t.value),text:t.value},bubbles:!0,composed:!0}))}handleKeydown(e){e.key==="ArrowUp"?(e.preventDefault(),this.stepBy(1)):e.key==="ArrowDown"?(e.preventDefault(),this.stepBy(-1)):e.key==="Enter"&&this.commit()}get canDecrement(){return!this.disabled&&!this.readonly&&this.value>this.min}get canIncrement(){return!this.disabled&&!this.readonly&&this.value<this.max}render(){const e=l=>{const r=l===1;return s.html`
|
|
1509
1610
|
<button
|
|
1510
1611
|
type="button"
|
|
1511
1612
|
class="step ${r?"plus":"minus"}"
|
|
@@ -1513,11 +1614,11 @@
|
|
|
1513
1614
|
tabindex="-1"
|
|
1514
1615
|
?disabled=${r?!this.canIncrement:!this.canDecrement}
|
|
1515
1616
|
aria-label=${this.localize.term(r?"inputNumber.increment":"inputNumber.decrement")}
|
|
1516
|
-
@click=${()=>this.stepBy(
|
|
1617
|
+
@click=${()=>this.stepBy(l)}
|
|
1517
1618
|
>
|
|
1518
1619
|
<wc-icon name=${r?"plus":"minus"}></wc-icon>
|
|
1519
1620
|
</button>
|
|
1520
|
-
`},t=
|
|
1621
|
+
`},t=s.html`
|
|
1521
1622
|
<input
|
|
1522
1623
|
part="input"
|
|
1523
1624
|
class="inner"
|
|
@@ -1533,12 +1634,12 @@
|
|
|
1533
1634
|
@input=${this.handleInput}
|
|
1534
1635
|
@keydown=${this.handleKeydown}
|
|
1535
1636
|
/>
|
|
1536
|
-
`;return this.theme==="normal"?
|
|
1637
|
+
`;return this.theme==="normal"?s.html`<div class="number" part="base">${t}</div>`:this.theme==="column"?s.html`
|
|
1537
1638
|
<div class="number" part="base">
|
|
1538
1639
|
${t}
|
|
1539
1640
|
<span class="stepper" part="stepper"> ${e(1)}${e(-1)} </span>
|
|
1540
1641
|
</div>
|
|
1541
|
-
`:
|
|
1642
|
+
`:s.html` <div class="number" part="base">${e(-1)}${t}${e(1)}</div> `}};_t.styles=[d,qo];let f=_t;S([a.property({type:Number})],f.prototype,"value",1);S([a.property({type:Number})],f.prototype,"min",2);S([a.property({type:Number})],f.prototype,"max",2);S([a.property({type:Number})],f.prototype,"step",2);S([a.property({reflect:!0})],f.prototype,"theme",2);S([a.property({reflect:!0})],f.prototype,"size",2);S([a.property()],f.prototype,"placeholder",2);S([a.property()],f.prototype,"label",2);S([a.property({type:Boolean,reflect:!0})],f.prototype,"readonly",2);S([a.property({reflect:!0})],f.prototype,"status",2);customElements.get("wc-input-number")||customElements.define("wc-input-number",f);const Ro=s.css`
|
|
1542
1643
|
:host {
|
|
1543
1644
|
display: inline-block;
|
|
1544
1645
|
width: 240px;
|
|
@@ -1822,7 +1923,7 @@
|
|
|
1822
1923
|
:host([readonly]) .trigger {
|
|
1823
1924
|
border-style: dashed;
|
|
1824
1925
|
}
|
|
1825
|
-
`;var
|
|
1926
|
+
`;var Uo=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,A=(o,e,t,l)=>{for(var r=l>1?void 0:l?Yo(e,t):e,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=(l?c(e,t,r):c(r))||r);return l&&r&&Uo(e,t,r),r};function yt(o){return String(o).padStart(2,"0")}function ke(o){return`${o.getFullYear()}-${yt(o.getMonth()+1)}-${yt(o.getDate())}`}function Je(o){const e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(o);if(!e)return null;const t=new Date(Number(e[1]),Number(e[2])-1,Number(e[3]));return Number.isNaN(t.getTime())?null:t}function mt(o,e){return new Date(o.getFullYear(),o.getMonth(),o.getDate()+e)}const Ft=class extends M(s.LitElement){constructor(){super(),this._value="",this.placeholder="",this.label="",this.size="medium",this.status="default",this.clearable=!1,this.readonly=!1,this.firstDayOfWeek=0,this.open=!1,this.viewYear=new Date().getFullYear(),this.viewMonth=new Date().getMonth(),this.activeIso="",this.localize=new u(this),this.uid=`wc-date-picker-${Math.random().toString(36).slice(2,8)}`,this.onDocumentClick=e=>{e.composedPath().includes(this)||this.hide()},this.handleKeydown=e=>{if(!(this.disabled||this.readonly))switch(e.key){case"Enter":case" ":e.preventDefault(),this.open&&this.activeIso?this.selectDate(this.activeIso):this.show();break;case"Escape":e.preventDefault(),this.hide();break;case"ArrowLeft":e.preventDefault(),this.open?this.moveActive(-1):this.show();break;case"ArrowRight":e.preventDefault(),this.open?this.moveActive(1):this.show();break;case"ArrowUp":e.preventDefault(),this.open?this.moveActive(-7):this.show();break;case"ArrowDown":e.preventDefault(),this.open?this.moveActive(7):this.show();break;case"Home":this.open&&(e.preventDefault(),this.moveActive(-7));break;case"End":this.open&&(e.preventDefault(),this.moveActive(7));break;case"Tab":this.hide();break}},this.addEventListener("keydown",this.handleKeydown)}get value(){return this._value}set value(e){const t=this._value;this._value=e&&Je(e)?e:"",this.requestUpdate("value",t)}get defaultValue(){return this.getAttribute("value")??""}updated(e){super.updated(e),e.has("value")&&this.internals.setFormValue(this.value||null)}formResetCallback(){super.formResetCallback(),this.value=String(this.defaultValue??""),this.internals.setFormValue(this.value||null)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick),super.disconnectedCallback()}show(){if(this.disabled||this.readonly||this.open)return;this.open=!0;const e=Je(this.value)??new Date;this.viewYear=e.getFullYear(),this.viewMonth=e.getMonth(),this.activeIso=ke(e)}hide(){this.open&&(this.open=!1,this.activeIso="")}toggle(){this.open?this.hide():this.show()}setView(e,t){this.viewYear=e,this.viewMonth=t,this.requestUpdate()}prevMonth(){const e=this.viewMonth===0?11:this.viewMonth-1,t=this.viewMonth===0?this.viewYear-1:this.viewYear;this.setView(t,e)}nextMonth(){const e=this.viewMonth===11?0:this.viewMonth+1,t=this.viewMonth===11?this.viewYear+1:this.viewYear;this.setView(t,e)}prevYear(){this.setView(this.viewYear-1,this.viewMonth)}nextYear(){this.setView(this.viewYear+1,this.viewMonth)}get calendarCells(){const e=(new Date(this.viewYear,this.viewMonth,1).getDay()-this.firstDayOfWeek+7)%7,t=new Date(this.viewYear,this.viewMonth,1-e),l=ke(new Date),r=[];for(let n=0;n<42;n++){const c=mt(t,n),h=ke(c);r.push({iso:h,day:c.getDate(),inMonth:c.getMonth()===this.viewMonth,isToday:h===l})}return r}get weekdayLabels(){return Array.from({length:7},(e,t)=>this.localize.date(new Date(2023,0,1+(this.firstDayOfWeek+t)%7),{weekday:"narrow"}))}get monthLabel(){return this.localize.date(new Date(this.viewYear,this.viewMonth,1),{year:"numeric",month:"long"})}selectDate(e){this.value=e,this.hide(),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:e},bubbles:!0,composed:!0}))}handleClear(e){e.preventDefault(),e.stopPropagation(),this.value="",this.hide(),this.dispatchEvent(new CustomEvent("wc-clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:""},bubbles:!0,composed:!0}))}selectToday(){this.selectDate(ke(new Date))}onCellClick(e){const t=e.target.closest("[data-iso]");t?.dataset.iso&&this.selectDate(t.dataset.iso)}moveActive(e){if(!this.open)return;const t=Je(this.activeIso)??new Date,l=mt(t,e),r=ke(l);this.activeIso=r,l.getFullYear()!==this.viewYear||l.getMonth()!==this.viewMonth?this.setView(l.getFullYear(),l.getMonth()):this.requestUpdate()}render(){const e=this.clearable&&this.value&&!this.disabled&&!this.readonly,t=this.open?this.calendarCells:[],l=[];for(let r=0;r<t.length;r+=7)l.push(t.slice(r,r+7));return s.html`
|
|
1826
1927
|
<div class="picker" part="base">
|
|
1827
1928
|
<div
|
|
1828
1929
|
class="trigger"
|
|
@@ -1840,7 +1941,7 @@
|
|
|
1840
1941
|
<span class="value ${this.value?"":"placeholder"}" part="value"
|
|
1841
1942
|
>${this.value||this.placeholder||this.localize.term("datePicker.placeholder")}</span
|
|
1842
1943
|
>
|
|
1843
|
-
${e?
|
|
1944
|
+
${e?s.html`
|
|
1844
1945
|
<span
|
|
1845
1946
|
class="clear"
|
|
1846
1947
|
part="clear-button"
|
|
@@ -1907,19 +2008,19 @@
|
|
|
1907
2008
|
</div>
|
|
1908
2009
|
<div class="grid" part="grid" role="grid">
|
|
1909
2010
|
<div class="row weekdays" role="row">
|
|
1910
|
-
${this.weekdayLabels.map(r=>
|
|
2011
|
+
${this.weekdayLabels.map(r=>s.html`<span class="cell weekday" role="columnheader">${r}</span>`)}
|
|
1911
2012
|
</div>
|
|
1912
|
-
${
|
|
2013
|
+
${l.map(r=>s.html`
|
|
1913
2014
|
<div class="row" role="row">
|
|
1914
|
-
${r.map(
|
|
2015
|
+
${r.map(n=>s.html`
|
|
1915
2016
|
<span
|
|
1916
|
-
class="cell day ${
|
|
2017
|
+
class="cell day ${n.inMonth?"":"out"} ${n.iso===this.value?"selected":""} ${n.iso===this.activeIso?"active":""}"
|
|
1917
2018
|
role="gridcell"
|
|
1918
|
-
data-iso=${
|
|
1919
|
-
id="${this.uid}-cell-${
|
|
1920
|
-
aria-selected=${
|
|
2019
|
+
data-iso=${n.iso}
|
|
2020
|
+
id="${this.uid}-cell-${n.iso}"
|
|
2021
|
+
aria-selected=${n.iso===this.value}
|
|
1921
2022
|
@click=${this.onCellClick}
|
|
1922
|
-
>${
|
|
2023
|
+
>${n.day}</span
|
|
1923
2024
|
>
|
|
1924
2025
|
`)}
|
|
1925
2026
|
</div>
|
|
@@ -1938,7 +2039,7 @@
|
|
|
1938
2039
|
</div>
|
|
1939
2040
|
</div>
|
|
1940
2041
|
</div>
|
|
1941
|
-
`}};
|
|
2042
|
+
`}};Ft.styles=[d,Ro];let z=Ft;A([a.property()],z.prototype,"value",1);A([a.property()],z.prototype,"placeholder",2);A([a.property()],z.prototype,"label",2);A([a.property({reflect:!0})],z.prototype,"size",2);A([a.property({reflect:!0})],z.prototype,"status",2);A([a.property({type:Boolean,reflect:!0})],z.prototype,"clearable",2);A([a.property({type:Boolean,reflect:!0})],z.prototype,"readonly",2);A([a.property({type:Number,attribute:"first-day-of-week"})],z.prototype,"firstDayOfWeek",2);A([a.property({type:Boolean,reflect:!0})],z.prototype,"open",2);customElements.get("wc-date-picker")||customElements.define("wc-date-picker",z);const Rt=s.css`
|
|
1942
2043
|
:host {
|
|
1943
2044
|
display: block;
|
|
1944
2045
|
}
|
|
@@ -1991,11 +2092,11 @@
|
|
|
1991
2092
|
:host([disabled]) .label {
|
|
1992
2093
|
color: var(--wc-color-text-disabled);
|
|
1993
2094
|
}
|
|
1994
|
-
`,
|
|
2095
|
+
`,Ut=class extends s.LitElement{constructor(){super(),this.onSubmit=e=>{e.preventDefault(),this.submit()},this.onHostClick=e=>{const t=e.composedPath().find(r=>r instanceof Element&&r.tagName==="WC-BUTTON");if(!t)return;const l=t.getAttribute("html-type");l==="submit"?(e.preventDefault(),this.submit()):l==="reset"&&(e.preventDefault(),this.reset())},this.addEventListener("click",this.onHostClick)}connectedCallback(){super.connectedCallback(),this.addEventListener("submit",this.onSubmit)}getItems(){return(this.shadowRoot.querySelector("slot")?.assignedElements()??[]).filter(e=>e.tagName==="WC-FORM-ITEM")}getItem(e){return this.getItems().find(t=>t.name===e)}async validate(){const e={};for(const l of this.getItems()){const r=await l.validate();r&&(e[l.name||`field-${Object.keys(e).length}`]=r)}const t=Object.values(e)[0]??"";return t&&this.focusFirstError(),{valid:Object.keys(e).length===0,errors:e,firstError:t}}reset(){for(const e of this.getItems())e.reset()}async submit(){const e=await this.validate();this.dispatchEvent(new CustomEvent("wc-submit",{detail:e,bubbles:!0,composed:!0}))}focusFirstError(){const e=this.getItems().find(t=>t.error)?.control;!e||typeof e.focus!="function"||(e.focus(),document.activeElement!==e&&e.shadowRoot?.querySelector("input, textarea, button, [tabindex]")?.focus())}render(){return s.html`
|
|
1995
2096
|
<form class="form" part="form" novalidate>
|
|
1996
2097
|
<slot></slot>
|
|
1997
2098
|
</form>
|
|
1998
|
-
`}};
|
|
2099
|
+
`}};Ut.styles=[d,Rt];let Yt=Ut;customElements.get("wc-form")||customElements.define("wc-form",Yt);var Ko=Object.defineProperty,P=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ko(e,t,r),r};const Kt=class extends s.LitElement{constructor(){super(),this.name="",this.label="",this.required=!1,this.pattern="",this.rules=[],this._error="",this.localize=new u(this),this.onControlInteract=()=>{this.validate()},this.addEventListener("wc-change",this.onControlInteract),this.addEventListener("blur",this.onControlInteract,!0)}get error(){return this._error}get control(){return this.shadowRoot.querySelector("slot")?.assignedElements()[0]??null}get controlValue(){return this.control?.value??""}get effectiveRules(){const e=[];return this.required&&e.push({required:!0}),this.min!==void 0&&e.push({min:this.min}),this.max!==void 0&&e.push({max:this.max}),this.minLength!==void 0&&e.push({minLength:this.minLength}),this.maxLength!==void 0&&e.push({maxLength:this.maxLength}),this.pattern&&e.push({pattern:this.pattern}),[...e,...this.rules]}async validate(){const e=this.controlValue;for(const t of this.effectiveRules){const l=await this.checkRule(t,e);if(l)return this.setError(l),l}return this.clearError(),""}async checkRule(e,t){const l=this.label||this.name||"",r=(c,h)=>e.message??this.localize.term(c,{name:l,...h}),n=t===""||t==null||Array.isArray(t)&&t.length===0;if(e.required&&n)return r("form.required");if(n)return"";if(e.min!==void 0&&Number(t)<e.min)return r("form.min",{min:e.min});if(e.max!==void 0&&Number(t)>e.max)return r("form.max",{max:e.max});if(e.minLength!==void 0&&String(t).length<e.minLength)return r("form.minLength",{minLength:e.minLength});if(e.maxLength!==void 0&&String(t).length>e.maxLength)return r("form.maxLength",{maxLength:e.maxLength});if(e.pattern&&!(typeof e.pattern=="string"?new RegExp(e.pattern):e.pattern).test(String(t)))return r("form.pattern");if(e.validator){const c=await e.validator(t);if(c===!1)return r("form.invalid");if(typeof c=="string"&&c)return c}return""}setError(e){this._error=e,this.applyControlStatus(),this.requestUpdate()}clearError(){this._error&&(this._error="",this.applyControlStatus(),this.requestUpdate())}applyControlStatus(){const e=this.control;e&&"status"in e&&(e.status=this._error?"error":"default")}reset(){const e=this.control;e&&(typeof e.formResetCallback=="function"?e.formResetCallback():"value"in e&&(e.value=""),this.clearError())}render(){return s.html`
|
|
1999
2100
|
<div class="item" part="base">
|
|
2000
2101
|
<label class="label" part="label">
|
|
2001
2102
|
<span class="asterisk" ?hidden=${!this.required}>*</span>${this.label}
|
|
@@ -2005,7 +2106,7 @@
|
|
|
2005
2106
|
<div class="error" part="error" role="alert" ?hidden=${!this._error}>${this._error}</div>
|
|
2006
2107
|
</div>
|
|
2007
2108
|
</div>
|
|
2008
|
-
`}};
|
|
2109
|
+
`}};Kt.styles=[d,Rt];let $=Kt;P([a.property()],$.prototype,"name");P([a.property()],$.prototype,"label");P([a.property({type:Boolean,reflect:!0})],$.prototype,"required");P([a.property({type:Number})],$.prototype,"min");P([a.property({type:Number})],$.prototype,"max");P([a.property({type:Number,attribute:"min-length"})],$.prototype,"minLength");P([a.property({type:Number,attribute:"max-length"})],$.prototype,"maxLength");P([a.property()],$.prototype,"pattern");P([a.property({attribute:!1})],$.prototype,"rules");customElements.get("wc-form-item")||customElements.define("wc-form-item",$);const Wo=s.css`
|
|
2009
2110
|
:host {
|
|
2010
2111
|
display: block;
|
|
2011
2112
|
|
|
@@ -2082,7 +2183,7 @@
|
|
|
2082
2183
|
:host([vertical]) .divider {
|
|
2083
2184
|
margin: 0;
|
|
2084
2185
|
}
|
|
2085
|
-
`;var
|
|
2186
|
+
`;var Xo=Object.defineProperty,nt=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Xo(e,t,r),r};const Wt=class extends s.LitElement{constructor(){super(...arguments),this.dashed=!1,this.align="center",this.vertical=!1,this._hasContent=!1}onSlotChange(e){this._hasContent=e.target.assignedNodes({flatten:!0}).length>0,this.requestUpdate()}render(){return this.vertical?s.html`<span class="line vertical" part="line"></span>`:s.html`
|
|
2086
2187
|
<div class="divider ${`align-${this.align}`}" part="base">
|
|
2087
2188
|
<span class="line start" part="line"></span>
|
|
2088
2189
|
<span class="content" part="content" ?hidden=${!this._hasContent}>
|
|
@@ -2090,7 +2191,7 @@
|
|
|
2090
2191
|
</span>
|
|
2091
2192
|
<span class="line end" part="line"></span>
|
|
2092
2193
|
</div>
|
|
2093
|
-
`}};
|
|
2194
|
+
`}};Wt.styles=[d,Wo];let Ee=Wt;nt([a.property({type:Boolean,reflect:!0})],Ee.prototype,"dashed");nt([a.property({reflect:!0})],Ee.prototype,"align");nt([a.property({type:Boolean,reflect:!0})],Ee.prototype,"vertical");customElements.get("wc-divider")||customElements.define("wc-divider",Ee);const Go=s.css`
|
|
2094
2195
|
:host {
|
|
2095
2196
|
display: inline-block;
|
|
2096
2197
|
|
|
@@ -2171,7 +2272,7 @@
|
|
|
2171
2272
|
border-color: var(--wc-color-border);
|
|
2172
2273
|
}
|
|
2173
2274
|
|
|
2174
|
-
/* ---- 语义色 × light 浅底(默认
|
|
2275
|
+
/* ---- 语义色 × light 浅底(默认 type) ---- */
|
|
2175
2276
|
:host([theme='primary']) .tag {
|
|
2176
2277
|
color: var(--wc-color-primary);
|
|
2177
2278
|
background-color: var(--wc-color-primary-light);
|
|
@@ -2193,54 +2294,54 @@
|
|
|
2193
2294
|
}
|
|
2194
2295
|
|
|
2195
2296
|
/* ---- dark 实底 ---- */
|
|
2196
|
-
:host([
|
|
2297
|
+
:host([type='dark'][theme='default']) .tag {
|
|
2197
2298
|
color: var(--wc-color-text-anti);
|
|
2198
2299
|
background-color: var(--wc-color-text-secondary);
|
|
2199
2300
|
border-color: transparent;
|
|
2200
2301
|
}
|
|
2201
2302
|
|
|
2202
|
-
:host([
|
|
2303
|
+
:host([type='dark'][theme='primary']) .tag {
|
|
2203
2304
|
color: var(--wc-color-text-anti);
|
|
2204
2305
|
background-color: var(--wc-color-primary);
|
|
2205
2306
|
}
|
|
2206
2307
|
|
|
2207
|
-
:host([
|
|
2308
|
+
:host([type='dark'][theme='success']) .tag {
|
|
2208
2309
|
color: var(--wc-color-text-anti);
|
|
2209
2310
|
background-color: var(--wc-color-success);
|
|
2210
2311
|
}
|
|
2211
2312
|
|
|
2212
|
-
:host([
|
|
2313
|
+
:host([type='dark'][theme='warning']) .tag {
|
|
2213
2314
|
color: var(--wc-color-text-anti);
|
|
2214
2315
|
background-color: var(--wc-color-warning);
|
|
2215
2316
|
}
|
|
2216
2317
|
|
|
2217
|
-
:host([
|
|
2318
|
+
:host([type='dark'][theme='danger']) .tag {
|
|
2218
2319
|
color: var(--wc-color-text-anti);
|
|
2219
2320
|
background-color: var(--wc-color-error);
|
|
2220
2321
|
}
|
|
2221
2322
|
|
|
2222
2323
|
/* ---- outline 描边 ---- */
|
|
2223
|
-
:host([
|
|
2324
|
+
:host([type='outline']) .tag {
|
|
2224
2325
|
background-color: transparent;
|
|
2225
2326
|
}
|
|
2226
2327
|
|
|
2227
|
-
:host([
|
|
2328
|
+
:host([type='outline'][theme='default']) .tag {
|
|
2228
2329
|
border-color: var(--wc-color-border);
|
|
2229
2330
|
}
|
|
2230
2331
|
|
|
2231
|
-
:host([
|
|
2332
|
+
:host([type='outline'][theme='primary']) .tag {
|
|
2232
2333
|
border-color: var(--wc-color-primary);
|
|
2233
2334
|
}
|
|
2234
2335
|
|
|
2235
|
-
:host([
|
|
2336
|
+
:host([type='outline'][theme='success']) .tag {
|
|
2236
2337
|
border-color: var(--wc-color-success);
|
|
2237
2338
|
}
|
|
2238
2339
|
|
|
2239
|
-
:host([
|
|
2340
|
+
:host([type='outline'][theme='warning']) .tag {
|
|
2240
2341
|
border-color: var(--wc-color-warning);
|
|
2241
2342
|
}
|
|
2242
2343
|
|
|
2243
|
-
:host([
|
|
2344
|
+
:host([type='outline'][theme='danger']) .tag {
|
|
2244
2345
|
border-color: var(--wc-color-error);
|
|
2245
2346
|
}
|
|
2246
2347
|
|
|
@@ -2253,11 +2354,11 @@
|
|
|
2253
2354
|
:host([disabled]) .close {
|
|
2254
2355
|
cursor: not-allowed;
|
|
2255
2356
|
}
|
|
2256
|
-
`;var
|
|
2357
|
+
`;var Jo=Object.defineProperty,Me=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Jo(e,t,r),r};const Xt=class extends s.LitElement{constructor(){super(...arguments),this.theme="default",this.size="medium",this.type="light",this.closable=!1,this.disabled=!1,this.localize=new u(this)}handleClose(e){e.stopPropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("wc-close",{bubbles:!0,composed:!0}))}render(){return s.html`
|
|
2257
2358
|
<span class="tag" part="base">
|
|
2258
2359
|
<slot name="icon" class="icon"><span class="icon-placeholder"></span></slot>
|
|
2259
2360
|
<slot></slot>
|
|
2260
|
-
${this.closable?
|
|
2361
|
+
${this.closable?s.html`
|
|
2261
2362
|
<button
|
|
2262
2363
|
type="button"
|
|
2263
2364
|
class="close"
|
|
@@ -2271,7 +2372,7 @@
|
|
|
2271
2372
|
</button>
|
|
2272
2373
|
`:""}
|
|
2273
2374
|
</span>
|
|
2274
|
-
`}};
|
|
2375
|
+
`}};Xt.styles=[d,Go];let X=Xt;Me([a.property({reflect:!0})],X.prototype,"theme");Me([a.property({reflect:!0})],X.prototype,"size");Me([a.property({reflect:!0})],X.prototype,"type");Me([a.property({type:Boolean,reflect:!0})],X.prototype,"closable");Me([a.property({type:Boolean,reflect:!0})],X.prototype,"disabled");customElements.get("wc-tag")||customElements.define("wc-tag",X);const Zo=s.css`
|
|
2275
2376
|
:host {
|
|
2276
2377
|
display: inline-block;
|
|
2277
2378
|
|
|
@@ -2326,7 +2427,7 @@
|
|
|
2326
2427
|
.avatar ::slotted(wc-icon) {
|
|
2327
2428
|
color: var(--wc-color-text-placeholder);
|
|
2328
2429
|
}
|
|
2329
|
-
`;var
|
|
2430
|
+
`;var Qo=Object.defineProperty,Gt=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Qo(e,t,r),r};const ei=["small","medium","large"],Jt=class extends s.LitElement{constructor(){super(...arguments),this.size="medium",this.shape="circle"}get isPreset(){return ei.includes(this.size)}get customStyle(){if(this.isPreset)return"";const e=this.size.trim(),t=/^\d+$/.test(e)?`${e}px`:e;return`--wc-avatar-size:${t};--wc-avatar-font-size:${t}`}render(){return s.html`
|
|
2330
2431
|
<div
|
|
2331
2432
|
class="avatar ${this.isPreset?this.size:"custom"} shape-${this.shape}"
|
|
2332
2433
|
part="base"
|
|
@@ -2334,7 +2435,7 @@
|
|
|
2334
2435
|
>
|
|
2335
2436
|
<slot></slot>
|
|
2336
2437
|
</div>
|
|
2337
|
-
`}};
|
|
2438
|
+
`}};Jt.styles=[d,Zo];let Ve=Jt;Gt([a.property()],Ve.prototype,"size");Gt([a.property({reflect:!0})],Ve.prototype,"shape");customElements.get("wc-avatar")||customElements.define("wc-avatar",Ve);const ti=s.css`
|
|
2338
2439
|
:host {
|
|
2339
2440
|
display: inline-block;
|
|
2340
2441
|
}
|
|
@@ -2380,7 +2481,7 @@
|
|
|
2380
2481
|
.align-stretch {
|
|
2381
2482
|
align-items: stretch;
|
|
2382
2483
|
}
|
|
2383
|
-
`;var
|
|
2484
|
+
`;var ri=Object.defineProperty,je=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ri(e,t,r),r};const oi={small:"var(--wc-space-2)",medium:"var(--wc-space-4)",large:"var(--wc-space-6)"},Zt=class extends s.LitElement{constructor(){super(...arguments),this.size="medium",this.direction="horizontal",this.wrap=!1}get gapValue(){const e=oi[this.size];if(e)return e;const t=this.size.trim();return/^\d+$/.test(t)?`${t}px`:t}render(){return s.html`
|
|
2384
2485
|
<div
|
|
2385
2486
|
class="space ${`align-${this.align??(this.direction==="vertical"?"stretch":"center")}`}"
|
|
2386
2487
|
part="base"
|
|
@@ -2388,7 +2489,7 @@
|
|
|
2388
2489
|
>
|
|
2389
2490
|
<slot></slot>
|
|
2390
2491
|
</div>
|
|
2391
|
-
`}};
|
|
2492
|
+
`}};Zt.styles=[d,ti];let de=Zt;je([a.property()],de.prototype,"size");je([a.property({reflect:!0})],de.prototype,"direction");je([a.property({reflect:!0})],de.prototype,"align");je([a.property({type:Boolean,reflect:!0})],de.prototype,"wrap");customElements.get("wc-space")||customElements.define("wc-space",de);const Qt=s.css`
|
|
2392
2493
|
:host {
|
|
2393
2494
|
display: block;
|
|
2394
2495
|
}
|
|
@@ -2462,7 +2563,7 @@
|
|
|
2462
2563
|
padding-right: calc(var(--wc-row-gutter, 0) / 2);
|
|
2463
2564
|
padding-left: calc(var(--wc-row-gutter, 0) / 2);
|
|
2464
2565
|
}
|
|
2465
|
-
`;var
|
|
2566
|
+
`;var ii=Object.defineProperty,he=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ii(e,t,r),r};const er=class extends s.LitElement{constructor(){super(...arguments),this.gutter=0,this.justify="start",this.align="top",this.wrap=!1}render(){return s.html`
|
|
2466
2567
|
<div
|
|
2467
2568
|
class="row ${`justify-${this.justify} align-${this.align}`}"
|
|
2468
2569
|
part="base"
|
|
@@ -2470,7 +2571,7 @@
|
|
|
2470
2571
|
>
|
|
2471
2572
|
<slot></slot>
|
|
2472
2573
|
</div>
|
|
2473
|
-
`}};
|
|
2574
|
+
`}};er.styles=[d,Qt];let pe=er;he([a.property({type:Number})],pe.prototype,"gutter");he([a.property({reflect:!0})],pe.prototype,"justify");he([a.property({reflect:!0})],pe.prototype,"align");he([a.property({type:Boolean,reflect:!0})],pe.prototype,"wrap");const tr=class extends s.LitElement{constructor(){super(...arguments),this.span=24,this.offset=0}get widthPercent(){return`${(Math.min(24,Math.max(1,Math.round(this.span)||24))/24*100).toFixed(4)}%`}get offsetPercent(){return`${(Math.min(23,Math.max(0,Math.round(this.offset)||0))/24*100).toFixed(4)}%`}render(){return s.html`
|
|
2474
2575
|
<div
|
|
2475
2576
|
class="col"
|
|
2476
2577
|
part="base"
|
|
@@ -2478,12 +2579,12 @@
|
|
|
2478
2579
|
>
|
|
2479
2580
|
<slot></slot>
|
|
2480
2581
|
</div>
|
|
2481
|
-
`}};
|
|
2582
|
+
`}};tr.styles=[d,Qt];let Be=tr;he([a.property({type:Number})],Be.prototype,"span");he([a.property({type:Number})],Be.prototype,"offset");customElements.get("wc-row")||customElements.define("wc-row",pe);customElements.get("wc-col")||customElements.define("wc-col",Be);const ai=s.css`
|
|
2482
2583
|
:host {
|
|
2483
2584
|
display: inline;
|
|
2484
2585
|
}
|
|
2485
2586
|
|
|
2486
|
-
:host([
|
|
2587
|
+
:host([type='heading']) {
|
|
2487
2588
|
display: block;
|
|
2488
2589
|
}
|
|
2489
2590
|
|
|
@@ -2530,19 +2631,19 @@
|
|
|
2530
2631
|
}
|
|
2531
2632
|
|
|
2532
2633
|
/* ---- 语义色 ---- */
|
|
2533
|
-
:host([
|
|
2634
|
+
:host([theme='secondary']) .text {
|
|
2534
2635
|
color: var(--wc-color-text-secondary);
|
|
2535
2636
|
}
|
|
2536
2637
|
|
|
2537
|
-
:host([
|
|
2638
|
+
:host([theme='success']) .text {
|
|
2538
2639
|
color: var(--wc-color-success);
|
|
2539
2640
|
}
|
|
2540
2641
|
|
|
2541
|
-
:host([
|
|
2642
|
+
:host([theme='warning']) .text {
|
|
2542
2643
|
color: var(--wc-color-warning);
|
|
2543
2644
|
}
|
|
2544
2645
|
|
|
2545
|
-
:host([
|
|
2646
|
+
:host([theme='danger']) .text {
|
|
2546
2647
|
color: var(--wc-color-error);
|
|
2547
2648
|
}
|
|
2548
2649
|
|
|
@@ -2552,11 +2653,11 @@
|
|
|
2552
2653
|
cursor: not-allowed;
|
|
2553
2654
|
user-select: none;
|
|
2554
2655
|
}
|
|
2555
|
-
`;var
|
|
2656
|
+
`;var si=Object.defineProperty,He=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&si(e,t,r),r};const rr=class extends s.LitElement{constructor(){super(...arguments),this.type="text",this.level=3,this.theme="default",this.disabled=!1}get headingLevel(){const e=Math.round(this.level);return Math.min(6,Math.max(1,Number.isNaN(e)?3:e))}render(){if(this.type==="heading"){const e=this.headingLevel;return s.html`
|
|
2556
2657
|
<div class="text heading level-${e}" part="base" role="heading" aria-level=${e}>
|
|
2557
2658
|
<slot></slot>
|
|
2558
2659
|
</div>
|
|
2559
|
-
`}return
|
|
2660
|
+
`}return s.html`<span class="text" part="base"><slot></slot></span>`}};rr.styles=[d,ai];let ue=rr;He([a.property({reflect:!0})],ue.prototype,"type");He([a.property({type:Number})],ue.prototype,"level");He([a.property({reflect:!0})],ue.prototype,"theme");He([a.property({type:Boolean,reflect:!0})],ue.prototype,"disabled");customElements.get("wc-text")||customElements.define("wc-text",ue);const ni="wc-dialog, wc-drawer";class lt{constructor(e,t){this.host=e,this.hooks=t,this.bound=!1,this.prevFocused=null,this.prevBodyOverflow="",this.onDocumentKeydown=l=>{l.key==="Escape"?(l.stopPropagation(),this.hooks.requestClose("escape")):l.key==="Tab"&&this.trapFocus(l)}}otherOpenOverlays(){let e=0;return document.querySelectorAll(ni).forEach(t=>{t!==this.host&&t.open&&(e+=1)}),e}trapFocus(e){const t=[...Array.from(this.host.shadowRoot.querySelectorAll('button, [href], [tabindex]:not([tabindex="-1"])')),...Array.from(this.host.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))].filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null);if(t.length===0)return;const l=t[0],r=t[t.length-1],n=this.host.shadowRoot.activeElement??document.activeElement;e.shiftKey&&(n===l||!this.host.contains(n))?(e.preventDefault(),r.focus()):!e.shiftKey&&n===r&&(e.preventDefault(),l.focus())}bind(){this.bound||(this.bound=!0,this.prevFocused=document.activeElement,document.addEventListener("keydown",this.onDocumentKeydown,!0),this.otherOpenOverlays()===0&&(this.prevBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),queueMicrotask(()=>{(this.host.shadowRoot?.querySelector('[part="close-button"]')??this.host.shadowRoot?.querySelector('[role="dialog"]'))?.focus()}))}unbind(){this.bound&&(this.bound=!1,document.removeEventListener("keydown",this.onDocumentKeydown,!0),this.otherOpenOverlays()===0&&(document.body.style.overflow=this.prevBodyOverflow),this.prevFocused&&this.prevFocused.focus&&(this.prevFocused.focus(),this.prevFocused=null))}}const li=s.css`
|
|
2560
2661
|
:host {
|
|
2561
2662
|
display: contents;
|
|
2562
2663
|
|
|
@@ -2683,7 +2784,7 @@
|
|
|
2683
2784
|
animation: none;
|
|
2684
2785
|
}
|
|
2685
2786
|
}
|
|
2686
|
-
`;var
|
|
2787
|
+
`;var ci=Object.defineProperty,we=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ci(e,t,r),r};const or=class extends s.LitElement{constructor(){super(...arguments),this.open=!1,this.header="",this.footer=!0,this.closable=!0,this.closeOnOverlayClick=!1,this.width="",this.localize=new u(this),this.overlay=new lt(this,{requestClose:e=>this.requestClose(e)})}connectedCallback(){super.connectedCallback(),this.open&&this.overlay.bind()}disconnectedCallback(){super.disconnectedCallback(),this.overlay.unbind()}show(){this.open||(this.open=!0)}requestClose(e="api"){this.dispatchEvent(new CustomEvent("wc-close",{detail:{reason:e},bubbles:!0,composed:!0,cancelable:!0}))&&(this.open=!1)}confirm(){this.dispatchEvent(new CustomEvent("wc-confirm",{bubbles:!0,composed:!0})),this.requestClose("confirm")}cancel(){this.dispatchEvent(new CustomEvent("wc-cancel",{bubbles:!0,composed:!0})),this.requestClose("cancel")}updated(e){super.updated(e),e.has("open")&&(this.open?(this.dispatchEvent(new CustomEvent("wc-open",{bubbles:!0,composed:!0})),this.overlay.bind()):this.overlay.unbind())}onOverlayClick(e){e.target===e.currentTarget&&this.closeOnOverlayClick&&this.requestClose("overlay")}widthStyle(){if(!this.width)return"";const e=this.width.trim();return`--wc-dialog-width:${/^\d+$/.test(e)?`${e}px`:e}`}render(){return s.html`
|
|
2687
2788
|
<div class="overlay" part="overlay" ?hidden=${!this.open} @click=${this.onOverlayClick}>
|
|
2688
2789
|
<div
|
|
2689
2790
|
class="dialog"
|
|
@@ -2694,10 +2795,10 @@
|
|
|
2694
2795
|
tabindex="-1"
|
|
2695
2796
|
style=${this.widthStyle()}
|
|
2696
2797
|
>
|
|
2697
|
-
${this.header||this.closable?
|
|
2798
|
+
${this.header||this.closable?s.html`
|
|
2698
2799
|
<div class="header" part="header">
|
|
2699
2800
|
<div class="title"><slot name="header">${this.header}</slot></div>
|
|
2700
|
-
${this.closable?
|
|
2801
|
+
${this.closable?s.html`
|
|
2701
2802
|
<button
|
|
2702
2803
|
type="button"
|
|
2703
2804
|
class="close"
|
|
@@ -2711,7 +2812,7 @@
|
|
|
2711
2812
|
</div>
|
|
2712
2813
|
`:""}
|
|
2713
2814
|
<div class="body" part="body"><slot></slot></div>
|
|
2714
|
-
${this.footer?
|
|
2815
|
+
${this.footer?s.html`
|
|
2715
2816
|
<div class="footer" part="footer">
|
|
2716
2817
|
<slot name="footer">
|
|
2717
2818
|
<wc-button @click=${()=>this.cancel()}>
|
|
@@ -2725,7 +2826,7 @@
|
|
|
2725
2826
|
`:""}
|
|
2726
2827
|
</div>
|
|
2727
2828
|
</div>
|
|
2728
|
-
`}};
|
|
2829
|
+
`}};or.styles=[d,li];let F=or;we([a.property({type:Boolean,reflect:!0})],F.prototype,"open");we([a.property()],F.prototype,"header");we([a.property({type:Boolean})],F.prototype,"footer");we([a.property({type:Boolean,reflect:!0})],F.prototype,"closable");we([a.property({type:Boolean,attribute:"close-on-overlay-click"})],F.prototype,"closeOnOverlayClick");we([a.property()],F.prototype,"width");customElements.get("wc-dialog")||customElements.define("wc-dialog",F);const di=s.css`
|
|
2729
2830
|
:host {
|
|
2730
2831
|
display: contents;
|
|
2731
2832
|
|
|
@@ -2876,7 +2977,7 @@
|
|
|
2876
2977
|
animation: none;
|
|
2877
2978
|
}
|
|
2878
2979
|
}
|
|
2879
|
-
`;var
|
|
2980
|
+
`;var hi=Object.defineProperty,G=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&hi(e,t,r),r};const pi={small:"300px",medium:"500px",large:"760px"},ir=class extends s.LitElement{constructor(){super(...arguments),this.open=!1,this.placement="right",this.size="medium",this.header="",this.footer=!0,this.closable=!0,this.closeOnOverlayClick=!0,this.localize=new u(this),this.overlay=new lt(this,{requestClose:e=>this.requestClose(e)})}connectedCallback(){super.connectedCallback(),this.open&&this.overlay.bind()}disconnectedCallback(){super.disconnectedCallback(),this.overlay.unbind()}show(){this.open||(this.open=!0)}requestClose(e="api"){this.dispatchEvent(new CustomEvent("wc-close",{detail:{reason:e},bubbles:!0,composed:!0,cancelable:!0}))&&(this.open=!1)}confirm(){this.dispatchEvent(new CustomEvent("wc-confirm",{bubbles:!0,composed:!0})),this.requestClose("confirm")}cancel(){this.dispatchEvent(new CustomEvent("wc-cancel",{bubbles:!0,composed:!0})),this.requestClose("cancel")}updated(e){super.updated(e),e.has("open")&&(this.open?(this.dispatchEvent(new CustomEvent("wc-open",{bubbles:!0,composed:!0})),this.overlay.bind()):this.overlay.unbind())}onOverlayClick(e){e.target===e.currentTarget&&this.closeOnOverlayClick&&this.requestClose("overlay")}sizeStyle(){const e=pi[this.size]??this.size.trim();return`--wc-drawer-size:${/^\d+$/.test(e)?`${e}px`:e}`}render(){return s.html`
|
|
2880
2981
|
<div class="overlay" part="overlay" ?hidden=${!this.open} @click=${this.onOverlayClick}>
|
|
2881
2982
|
<div
|
|
2882
2983
|
class="drawer placement-${this.placement}"
|
|
@@ -2887,10 +2988,10 @@
|
|
|
2887
2988
|
tabindex="-1"
|
|
2888
2989
|
style=${this.sizeStyle()}
|
|
2889
2990
|
>
|
|
2890
|
-
${this.header||this.closable?
|
|
2991
|
+
${this.header||this.closable?s.html`
|
|
2891
2992
|
<div class="header" part="header">
|
|
2892
2993
|
<div class="title"><slot name="header">${this.header}</slot></div>
|
|
2893
|
-
${this.closable?
|
|
2994
|
+
${this.closable?s.html`
|
|
2894
2995
|
<button
|
|
2895
2996
|
type="button"
|
|
2896
2997
|
class="close"
|
|
@@ -2904,7 +3005,7 @@
|
|
|
2904
3005
|
</div>
|
|
2905
3006
|
`:""}
|
|
2906
3007
|
<div class="body" part="body"><slot></slot></div>
|
|
2907
|
-
${this.footer?
|
|
3008
|
+
${this.footer?s.html`
|
|
2908
3009
|
<div class="footer" part="footer">
|
|
2909
3010
|
<slot name="footer">
|
|
2910
3011
|
<wc-button @click=${()=>this.cancel()}>
|
|
@@ -2918,7 +3019,7 @@
|
|
|
2918
3019
|
`:""}
|
|
2919
3020
|
</div>
|
|
2920
3021
|
</div>
|
|
2921
|
-
`}};
|
|
3022
|
+
`}};ir.styles=[d,di];let D=ir;G([a.property({type:Boolean,reflect:!0})],D.prototype,"open");G([a.property({reflect:!0})],D.prototype,"placement");G([a.property()],D.prototype,"size");G([a.property()],D.prototype,"header");G([a.property({type:Boolean})],D.prototype,"footer");G([a.property({type:Boolean,reflect:!0})],D.prototype,"closable");G([a.property({type:Boolean,attribute:"close-on-overlay-click"})],D.prototype,"closeOnOverlayClick");customElements.get("wc-drawer")||customElements.define("wc-drawer",D);const ui=s.css`
|
|
2922
3023
|
:host {
|
|
2923
3024
|
display: block;
|
|
2924
3025
|
pointer-events: auto;
|
|
@@ -3007,7 +3108,7 @@
|
|
|
3007
3108
|
animation: none;
|
|
3008
3109
|
}
|
|
3009
3110
|
}
|
|
3010
|
-
`;var
|
|
3111
|
+
`;var wi=Object.defineProperty,Ne=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&wi(e,t,r),r};const vi={info:"info",success:"check",warning:"warning",error:"error",loading:"loader"},ar=class extends s.LitElement{constructor(){super(...arguments),this.theme="info",this.content="",this.duration=3e3,this.closable=!1,this.localize=new u(this),this.autoCloseTimer=null}connectedCallback(){super.connectedCallback(),this.startAutoClose()}disconnectedCallback(){super.disconnectedCallback(),this.stopAutoClose()}startAutoClose(){this.duration<=0||this.autoCloseTimer!==null||(this.autoCloseTimer=setTimeout(()=>this.close(),this.duration))}stopAutoClose(){this.autoCloseTimer!==null&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null)}close(){this.stopAutoClose(),this.dispatchEvent(new CustomEvent("wc-close",{bubbles:!0,composed:!0})),this.remove()}render(){const e=vi[this.theme]??"info";return s.html`
|
|
3011
3112
|
<div class="message" part="base" role="status" aria-live="polite">
|
|
3012
3113
|
<wc-icon
|
|
3013
3114
|
class="icon ${this.theme}"
|
|
@@ -3016,7 +3117,7 @@
|
|
|
3016
3117
|
?spin=${this.theme==="loading"}
|
|
3017
3118
|
></wc-icon>
|
|
3018
3119
|
<div class="content" part="content"><slot>${this.content}</slot></div>
|
|
3019
|
-
${this.closable?
|
|
3120
|
+
${this.closable?s.html`
|
|
3020
3121
|
<button
|
|
3021
3122
|
type="button"
|
|
3022
3123
|
class="close"
|
|
@@ -3028,7 +3129,7 @@
|
|
|
3028
3129
|
</button>
|
|
3029
3130
|
`:""}
|
|
3030
3131
|
</div>
|
|
3031
|
-
`}};
|
|
3132
|
+
`}};ar.styles=[d,ui];let ve=ar;Ne([a.property({reflect:!0})],ve.prototype,"theme");Ne([a.property()],ve.prototype,"content");Ne([a.property({type:Number})],ve.prototype,"duration");Ne([a.property({type:Boolean,reflect:!0})],ve.prototype,"closable");customElements.get("wc-message")||customElements.define("wc-message",ve);let N=null;function yi(){if(N&&N.isConnected)return N;N=document.createElement("div"),N.className="wc-message-container";const o=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--wc-z-index-message"));return N.style.cssText=["position:fixed","top:var(--wc-space-4, 16px)","left:0","right:0","display:flex","flex-direction:column","align-items:center","pointer-events:none",`z-index:${Number.isFinite(o)&&o>0?o:1500}`].join(";"),document.body.appendChild(N),N}function oe(o,e={}){const t=document.createElement("wc-message");return t.theme=e.theme??"info",t.content=o,e.duration!==void 0&&(t.duration=e.duration),e.closable!==void 0&&(t.closable=e.closable),e.onClose&&t.addEventListener("wc-close",()=>e.onClose()),yi().appendChild(t),t}const mi={info:(o,e)=>oe(o,{...e,theme:"info"}),success:(o,e)=>oe(o,{...e,theme:"success"}),warning:(o,e)=>oe(o,{...e,theme:"warning"}),error:(o,e)=>oe(o,{...e,theme:"error"}),loading:(o,e)=>oe(o,{duration:0,closable:!1,...e,theme:"loading"}),show:oe},m=8,Ie=12;function qe(o){const e=o.indexOf("-");return e===-1?{base:o}:{base:o.slice(0,e),align:o.slice(e+1)}}function gt(o){switch(o){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}function bt(o,e,t,l){switch(o){case"top":return e.y-t.height-m>=l.y;case"bottom":return e.y+e.height+t.height+m<=l.y+l.height;case"left":return e.x-t.width-m>=l.x;case"right":return e.x+e.width+t.width+m<=l.x+l.width}}function Ze(o,e,t){return Math.max(e,Math.min(o,t))}function _e(o,e,t,l){const{base:r,align:n}=qe(l);let c=r;!bt(r,o,e,t)&&bt(gt(r),o,e,t)&&(c=gt(r));const h=n==="start",ro=n==="end";let te,re;const ut=(Xe,wt,vt)=>h?Xe:ro?Xe+wt-vt:Xe+wt/2-vt/2;c==="top"||c==="bottom"?(te=ut(o.x,o.width,e.width),re=c==="top"?o.y-e.height-m:o.y+o.height+m):(re=ut(o.y,o.height,e.height),te=c==="left"?o.x-e.width-m:o.x+o.width+m),te=Ze(te,t.x,t.x+t.width-e.width),re=Ze(re,t.y,t.y+t.height-e.height);const oo=c==="top"||c==="bottom"?o.x+o.width/2-te:o.y+o.height/2-re,io=(c==="top"||c==="bottom"?e.width:e.height)-Ie,ao=Ze(oo,Ie,Math.max(Ie,io)),so=n?`${c}-${n}`:c;return{x:te,y:re,placement:so,arrowOffset:ao}}const gi=s.css`
|
|
3032
3133
|
:host {
|
|
3033
3134
|
display: inline-block;
|
|
3034
3135
|
|
|
@@ -3110,7 +3211,7 @@
|
|
|
3110
3211
|
transition: none;
|
|
3111
3212
|
}
|
|
3112
3213
|
}
|
|
3113
|
-
`;var
|
|
3214
|
+
`;var bi=Object.defineProperty,Fe=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&bi(e,t,r),r};const fi=100,xi=150;let ki=0;const sr=class extends s.LitElement{constructor(){super(...arguments),this.content="",this.placement="top",this.trigger="hover",this.open=!1,this.panelId=`wc-tooltip-panel-${++ki}`,this.showTimer=null,this.hideTimer=null,this.onDocumentClick=e=>{e.composedPath().includes(this)||this.hide()}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.clearTimers(),document.removeEventListener("click",this.onDocumentClick,!0)}show(){this.clearTimers(),this.showTimer=setTimeout(()=>{this.open||(this.open=!0,this.dispatchEvent(new CustomEvent("wc-show",{bubbles:!0,composed:!0})))},fi)}hide(){this.clearTimers(),this.hideTimer=setTimeout(()=>{this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("wc-hide",{bubbles:!0,composed:!0})))},xi)}clearTimers(){this.showTimer!==null&&(clearTimeout(this.showTimer),this.showTimer=null),this.hideTimer!==null&&(clearTimeout(this.hideTimer),this.hideTimer=null)}onTriggerEnter(){this.trigger==="hover"&&this.show()}onTriggerLeave(){this.trigger==="hover"&&this.hide()}onTriggerClick(e){this.trigger==="click"&&(e.stopPropagation(),this.open?this.hide():this.show())}onTriggerKeydown(e){this.trigger==="click"&&e.key==="Escape"&&this.open&&this.hide()}updated(e){super.updated(e),e.has("open")&&(this.open&&this.trigger==="click"?document.addEventListener("click",this.onDocumentClick,!0):this.open||document.removeEventListener("click",this.onDocumentClick,!0),this.open&&this.position())}position(){const e=this.shadowRoot.querySelector(".panel");if(!e)return;const t=this.getBoundingClientRect(),l=e.getBoundingClientRect(),r={x:0,y:0,width:window.innerWidth,height:window.innerHeight},n=_e(t,l,r,this.placement);e.style.left=`${n.x}px`,e.style.top=`${n.y}px`,e.dataset.placement=n.placement,e.style.setProperty("--wc-tooltip-arrow-offset",`${n.arrowOffset}px`)}render(){const{base:e}=qe(this.placement);return s.html`
|
|
3114
3215
|
<span
|
|
3115
3216
|
class="trigger"
|
|
3116
3217
|
part="trigger"
|
|
@@ -3134,7 +3235,7 @@
|
|
|
3134
3235
|
<div class="arrow" part="arrow"></div>
|
|
3135
3236
|
<div class="body"><slot name="content">${this.content}</slot></div>
|
|
3136
3237
|
</div>
|
|
3137
|
-
`}};
|
|
3238
|
+
`}};sr.styles=[d,gi];let ye=sr;Fe([a.property()],ye.prototype,"content");Fe([a.property()],ye.prototype,"placement");Fe([a.property({reflect:!0})],ye.prototype,"trigger");Fe([a.property({type:Boolean,reflect:!0})],ye.prototype,"open");customElements.get("wc-tooltip")||customElements.define("wc-tooltip",ye);const zi=s.css`
|
|
3138
3239
|
:host {
|
|
3139
3240
|
display: inline-block;
|
|
3140
3241
|
|
|
@@ -3238,7 +3339,7 @@
|
|
|
3238
3339
|
transition: none;
|
|
3239
3340
|
}
|
|
3240
3341
|
}
|
|
3241
|
-
`;var
|
|
3342
|
+
`;var $i=Object.defineProperty,J=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&$i(e,t,r),r};let Ci=0;const nr=class extends s.LitElement{constructor(){super(...arguments),this.content="",this.placement="top",this.confirmText="",this.cancelText="",this.theme="primary",this.icon="warning",this.open=!1,this.panelId=`wc-popconfirm-panel-${++Ci}`,this.localize=new u(this),this.onDocumentClick=e=>{e.composedPath().includes(this)||this.cancel("outside")},this.onDocumentKeydown=e=>{e.key==="Escape"&&(e.stopPropagation(),this.cancel("escape"))}}disconnectedCallback(){super.disconnectedCallback(),this.unbindSideEffects()}connectedCallback(){super.connectedCallback(),this.open&&this.bindSideEffects()}show(){this.open||(this.open=!0,this.bindSideEffects())}hide(){this.open&&(this.open=!1,this.unbindSideEffects())}confirm(){this.dispatchEvent(new CustomEvent("wc-confirm",{bubbles:!0,composed:!0})),this.hide()}cancel(e="button"){this.open&&(this.dispatchEvent(new CustomEvent("wc-cancel",{detail:{reason:e},bubbles:!0,composed:!0})),this.hide())}bindSideEffects(){document.addEventListener("click",this.onDocumentClick,!0),document.addEventListener("keydown",this.onDocumentKeydown,!0),queueMicrotask(()=>{this.shadowRoot.querySelector('[part="confirm-button"]')?.focus()})}unbindSideEffects(){document.removeEventListener("click",this.onDocumentClick,!0),document.removeEventListener("keydown",this.onDocumentKeydown,!0),this.shadowRoot.querySelector(".trigger")?.focus()}updated(e){super.updated(e),e.has("open")&&(this.open?(this.bindSideEffects(),this.position()):this.unbindSideEffects())}position(){const e=this.shadowRoot.querySelector(".panel");if(!e)return;const t=this.getBoundingClientRect(),l=e.getBoundingClientRect(),r={x:0,y:0,width:window.innerWidth,height:window.innerHeight},n=_e(t,l,r,this.placement);e.style.left=`${n.x}px`,e.style.top=`${n.y}px`,e.dataset.placement=n.placement,e.style.setProperty("--wc-popconfirm-arrow-offset",`${n.arrowOffset}px`)}onTriggerClick(e){e.stopPropagation(),this.open?this.hide():this.show()}render(){const{base:e}=qe(this.placement);return s.html`
|
|
3242
3343
|
<span
|
|
3243
3344
|
class="trigger"
|
|
3244
3345
|
part="trigger"
|
|
@@ -3260,7 +3361,7 @@
|
|
|
3260
3361
|
>
|
|
3261
3362
|
<div class="arrow" part="arrow"></div>
|
|
3262
3363
|
<div class="main">
|
|
3263
|
-
${this.icon?
|
|
3364
|
+
${this.icon?s.html`<wc-icon class="icon" part="icon" name=${this.icon}></wc-icon>`:""}
|
|
3264
3365
|
<div class="content"><slot name="content">${this.content}</slot></div>
|
|
3265
3366
|
</div>
|
|
3266
3367
|
<div class="actions" part="actions">
|
|
@@ -3277,7 +3378,495 @@
|
|
|
3277
3378
|
</wc-button>
|
|
3278
3379
|
</div>
|
|
3279
3380
|
</div>
|
|
3280
|
-
`}};
|
|
3381
|
+
`}};nr.styles=[d,zi];let V=nr;J([a.property()],V.prototype,"content");J([a.property()],V.prototype,"placement");J([a.property({attribute:"confirm-text"})],V.prototype,"confirmText");J([a.property({attribute:"cancel-text"})],V.prototype,"cancelText");J([a.property()],V.prototype,"theme");J([a.property()],V.prototype,"icon");J([a.property({type:Boolean,reflect:!0})],V.prototype,"open");customElements.get("wc-popconfirm")||customElements.define("wc-popconfirm",V);const Ei=s.css`
|
|
3382
|
+
:host {
|
|
3383
|
+
display: block;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
.item {
|
|
3387
|
+
display: flex;
|
|
3388
|
+
align-items: center;
|
|
3389
|
+
gap: var(--wc-space-2);
|
|
3390
|
+
padding: 0 var(--wc-space-3);
|
|
3391
|
+
height: 32px;
|
|
3392
|
+
font-size: var(--wc-font-size-medium);
|
|
3393
|
+
color: var(--wc-color-text);
|
|
3394
|
+
cursor: pointer;
|
|
3395
|
+
user-select: none;
|
|
3396
|
+
transition: background-color var(--wc-duration-fast) var(--wc-easing-standard);
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
.text {
|
|
3400
|
+
flex: 1;
|
|
3401
|
+
min-width: 0;
|
|
3402
|
+
overflow: hidden;
|
|
3403
|
+
text-overflow: ellipsis;
|
|
3404
|
+
white-space: nowrap;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
:host(:hover:not([disabled]):not([divider])) .item,
|
|
3408
|
+
:host([active]:not([disabled]):not([divider])) .item {
|
|
3409
|
+
background-color: var(--wc-color-bg-hover);
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
:host([danger]:not([disabled])) .item {
|
|
3413
|
+
color: var(--wc-color-error);
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
:host([disabled]) .item {
|
|
3417
|
+
color: var(--wc-color-text-disabled);
|
|
3418
|
+
cursor: not-allowed;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
/* 分隔线:不响应 hover / danger */
|
|
3422
|
+
:host([divider]) .item {
|
|
3423
|
+
display: block;
|
|
3424
|
+
height: 1px;
|
|
3425
|
+
min-height: 1px;
|
|
3426
|
+
padding: 0;
|
|
3427
|
+
margin: var(--wc-space-1) 0;
|
|
3428
|
+
overflow: hidden;
|
|
3429
|
+
background-color: var(--wc-color-border);
|
|
3430
|
+
cursor: default;
|
|
3431
|
+
}
|
|
3432
|
+
`;var Mi=Object.defineProperty,Le=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Mi(e,t,r),r};const lr=class extends s.LitElement{constructor(){super(...arguments),this.value="",this.disabled=!1,this.danger=!1,this.divider=!1,this.active=!1}get label(){return(this.textContent??"").trim()}render(){return this.divider?s.html`<div class="item" part="base" role="separator"></div>`:s.html`
|
|
3433
|
+
<div
|
|
3434
|
+
class="item"
|
|
3435
|
+
part="base"
|
|
3436
|
+
role="menuitem"
|
|
3437
|
+
aria-disabled=${this.disabled}
|
|
3438
|
+
aria-label=${this.label}
|
|
3439
|
+
>
|
|
3440
|
+
<span class="text"><slot></slot></span>
|
|
3441
|
+
</div>
|
|
3442
|
+
`}};lr.styles=[Ei];let Z=lr;Le([a.property({reflect:!0})],Z.prototype,"value");Le([a.property({type:Boolean,reflect:!0})],Z.prototype,"disabled");Le([a.property({type:Boolean,reflect:!0})],Z.prototype,"danger");Le([a.property({type:Boolean,reflect:!0})],Z.prototype,"divider");Le([a.property({type:Boolean,reflect:!0})],Z.prototype,"active");customElements.get("wc-dropdown-item")||customElements.define("wc-dropdown-item",Z);const Li=s.css`
|
|
3443
|
+
:host {
|
|
3444
|
+
display: inline-block;
|
|
3445
|
+
|
|
3446
|
+
/* component 层令牌 */
|
|
3447
|
+
--wc-dropdown-min-width: 120px;
|
|
3448
|
+
--wc-dropdown-max-height: 280px;
|
|
3449
|
+
--wc-dropdown-radius: var(--wc-radius-medium);
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
.trigger {
|
|
3453
|
+
display: inline-flex;
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
.panel {
|
|
3457
|
+
position: fixed;
|
|
3458
|
+
z-index: var(--wc-z-index-dropdown);
|
|
3459
|
+
box-sizing: border-box;
|
|
3460
|
+
min-width: var(--wc-dropdown-min-width);
|
|
3461
|
+
max-height: var(--wc-dropdown-max-height);
|
|
3462
|
+
overflow-y: auto;
|
|
3463
|
+
padding: var(--wc-space-1) 0;
|
|
3464
|
+
font-size: var(--wc-font-size-medium);
|
|
3465
|
+
background-color: var(--wc-color-bg-container);
|
|
3466
|
+
border: 1px solid var(--wc-color-border);
|
|
3467
|
+
border-radius: var(--wc-dropdown-radius);
|
|
3468
|
+
box-shadow: var(--wc-shadow-2);
|
|
3469
|
+
opacity: 0;
|
|
3470
|
+
visibility: hidden;
|
|
3471
|
+
transform: scale(0.96);
|
|
3472
|
+
transform-origin: top;
|
|
3473
|
+
transition:
|
|
3474
|
+
opacity var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3475
|
+
transform var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3476
|
+
visibility var(--wc-duration-fast);
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
/* visibility:hidden 而非 display:none:面板需保持可测量供定位引擎使用 */
|
|
3480
|
+
.panel[data-open] {
|
|
3481
|
+
opacity: 1;
|
|
3482
|
+
visibility: visible;
|
|
3483
|
+
transform: none;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
.empty {
|
|
3487
|
+
padding: var(--wc-space-4) var(--wc-space-3);
|
|
3488
|
+
color: var(--wc-color-text-placeholder);
|
|
3489
|
+
text-align: center;
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3493
|
+
.panel {
|
|
3494
|
+
transition: none;
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
`;var Si=Object.defineProperty,ct=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Si(e,t,r),r};let ft=0;const cr=class extends s.LitElement{constructor(){super(),this.placement="bottom-start",this.open=!1,this.disabled=!1,this.panelId=`wc-dropdown-panel-${++ft}`,this.itemUid=`wc-dropdown-item-${++ft}`,this.activeIndex=-1,this.assignedItems=[],this.onDocumentClick=e=>{if(e.composedPath().includes(this))return;const t=this.open;this.hide(),t&&this.emitClose("outside")},this.handleKeydown=e=>{if(!this.disabled)switch(e.key){case"Enter":case" ":if(e.preventDefault(),this.open&&this.activeIndex>=0){const t=this.enabledItems[this.activeIndex];t&&this.selectItem(t)}else this.show();break;case"Escape":this.open&&(e.preventDefault(),this.hide(),this.emitClose("escape"));break;case"ArrowDown":e.preventDefault(),this.open?this.enabledItems.length&&(this.activeIndex=(this.activeIndex+1)%this.enabledItems.length,this.syncActive()):this.show();break;case"ArrowUp":if(e.preventDefault(),!this.open)this.show();else if(this.enabledItems.length){const t=this.enabledItems.length;this.activeIndex=(this.activeIndex-1+t)%t,this.syncActive()}break;case"Home":this.open&&this.enabledItems.length&&(e.preventDefault(),this.activeIndex=0,this.syncActive());break;case"End":this.open&&this.enabledItems.length&&(e.preventDefault(),this.activeIndex=this.enabledItems.length-1,this.syncActive());break;case"Tab":{const t=this.open;this.hide(),t&&this.emitClose("escape");break}}},this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.unbindSideEffects()}connectedCallback(){super.connectedCallback(),this.open&&this.bindSideEffects()}get enabledItems(){return this.assignedItems.filter(e=>!e.disabled&&!e.divider)}show(){this.disabled||this.open||(this.open=!0,this.activeIndex=this.enabledItems.length?0:-1,this.syncActive(),this.bindSideEffects(),this.dispatchEvent(new CustomEvent("wc-open",{bubbles:!0,composed:!0})))}hide(){this.open&&(this.open=!1,this.activeIndex=-1,this.syncActive(),this.unbindSideEffects())}toggle(){this.open?(this.hide(),this.emitClose("toggle")):this.show()}emitClose(e){this.dispatchEvent(new CustomEvent("wc-close",{detail:{reason:e},bubbles:!0,composed:!0}))}bindSideEffects(){document.addEventListener("click",this.onDocumentClick,!0),this.updateComplete.then(()=>this.position())}unbindSideEffects(){document.removeEventListener("click",this.onDocumentClick,!0)}updated(e){super.updated(e),e.has("open")&&this.open&&this.position()}position(){const e=this.shadowRoot.querySelector(".panel");if(!e)return;const t=this.getBoundingClientRect(),l=e.getBoundingClientRect(),r={x:0,y:0,width:window.innerWidth,height:window.innerHeight},n=_e(t,l,r,this.placement);e.style.left=`${n.x}px`,e.style.top=`${n.y}px`}onSlotChange(e){this.assignedItems=e.target.assignedElements({flatten:!0}).filter(t=>t.tagName==="WC-DROPDOWN-ITEM"),this.assignedItems.forEach((t,l)=>t.setAttribute("id",`${this.itemUid}-${l}`)),this.syncActive(),this.requestUpdate()}syncActive(){for(const t of this.assignedItems)t.active=!1;const e=this.enabledItems[this.activeIndex];e&&(e.active=!0),e&&typeof e.scrollIntoView=="function"&&e.scrollIntoView({block:"nearest"})}onPanelClick(e){const t=e.target.closest?.("wc-dropdown-item");t&&!t.disabled&&!t.divider&&this.selectItem(t)}selectItem(e){this.hide(),this.dispatchEvent(new CustomEvent("wc-select",{detail:{value:e.value,label:e.label},bubbles:!0,composed:!0})),this.emitClose("select")}onTriggerClick(e){e.stopPropagation(),!this.disabled&&this.toggle()}render(){const e=this.activeIndex>=0?this.enabledItems[this.activeIndex]:void 0,t=e?`${this.itemUid}-${this.assignedItems.indexOf(e)}`:"";return s.html`
|
|
3498
|
+
<span
|
|
3499
|
+
class="trigger"
|
|
3500
|
+
part="trigger"
|
|
3501
|
+
tabindex=${this.disabled?-1:0}
|
|
3502
|
+
role="button"
|
|
3503
|
+
aria-haspopup="menu"
|
|
3504
|
+
aria-expanded=${this.open}
|
|
3505
|
+
aria-disabled=${this.disabled}
|
|
3506
|
+
aria-controls=${this.open?this.panelId:void 0}
|
|
3507
|
+
aria-activedescendant=${this.open&&t?t:void 0}
|
|
3508
|
+
@click=${this.onTriggerClick}
|
|
3509
|
+
>
|
|
3510
|
+
<slot name="trigger"></slot>
|
|
3511
|
+
</span>
|
|
3512
|
+
<div
|
|
3513
|
+
class="panel"
|
|
3514
|
+
part="base"
|
|
3515
|
+
id=${this.panelId}
|
|
3516
|
+
role="menu"
|
|
3517
|
+
?data-open=${this.open}
|
|
3518
|
+
@click=${this.onPanelClick}
|
|
3519
|
+
>
|
|
3520
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
3521
|
+
${this.assignedItems.length===0?s.html`<div class="empty">暂无数据</div>`:""}
|
|
3522
|
+
</div>
|
|
3523
|
+
`}};cr.styles=[d,Li];let Se=cr;ct([a.property()],Se.prototype,"placement");ct([a.property({type:Boolean,reflect:!0})],Se.prototype,"open");ct([a.property({type:Boolean,reflect:!0})],Se.prototype,"disabled");customElements.get("wc-dropdown")||customElements.define("wc-dropdown",Se);const Oi=s.css`
|
|
3524
|
+
:host {
|
|
3525
|
+
display: inline-block;
|
|
3526
|
+
|
|
3527
|
+
/* component 层令牌:首尾圆角可覆写;聚焦环内嵌避免叠在相邻半边上 */
|
|
3528
|
+
--wc-split-button-radius: var(--wc-radius-medium);
|
|
3529
|
+
--wc-button-focus-ring-offset: -2px;
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
.group {
|
|
3533
|
+
display: inline-flex;
|
|
3534
|
+
vertical-align: middle;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
/* 内部按钮去圆角、由两端各留单侧圆角(shadow 内部元素,普通选择器即可) */
|
|
3538
|
+
.main-btn {
|
|
3539
|
+
--wc-button-radius: var(--wc-split-button-radius) 0 0 var(--wc-split-button-radius);
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
.arrow-btn {
|
|
3543
|
+
--wc-button-radius: 0 var(--wc-split-button-radius) var(--wc-split-button-radius) 0;
|
|
3544
|
+
margin-left: -1px;
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
/* 悬停/聚焦的上层半边边框完整可见 */
|
|
3548
|
+
.main-btn:hover,
|
|
3549
|
+
.main-btn:focus-within {
|
|
3550
|
+
z-index: 1;
|
|
3551
|
+
}
|
|
3552
|
+
`;var Ii=Object.defineProperty,j=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ii(e,t,r),r};const dr=class extends s.LitElement{constructor(){super(...arguments),this.theme="default",this.type="base",this.size="medium",this.placement="bottom-end",this.disabled=!1,this.loading=!1,this.ghost=!1,this.gradient=!1,this.ripple=!1,this.localize=new u(this),this.observer=null}get dropdown(){return this.shadowRoot.querySelector("wc-dropdown")}connectedCallback(){super.connectedCallback(),this.syncItemSlots(),this.observer=new MutationObserver(()=>this.syncItemSlots()),this.observer.observe(this,{childList:!0})}disconnectedCallback(){this.observer?.disconnect(),this.observer=null,super.disconnectedCallback()}syncItemSlots(){for(const e of this.children)e.tagName==="WC-DROPDOWN-ITEM"&&!e.slot&&(e.slot="menu")}onMainClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("wc-main-click",{bubbles:!0,composed:!0}))}onArrowClick(e){e.stopPropagation(),this.dropdown?.toggle(),this.dispatchEvent(new CustomEvent("wc-arrow-click",{bubbles:!0,composed:!0}))}render(){return s.html`
|
|
3553
|
+
<span class="group" part="base">
|
|
3554
|
+
<wc-button
|
|
3555
|
+
class="main-btn"
|
|
3556
|
+
theme=${this.theme}
|
|
3557
|
+
type=${this.type}
|
|
3558
|
+
size=${this.size}
|
|
3559
|
+
?disabled=${this.disabled}
|
|
3560
|
+
?loading=${this.loading}
|
|
3561
|
+
?ghost=${this.ghost}
|
|
3562
|
+
?gradient=${this.gradient}
|
|
3563
|
+
?ripple=${this.ripple}
|
|
3564
|
+
@click=${this.onMainClick}
|
|
3565
|
+
><slot></slot
|
|
3566
|
+
></wc-button>
|
|
3567
|
+
<wc-dropdown .placement=${this.placement} ?disabled=${this.disabled}>
|
|
3568
|
+
<wc-button
|
|
3569
|
+
class="arrow-btn"
|
|
3570
|
+
theme=${this.theme}
|
|
3571
|
+
type=${this.type}
|
|
3572
|
+
size=${this.size}
|
|
3573
|
+
?disabled=${this.disabled}
|
|
3574
|
+
?loading=${this.loading}
|
|
3575
|
+
?ghost=${this.ghost}
|
|
3576
|
+
?gradient=${this.gradient}
|
|
3577
|
+
?ripple=${this.ripple}
|
|
3578
|
+
aria-label=${this.localize.term("dropdown.more")}
|
|
3579
|
+
@click=${this.onArrowClick}
|
|
3580
|
+
>
|
|
3581
|
+
<wc-icon slot="icon" name="chevron-down"></wc-icon>
|
|
3582
|
+
</wc-button>
|
|
3583
|
+
<slot name="menu"></slot>
|
|
3584
|
+
</wc-dropdown>
|
|
3585
|
+
</span>
|
|
3586
|
+
`}};dr.styles=[d,Oi];let C=dr;j([a.property({reflect:!0})],C.prototype,"theme");j([a.property({reflect:!0})],C.prototype,"type");j([a.property({reflect:!0})],C.prototype,"size");j([a.property({reflect:!0})],C.prototype,"placement");j([a.property({type:Boolean,reflect:!0})],C.prototype,"disabled");j([a.property({type:Boolean,reflect:!0})],C.prototype,"loading");j([a.property({type:Boolean,reflect:!0})],C.prototype,"ghost");j([a.property({type:Boolean,reflect:!0})],C.prototype,"gradient");j([a.property({type:Boolean,reflect:!0})],C.prototype,"ripple");customElements.get("wc-split-button")||customElements.define("wc-split-button",C);const Ti=s.css`
|
|
3587
|
+
:host {
|
|
3588
|
+
position: fixed;
|
|
3589
|
+
bottom: var(--wc-float-button-bottom, 24px);
|
|
3590
|
+
right: var(--wc-float-button-right, 24px);
|
|
3591
|
+
z-index: var(--wc-z-index-fab);
|
|
3592
|
+
display: inline-flex;
|
|
3593
|
+
|
|
3594
|
+
/* component 层令牌 */
|
|
3595
|
+
--wc-float-button-size: 40px;
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
/* 回到顶部预设:未达滚动阈值时整体隐藏 */
|
|
3599
|
+
:host([backtop]:not([data-visible])) {
|
|
3600
|
+
display: none;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
.fab {
|
|
3604
|
+
position: relative;
|
|
3605
|
+
box-sizing: border-box;
|
|
3606
|
+
display: inline-flex;
|
|
3607
|
+
flex-direction: column;
|
|
3608
|
+
align-items: center;
|
|
3609
|
+
justify-content: center;
|
|
3610
|
+
gap: 2px;
|
|
3611
|
+
width: var(--wc-float-button-size);
|
|
3612
|
+
height: var(--wc-float-button-size);
|
|
3613
|
+
padding: 0;
|
|
3614
|
+
color: var(--wc-color-text);
|
|
3615
|
+
font-size: var(--wc-font-size-medium);
|
|
3616
|
+
text-decoration: none;
|
|
3617
|
+
background-color: var(--wc-color-bg-container);
|
|
3618
|
+
border: 1px solid var(--wc-color-border);
|
|
3619
|
+
border-radius: var(--wc-radius-round);
|
|
3620
|
+
box-shadow: var(--wc-shadow-2);
|
|
3621
|
+
cursor: pointer;
|
|
3622
|
+
transition:
|
|
3623
|
+
color var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3624
|
+
border-color var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3625
|
+
box-shadow var(--wc-duration-fast) var(--wc-easing-standard);
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
.fab:hover {
|
|
3629
|
+
color: var(--wc-color-primary);
|
|
3630
|
+
border-color: var(--wc-color-primary);
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3633
|
+
.fab:focus-visible {
|
|
3634
|
+
outline: var(--wc-color-focus-ring) solid 2px;
|
|
3635
|
+
outline-offset: 2px;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
.ico {
|
|
3639
|
+
/* flex 化:wc-icon 是 inline-flex 无文本基线(基线=底边),行内摆放会被
|
|
3640
|
+
字体 descent 撑高行盒导致图标偏上(同 wc-button .icon 的教训) */
|
|
3641
|
+
display: flex;
|
|
3642
|
+
align-items: center;
|
|
3643
|
+
justify-content: center;
|
|
3644
|
+
font-size: var(--wc-font-size-h3);
|
|
3645
|
+
line-height: 1;
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
.desc {
|
|
3649
|
+
max-width: calc(var(--wc-float-button-size) - 8px);
|
|
3650
|
+
overflow: hidden;
|
|
3651
|
+
font-size: var(--wc-font-size-xsmall);
|
|
3652
|
+
line-height: 1.2;
|
|
3653
|
+
text-align: center;
|
|
3654
|
+
white-space: nowrap;
|
|
3655
|
+
text-overflow: ellipsis;
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
:host([shape='square']) .fab {
|
|
3659
|
+
border-radius: var(--wc-radius-medium);
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
:host([type='primary']) .fab {
|
|
3663
|
+
color: var(--wc-color-text-anti);
|
|
3664
|
+
background-color: var(--wc-color-primary);
|
|
3665
|
+
border-color: var(--wc-color-primary);
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
:host([type='primary']) .fab:hover {
|
|
3669
|
+
background-color: var(--wc-color-primary-hover);
|
|
3670
|
+
border-color: var(--wc-color-primary-hover);
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
:host([disabled]) .fab {
|
|
3674
|
+
color: var(--wc-color-text-disabled);
|
|
3675
|
+
background-color: var(--wc-color-bg-disabled);
|
|
3676
|
+
border-color: var(--wc-color-border);
|
|
3677
|
+
box-shadow: none;
|
|
3678
|
+
cursor: not-allowed;
|
|
3679
|
+
pointer-events: none;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
.badge {
|
|
3683
|
+
position: absolute;
|
|
3684
|
+
top: 0;
|
|
3685
|
+
right: 0;
|
|
3686
|
+
z-index: 1;
|
|
3687
|
+
display: inline-flex;
|
|
3688
|
+
align-items: center;
|
|
3689
|
+
justify-content: center;
|
|
3690
|
+
min-width: 16px;
|
|
3691
|
+
height: 16px;
|
|
3692
|
+
padding: 0 4px;
|
|
3693
|
+
color: var(--wc-color-text-anti);
|
|
3694
|
+
font-size: var(--wc-font-size-xsmall);
|
|
3695
|
+
line-height: 1;
|
|
3696
|
+
white-space: nowrap;
|
|
3697
|
+
background-color: var(--wc-color-error);
|
|
3698
|
+
border-radius: var(--wc-radius-round);
|
|
3699
|
+
transform: translate(50%, -50%);
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
:host([dot]) .badge {
|
|
3703
|
+
min-width: 6px;
|
|
3704
|
+
width: 6px;
|
|
3705
|
+
height: 6px;
|
|
3706
|
+
padding: 0;
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
/* 内建 tooltip 气泡(轻量版:无箭头,fixed 定位于按钮左侧) */
|
|
3710
|
+
.tip {
|
|
3711
|
+
position: fixed;
|
|
3712
|
+
z-index: var(--wc-z-index-tooltip);
|
|
3713
|
+
max-width: 200px;
|
|
3714
|
+
padding: var(--wc-space-1) var(--wc-space-2);
|
|
3715
|
+
color: var(--wc-color-text-anti);
|
|
3716
|
+
font-size: var(--wc-font-size-xsmall);
|
|
3717
|
+
white-space: nowrap;
|
|
3718
|
+
background-color: var(--wc-color-gray-900);
|
|
3719
|
+
border-radius: var(--wc-radius-small);
|
|
3720
|
+
opacity: 0;
|
|
3721
|
+
visibility: hidden;
|
|
3722
|
+
transition:
|
|
3723
|
+
opacity var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3724
|
+
visibility var(--wc-duration-fast);
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
.tip[data-open] {
|
|
3728
|
+
opacity: 1;
|
|
3729
|
+
visibility: visible;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3733
|
+
.fab,
|
|
3734
|
+
.tip {
|
|
3735
|
+
transition: none;
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
`;var Ai=Object.defineProperty,y=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ai(e,t,r),r};let Pi=0;const Di=100,Vi=150,hr=class extends s.LitElement{constructor(){super(...arguments),this.shape="circle",this.type="default",this.icon="",this.description="",this.tooltip="",this.href="",this.target="",this.disabled=!1,this.dot=!1,this.count=0,this.max=99,this.backtop=!1,this.visibilityHeight=400,this.localize=new u(this),this.tipId=`wc-float-button-tip-${++Pi}`,this._hasIcon=!1,this._hasText=!1,this.showTimer=null,this.hideTimer=null,this.onScroll=()=>{this.toggleAttribute("data-visible",window.scrollY>this.visibilityHeight)},this.onDocumentClick=e=>{e.composedPath().includes(this)||this.hideTip()},this.tooltipIsOpen=!1}onIconSlotChange(e){this._hasIcon=e.target.assignedNodes({flatten:!0}).length>0}onTextSlotChange(e){const t=e.target.assignedNodes({flatten:!0});this._hasText=t.some(l=>(l.textContent??"").trim()!=="")}connectedCallback(){super.connectedCallback(),this.backtop&&this.bindBacktop()}disconnectedCallback(){this.unbindBacktop(),this.unbindOutsideClose(),this.clearTimers(),super.disconnectedCallback()}updated(e){super.updated(e),e.has("backtop")&&(this.backtop?this.bindBacktop():(this.unbindBacktop(),this.removeAttribute("data-visible"))),e.has("tooltip")&&this.tooltipIsOpen&&this.updateComplete.then(()=>this.positionTip())}bindBacktop(){window.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll()}unbindBacktop(){window.removeEventListener("scroll",this.onScroll)}get effectiveTooltip(){return this.backtop&&!this.tooltip?this.localize.term("floatbutton.backtop"):this.tooltip}showTip(){!this.effectiveTooltip||this.disabled||(this.clearTimers(),this.showTimer=setTimeout(()=>{this.tooltipIsOpen||(this.tooltipIsOpen=!0,this.bindOutsideClose(),this.updateComplete.then(()=>this.positionTip()),this.requestUpdate())},Di))}hideTip(){this.clearTimers(),this.hideTimer=setTimeout(()=>{this.tooltipIsOpen&&(this.tooltipIsOpen=!1,this.unbindOutsideClose(),this.requestUpdate())},Vi)}positionTip(){const e=this.shadowRoot.querySelector(".tip");if(!e)return;const t=this.getBoundingClientRect();e.style.visibility="hidden",e.style.left="0px",e.style.top="0px";const l=e.getBoundingClientRect(),r=t.left-l.width-m,n=t.top+t.height/2-l.height/2;e.style.left=`${Math.max(m,r)}px`,e.style.top=`${Math.min(Math.max(m,n),window.innerHeight-l.height-m)}px`,e.style.visibility=""}bindOutsideClose(){document.addEventListener("click",this.onDocumentClick,!0)}unbindOutsideClose(){document.removeEventListener("click",this.onDocumentClick,!0)}clearTimers(){this.showTimer!==null&&(clearTimeout(this.showTimer),this.showTimer=null),this.hideTimer!==null&&(clearTimeout(this.hideTimer),this.hideTimer=null)}onClick(e){this.disabled||this.backtop&&(e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}))}get displayCount(){return this.count>this.max?`${this.max}+`:String(Math.max(0,this.count))}render(){const e=this.dot||this.count>0,t=this.effectiveTooltip,l=this.icon||(this.backtop?"arrow-up":""),r=s.html`
|
|
3739
|
+
<span class="ico" part="icon" ?hidden=${!l&&!this._hasIcon}>
|
|
3740
|
+
${l?s.html`<wc-icon name=${l}></wc-icon>`:s.html`<slot name="icon" @slotchange=${this.onIconSlotChange}></slot>`}
|
|
3741
|
+
</span>
|
|
3742
|
+
`,n=s.html`${r}<span
|
|
3743
|
+
class="desc"
|
|
3744
|
+
part="description"
|
|
3745
|
+
?hidden=${!this.description&&!this._hasText}
|
|
3746
|
+
><slot @slotchange=${this.onTextSlotChange}>${this.description}</slot></span
|
|
3747
|
+
>`,c=this.href&&!this.disabled?s.html`<a
|
|
3748
|
+
class="fab"
|
|
3749
|
+
part="base"
|
|
3750
|
+
href=${this.href}
|
|
3751
|
+
target=${this.target||s.nothing}
|
|
3752
|
+
rel=${this.target==="_blank"?"noopener noreferrer":s.nothing}
|
|
3753
|
+
aria-describedby=${this.tooltipIsOpen?this.tipId:s.nothing}
|
|
3754
|
+
@mouseenter=${this.showTip}
|
|
3755
|
+
@mouseleave=${this.hideTip}
|
|
3756
|
+
@focusin=${this.showTip}
|
|
3757
|
+
@focusout=${this.hideTip}
|
|
3758
|
+
@click=${this.onClick}
|
|
3759
|
+
>${n}</a
|
|
3760
|
+
>`:s.html`<button
|
|
3761
|
+
class="fab"
|
|
3762
|
+
part="base"
|
|
3763
|
+
type="button"
|
|
3764
|
+
?disabled=${this.disabled}
|
|
3765
|
+
aria-describedby=${this.tooltipIsOpen?this.tipId:s.nothing}
|
|
3766
|
+
@mouseenter=${this.showTip}
|
|
3767
|
+
@mouseleave=${this.hideTip}
|
|
3768
|
+
@focusin=${this.showTip}
|
|
3769
|
+
@focusout=${this.hideTip}
|
|
3770
|
+
@click=${this.onClick}
|
|
3771
|
+
>
|
|
3772
|
+
${n}
|
|
3773
|
+
</button>`;return s.html`${c}
|
|
3774
|
+
${e?s.html`<sup class="badge" part="badge">${this.dot?s.nothing:this.displayCount}</sup>`:s.nothing}
|
|
3775
|
+
${t?s.html`<div
|
|
3776
|
+
class="tip"
|
|
3777
|
+
part="tooltip"
|
|
3778
|
+
role="tooltip"
|
|
3779
|
+
id=${this.tipId}
|
|
3780
|
+
?data-open=${this.tooltipIsOpen}
|
|
3781
|
+
>
|
|
3782
|
+
${t}
|
|
3783
|
+
</div>`:s.nothing}`}};hr.styles=[d,Ti];let v=hr;y([a.property({reflect:!0})],v.prototype,"shape");y([a.property({reflect:!0})],v.prototype,"type");y([a.property()],v.prototype,"icon");y([a.property()],v.prototype,"description");y([a.property()],v.prototype,"tooltip");y([a.property()],v.prototype,"href");y([a.property()],v.prototype,"target");y([a.property({type:Boolean,reflect:!0})],v.prototype,"disabled");y([a.property({type:Boolean,reflect:!0})],v.prototype,"dot");y([a.property({type:Number})],v.prototype,"count");y([a.property({type:Number})],v.prototype,"max");y([a.property({type:Boolean,reflect:!0})],v.prototype,"backtop");y([a.property({type:Number,attribute:"visibility-height"})],v.prototype,"visibilityHeight");y([a.state()],v.prototype,"_hasIcon");y([a.state()],v.prototype,"_hasText");customElements.get("wc-float-button")||customElements.define("wc-float-button",v);const ji=s.css`
|
|
3784
|
+
:host {
|
|
3785
|
+
position: fixed;
|
|
3786
|
+
bottom: var(--wc-float-button-bottom, 24px);
|
|
3787
|
+
right: var(--wc-float-button-right, 24px);
|
|
3788
|
+
z-index: var(--wc-z-index-fab);
|
|
3789
|
+
display: inline-flex;
|
|
3790
|
+
flex-direction: column;
|
|
3791
|
+
align-items: center;
|
|
3792
|
+
gap: var(--wc-float-button-gap, 8px);
|
|
3793
|
+
|
|
3794
|
+
/* component 层令牌 */
|
|
3795
|
+
--wc-float-button-gap: 8px;
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
/*
|
|
3799
|
+
* 子按钮自身 :host 是 fixed 定位(standalone 用),进组后必须改随布局——
|
|
3800
|
+
* 外层 shadow 树的声明优先于内层 :host,这里再加内联样式双保险(slotchange 同步)
|
|
3801
|
+
*/
|
|
3802
|
+
.trigger-btn {
|
|
3803
|
+
position: static;
|
|
3804
|
+
z-index: auto;
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
::slotted(wc-float-button) {
|
|
3808
|
+
position: static;
|
|
3809
|
+
z-index: auto;
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
.trigger-ico {
|
|
3813
|
+
transition: transform var(--wc-duration-fast) var(--wc-easing-standard);
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
/* 展开时 plus 旋转成 × */
|
|
3817
|
+
:host([open]) .trigger-ico {
|
|
3818
|
+
transform: rotate(45deg);
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
.items {
|
|
3822
|
+
display: flex;
|
|
3823
|
+
flex-direction: column;
|
|
3824
|
+
align-items: center;
|
|
3825
|
+
gap: var(--wc-float-button-gap, 8px);
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
/* trigger 模式:面板悬浮于触发按钮上方(absolute 脱离布局,收起不影响定位) */
|
|
3829
|
+
:host([trigger]) .items {
|
|
3830
|
+
position: absolute;
|
|
3831
|
+
right: 0;
|
|
3832
|
+
bottom: calc(100% + var(--wc-float-button-gap, 8px));
|
|
3833
|
+
opacity: 0;
|
|
3834
|
+
visibility: hidden;
|
|
3835
|
+
transform: translateY(6px) scale(0.9);
|
|
3836
|
+
transform-origin: bottom center;
|
|
3837
|
+
transition:
|
|
3838
|
+
opacity var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3839
|
+
transform var(--wc-duration-fast) var(--wc-easing-standard),
|
|
3840
|
+
visibility var(--wc-duration-fast);
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
:host([trigger]) .items[data-open] {
|
|
3844
|
+
opacity: 1;
|
|
3845
|
+
visibility: visible;
|
|
3846
|
+
transform: none;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3850
|
+
.items,
|
|
3851
|
+
.trigger-ico {
|
|
3852
|
+
transition: none;
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
`;var Bi=Object.defineProperty,Re=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Bi(e,t,r),r};const pr=class extends s.LitElement{constructor(){super(),this.shape="circle",this.trigger="",this.open=!1,this.icon="",this.localize=new u(this),this.onDocumentClick=e=>{if(e.composedPath().includes(this))return;const t=this.open;this.hide(),t&&this.emitClose("outside")},this.handleKeydown=e=>{e.key==="Escape"&&this.open&&(this.hide(),this.emitClose("escape"))},this.addEventListener("keydown",this.handleKeydown),this.addEventListener("mouseenter",this.onHostMouseenter),this.addEventListener("mouseleave",this.onHostMouseleave)}disconnectedCallback(){super.disconnectedCallback(),this.unbindOutsideClose()}connectedCallback(){super.connectedCallback(),this.open&&this.trigger==="click"&&this.bindOutsideClose()}show(){!this.trigger||this.open||(this.open=!0,this.trigger==="click"&&this.bindOutsideClose(),this.dispatchEvent(new CustomEvent("wc-open",{bubbles:!0,composed:!0})))}hide(){this.open&&(this.open=!1,this.unbindOutsideClose())}toggle(){this.open?(this.hide(),this.emitClose("toggle")):this.show()}emitClose(e){this.dispatchEvent(new CustomEvent("wc-close",{detail:{reason:e},bubbles:!0,composed:!0}))}bindOutsideClose(){document.addEventListener("click",this.onDocumentClick,!0)}unbindOutsideClose(){document.removeEventListener("click",this.onDocumentClick,!0)}onTriggerClick(){this.trigger==="click"&&this.toggle()}onHostMouseenter(){this.trigger==="hover"&&this.show()}onHostMouseleave(){if(this.trigger==="hover"){const e=this.open;this.hide(),e&&this.emitClose("toggle")}}onSlotChange(e){this.syncShapes(e.target.assignedElements())}syncShapes(e){for(const t of e)t.tagName==="WC-FLOAT-BUTTON"&&!t.hasAttribute("shape")&&t.setAttribute("shape",this.shape)}updated(e){if(super.updated(e),e.has("shape")){const t=this.shadowRoot.querySelector("slot");t&&this.syncShapes(t.assignedElements())}}render(){return s.html`
|
|
3856
|
+
${this.trigger?s.html`<wc-float-button
|
|
3857
|
+
class="trigger-btn"
|
|
3858
|
+
part="trigger"
|
|
3859
|
+
shape=${this.shape}
|
|
3860
|
+
aria-expanded=${this.open}
|
|
3861
|
+
aria-label=${this.localize.term("floatbutton.menu")}
|
|
3862
|
+
@click=${this.onTriggerClick}
|
|
3863
|
+
>
|
|
3864
|
+
<wc-icon slot="icon" class="trigger-ico" name=${this.icon||"plus"}></wc-icon>
|
|
3865
|
+
</wc-float-button>`:s.nothing}
|
|
3866
|
+
<div class="items" part="items" ?data-open=${!this.trigger||this.open}>
|
|
3867
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
3868
|
+
</div>
|
|
3869
|
+
`}};pr.styles=[d,ji];let me=pr;Re([a.property({reflect:!0})],me.prototype,"shape");Re([a.property({reflect:!0})],me.prototype,"trigger");Re([a.property({type:Boolean,reflect:!0})],me.prototype,"open");Re([a.property()],me.prototype,"icon");customElements.get("wc-float-button-group")||customElements.define("wc-float-button-group",me);const Hi=s.css`
|
|
3281
3870
|
:host {
|
|
3282
3871
|
display: block;
|
|
3283
3872
|
}
|
|
@@ -3343,7 +3932,7 @@
|
|
|
3343
3932
|
cursor: not-allowed;
|
|
3344
3933
|
background-color: transparent;
|
|
3345
3934
|
}
|
|
3346
|
-
`,
|
|
3935
|
+
`,Ni=s.css`
|
|
3347
3936
|
:host {
|
|
3348
3937
|
display: block;
|
|
3349
3938
|
padding-top: var(--wc-space-3);
|
|
@@ -3355,11 +3944,11 @@
|
|
|
3355
3944
|
:host(:not([active])) {
|
|
3356
3945
|
display: none;
|
|
3357
3946
|
}
|
|
3358
|
-
`;var
|
|
3947
|
+
`;var qi=Object.defineProperty,Ue=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&qi(e,t,r),r};const ur=class extends s.LitElement{constructor(){super(...arguments),this.value="",this.label="",this.disabled=!1,this.active=!1}render(){return s.html`<div class="panel" part="panel" role="tabpanel" aria-label=${this.label}>
|
|
3359
3948
|
<slot></slot>
|
|
3360
|
-
</div>`}};
|
|
3949
|
+
</div>`}};ur.styles=[d,Ni];let ge=ur;Ue([a.property()],ge.prototype,"value");Ue([a.property()],ge.prototype,"label");Ue([a.property({type:Boolean,reflect:!0})],ge.prototype,"disabled");Ue([a.property({type:Boolean,reflect:!0})],ge.prototype,"active");customElements.get("wc-tab")||customElements.define("wc-tab",ge);var _i=Object.defineProperty,Fi=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&_i(e,t,r),r};const wr=class extends s.LitElement{constructor(){super(...arguments),this.value="",this.tabs=[],this.uid=`wc-tabs-${Math.random().toString(36).slice(2,8)}`,this.mutationObserver=new MutationObserver(()=>this.collectTabs())}connectedCallback(){super.connectedCallback(),this.mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["label","value","disabled"]})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect()}collectTabs(){const e=Array.from(this.querySelectorAll("wc-tab"));this.tabs=e.map((t,l)=>({value:t.value||String(l),label:t.label||t.textContent?.trim()||String(l+1),disabled:t.disabled,element:t})),this.requestUpdate(),this.syncActive()}syncActive(){!this.value&&this.tabs.length>0&&!this.tabs.some(e=>e.value===this.value)&&(this.value=this.tabs[0].value);for(const e of this.tabs)e.element.active=e.value===this.value}updated(e){super.updated(e),e.has("value")&&this.syncActive()}select(e){if(e===this.value)return;const t=this.tabs.find(l=>l.value===e);!t||t.disabled||(this.value=e,this.dispatchEvent(new CustomEvent("wc-change",{detail:{value:e},bubbles:!0,composed:!0})))}onTablistKeydown(e){const t=this.tabs.filter(n=>!n.disabled);if(t.length===0)return;const l=Math.max(0,t.findIndex(n=>n.value===this.value));let r;switch(e.key){case"ArrowRight":case"ArrowDown":r=t[(l+1)%t.length];break;case"ArrowLeft":case"ArrowUp":r=t[(l-1+t.length)%t.length];break;case"Home":r=t[0];break;case"End":r=t[t.length-1];break;default:return}e.preventDefault(),r&&(this.select(r.value),this.focusTab(r.value))}focusTab(e){const t=e.replace(/["\\]/g,"\\$&");this.shadowRoot.querySelector(`[data-value="${t}"]`)?.focus()}render(){return s.html`
|
|
3361
3950
|
<div class="bar" part="bar" role="tablist" @keydown=${this.onTablistKeydown}>
|
|
3362
|
-
${this.tabs.map(e=>
|
|
3951
|
+
${this.tabs.map(e=>s.html`
|
|
3363
3952
|
<button
|
|
3364
3953
|
type="button"
|
|
3365
3954
|
class="tab"
|
|
@@ -3377,8 +3966,8 @@
|
|
|
3377
3966
|
</button>
|
|
3378
3967
|
`)}
|
|
3379
3968
|
</div>
|
|
3380
|
-
${this.tabs.length>0?
|
|
3381
|
-
`}};
|
|
3969
|
+
${this.tabs.length>0?s.html`<slot @slotchange=${this.collectTabs}></slot>`:s.nothing}
|
|
3970
|
+
`}};wr.styles=[d,Hi];let dt=wr;Fi([a.property({reflect:!0})],dt.prototype,"value");customElements.get("wc-tabs")||customElements.define("wc-tabs",dt);const Ri=s.css`
|
|
3382
3971
|
:host {
|
|
3383
3972
|
display: block;
|
|
3384
3973
|
}
|
|
@@ -3435,23 +4024,23 @@
|
|
|
3435
4024
|
color: var(--wc-color-text);
|
|
3436
4025
|
font-weight: var(--wc-font-weight-medium);
|
|
3437
4026
|
}
|
|
3438
|
-
`;var
|
|
4027
|
+
`;var Ui=Object.defineProperty,Yi=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ui(e,t,r),r};const vr=class extends s.LitElement{constructor(){super(...arguments),this.separator="/",this.items=[],this.localize=new u(this),this.mutationObserver=new MutationObserver(()=>this.collectItems())}connectedCallback(){super.connectedCallback(),this.mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href","disabled"]})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect()}collectItems(){const e=Array.from(this.querySelectorAll("wc-breadcrumb-item"));this.items=e.map((t,l)=>({label:t.textContent?.trim()||String(l+1),href:t.getAttribute("href")||"",disabled:t.hasAttribute("disabled"),index:l})),this.requestUpdate()}onSelect(e){this.dispatchEvent(new CustomEvent("wc-select",{detail:{index:e.index,label:e.label,href:e.href},bubbles:!0,composed:!0}))}renderItem(e,t){return t?s.html`<span class="current" part="current" aria-current="page">${e.label}</span>`:e.disabled?s.html`<span class="link" data-disabled aria-disabled="true">${e.label}</span>`:e.href?s.html`<a class="link" part="link" href=${e.href} @click=${()=>this.onSelect(e)}
|
|
3439
4028
|
>${e.label}</a
|
|
3440
|
-
>`:
|
|
4029
|
+
>`:s.html`<span class="link" part="link" @click=${()=>this.onSelect(e)}
|
|
3441
4030
|
>${e.label}</span
|
|
3442
|
-
>`}render(){const e=this.items.length-1;return
|
|
4031
|
+
>`}render(){const e=this.items.length-1;return s.html`
|
|
3443
4032
|
<nav class="nav" part="nav" aria-label=${this.localize.term("breadcrumb.label")}>
|
|
3444
4033
|
<ol class="list" part="list">
|
|
3445
|
-
${this.items.map((t,
|
|
3446
|
-
<li class="item" part="item">${this.renderItem(t,
|
|
3447
|
-
${
|
|
4034
|
+
${this.items.map((t,l)=>s.html`
|
|
4035
|
+
<li class="item" part="item">${this.renderItem(t,l===e)}</li>
|
|
4036
|
+
${l<e?s.html`<li class="separator" part="separator" aria-hidden="true">
|
|
3448
4037
|
${this.separator}
|
|
3449
|
-
</li>`:
|
|
4038
|
+
</li>`:s.nothing}
|
|
3450
4039
|
`)}
|
|
3451
4040
|
</ol>
|
|
3452
4041
|
<slot @slotchange=${this.collectItems}></slot>
|
|
3453
4042
|
</nav>
|
|
3454
|
-
`}};
|
|
4043
|
+
`}};vr.styles=[d,Ri];let ht=vr;Yi([a.property()],ht.prototype,"separator");customElements.get("wc-breadcrumb")||customElements.define("wc-breadcrumb",ht);var Ki=Object.defineProperty,yr=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ki(e,t,r),r};class Ye extends s.LitElement{constructor(){super(...arguments),this.href="",this.disabled=!1}render(){return s.html``}}yr([a.property()],Ye.prototype,"href");yr([a.property({type:Boolean,reflect:!0})],Ye.prototype,"disabled");customElements.get("wc-breadcrumb-item")||customElements.define("wc-breadcrumb-item",Ye);const Wi=s.css`
|
|
3455
4044
|
:host {
|
|
3456
4045
|
display: block;
|
|
3457
4046
|
}
|
|
@@ -3542,11 +4131,11 @@
|
|
|
3542
4131
|
background-color: var(--wc-color-bg-disabled, var(--wc-color-bg-hover));
|
|
3543
4132
|
cursor: not-allowed;
|
|
3544
4133
|
}
|
|
3545
|
-
`;var
|
|
4134
|
+
`;var Xi=Object.defineProperty,Q=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Xi(e,t,r),r};const mr=class extends s.LitElement{constructor(){super(...arguments),this.total=0,this.pageSize=10,this.current=1,this.foldedPageCount=5,this.showTotal=!1,this.showJumper=!1,this.disabled=!1,this.localize=new u(this)}get pageCount(){return Math.max(1,Math.ceil(this.total/Math.max(1,this.pageSize)))}select(e){const t=Math.min(this.pageCount,Math.max(1,Math.floor(e)));if(this.disabled||t===this.current)return;const l=this.current;this.current=t,this.dispatchEvent(new CustomEvent("wc-change",{detail:{current:t,previous:l},bubbles:!0,composed:!0}))}updated(e){super.updated(e),(e.has("total")||e.has("pageSize"))&&this.current>this.pageCount&&(this.current=this.pageCount)}getPageItems(){const e=this.pageCount,t=Math.max(1,this.foldedPageCount);if(e<=t+2)return Array.from({length:e},(c,h)=>h+1);let l=Math.max(2,this.current-Math.floor(t/2));const r=Math.min(e-1,l+t-1);l=Math.max(2,r-t+1);const n=[1];l>2&&n.push("ellipsis-prev");for(let c=l;c<=r;c++)n.push(c);return r<e-1&&n.push("ellipsis-next"),n.push(e),n}onJumperKeydown(e){if(e.key!=="Enter")return;const t=e.target,l=Number.parseInt(t.value,10);Number.isNaN(l)||(this.select(l),t.value=String(this.current))}render(){const e=this.disabled||this.current<=1,t=this.disabled||this.current>=this.pageCount;return s.html`
|
|
3546
4135
|
<nav class="pagination" part="nav" aria-label=${this.localize.term("pagination.label")}>
|
|
3547
|
-
${this.showTotal?
|
|
4136
|
+
${this.showTotal?s.html`<span class="total" part="total">
|
|
3548
4137
|
${this.localize.term("pagination.total",{total:this.total})}
|
|
3549
|
-
</span>`:
|
|
4138
|
+
</span>`:s.nothing}
|
|
3550
4139
|
<button
|
|
3551
4140
|
type="button"
|
|
3552
4141
|
class="page-button"
|
|
@@ -3557,16 +4146,16 @@
|
|
|
3557
4146
|
>
|
|
3558
4147
|
<wc-icon name="chevron-left"></wc-icon>
|
|
3559
4148
|
</button>
|
|
3560
|
-
${this.getPageItems().map(
|
|
4149
|
+
${this.getPageItems().map(l=>typeof l!="number"?s.html`<span class="ellipsis" part="ellipsis" aria-hidden="true">•••</span>`:s.html`<button
|
|
3561
4150
|
type="button"
|
|
3562
4151
|
class="page-button"
|
|
3563
4152
|
part="page"
|
|
3564
4153
|
?disabled=${this.disabled}
|
|
3565
|
-
aria-label=${this.localize.term("pagination.page",{page:
|
|
3566
|
-
aria-current=${
|
|
3567
|
-
@click=${()=>this.select(
|
|
4154
|
+
aria-label=${this.localize.term("pagination.page",{page:l})}
|
|
4155
|
+
aria-current=${l===this.current?"page":s.nothing}
|
|
4156
|
+
@click=${()=>this.select(l)}
|
|
3568
4157
|
>
|
|
3569
|
-
${
|
|
4158
|
+
${l}
|
|
3570
4159
|
</button>`)}
|
|
3571
4160
|
<button
|
|
3572
4161
|
type="button"
|
|
@@ -3578,7 +4167,7 @@
|
|
|
3578
4167
|
>
|
|
3579
4168
|
<wc-icon name="chevron-right"></wc-icon>
|
|
3580
4169
|
</button>
|
|
3581
|
-
${this.showJumper?
|
|
4170
|
+
${this.showJumper?s.html`<span class="jumper" part="jumper">
|
|
3582
4171
|
${this.localize.term("pagination.jumpTo")}
|
|
3583
4172
|
<input
|
|
3584
4173
|
type="text"
|
|
@@ -3589,9 +4178,9 @@
|
|
|
3589
4178
|
@keydown=${this.onJumperKeydown}
|
|
3590
4179
|
/>
|
|
3591
4180
|
${this.localize.term("pagination.pageUnit")}
|
|
3592
|
-
</span>`:
|
|
4181
|
+
</span>`:s.nothing}
|
|
3593
4182
|
</nav>
|
|
3594
|
-
`}};
|
|
4183
|
+
`}};mr.styles=[d,Wi];let B=mr;Q([a.property({type:Number})],B.prototype,"total");Q([a.property({type:Number,attribute:"page-size"})],B.prototype,"pageSize");Q([a.property({type:Number,reflect:!0})],B.prototype,"current");Q([a.property({type:Number,attribute:"folded-page-count"})],B.prototype,"foldedPageCount");Q([a.property({type:Boolean,attribute:"show-total"})],B.prototype,"showTotal");Q([a.property({type:Boolean,attribute:"show-jumper"})],B.prototype,"showJumper");Q([a.property({type:Boolean,reflect:!0})],B.prototype,"disabled");customElements.get("wc-pagination")||customElements.define("wc-pagination",B);const Gi=s.css`
|
|
3595
4184
|
:host {
|
|
3596
4185
|
position: relative;
|
|
3597
4186
|
display: inline-flex;
|
|
@@ -3639,10 +4228,10 @@
|
|
|
3639
4228
|
:host([theme='danger']) .badge {
|
|
3640
4229
|
background-color: var(--wc-color-error);
|
|
3641
4230
|
}
|
|
3642
|
-
`;var
|
|
4231
|
+
`;var Ji=Object.defineProperty,Ke=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&Ji(e,t,r),r};const gr=class extends s.LitElement{constructor(){super(...arguments),this.count=0,this.max=99,this.dot=!1,this.theme="danger"}get displayCount(){return this.count>this.max?`${this.max}+`:String(Math.max(0,this.count))}render(){const e=this.dot||this.count>0;return s.html`
|
|
3643
4232
|
<slot></slot>
|
|
3644
|
-
${e?
|
|
3645
|
-
`}};
|
|
4233
|
+
${e?s.html`<sup class="badge" part="badge">${this.dot?s.nothing:this.displayCount}</sup>`:s.nothing}
|
|
4234
|
+
`}};gr.styles=[d,Gi];let be=gr;Ke([a.property({type:Number})],be.prototype,"count");Ke([a.property({type:Number})],be.prototype,"max");Ke([a.property({type:Boolean,reflect:!0})],be.prototype,"dot");Ke([a.property({reflect:!0})],be.prototype,"theme");customElements.get("wc-badge")||customElements.define("wc-badge",be);const Zi=s.css`
|
|
3646
4235
|
:host {
|
|
3647
4236
|
display: block;
|
|
3648
4237
|
}
|
|
@@ -3698,7 +4287,7 @@
|
|
|
3698
4287
|
.action:empty {
|
|
3699
4288
|
display: none;
|
|
3700
4289
|
}
|
|
3701
|
-
`,
|
|
4290
|
+
`,br=class extends s.LitElement{constructor(){super(...arguments),this.localize=new u(this)}render(){return s.html`
|
|
3702
4291
|
<div class="empty" part="base">
|
|
3703
4292
|
<div class="icon" part="icon">
|
|
3704
4293
|
<slot name="icon"><span class="placeholder"></span></slot>
|
|
@@ -3710,7 +4299,7 @@
|
|
|
3710
4299
|
<slot name="action"></slot>
|
|
3711
4300
|
</div>
|
|
3712
4301
|
</div>
|
|
3713
|
-
`}};
|
|
4302
|
+
`}};br.styles=[d,Zi];let fr=br;customElements.get("wc-empty")||customElements.define("wc-empty",fr);const Qi=s.css`
|
|
3714
4303
|
:host {
|
|
3715
4304
|
display: block;
|
|
3716
4305
|
}
|
|
@@ -3824,9 +4413,9 @@
|
|
|
3824
4413
|
.circle-label .label {
|
|
3825
4414
|
color: inherit;
|
|
3826
4415
|
}
|
|
3827
|
-
`;var
|
|
3828
|
-
${e?
|
|
3829
|
-
</span>`}renderLine(){return
|
|
4416
|
+
`;var ea=Object.defineProperty,fe=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ea(e,t,r),r};const et=32,xt=2*Math.PI*et,xr=class extends s.LitElement{constructor(){super(...arguments),this.value=0,this.theme="line",this.status="normal",this.showLabel=!0,this.strokeWidth=6,this.label=""}get percent(){return Math.min(100,Math.max(0,this.value))}get labelText(){return this.label||`${Math.round(this.percent)}%`}renderStatusLabel(){if(!this.showLabel)return s.nothing;const e=this.status==="success"?"check":this.status==="error"?"close":"";return s.html`<span class="label" part="label">
|
|
4417
|
+
${e?s.html`<wc-icon name=${e}></wc-icon>`:s.nothing}${this.labelText}
|
|
4418
|
+
</span>`}renderLine(){return s.html`<div class="line" part="base">
|
|
3830
4419
|
<div
|
|
3831
4420
|
class="track"
|
|
3832
4421
|
part="track"
|
|
@@ -3840,7 +4429,7 @@
|
|
|
3840
4429
|
<div class="indicator" part="indicator" style="width: ${this.percent}%"></div>
|
|
3841
4430
|
</div>
|
|
3842
4431
|
${this.renderStatusLabel()}
|
|
3843
|
-
</div>`}renderCircle(){return
|
|
4432
|
+
</div>`}renderCircle(){return s.html`<div class="circle-wrap" part="base">
|
|
3844
4433
|
<svg
|
|
3845
4434
|
class="circle"
|
|
3846
4435
|
viewBox="0 0 72 72"
|
|
@@ -3850,22 +4439,23 @@
|
|
|
3850
4439
|
aria-valuenow=${Math.round(this.percent)}
|
|
3851
4440
|
aria-label=${this.labelText}
|
|
3852
4441
|
>
|
|
3853
|
-
<circle class="track" part="track" cx="36" cy="36" r="${
|
|
4442
|
+
<circle class="track" part="track" cx="36" cy="36" r="${et}"></circle>
|
|
3854
4443
|
<circle
|
|
3855
4444
|
class="indicator"
|
|
3856
4445
|
part="indicator"
|
|
3857
4446
|
cx="36"
|
|
3858
4447
|
cy="36"
|
|
3859
|
-
r="${
|
|
3860
|
-
stroke-dasharray="${
|
|
3861
|
-
stroke-dashoffset=${
|
|
4448
|
+
r="${et}"
|
|
4449
|
+
stroke-dasharray="${xt}"
|
|
4450
|
+
stroke-dashoffset=${xt*(1-this.percent/100)}
|
|
3862
4451
|
transform="rotate(-90 36 36)"
|
|
3863
4452
|
></circle>
|
|
3864
4453
|
</svg>
|
|
3865
4454
|
<div class="circle-label">${this.renderStatusLabel()}</div>
|
|
3866
|
-
</div>`}render(){return this.theme==="circle"?this.renderCircle():this.renderLine()}};
|
|
4455
|
+
</div>`}render(){return this.theme==="circle"?this.renderCircle():this.renderLine()}};xr.styles=[d,Qi];let R=xr;fe([a.property({type:Number})],R.prototype,"value");fe([a.property({reflect:!0})],R.prototype,"theme");fe([a.property({reflect:!0})],R.prototype,"status");fe([a.property({type:Boolean,attribute:"show-label"})],R.prototype,"showLabel");fe([a.property({type:Number,attribute:"stroke-width"})],R.prototype,"strokeWidth");fe([a.property()],R.prototype,"label");customElements.get("wc-progress")||customElements.define("wc-progress",R);const ta=s.css`
|
|
3867
4456
|
:host {
|
|
3868
4457
|
display: block;
|
|
4458
|
+
--wc-card-radius: var(--wc-radius-medium);
|
|
3869
4459
|
}
|
|
3870
4460
|
|
|
3871
4461
|
/* display:flex 类会覆盖 [hidden] 的 UA 样式,显式关闭 */
|
|
@@ -3875,7 +4465,7 @@
|
|
|
3875
4465
|
|
|
3876
4466
|
.card {
|
|
3877
4467
|
background-color: var(--wc-color-bg-container);
|
|
3878
|
-
border-radius: var(--wc-radius
|
|
4468
|
+
border-radius: var(--wc-card-radius);
|
|
3879
4469
|
transition: box-shadow var(--wc-duration-base, 200ms) var(--wc-easing-standard);
|
|
3880
4470
|
}
|
|
3881
4471
|
|
|
@@ -3926,27 +4516,28 @@
|
|
|
3926
4516
|
padding: var(--wc-space-3) var(--wc-space-4);
|
|
3927
4517
|
border-top: 1px solid var(--wc-color-border);
|
|
3928
4518
|
}
|
|
3929
|
-
`;var
|
|
4519
|
+
`;var ra=Object.defineProperty,ee=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ra(e,t,r),r};const kr=class extends s.LitElement{constructor(){super(...arguments),this.title="",this.subtitle="",this.bordered=!0,this.hoverable=!1,this.hasHeaderSlot=!1,this.hasActions=!1,this.hasFooter=!1}onSlotChange(e){const t=e.target,l=t.assignedElements().length>0;t.name==="header"?this.hasHeaderSlot=l:t.name==="actions"?this.hasActions=l:t.name==="footer"&&(this.hasFooter=l)}connectedCallback(){super.connectedCallback(),this.hasHeaderSlot=this.querySelector('[slot="header"]')!==null,this.hasActions=this.querySelector('[slot="actions"]')!==null,this.hasFooter=this.querySelector('[slot="footer"]')!==null}renderHeader(){const e=!!(this.title||this.subtitle||this.hasHeaderSlot||this.hasActions);return s.html`<div class="header" part="header" ?hidden=${!e}>
|
|
3930
4520
|
<div class="titles" ?hidden=${this.hasHeaderSlot}>
|
|
3931
|
-
${this.title?
|
|
3932
|
-
${this.subtitle?
|
|
4521
|
+
${this.title?s.html`<div class="title" part="title">${this.title}</div>`:s.nothing}
|
|
4522
|
+
${this.subtitle?s.html`<div class="subtitle" part="subtitle">${this.subtitle}</div>`:s.nothing}
|
|
3933
4523
|
</div>
|
|
3934
4524
|
<slot name="header" @slotchange=${this.onSlotChange} ?hidden=${!this.hasHeaderSlot}></slot>
|
|
3935
4525
|
<div class="actions" part="actions" ?hidden=${!this.hasActions}>
|
|
3936
4526
|
<slot name="actions" @slotchange=${this.onSlotChange}></slot>
|
|
3937
4527
|
</div>
|
|
3938
|
-
</div>`}render(){return
|
|
4528
|
+
</div>`}render(){return s.html`<div class="card" part="base">
|
|
3939
4529
|
${this.renderHeader()}
|
|
3940
4530
|
<div class="body" part="body"><slot></slot></div>
|
|
3941
4531
|
<div class="footer" part="footer" ?hidden=${!this.hasFooter}>
|
|
3942
4532
|
<slot name="footer" @slotchange=${this.onSlotChange}></slot>
|
|
3943
4533
|
</div>
|
|
3944
|
-
</div>`}};
|
|
4534
|
+
</div>`}};kr.styles=[d,ta];let H=kr;ee([a.property()],H.prototype,"title");ee([a.property()],H.prototype,"subtitle");ee([a.property({type:Boolean,reflect:!0})],H.prototype,"bordered");ee([a.property({type:Boolean,reflect:!0})],H.prototype,"hoverable");ee([a.state()],H.prototype,"hasHeaderSlot");ee([a.state()],H.prototype,"hasActions");ee([a.state()],H.prototype,"hasFooter");customElements.get("wc-card")||customElements.define("wc-card",H);const oa=s.css`
|
|
3945
4535
|
:host {
|
|
3946
4536
|
display: block;
|
|
4537
|
+
--wc-list-radius: var(--wc-radius-medium);
|
|
3947
4538
|
}
|
|
3948
4539
|
|
|
3949
|
-
/* display:flex
|
|
4540
|
+
/* display:flex 类会覆盖 [hidden] 的 UA 样式,显式关闭 */
|
|
3950
4541
|
[hidden] {
|
|
3951
4542
|
display: none !important;
|
|
3952
4543
|
}
|
|
@@ -3957,6 +4548,9 @@
|
|
|
3957
4548
|
list-style: none;
|
|
3958
4549
|
color: var(--wc-color-text);
|
|
3959
4550
|
font-size: var(--wc-font-size-medium);
|
|
4551
|
+
border-radius: var(--wc-list-radius);
|
|
4552
|
+
/* 裁剪条目背景(striped/hover)避免溢出圆角 */
|
|
4553
|
+
overflow: hidden;
|
|
3960
4554
|
}
|
|
3961
4555
|
|
|
3962
4556
|
/* 通过 ::slotted 为 light-DOM 条目提供统一样式 */
|
|
@@ -3988,14 +4582,14 @@
|
|
|
3988
4582
|
.empty {
|
|
3989
4583
|
padding: var(--wc-space-2) 0;
|
|
3990
4584
|
}
|
|
3991
|
-
`;var
|
|
4585
|
+
`;var ia=Object.defineProperty,We=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&ia(e,t,r),r};const zr=class extends s.LitElement{constructor(){super(...arguments),this.size="medium",this.striped=!1,this.hoverable=!1,this.itemCount=0}onSlotChange(e){const t=e.target;t.name===""&&(this.itemCount=t.assignedElements().length)}connectedCallback(){super.connectedCallback(),this.itemCount=this.querySelectorAll("wc-list-item").length}render(){return s.html`
|
|
3992
4586
|
<ul class="list" part="base" role="list" ?hidden=${this.itemCount===0}>
|
|
3993
4587
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
3994
4588
|
</ul>
|
|
3995
4589
|
<div class="empty" part="empty" ?hidden=${this.itemCount>0}>
|
|
3996
4590
|
<slot name="empty" @slotchange=${this.onSlotChange}><wc-empty></wc-empty></slot>
|
|
3997
4591
|
</div>
|
|
3998
|
-
`}};
|
|
4592
|
+
`}};zr.styles=[d,oa];let xe=zr;We([a.property({reflect:!0})],xe.prototype,"size");We([a.property({type:Boolean,reflect:!0})],xe.prototype,"striped");We([a.property({type:Boolean,reflect:!0})],xe.prototype,"hoverable");We([a.state()],xe.prototype,"itemCount");customElements.get("wc-list")||customElements.define("wc-list",xe);const $r=class extends s.LitElement{render(){return s.html`<slot></slot>`}};$r.styles=[d];let Cr=$r;customElements.get("wc-list-item")||customElements.define("wc-list-item",Cr);const aa=s.css`
|
|
3999
4593
|
:host {
|
|
4000
4594
|
display: block;
|
|
4001
4595
|
}
|
|
@@ -4131,19 +4725,19 @@
|
|
|
4131
4725
|
/* 随容器底色自适应明暗主题 */
|
|
4132
4726
|
background-color: color-mix(in srgb, var(--wc-color-bg-container) 70%, transparent);
|
|
4133
4727
|
}
|
|
4134
|
-
`;var
|
|
4728
|
+
`;var sa=Object.defineProperty,U=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&sa(e,t,r),r};const Er=class extends s.LitElement{constructor(){super(...arguments),this.columns=[],this.data=[],this.striped=!1,this.bordered=!1,this.size="medium",this.loading=!1,this.sortKey="",this.sortOrder=null,this.onSlotChange=()=>this.requestUpdate()}get displayData(){if(!this.sortKey||!this.sortOrder)return this.data;const e=this.sortOrder==="asc"?1:-1;return[...this.data].sort((t,l)=>{const r=t[this.sortKey],n=l[this.sortKey];return r==null?1:n==null?-1:typeof r=="number"&&typeof n=="number"?(r-n)*e:String(r).localeCompare(String(n),"zh-CN")*e})}onHeaderClick(e){if(!e.sortable)return;const t={"":"asc",asc:"desc",desc:null};this.sortOrder=this.sortKey===e.key?t[this.sortOrder??""]??null:"asc",this.sortKey=this.sortOrder===null?"":e.key,this.dispatchEvent(new CustomEvent("wc-sort",{detail:{key:this.sortKey,order:this.sortOrder},bubbles:!0,composed:!0}))}cellContent(e,t,l){const r=e.render?.(t,l);if(r!=null&&r!=="")return typeof r=="object"?r:String(r);const n=t[e.key];return n==null?"":String(n)}renderHead(){return s.html`<thead part="head">
|
|
4135
4729
|
<tr>
|
|
4136
|
-
${this.columns.map(e=>{const t=this.sortKey===e.key&&this.sortOrder!==null;return
|
|
4730
|
+
${this.columns.map(e=>{const t=this.sortKey===e.key&&this.sortOrder!==null;return s.html`<th
|
|
4137
4731
|
part="th"
|
|
4138
4732
|
scope="col"
|
|
4139
|
-
style=${e.width!=null?`width: ${typeof e.width=="number"?`${e.width}px`:e.width}`:
|
|
4140
|
-
class=${[e.align?`align-${e.align}`:"",e.sortable?"sortable":"",t?"sorted":""].join(" ")||
|
|
4141
|
-
aria-sort=${t?this.sortOrder==="asc"?"ascending":"descending":
|
|
4733
|
+
style=${e.width!=null?`width: ${typeof e.width=="number"?`${e.width}px`:e.width}`:s.nothing}
|
|
4734
|
+
class=${[e.align?`align-${e.align}`:"",e.sortable?"sortable":"",t?"sorted":""].join(" ")||s.nothing}
|
|
4735
|
+
aria-sort=${t?this.sortOrder==="asc"?"ascending":"descending":s.nothing}
|
|
4142
4736
|
@click=${()=>this.onHeaderClick(e)}
|
|
4143
4737
|
>
|
|
4144
4738
|
<div class="th-inner">
|
|
4145
4739
|
${e.title}
|
|
4146
|
-
${e.sortable?
|
|
4740
|
+
${e.sortable?s.html`<span class="sort" part="sort">
|
|
4147
4741
|
<wc-icon
|
|
4148
4742
|
class=${this.sortKey===e.key&&this.sortOrder==="asc"?"active":""}
|
|
4149
4743
|
name="chevron-up"
|
|
@@ -4152,25 +4746,25 @@
|
|
|
4152
4746
|
class=${this.sortKey===e.key&&this.sortOrder==="desc"?"active":""}
|
|
4153
4747
|
name="chevron-down"
|
|
4154
4748
|
></wc-icon>
|
|
4155
|
-
</span>`:
|
|
4749
|
+
</span>`:s.nothing}
|
|
4156
4750
|
</div>
|
|
4157
4751
|
</th>`})}
|
|
4158
4752
|
</tr>
|
|
4159
|
-
</thead>`}render(){const e=this.data.length>0;return
|
|
4753
|
+
</thead>`}render(){const e=this.data.length>0;return s.html`<div class="wrapper" part="wrapper">
|
|
4160
4754
|
<table part="table">
|
|
4161
4755
|
${this.renderHead()}
|
|
4162
4756
|
<tbody part="body" ?hidden=${!e}>
|
|
4163
|
-
${this.displayData.map((t,
|
|
4757
|
+
${this.displayData.map((t,l)=>s.html`<tr
|
|
4164
4758
|
part="row"
|
|
4165
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("wc-row-click",{detail:{row:t,index:
|
|
4759
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("wc-row-click",{detail:{row:t,index:l},bubbles:!0,composed:!0}))}
|
|
4166
4760
|
>
|
|
4167
|
-
${this.columns.map(r=>
|
|
4761
|
+
${this.columns.map(r=>s.html`<td
|
|
4168
4762
|
part="td"
|
|
4169
|
-
class=${r.align?`align-${r.align}`:
|
|
4763
|
+
class=${r.align?`align-${r.align}`:s.nothing}
|
|
4170
4764
|
?ellipsis=${r.ellipsis===!0}
|
|
4171
|
-
title=${r.ellipsis?String(t[r.key]??""):
|
|
4765
|
+
title=${r.ellipsis?String(t[r.key]??""):s.nothing}
|
|
4172
4766
|
>
|
|
4173
|
-
${this.cellContent(r,t,
|
|
4767
|
+
${this.cellContent(r,t,l)}
|
|
4174
4768
|
</td>`)}
|
|
4175
4769
|
</tr>`)}
|
|
4176
4770
|
</tbody>
|
|
@@ -4178,10 +4772,10 @@
|
|
|
4178
4772
|
<div class="empty" part="empty" ?hidden=${e}>
|
|
4179
4773
|
<slot name="empty" @slotchange=${this.onSlotChange}><wc-empty></wc-empty></slot>
|
|
4180
4774
|
</div>
|
|
4181
|
-
${this.loading?
|
|
4775
|
+
${this.loading?s.html`<div class="loading" part="loading">
|
|
4182
4776
|
<wc-icon name="loader" spin label="加载中"></wc-icon>
|
|
4183
|
-
</div>`:
|
|
4184
|
-
</div>`}};
|
|
4777
|
+
</div>`:s.nothing}
|
|
4778
|
+
</div>`}};Er.styles=[d,aa];let O=Er;U([a.property({type:Array})],O.prototype,"columns");U([a.property({type:Array})],O.prototype,"data");U([a.property({type:Boolean,reflect:!0})],O.prototype,"striped");U([a.property({type:Boolean,reflect:!0})],O.prototype,"bordered");U([a.property({reflect:!0})],O.prototype,"size");U([a.property({type:Boolean,reflect:!0})],O.prototype,"loading");U([a.state()],O.prototype,"sortKey");U([a.state()],O.prototype,"sortOrder");customElements.get("wc-table")||customElements.define("wc-table",O);const na=s.css`
|
|
4185
4779
|
:host {
|
|
4186
4780
|
--wc-image-bg: var(--wc-color-bg-container-secondary);
|
|
4187
4781
|
--wc-image-radius: var(--wc-radius-medium);
|
|
@@ -4318,9 +4912,9 @@
|
|
|
4318
4912
|
opacity: 1;
|
|
4319
4913
|
}
|
|
4320
4914
|
}
|
|
4321
|
-
`;var
|
|
4915
|
+
`;var la=Object.defineProperty,w=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&la(e,t,r),r};const ca=.25,da=5,Oe=.25,Mr=class extends s.LitElement{constructor(){super(...arguments),this.src="",this.alt="",this.fit="fill",this.position="center",this.shape="square",this.lazy=!1,this.preview=!1,this.previewSrc="",this.fallback="",this.status="loading",this.shouldLoad=!1,this.fallbackFailed=!1,this.previewOpen=!1,this.scale=1,this.rotate=0,this.x=0,this.y=0,this.dragging=!1,this.localize=new u(this),this.overlay=new lt(this,{requestClose:()=>this.requestClosePreview("escape")}),this.io=null,this.dragStartX=0,this.dragStartY=0}connectedCallback(){super.connectedCallback(),this.lazy&&typeof IntersectionObserver<"u"?(this.io=new IntersectionObserver(e=>{e.some(t=>t.isIntersecting)&&(this.startLoad(),this.io?.disconnect())}),this.io.observe(this)):this.startLoad(),this.previewOpen&&this.overlay.bind()}disconnectedCallback(){super.disconnectedCallback(),this.io?.disconnect(),this.overlay.unbind()}willUpdate(e){super.willUpdate(e),e.has("src")&&(this.status="loading",this.fallbackFailed=!1)}updated(e){super.updated(e),e.has("previewOpen")&&(this.previewOpen?(this.dispatchEvent(new CustomEvent("wc-preview-open",{bubbles:!0,composed:!0})),this.overlay.bind()):this.overlay.unbind())}startLoad(){this.shouldLoad||(this.shouldLoad=!0)}onImgLoad(){this.status="loaded",this.dispatchEvent(new CustomEvent("wc-load",{detail:{src:this.src},bubbles:!0,composed:!0}))}onImgError(){this.status="error",this.dispatchEvent(new CustomEvent("wc-error",{detail:{src:this.src},bubbles:!0,composed:!0}))}openPreview(){!this.preview||this.status!=="loaded"||(this.resetTransform(),this.previewOpen=!0)}requestClosePreview(e="api"){this.previewOpen&&this.dispatchEvent(new CustomEvent("wc-preview-close",{detail:{reason:e},bubbles:!0,composed:!0,cancelable:!0}))&&(this.previewOpen=!1)}zoomBy(e){const t=Math.round((this.scale+e)*100)/100;this.scale=Math.min(da,Math.max(ca,t))}rotateBy(){this.rotate=(this.rotate+90)%360}resetTransform(){this.scale=1,this.rotate=0,this.x=0,this.y=0}onOverlayWheel(e){e.preventDefault(),this.zoomBy(e.deltaY<0?Oe:-Oe)}onStagePointerDown(e){e.button===0&&(this.dragging=!0,this.dragStartX=e.clientX-this.x,this.dragStartY=e.clientY-this.y,e.currentTarget.setPointerCapture(e.pointerId))}onStagePointerMove(e){this.dragging&&(this.x=e.clientX-this.dragStartX,this.y=e.clientY-this.dragStartY)}onStagePointerUp(){this.dragging=!1}onTriggerKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.openPreview())}imgStyle(){return`object-fit:${this.fit};object-position:${this.position}`}previewStyle(){return`transform:translate(${this.x}px, ${this.y}px) scale(${this.scale}) rotate(${this.rotate}deg)`}render(){const e=this.previewSrc||this.src;return s.html`
|
|
4322
4916
|
<div class="frame" part="base">
|
|
4323
|
-
${this.shouldLoad&&this.status!=="error"?
|
|
4917
|
+
${this.shouldLoad&&this.status!=="error"?s.html`<img
|
|
4324
4918
|
part="image"
|
|
4325
4919
|
src=${this.src}
|
|
4326
4920
|
alt=${this.alt}
|
|
@@ -4328,21 +4922,21 @@
|
|
|
4328
4922
|
@load=${this.onImgLoad}
|
|
4329
4923
|
@error=${this.onImgError}
|
|
4330
4924
|
/>`:""}
|
|
4331
|
-
${this.status==="error"&&this.fallback&&!this.fallbackFailed?
|
|
4925
|
+
${this.status==="error"&&this.fallback&&!this.fallbackFailed?s.html`<img
|
|
4332
4926
|
part="image"
|
|
4333
4927
|
src=${this.fallback}
|
|
4334
4928
|
alt=${this.alt}
|
|
4335
4929
|
style=${this.imgStyle()}
|
|
4336
4930
|
@error=${()=>this.fallbackFailed=!0}
|
|
4337
4931
|
/>`:""}
|
|
4338
|
-
${this.status==="loading"?
|
|
4932
|
+
${this.status==="loading"?s.html`<div class="layer">
|
|
4339
4933
|
<wc-icon name="loader" spin></wc-icon>
|
|
4340
4934
|
</div>`:""}
|
|
4341
|
-
${this.status==="error"&&(!this.fallback||this.fallbackFailed)?
|
|
4935
|
+
${this.status==="error"&&(!this.fallback||this.fallbackFailed)?s.html`<div class="layer">
|
|
4342
4936
|
<wc-icon name="image-off"></wc-icon>
|
|
4343
4937
|
<span>${this.localize.term("image.loadError")}</span>
|
|
4344
4938
|
</div>`:""}
|
|
4345
|
-
${this.preview&&this.status==="loaded"?
|
|
4939
|
+
${this.preview&&this.status==="loaded"?s.html`<div
|
|
4346
4940
|
class="trigger"
|
|
4347
4941
|
role="button"
|
|
4348
4942
|
tabindex="0"
|
|
@@ -4351,7 +4945,7 @@
|
|
|
4351
4945
|
@keydown=${this.onTriggerKeydown}
|
|
4352
4946
|
></div>`:""}
|
|
4353
4947
|
</div>
|
|
4354
|
-
${this.previewOpen?
|
|
4948
|
+
${this.previewOpen?s.html`<div
|
|
4355
4949
|
class="overlay"
|
|
4356
4950
|
part="overlay"
|
|
4357
4951
|
role="dialog"
|
|
@@ -4380,14 +4974,14 @@
|
|
|
4380
4974
|
<button
|
|
4381
4975
|
type="button"
|
|
4382
4976
|
aria-label=${this.localize.term("image.zoomIn")}
|
|
4383
|
-
@click=${()=>this.zoomBy(
|
|
4977
|
+
@click=${()=>this.zoomBy(Oe)}
|
|
4384
4978
|
>
|
|
4385
4979
|
<wc-icon name="zoom-in"></wc-icon>
|
|
4386
4980
|
</button>
|
|
4387
4981
|
<button
|
|
4388
4982
|
type="button"
|
|
4389
4983
|
aria-label=${this.localize.term("image.zoomOut")}
|
|
4390
|
-
@click=${()=>this.zoomBy(-
|
|
4984
|
+
@click=${()=>this.zoomBy(-Oe)}
|
|
4391
4985
|
>
|
|
4392
4986
|
<wc-icon name="zoom-out"></wc-icon>
|
|
4393
4987
|
</button>
|
|
@@ -4416,7 +5010,7 @@
|
|
|
4416
5010
|
</button>
|
|
4417
5011
|
</div>
|
|
4418
5012
|
</div>`:""}
|
|
4419
|
-
`}};
|
|
5013
|
+
`}};Mr.styles=[d,na];let p=Mr;w([a.property()],p.prototype,"src");w([a.property()],p.prototype,"alt");w([a.property()],p.prototype,"fit");w([a.property()],p.prototype,"position");w([a.property({reflect:!0})],p.prototype,"shape");w([a.property({type:Boolean})],p.prototype,"lazy");w([a.property({type:Boolean,reflect:!0})],p.prototype,"preview");w([a.property({attribute:"preview-src"})],p.prototype,"previewSrc");w([a.property()],p.prototype,"fallback");w([a.state()],p.prototype,"status");w([a.state()],p.prototype,"shouldLoad");w([a.state()],p.prototype,"fallbackFailed");w([a.state()],p.prototype,"previewOpen");w([a.state()],p.prototype,"scale");w([a.state()],p.prototype,"rotate");w([a.state()],p.prototype,"x");w([a.state()],p.prototype,"y");w([a.state()],p.prototype,"dragging");customElements.get("wc-image")||customElements.define("wc-image",p);const ha=s.css`
|
|
4420
5014
|
:host {
|
|
4421
5015
|
display: block;
|
|
4422
5016
|
|
|
@@ -4648,7 +5242,7 @@
|
|
|
4648
5242
|
.bar {
|
|
4649
5243
|
margin: var(--wc-space-1) 0 0 var(--wc-space-6);
|
|
4650
5244
|
}
|
|
4651
|
-
`;var
|
|
5245
|
+
`;var pa=Object.defineProperty,E=(o,e,t,l)=>{for(var r=void 0,n=o.length-1,c;n>=0;n--)(c=o[n])&&(r=c(e,t,r)||r);return r&&pa(e,t,r),r};const Lr=class extends s.LitElement{constructor(){super(...arguments),this.action="",this.name="file",this.accept="",this.multiple=!1,this.max=0,this.draggable=!1,this.autoUpload=!0,this.disabled=!1,this.requestMethod=null,this.files=[],this.dragOver=!1,this.localize=new u(this),this.xhrMap=new Map,this.uidCounter=0}disconnectedCallback(){super.disconnectedCallback();for(const e of this.xhrMap.values())e.abort();this.xhrMap.clear()}submit(){for(const e of this.files)e.status==="waiting"&&this.startUpload(e)}clearFiles(){for(const e of this.xhrMap.values())e.abort();this.xhrMap.clear(),this.files.length&&(this.files=[],this.emitChange())}nextUid(){return this.uidCounter+=1,`wc-upload-file-${this.uidCounter}`}pick(){this.disabled||this.shadowRoot?.querySelector('input[type="file"]')?.click()}onInputChange(e){const t=e.target;t.files?.length&&this.addFiles(t.files),t.value=""}onDragOver(e){e.preventDefault(),this.disabled||(this.dragOver=!0)}onDragLeave(){this.dragOver=!1}onDrop(e){e.preventDefault(),this.dragOver=!1,!this.disabled&&e.dataTransfer?.files?.length&&this.addFiles(e.dataTransfer.files)}onDraggerKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.pick())}addFiles(e){const t=Array.from(e);if(!t.length)return;let l=t;if(this.max>0){const n=this.max-this.files.length;if(n<t.length){const c=t.slice(Math.max(0,n));this.dispatchEvent(new CustomEvent("wc-exceed",{detail:{files:c,max:this.max},bubbles:!0,composed:!0})),l=t.slice(0,Math.max(0,n))}}if(!l.length)return;const r=l.map(n=>({uid:this.nextUid(),raw:n,name:n.name,size:n.size,percent:0,status:"waiting"}));if(this.files=[...this.files,...r],this.dispatchEvent(new CustomEvent("wc-select",{detail:{files:l},bubbles:!0,composed:!0})),this.emitChange(),this.autoUpload)for(const n of r)this.startUpload(n)}startUpload(e){if(!(this.disabled||e.status==="uploading")){if(!this.action&&!this.requestMethod){console.warn("[wc-upload] 未配置 action 或 requestMethod,文件保持待上传状态");return}this.updateFile(e,{status:"uploading",percent:0}),this.requestMethod?this.requestMethod(e,{onProgress:t=>this.handleProgress(e,t),onSuccess:t=>this.handleSuccess(e,t),onError:t=>this.handleError(e,t)}):this.uploadWithXhr(e)}}uploadWithXhr(e){const t=new XMLHttpRequest;this.xhrMap.set(e.uid,t);const l=new FormData;l.append(this.name,e.raw),t.open("POST",this.action),t.upload.onprogress=r=>{r.lengthComputable&&this.handleProgress(e,r.loaded/r.total*100)},t.onload=()=>{if(t.status>=200&&t.status<300){let r=t.responseText;try{r=JSON.parse(t.responseText)}catch{}this.handleSuccess(e,r)}else this.handleError(e,`HTTP ${t.status}`)},t.onerror=()=>this.handleError(e,"network error"),t.send(l)}handleProgress(e,t){const l=Math.min(100,Math.max(0,Math.round(t)));this.updateFile(e,{percent:l}),this.dispatchEvent(new CustomEvent("wc-progress",{detail:{file:this.snapshot(e),percent:l},bubbles:!0,composed:!0}))}handleSuccess(e,t){this.xhrMap.delete(e.uid);const l=typeof t?.url=="string"?t.url:void 0;this.updateFile(e,{status:"success",percent:100,response:t,url:l}),this.dispatchEvent(new CustomEvent("wc-success",{detail:{file:this.snapshot(e),response:t},bubbles:!0,composed:!0})),this.emitChange()}handleError(e,t){this.xhrMap.delete(e.uid),this.updateFile(e,{status:"error"}),this.dispatchEvent(new CustomEvent("wc-error",{detail:{file:this.snapshot(e),message:t},bubbles:!0,composed:!0})),this.emitChange()}removeFile(e){const t=this.files[e];!t||!this.dispatchEvent(new CustomEvent("wc-remove",{detail:{file:t,index:e},bubbles:!0,composed:!0,cancelable:!0}))||(this.xhrMap.get(t.uid)?.abort(),this.xhrMap.delete(t.uid),this.files=this.files.filter((l,r)=>r!==e),this.emitChange())}retry(e){e.status==="error"&&this.startUpload(e)}onNameClick(e){e.url&&this.dispatchEvent(new CustomEvent("wc-preview",{detail:{file:e},bubbles:!0,composed:!0}))}updateFile(e,t){this.files=this.files.map(l=>l.uid===e.uid?{...l,...t}:l)}snapshot(e){return this.files.find(t=>t.uid===e.uid)??e}emitChange(){this.dispatchEvent(new CustomEvent("wc-change",{detail:{files:[...this.files]},bubbles:!0,composed:!0}))}formatSize(e){return e==null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}render(){return s.html`
|
|
4652
5246
|
<div class="upload" part="base">
|
|
4653
5247
|
<input
|
|
4654
5248
|
class="hidden-input"
|
|
@@ -4658,7 +5252,7 @@
|
|
|
4658
5252
|
?disabled=${this.disabled}
|
|
4659
5253
|
@change=${this.onInputChange}
|
|
4660
5254
|
/>
|
|
4661
|
-
${this.draggable?
|
|
5255
|
+
${this.draggable?s.html`<div
|
|
4662
5256
|
class="dragger ${this.dragOver?"drag-over":""}"
|
|
4663
5257
|
part="dragger"
|
|
4664
5258
|
role="button"
|
|
@@ -4673,7 +5267,7 @@
|
|
|
4673
5267
|
<wc-icon name="upload" class="dragger-icon"></wc-icon>
|
|
4674
5268
|
<span class="dragger-text">${this.localize.term("upload.clickOrDrag")}</span>
|
|
4675
5269
|
<span class="tip"><slot name="tip"></slot></span>
|
|
4676
|
-
</div>`:
|
|
5270
|
+
</div>`:s.html`<div class="trigger-wrap">
|
|
4677
5271
|
<button
|
|
4678
5272
|
type="button"
|
|
4679
5273
|
class="trigger"
|
|
@@ -4686,8 +5280,8 @@
|
|
|
4686
5280
|
</button>
|
|
4687
5281
|
<span class="tip"><slot name="tip"></slot></span>
|
|
4688
5282
|
</div>`}
|
|
4689
|
-
${this.files.length?
|
|
4690
|
-
${this.files.map((e,t)=>
|
|
5283
|
+
${this.files.length?s.html`<ul class="list" part="list">
|
|
5284
|
+
${this.files.map((e,t)=>s.html`
|
|
4691
5285
|
<li class="item ${e.status}" part="item">
|
|
4692
5286
|
<div class="row">
|
|
4693
5287
|
<wc-icon name="file" class="type-icon"></wc-icon>
|
|
@@ -4697,13 +5291,13 @@
|
|
|
4697
5291
|
role=${e.url?"button":void 0}
|
|
4698
5292
|
tabindex=${e.url?0:void 0}
|
|
4699
5293
|
@click=${()=>this.onNameClick(e)}
|
|
4700
|
-
@keydown=${
|
|
5294
|
+
@keydown=${l=>{e.url&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),this.onNameClick(e))}}
|
|
4701
5295
|
>${e.name}</span
|
|
4702
5296
|
>
|
|
4703
|
-
${e.status==="uploading"?
|
|
5297
|
+
${e.status==="uploading"?s.html`<span class="percent">${Math.round(e.percent??0)}%</span>`:e.status==="error"?s.html`<span class="fail-text"
|
|
4704
5298
|
>${this.localize.term("upload.failed")}</span
|
|
4705
|
-
>`:
|
|
4706
|
-
${e.status==="success"?
|
|
5299
|
+
>`:s.html`<span class="size">${this.formatSize(e.size)}</span>`}
|
|
5300
|
+
${e.status==="success"?s.html`<wc-icon name="check" class="status-icon success"></wc-icon>`:e.status==="error"?s.html`<button
|
|
4707
5301
|
type="button"
|
|
4708
5302
|
class="icon-btn"
|
|
4709
5303
|
title=${this.localize.term("upload.retry")}
|
|
@@ -4711,7 +5305,7 @@
|
|
|
4711
5305
|
@click=${()=>this.retry(e)}
|
|
4712
5306
|
>
|
|
4713
5307
|
<wc-icon name="error" class="status-icon error"></wc-icon>
|
|
4714
|
-
</button>`:e.status==="waiting"?
|
|
5308
|
+
</button>`:e.status==="waiting"?s.html`<wc-icon
|
|
4715
5309
|
name="loader"
|
|
4716
5310
|
spin
|
|
4717
5311
|
class="status-icon waiting"
|
|
@@ -4726,7 +5320,7 @@
|
|
|
4726
5320
|
<wc-icon name="close"></wc-icon>
|
|
4727
5321
|
</button>
|
|
4728
5322
|
</div>
|
|
4729
|
-
${e.status==="uploading"?
|
|
5323
|
+
${e.status==="uploading"?s.html`<wc-progress
|
|
4730
5324
|
class="bar"
|
|
4731
5325
|
value=${e.percent??0}
|
|
4732
5326
|
stroke-width="4"
|
|
@@ -4736,5 +5330,5 @@
|
|
|
4736
5330
|
`)}
|
|
4737
5331
|
</ul>`:""}
|
|
4738
5332
|
</div>
|
|
4739
|
-
`}};hr.styles=[l,Da];let w=hr;y([s.property()],w.prototype,"action");y([s.property()],w.prototype,"name");y([s.property()],w.prototype,"accept");y([s.property({type:Boolean})],w.prototype,"multiple");y([s.property({type:Number})],w.prototype,"max");y([s.property({type:Boolean,reflect:!0})],w.prototype,"draggable");y([s.property({type:Boolean,reflect:!0,attribute:"auto-upload",converter:o=>o==null?!0:o!=="false"})],w.prototype,"autoUpload");y([s.property({type:Boolean,reflect:!0})],w.prototype,"disabled");y([s.property({attribute:!1})],w.prototype,"requestMethod");y([s.state()],w.prototype,"files");y([s.state()],w.prototype,"dragOver");customElements.get("wc-upload")||customElements.define("wc-upload",w);const pr=d("arrow-left",'<path d="M19 12H5"/><path d="m12 19-7-7 7-7"/>'),ur=d("arrow-right",'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>'),wr=d("calendar",'<rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4"/><path d="M8 2v4"/><path d="M3 10h18"/>'),vr=d("check",'<polyline points="20 6 9 17 4 12"/>'),mr=d("chevron-down",'<path d="m6 9 6 6 6-6"/>'),gr=d("chevron-left",'<path d="m15 18-6-6 6-6"/>'),br=d("chevron-right",'<path d="m9 18 6-6-6-6"/>'),fr=d("chevron-up",'<path d="m18 15-6-6-6 6"/>'),yr=d("close",'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'),xr=d("error",'<circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/>'),kr=d("file",'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/>'),$r=d("image-off",'<path d="m2 2 20 20"/><path d="M10.41 10.17a2 2 0 0 1-2.24 2.24"/><path d="M21 15V5a2 2 0 0 0-2-2H7"/><path d="M3.59 3.59A2 2 0 0 0 3 5v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.41-.59"/><path d="m21 15-5-5L5 21"/>'),zr=d("info",'<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>'),Cr=d("loader",'<path d="M21 12a9 9 0 1 1-6.219-8.56"/>'),Er=d("minus",'<path d="M5 12h14"/>'),Or=d("plus",'<path d="M5 12h14"/><path d="M12 5v14"/>'),Sr=d("rotate-cw",'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/>'),Lr=d("search",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),Mr=d("upload",'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>'),Pr=d("warning",'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>'),jr=d("zoom-in",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M11 8v6"/><path d="M8 11h6"/>'),Tr=d("zoom-out",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M8 11h6"/>'),Dr=[pr,ur,wr,vr,mr,gr,br,fr,yr,xr,kr,$r,zr,Cr,Er,Or,Sr,Lr,Mr,Pr,jr,Tr];function Na(){for(const o of Dr)vt(o.name,o.svg)}const Ir="wc-theme-change",Ye="wc-theme";let ee="light",Q=null;function Ba(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Nr(){return ee==="auto"?Ba():ee}function qa(){return ee}function Br(o,e){if(o!=="light"&&o!=="dark"&&o!=="auto")throw new Error(`[wc] 无效主题: "${String(o)}",可选 light | dark | auto`);ee=o,typeof localStorage<"u"&&(e?.persist?localStorage.setItem(Ye,o):localStorage.removeItem(Ye)),_a(),Ke()}function Aa(){let o=null;typeof localStorage<"u"&&(o=localStorage.getItem(Ye)),Br(o==="light"||o==="dark"||o==="auto"?o:"auto")}function _a(){const o=ee==="auto"&&typeof window.matchMedia=="function";o&&!Q?(Q=window.matchMedia("(prefers-color-scheme: dark)"),Q.addEventListener("change",Ke)):!o&&Q&&(Q.removeEventListener("change",Ke),Q=null)}function Ke(){const o=Nr();typeof document<"u"&&(document.documentElement.dataset.theme=o),document.dispatchEvent(new CustomEvent(Ir,{detail:{theme:ee,effective:o},bubbles:!0,composed:!0}))}const Fa=':root{--wc-color-brand-50: #f2f7ff;--wc-color-brand-100: #d9e8ff;--wc-color-brand-200: #b5d0ff;--wc-color-brand-300: #8cb8ff;--wc-color-brand-400: #5f96f7;--wc-color-brand-500: #0052d9;--wc-color-brand-600: #0045c2;--wc-color-brand-700: #00359e;--wc-color-brand-800: #002a7d;--wc-color-success-light: #e3f9e9;--wc-color-success: #2ba471;--wc-color-success-dark: #1f895c;--wc-color-warning-light: #fdf3e6;--wc-color-warning: #e37318;--wc-color-warning-dark: #c25c0a;--wc-color-error-light: #fdecee;--wc-color-error: #d54941;--wc-color-error-dark: #b5362f;--wc-color-info-light: #f2f7ff;--wc-color-info: #0052d9;--wc-color-info-dark: #0045c2;--wc-color-gray-50: #f5f7fa;--wc-color-gray-100: #e7eaee;--wc-color-gray-200: #d5dbe3;--wc-color-gray-300: #c2c9d4;--wc-color-gray-400: #a6b0bf;--wc-color-gray-500: #8a94a6;--wc-color-gray-600: #6b7687;--wc-color-gray-700: #4b5563;--wc-color-gray-800: #2f3540;--wc-color-gray-900: #1b1f27;--wc-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "PingFang SC", "Microsoft YaHei", sans-serif;--wc-font-family-mono: ui-monospace, sfmono-regular, "SF Mono", menlo, consolas, "Liberation Mono", monospace;--wc-font-size-xsmall: 12px;--wc-font-size-small: 13px;--wc-font-size-medium: 14px;--wc-font-size-large: 16px;--wc-font-size-xlarge: 20px;--wc-font-size-h1: 24px;--wc-font-size-h2: 20px;--wc-font-size-h3: 18px;--wc-font-weight-normal: 400;--wc-font-weight-medium: 500;--wc-font-weight-semibold: 600;--wc-font-weight-bold: 700;--wc-line-height-base: 1.5;--wc-line-height-compact: 1.25;--wc-space-1: 4px;--wc-space-2: 8px;--wc-space-3: 12px;--wc-space-4: 16px;--wc-space-5: 20px;--wc-space-6: 24px;--wc-space-8: 32px;--wc-space-10: 40px;--wc-space-12: 48px;--wc-radius-none: 0;--wc-radius-small: 3px;--wc-radius-medium: 4px;--wc-radius-large: 8px;--wc-radius-xlarge: 10px;--wc-radius-round: 999px;--wc-radius-circle: 50%;--wc-shadow-1: 0 1px 2px rgb(15 23 42 / 6%), 0 1px 3px rgb(15 23 42 / 10%);--wc-shadow-2: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 12px -2px rgb(15 23 42 / 12%);--wc-shadow-3: 0 4px 8px -2px rgb(15 23 42 / 8%), 0 12px 32px -4px rgb(15 23 42 / 18%);--wc-duration-fast: .15s;--wc-duration-medium: .3s;--wc-duration-slow: 1s;--wc-easing-standard: cubic-bezier(.4, 0, .2, 1);--wc-easing-emphasized: cubic-bezier(.2, 0, 0, 1);--wc-z-index-dropdown: 1000;--wc-z-index-sticky: 1100;--wc-z-index-modal: 1200;--wc-z-index-drawer: 1300;--wc-z-index-message: 1500;--wc-z-index-tooltip: 1600;--wc-color-primary: var(--wc-color-brand-500);--wc-color-primary-hover: var(--wc-color-brand-600);--wc-color-primary-active: var(--wc-color-brand-700);--wc-color-primary-light: var(--wc-color-brand-50);--wc-color-text-anti: #ffffff;--wc-color-success-bg: var(--wc-color-success-light);--wc-color-warning-bg: var(--wc-color-warning-light);--wc-color-error-bg: var(--wc-color-error-light);--wc-color-info-bg: var(--wc-color-info-light);--wc-color-text: var(--wc-color-gray-900);--wc-color-text-secondary: var(--wc-color-gray-600);--wc-color-text-placeholder: var(--wc-color-gray-400);--wc-color-text-disabled: var(--wc-color-gray-500);--wc-color-border: var(--wc-color-gray-200);--wc-color-border-strong: var(--wc-color-gray-500);--wc-color-bg: var(--wc-color-gray-50);--wc-color-bg-container: #ffffff;--wc-color-bg-container-secondary: var(--wc-color-gray-50);--wc-color-bg-hover: var(--wc-color-gray-100);--wc-color-bg-disabled: var(--wc-color-gray-100);--wc-color-mask: rgb(0 0 0 / 60%);--wc-color-overlay-hover: rgb(0 0 0 / 8%);--wc-color-focus-ring: var(--wc-color-brand-300)}[data-theme=dark]{color-scheme:dark;--wc-color-primary: var(--wc-color-brand-300);--wc-color-primary-hover: var(--wc-color-brand-200);--wc-color-primary-active: var(--wc-color-brand-100);--wc-color-primary-light: var(--wc-color-brand-800);--wc-color-text-anti: #1b1f27;--wc-color-success: #4fce8e;--wc-color-success-bg: #103524;--wc-color-warning: #f5a962;--wc-color-warning-bg: #3c2a15;--wc-color-error: #e76f68;--wc-color-error-bg: #442423;--wc-color-info: var(--wc-color-brand-300);--wc-color-info-bg: var(--wc-color-brand-800);--wc-color-text: var(--wc-color-gray-50);--wc-color-text-secondary: var(--wc-color-gray-400);--wc-color-text-placeholder: var(--wc-color-gray-600);--wc-color-text-disabled: var(--wc-color-gray-500);--wc-color-border: var(--wc-color-gray-700);--wc-color-border-strong: var(--wc-color-gray-500);--wc-color-bg: var(--wc-color-gray-900);--wc-color-bg-container: #242832;--wc-color-bg-container-secondary: #2f3540;--wc-color-bg-hover: var(--wc-color-gray-800);--wc-color-bg-disabled: var(--wc-color-gray-700);--wc-color-mask: rgb(0 0 0 / 70%);--wc-color-overlay-hover: rgb(255 255 255 / 12%);--wc-color-focus-ring: var(--wc-color-brand-200);--wc-shadow-1: 0 1px 2px rgb(0 0 0 / 40%), 0 1px 3px rgb(0 0 0 / 30%);--wc-shadow-2: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 12px -2px rgb(0 0 0 / 45%);--wc-shadow-3: 0 4px 8px -2px rgb(0 0 0 / 40%), 0 12px 32px -4px rgb(0 0 0 / 50%)}',Ra="*,*:before,*:after{box-sizing:border-box}*{margin:0}html{-webkit-text-size-adjust:100%;text-size-adjust:100%;tab-size:4}body{font-family:var(--wc-font-family);font-size:var(--wc-font-size-medium);line-height:var(--wc-line-height-base);color:var(--wc-color-text);background-color:var(--wc-color-bg-container);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}h1,h2,h3,h4,h5,h6{font-weight:var(--wc-font-weight-semibold);line-height:var(--wc-line-height-compact)}h1{font-size:var(--wc-font-size-h1)}h2{font-size:var(--wc-font-size-h2)}h3{font-size:var(--wc-font-size-h3)}h4{font-size:var(--wc-font-size-large)}h5,h6{font-size:var(--wc-font-size-medium)}ul,ol{padding:0;list-style:none}a{color:var(--wc-color-primary);text-decoration:none;transition:color var(--wc-duration-fast) var(--wc-easing-standard)}a:hover{color:var(--wc-color-primary-hover)}a:active{color:var(--wc-color-primary-active)}a[disabled]{color:var(--wc-color-text-disabled);cursor:not-allowed}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%}img{border-style:none}button,input,select,textarea{font:inherit;color:inherit;letter-spacing:inherit}button{background:none;border:none;padding:0;cursor:pointer}button:disabled{cursor:not-allowed}input,select,textarea{background-color:transparent;border:none}input::placeholder,textarea::placeholder{color:var(--wc-color-text-placeholder)}textarea{resize:vertical}code,kbd,samp,pre{font-family:var(--wc-font-family-mono);font-size:var(--wc-font-size-small)}table{border-collapse:collapse;border-spacing:0}th{font-weight:var(--wc-font-weight-medium);text-align:inherit}fieldset{border:none;padding:0}hr{border:none;border-top:1px solid var(--wc-color-border)}blockquote,figure,dd,dl{margin:0}:focus-visible{outline:2px solid var(--wc-color-focus-ring);outline-offset:2px}:focus:not(:focus-visible){outline:none}::selection{background:var(--wc-color-primary-light);color:var(--wc-color-text)}";exports.ARROW_INSET=$e;exports.FormAssociatedMixin=x;exports.LANGUAGE_CHANGE_EVENT=ze;exports.LocalizeController=u;exports.POSITION_GAP=C;exports.THEME_CHANGE_EVENT=Ir;exports.WcIcon=O;exports.arrowLeft=pr;exports.arrowRight=ur;exports.baseStyles=l;exports.builtinIcons=Dr;exports.calendar=wr;exports.check=vr;exports.chevronDown=mr;exports.chevronLeft=gr;exports.chevronRight=br;exports.chevronUp=fr;exports.close=yr;exports.computePosition=Qe;exports.createIcon=d;exports.error=xr;exports.file=kr;exports.getEffectiveTheme=Nr;exports.getIcon=Hr;exports.getIconLibrary=Wr;exports.getLocale=ft;exports.getRegisteredLocales=to;exports.getTerm=yt;exports.getTheme=qa;exports.imageOff=$r;exports.info=zr;exports.initTheme=Aa;exports.loader=Cr;exports.message=Qo;exports.minus=Er;exports.onIconRegister=ut;exports.plus=Or;exports.registerBuiltinIcons=Na;exports.registerIcon=vt;exports.registerIconLibrary=mt;exports.registerLocale=Qr;exports.resetCss=Ra;exports.resolveIcon=gt;exports.resolveLocale=Xe;exports.rotateCw=Sr;exports.search=Lr;exports.setLocale=eo;exports.setTheme=Br;exports.splitPlacement=Te;exports.tokensCss=Fa;exports.upload=Mr;exports.warning=Pr;exports.wcAvatar=Se;exports.wcBadge=ue;exports.wcBreadcrumb=tt;exports.wcBreadcrumbItem=Ne;exports.wcButton=E;exports.wcButtonGroup=pt;exports.wcCard=D;exports.wcCheckbox=te;exports.wcCol=Me;exports.wcDatePicker=b;exports.wcDialog=q;exports.wcDivider=ye;exports.wcDrawer=P;exports.wcEmpty=or;exports.wcForm=Dt;exports.wcFormItem=f;exports.wcImage=h;exports.wcInput=g;exports.wcInputNumber=v;exports.wcList=ve;exports.wcListItem=cr;exports.wcMessage=de;exports.wcOption=oe;exports.wcPagination=T;exports.wcPopconfirm=j;exports.wcProgress=A;exports.wcRadio=be;exports.wcRow=ne;exports.wcSelect=B;exports.wcSlider=U;exports.wcSpace=se;exports.wcSwitch=re;exports.wcTab=pe;exports.wcTable=z;exports.wcTabs=et;exports.wcTag=Y;exports.wcText=ce;exports.wcTextarea=k;exports.wcTooltip=he;exports.wcUpload=w;exports.zoomIn=jr;exports.zoomOut=Tr;
|
|
5333
|
+
`}};Lr.styles=[d,ha];let b=Lr;E([a.property()],b.prototype,"action");E([a.property()],b.prototype,"name");E([a.property()],b.prototype,"accept");E([a.property({type:Boolean})],b.prototype,"multiple");E([a.property({type:Number})],b.prototype,"max");E([a.property({type:Boolean,reflect:!0})],b.prototype,"draggable");E([a.property({type:Boolean,reflect:!0,attribute:"auto-upload",converter:o=>o==null?!0:o!=="false"})],b.prototype,"autoUpload");E([a.property({type:Boolean,reflect:!0})],b.prototype,"disabled");E([a.property({attribute:!1})],b.prototype,"requestMethod");E([a.state()],b.prototype,"files");E([a.state()],b.prototype,"dragOver");customElements.get("wc-upload")||customElements.define("wc-upload",b);const ua=[i("activity",'<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>'),i("airplay",'<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon>'),i("alert-circle",'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>'),i("alert-octagon",'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>'),i("alert-triangle",'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>'),i("align-center",'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>'),i("align-justify",'<line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line>'),i("align-left",'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>'),i("align-right",'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>'),i("anchor",'<circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path>'),i("aperture",'<circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line>'),i("archive",'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>'),i("arrow-down-circle",'<circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line>'),i("arrow-down-left",'<line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline>'),i("arrow-down-right",'<line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline>'),i("arrow-down",'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>'),i("arrow-left-circle",'<circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line>'),i("arrow-right-circle",'<circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line>'),i("arrow-up-circle",'<circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line>'),i("arrow-up-left",'<line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline>'),i("arrow-up-right",'<line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline>'),i("at-sign",'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>'),i("award",'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>'),i("bar-chart-2",'<line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line>'),i("bar-chart",'<line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line>'),i("battery-charging",'<path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline>'),i("battery",'<rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line>'),i("bell-off",'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>'),i("bell",'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>'),i("bluetooth",'<polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline>'),i("bold",'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>'),i("book-open",'<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>'),i("book",'<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>'),i("bookmark",'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>'),i("box",'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>'),i("briefcase",'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>'),i("camera-off",'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path>'),i("camera",'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>'),i("cast",'<path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line>'),i("check-circle",'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>'),i("check-square",'<polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>'),i("chevrons-down",'<polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline>'),i("chevrons-left",'<polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline>'),i("chevrons-right",'<polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline>'),i("chevrons-up",'<polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline>'),i("chrome",'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line>'),i("circle",'<circle cx="12" cy="12" r="10"></circle>'),i("clipboard",'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>'),i("clock",'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>'),i("cloud-drizzle",'<line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>'),i("cloud-lightning",'<path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline>'),i("cloud-off",'<path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line>'),i("cloud-rain",'<line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>'),i("cloud-snow",'<path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line>'),i("cloud",'<path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path>'),i("code",'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>'),i("codepen",'<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line>'),i("codesandbox",'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>'),i("coffee",'<path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line>'),i("columns",'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>'),i("command",'<path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path>'),i("compass",'<circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>'),i("copy",'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>'),i("corner-down-left",'<polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path>'),i("corner-down-right",'<polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path>'),i("corner-left-down",'<polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path>'),i("corner-left-up",'<polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></path>'),i("corner-right-down",'<polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path>'),i("corner-right-up",'<polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path>'),i("corner-up-left",'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>'),i("corner-up-right",'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>'),i("cpu",'<rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line>'),i("credit-card",'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>'),i("crop",'<path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path>'),i("crosshair",'<circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line>'),i("database",'<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>'),i("delete",'<path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line>'),i("disc",'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle>'),i("divide-circle",'<line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle>'),i("divide-square",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line>'),i("divide",'<circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle>'),i("dollar-sign",'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>'),i("download-cloud",'<polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path>'),i("download",'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>'),i("dribbble",'<circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path>'),i("droplet",'<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path>'),i("edit-2",'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>'),i("edit-3",'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>'),i("edit",'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>'),i("external-link",'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>'),i("eye-off",'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>'),i("eye",'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>'),i("facebook",'<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>'),i("fast-forward",'<polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon>'),i("feather",'<path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line>'),i("figma",'<path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path>'),i("file-minus",'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>'),i("file-plus",'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>'),i("file-text",'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>'),i("film",'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>'),i("filter",'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>'),i("flag",'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>'),i("folder-minus",'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>'),i("folder-plus",'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>'),i("folder",'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>'),i("framer",'<path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path>'),i("frown",'<circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>'),i("gift",'<polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>'),i("git-branch",'<line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path>'),i("git-commit",'<circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line>'),i("git-merge",'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path>'),i("git-pull-request",'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line>'),i("github",'<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>'),i("gitlab",'<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path>'),i("globe",'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>'),i("grid",'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>'),i("hard-drive",'<line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line>'),i("hash",'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>'),i("headphones",'<path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path>'),i("heart",'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>'),i("help-circle",'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>'),i("hexagon",'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>'),i("home",'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>'),i("image",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>'),i("inbox",'<polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path>'),i("instagram",'<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>'),i("italic",'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>'),i("key",'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>'),i("layers",'<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline>'),i("layout",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>'),i("life-buoy",'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line>'),i("link-2",'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>'),i("link",'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>'),i("linkedin",'<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle>'),i("list",'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>'),i("lock",'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>'),i("log-in",'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>'),i("log-out",'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>'),i("mail",'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>'),i("map-pin",'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>'),i("map",'<polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line>'),i("maximize-2",'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>'),i("maximize",'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>'),i("meh",'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>'),i("menu",'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>'),i("message-circle",'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>'),i("message-square",'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>'),i("mic-off",'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>'),i("mic",'<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>'),i("minimize-2",'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>'),i("minimize",'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>'),i("minus-circle",'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line>'),i("minus-square",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line>'),i("monitor",'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line>'),i("moon",'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>'),i("more-horizontal",'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>'),i("more-vertical",'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>'),i("mouse-pointer",'<path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path>'),i("move",'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>'),i("music",'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>'),i("navigation-2",'<polygon points="12 2 19 21 12 17 5 21 12 2"></polygon>'),i("navigation",'<polygon points="3 11 22 2 13 21 11 13 3 11"></polygon>'),i("octagon",'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon>'),i("package",'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>'),i("paperclip",'<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path>'),i("pause-circle",'<circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line>'),i("pause",'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>'),i("pen-tool",'<path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.586 7.586"></path><circle cx="11" cy="11" r="2"></circle>'),i("percent",'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>'),i("phone-call",'<path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("phone-forwarded",'<polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("phone-incoming",'<polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("phone-missed",'<line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("phone-off",'<path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line>'),i("phone-outgoing",'<polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("phone",'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>'),i("pie-chart",'<path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path>'),i("play-circle",'<circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon>'),i("play",'<polygon points="5 3 19 12 5 21 5 3"></polygon>'),i("plus-circle",'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>'),i("plus-square",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>'),i("pocket",'<path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline>'),i("power",'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>'),i("printer",'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>'),i("radio",'<circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path>'),i("refresh-ccw",'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>'),i("refresh-cw",'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>'),i("repeat",'<polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path>'),i("rewind",'<polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon>'),i("rotate-ccw",'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>'),i("rss",'<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>'),i("save",'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>'),i("scissors",'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>'),i("send",'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>'),i("server",'<rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line>'),i("settings",'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>'),i("share-2",'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>'),i("share",'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>'),i("shield-off",'<path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line>'),i("shield",'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>'),i("shopping-bag",'<path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path>'),i("shopping-cart",'<circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>'),i("shuffle",'<polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line>'),i("sidebar",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>'),i("skip-back",'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>'),i("skip-forward",'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>'),i("slack",'<path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>'),i("slash",'<circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>'),i("sliders",'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>'),i("smartphone",'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>'),i("smile",'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>'),i("speaker",'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line>'),i("square",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>'),i("star",'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>'),i("stop-circle",'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>'),i("sun",'<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>'),i("sunrise",'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline>'),i("sunset",'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline>'),i("table",'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path>'),i("tablet",'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>'),i("tag",'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>'),i("target",'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle>'),i("terminal",'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>'),i("thermometer",'<path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path>'),i("thumbs-down",'<path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path>'),i("thumbs-up",'<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>'),i("toggle-left",'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle>'),i("toggle-right",'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle>'),i("tool",'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>'),i("trash-2",'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>'),i("trash",'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>'),i("trello",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect>'),i("trending-down",'<polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline>'),i("trending-up",'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>'),i("triangle",'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>'),i("truck",'<rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle>'),i("tv",'<rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline>'),i("twitch",'<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>'),i("twitter",'<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>'),i("type",'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>'),i("umbrella",'<path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path>'),i("underline",'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>'),i("unlock",'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>'),i("upload-cloud",'<polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline>'),i("user-check",'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>'),i("user-minus",'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>'),i("user-plus",'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>'),i("user-x",'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>'),i("user",'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>'),i("users",'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>'),i("video-off",'<path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line>'),i("video",'<polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>'),i("voicemail",'<circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line>'),i("volume-1",'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>'),i("volume-2",'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>'),i("volume-x",'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>'),i("volume",'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>'),i("watch",'<circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path>'),i("wifi-off",'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>'),i("wifi",'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>'),i("wind",'<path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path>'),i("x-circle",'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>'),i("x-octagon",'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>'),i("x-square",'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line>'),i("x",'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>'),i("youtube",'<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>'),i("zap-off",'<polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line>'),i("zap",'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>')],Sr=i("arrow-left",'<path d="M19 12H5"/><path d="m12 19-7-7 7-7"/>'),Or=i("arrow-right",'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>'),Ir=i("arrow-up",'<path d="M12 19V5"/><path d="m5 12 7-7 7 7"/><path d="M5 4h14"/>'),Tr=i("calendar",'<rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4"/><path d="M8 2v4"/><path d="M3 10h18"/>'),Ar=i("check",'<polyline points="20 6 9 17 4 12"/>'),Pr=i("chevron-down",'<path d="m6 9 6 6 6-6"/>'),Dr=i("chevron-left",'<path d="m15 18-6-6 6-6"/>'),Vr=i("chevron-right",'<path d="m9 18 6-6-6-6"/>'),jr=i("chevron-up",'<path d="m18 15-6-6-6 6"/>'),Br=i("close",'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'),Hr=i("error",'<circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/>'),Nr=i("file",'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/>'),qr=i("image-off",'<path d="m2 2 20 20"/><path d="M10.41 10.17a2 2 0 0 1-2.24 2.24"/><path d="M21 15V5a2 2 0 0 0-2-2H7"/><path d="M3.59 3.59A2 2 0 0 0 3 5v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.41-.59"/><path d="m21 15-5-5L5 21"/>'),_r=i("info",'<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>'),Fr=i("loader",'<path d="M21 12a9 9 0 1 1-6.219-8.56"/>'),Rr=i("minus",'<path d="M5 12h14"/>'),Ur=i("plus",'<path d="M5 12h14"/><path d="M12 5v14"/>'),Yr=i("rotate-cw",'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/>'),Kr=i("search",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),Wr=i("upload",'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>'),Xr=i("warning",'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>'),Gr=i("zoom-in",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M11 8v6"/><path d="M8 11h6"/>'),Jr=i("zoom-out",'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M8 11h6"/>'),pt=[Sr,Or,Ir,Tr,Ar,Pr,Dr,Vr,jr,Br,Hr,Nr,qr,_r,Fr,Rr,Ur,Yr,Kr,Wr,Xr,Gr,Jr],wa=new Set(pt.map(o=>o.name)),Zr=[...pt,...ua.filter(o=>!wa.has(o.name))];function va(){for(const o of Zr)$t(o.name,o.svg)}const Qr="wc-theme-change",tt="wc-theme";let ae="light",ie=null;function ya(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function eo(){return ae==="auto"?ya():ae}function ma(){return ae}function to(o,e){if(o!=="light"&&o!=="dark"&&o!=="auto")throw new Error(`[wc] 无效主题: "${String(o)}",可选 light | dark | auto`);ae=o,typeof localStorage<"u"&&(e?.persist?localStorage.setItem(tt,o):localStorage.removeItem(tt)),ba(),rt()}function ga(){let o=null;typeof localStorage<"u"&&(o=localStorage.getItem(tt)),to(o==="light"||o==="dark"||o==="auto"?o:"auto")}function ba(){const o=ae==="auto"&&typeof window.matchMedia=="function";o&&!ie?(ie=window.matchMedia("(prefers-color-scheme: dark)"),ie.addEventListener("change",rt)):!o&&ie&&(ie.removeEventListener("change",rt),ie=null)}function rt(){const o=eo();typeof document<"u"&&(document.documentElement.dataset.theme=o),document.dispatchEvent(new CustomEvent(Qr,{detail:{theme:ae,effective:o},bubbles:!0,composed:!0}))}const fa=':root{--wc-color-brand-50: #f2f7ff;--wc-color-brand-100: #d9e8ff;--wc-color-brand-200: #b5d0ff;--wc-color-brand-300: #8cb8ff;--wc-color-brand-400: #5f96f7;--wc-color-brand-500: #0052d9;--wc-color-brand-600: #0045c2;--wc-color-brand-700: #00359e;--wc-color-brand-800: #002a7d;--wc-color-success-light: #e3f9e9;--wc-color-success: #2ba471;--wc-color-success-dark: #1f895c;--wc-color-warning-light: #fdf3e6;--wc-color-warning: #e37318;--wc-color-warning-dark: #c25c0a;--wc-color-error-light: #fdecee;--wc-color-error: #d54941;--wc-color-error-dark: #b5362f;--wc-color-info-light: #f2f7ff;--wc-color-info: #0052d9;--wc-color-info-dark: #0045c2;--wc-color-gray-50: #f5f7fa;--wc-color-gray-100: #e7eaee;--wc-color-gray-200: #d5dbe3;--wc-color-gray-300: #c2c9d4;--wc-color-gray-400: #a6b0bf;--wc-color-gray-500: #8a94a6;--wc-color-gray-600: #6b7687;--wc-color-gray-700: #4b5563;--wc-color-gray-800: #2f3540;--wc-color-gray-900: #1b1f27;--wc-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "PingFang SC", "Microsoft YaHei", sans-serif;--wc-font-family-mono: ui-monospace, sfmono-regular, "SF Mono", menlo, consolas, "Liberation Mono", monospace;--wc-font-size-xsmall: 12px;--wc-font-size-small: 13px;--wc-font-size-medium: 14px;--wc-font-size-large: 16px;--wc-font-size-xlarge: 20px;--wc-font-size-h1: 24px;--wc-font-size-h2: 20px;--wc-font-size-h3: 18px;--wc-font-weight-normal: 400;--wc-font-weight-medium: 500;--wc-font-weight-semibold: 600;--wc-font-weight-bold: 700;--wc-line-height-base: 1.5;--wc-line-height-compact: 1.25;--wc-space-1: 4px;--wc-space-2: 8px;--wc-space-3: 12px;--wc-space-4: 16px;--wc-space-5: 20px;--wc-space-6: 24px;--wc-space-8: 32px;--wc-space-10: 40px;--wc-space-12: 48px;--wc-radius-none: 0;--wc-radius-small: 3px;--wc-radius-medium: 4px;--wc-radius-large: 8px;--wc-radius-xlarge: 10px;--wc-radius-round: 999px;--wc-radius-circle: 50%;--wc-shadow-1: 0 1px 2px rgb(15 23 42 / 6%), 0 1px 3px rgb(15 23 42 / 10%);--wc-shadow-2: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 12px -2px rgb(15 23 42 / 12%);--wc-shadow-3: 0 4px 8px -2px rgb(15 23 42 / 8%), 0 12px 32px -4px rgb(15 23 42 / 18%);--wc-duration-fast: .15s;--wc-duration-medium: .3s;--wc-duration-slow: 1s;--wc-easing-standard: cubic-bezier(.4, 0, .2, 1);--wc-easing-emphasized: cubic-bezier(.2, 0, 0, 1);--wc-z-index-dropdown: 1000;--wc-z-index-fab: 1050;--wc-z-index-sticky: 1100;--wc-z-index-modal: 1200;--wc-z-index-drawer: 1300;--wc-z-index-message: 1500;--wc-z-index-tooltip: 1600;--wc-color-primary: var(--wc-color-brand-500);--wc-color-primary-hover: var(--wc-color-brand-600);--wc-color-primary-active: var(--wc-color-brand-700);--wc-color-primary-light: var(--wc-color-brand-50);--wc-color-text-anti: #ffffff;--wc-color-success-bg: var(--wc-color-success-light);--wc-color-warning-bg: var(--wc-color-warning-light);--wc-color-error-bg: var(--wc-color-error-light);--wc-color-info-bg: var(--wc-color-info-light);--wc-color-text: var(--wc-color-gray-900);--wc-color-text-secondary: var(--wc-color-gray-600);--wc-color-text-placeholder: var(--wc-color-gray-400);--wc-color-text-disabled: var(--wc-color-gray-500);--wc-color-border: var(--wc-color-gray-200);--wc-color-border-strong: var(--wc-color-gray-500);--wc-color-bg: var(--wc-color-gray-50);--wc-color-bg-container: #ffffff;--wc-color-bg-container-secondary: var(--wc-color-gray-50);--wc-color-bg-hover: var(--wc-color-gray-100);--wc-color-bg-disabled: var(--wc-color-gray-100);--wc-color-mask: rgb(0 0 0 / 60%);--wc-color-overlay-hover: rgb(0 0 0 / 8%);--wc-color-focus-ring: var(--wc-color-brand-300)}[data-theme=dark]{color-scheme:dark;--wc-color-primary: var(--wc-color-brand-300);--wc-color-primary-hover: var(--wc-color-brand-200);--wc-color-primary-active: var(--wc-color-brand-100);--wc-color-primary-light: var(--wc-color-brand-800);--wc-color-text-anti: #1b1f27;--wc-color-success: #4fce8e;--wc-color-success-bg: #103524;--wc-color-warning: #f5a962;--wc-color-warning-bg: #3c2a15;--wc-color-error: #e76f68;--wc-color-error-bg: #442423;--wc-color-info: var(--wc-color-brand-300);--wc-color-info-bg: var(--wc-color-brand-800);--wc-color-text: var(--wc-color-gray-50);--wc-color-text-secondary: var(--wc-color-gray-400);--wc-color-text-placeholder: var(--wc-color-gray-600);--wc-color-text-disabled: var(--wc-color-gray-500);--wc-color-border: var(--wc-color-gray-700);--wc-color-border-strong: var(--wc-color-gray-500);--wc-color-bg: var(--wc-color-gray-900);--wc-color-bg-container: #242832;--wc-color-bg-container-secondary: #2f3540;--wc-color-bg-hover: var(--wc-color-gray-800);--wc-color-bg-disabled: var(--wc-color-gray-700);--wc-color-mask: rgb(0 0 0 / 70%);--wc-color-overlay-hover: rgb(255 255 255 / 12%);--wc-color-focus-ring: var(--wc-color-brand-200);--wc-shadow-1: 0 1px 2px rgb(0 0 0 / 40%), 0 1px 3px rgb(0 0 0 / 30%);--wc-shadow-2: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 12px -2px rgb(0 0 0 / 45%);--wc-shadow-3: 0 4px 8px -2px rgb(0 0 0 / 40%), 0 12px 32px -4px rgb(0 0 0 / 50%)}',xa="*,*:before,*:after{box-sizing:border-box}*{margin:0}html{-webkit-text-size-adjust:100%;text-size-adjust:100%;tab-size:4}body{font-family:var(--wc-font-family);font-size:var(--wc-font-size-medium);line-height:var(--wc-line-height-base);color:var(--wc-color-text);background-color:var(--wc-color-bg-container);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}h1,h2,h3,h4,h5,h6{font-weight:var(--wc-font-weight-semibold);line-height:var(--wc-line-height-compact)}h1{font-size:var(--wc-font-size-h1)}h2{font-size:var(--wc-font-size-h2)}h3{font-size:var(--wc-font-size-h3)}h4{font-size:var(--wc-font-size-large)}h5,h6{font-size:var(--wc-font-size-medium)}ul,ol{padding:0;list-style:none}a{color:var(--wc-color-primary);text-decoration:none;transition:color var(--wc-duration-fast) var(--wc-easing-standard)}a:hover{color:var(--wc-color-primary-hover)}a:active{color:var(--wc-color-primary-active)}a[disabled]{color:var(--wc-color-text-disabled);cursor:not-allowed}img,svg,video,canvas,audio,iframe,embed,object{display:block;max-width:100%}img{border-style:none}button,input,select,textarea{font:inherit;color:inherit;letter-spacing:inherit}button{background:none;border:none;padding:0;cursor:pointer}button:disabled{cursor:not-allowed}input,select,textarea{background-color:transparent;border:none}input::placeholder,textarea::placeholder{color:var(--wc-color-text-placeholder)}textarea{resize:vertical}code,kbd,samp,pre{font-family:var(--wc-font-family-mono);font-size:var(--wc-font-size-small)}table{border-collapse:collapse;border-spacing:0}th{font-weight:var(--wc-font-weight-medium);text-align:inherit}fieldset{border:none;padding:0}hr{border:none;border-top:1px solid var(--wc-color-border)}blockquote,figure,dd,dl{margin:0}:focus-visible{outline:2px solid var(--wc-color-focus-ring);outline-offset:2px}:focus:not(:focus-visible){outline:none}::selection{background:var(--wc-color-primary-light);color:var(--wc-color-text)}";exports.ARROW_INSET=Ie;exports.FormAssociatedMixin=M;exports.LANGUAGE_CHANGE_EVENT=Te;exports.LocalizeController=u;exports.POSITION_GAP=m;exports.THEME_CHANGE_EVENT=Qr;exports.WcIcon=I;exports.arrowLeft=Sr;exports.arrowRight=Or;exports.arrowUp=Ir;exports.baseStyles=d;exports.builtinIcons=pt;exports.builtinIconsWithFeather=Zr;exports.calendar=Tr;exports.check=Ar;exports.chevronDown=Pr;exports.chevronLeft=Dr;exports.chevronRight=Vr;exports.chevronUp=jr;exports.close=Br;exports.computePosition=_e;exports.createIcon=i;exports.error=Hr;exports.file=Nr;exports.getEffectiveTheme=eo;exports.getIcon=lo;exports.getIconLibrary=co;exports.getLocale=It;exports.getRegisteredLocales=fo;exports.getTerm=Tt;exports.getTheme=ma;exports.imageOff=qr;exports.info=_r;exports.initTheme=ga;exports.loader=Fr;exports.message=mi;exports.minus=Rr;exports.onIconRegister=kt;exports.plus=Ur;exports.registerBuiltinIcons=va;exports.registerIcon=$t;exports.registerIconLibrary=Ct;exports.registerLocale=go;exports.resetCss=xa;exports.resolveIcon=Et;exports.resolveLocale=at;exports.rotateCw=Yr;exports.search=Kr;exports.setLocale=bo;exports.setTheme=to;exports.splitPlacement=qe;exports.tokensCss=fa;exports.upload=Wr;exports.warning=Xr;exports.wcAvatar=Ve;exports.wcBadge=be;exports.wcBreadcrumb=ht;exports.wcBreadcrumbItem=Ye;exports.wcButton=g;exports.wcButtonGroup=Ot;exports.wcCard=H;exports.wcCheckbox=se;exports.wcCol=Be;exports.wcDatePicker=z;exports.wcDialog=F;exports.wcDivider=Ee;exports.wcDrawer=D;exports.wcDropdown=Se;exports.wcDropdownItem=Z;exports.wcEmpty=fr;exports.wcFloatButton=v;exports.wcFloatButtonGroup=me;exports.wcForm=Yt;exports.wcFormItem=$;exports.wcImage=p;exports.wcInput=k;exports.wcInputNumber=f;exports.wcList=xe;exports.wcListItem=Cr;exports.wcMessage=ve;exports.wcOption=le;exports.wcPagination=B;exports.wcPopconfirm=V;exports.wcProgress=R;exports.wcRadio=$e;exports.wcRow=pe;exports.wcSelect=_;exports.wcSlider=W;exports.wcSpace=de;exports.wcSplitButton=C;exports.wcSwitch=ne;exports.wcTab=ge;exports.wcTable=O;exports.wcTabs=dt;exports.wcTag=X;exports.wcText=ue;exports.wcTextarea=L;exports.wcTooltip=ye;exports.wcUpload=b;exports.zoomIn=Gr;exports.zoomOut=Jr;
|
|
4740
5334
|
//# sourceMappingURL=index.cjs.js.map
|