lyco 1.3.8 → 1.4.0
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/core-BoB7sDMv.js.map +1 -1
- package/dist/core-bQvrG1od.mjs.map +1 -1
- package/dist/index.cjs.js +247 -247
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +247 -247
- package/dist/index.es.js.map +1 -1
- package/dist/types/components/mod.d.ts +8 -7
- package/dist/types/core/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -228,7 +228,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
228
228
|
<div style="flex: 0 0 ${r}; overflow: auto;">${s}</div>
|
229
229
|
<div style="flex: 1 1 auto; overflow: auto;">${c}</div>
|
230
230
|
</div>
|
231
|
-
`}function ee(e={},a){if(a===void 0)return t=>ee(e,t??[u``]);let o=r(`Swiper`),{gap:s=`8px`,snapType:c=`mandatory`,height:l=`auto`,width:d=`100%`,className:f=i(`Swiper::swiper`)+`-lyco-now-${o}`,direction:p=`x`,scrollBehavior:h=`smooth`,align:g=`start`,showNavigation:_=!0,navigationPosition:v=`inside`,showPagination:y=!0,paginationType:b=`dots`,autoPlay:x=!1,interval:S=3e3,loop:C=!1,touchEnabled:w=!0,mouseWheel:T=!1,onSlideChange:E,on:D}=e,O=f,k=O+`-container`,A=O+`-slide`,j=O+`-navigation`,M=O+`-pagination`,N;N=a?typeof a==`function`?a():a:[];let P=N.length,[F,I]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,P-1));e.value!==n&&(e.value=n,E?.(n))}]})(),L=e=>{let t=typeof document<`u`?document.querySelector(`.${k}`):null;if(!t)return;let n=t.querySelectorAll(`.${A}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;p===`x`?(o=r.offsetLeft-t.offsetLeft,g===`center`?o-=(a.width-i.width)/2:g===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:h})):(o=r.offsetTop-t.offsetTop,g===`center`?o-=(a.height-i.height)/2:g===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:h})),I(e)},R=()=>{let e=F()+1>=P?C?0:F():F()+1;L(e)},z=()=>{let e=F()-1<0?C?P-1:F():F()-1;L(e)},
|
231
|
+
`}function ee(e={},a){if(a===void 0)return t=>ee(e,t??[u``]);let o=r(`Swiper`),{gap:s=`8px`,snapType:c=`mandatory`,height:l=`auto`,width:d=`100%`,className:f=i(`Swiper::swiper`)+`-lyco-now-${o}`,direction:p=`x`,scrollBehavior:h=`smooth`,align:g=`start`,showNavigation:_=!0,navigationPosition:v=`inside`,showPagination:y=!0,paginationType:b=`dots`,autoPlay:x=!1,interval:S=3e3,loop:C=!1,touchEnabled:w=!0,mouseWheel:T=!1,onSlideChange:E,on:D}=e,O=f,k=O+`-container`,A=O+`-slide`,j=O+`-navigation`,M=O+`-pagination`,N;N=a?typeof a==`function`?a():a:[];let P=N.length,[F,I]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,P-1));e.value!==n&&(e.value=n,E?.(n))}]})(),L=e=>{let t=typeof document<`u`?document.querySelector(`.${k}`):null;if(!t)return;let n=t.querySelectorAll(`.${A}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;p===`x`?(o=r.offsetLeft-t.offsetLeft,g===`center`?o-=(a.width-i.width)/2:g===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:h})):(o=r.offsetTop-t.offsetTop,g===`center`?o-=(a.height-i.height)/2:g===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:h})),I(e)},R=()=>{let e=F()+1>=P?C?0:F():F()+1;L(e)},z=()=>{let e=F()-1<0?C?P-1:F():F()-1;L(e)},te=()=>{let e=typeof document<`u`?document.querySelector(`.${k}`):null;if(!e)return;let t=e.querySelectorAll(`.${A}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(p===`x`){let e=a.left+a.width/2-(o.left+o.width/2);s=Math.abs(e)}else{let e=a.top+a.height/2-(o.top+o.height/2);s=Math.abs(e)}s<r&&(r=s,n=i)}),I(n)},B=e=>{if(!w)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},V=e=>{if(!w)return;let t=e.touches[0],n=e.currentTarget,r=parseFloat(n.dataset.touchStartX||`0`),i=parseFloat(n.dataset.touchStartY||`0`),a=t.clientX-r,o=t.clientY-i;(Math.abs(a)>Math.abs(o)||p===`x`)&&e.preventDefault()},H=e=>{if(!w)return;let t=e.currentTarget,n=parseFloat(t.dataset.touchStartX||`0`),r=parseFloat(t.dataset.touchStartY||`0`);if(!n&&!r)return;let i=e.changedTouches[0],a=i.clientX-n,o=i.clientY-r,s=Math.max(Math.abs(a),Math.abs(o))>30;s&&(p===`x`?a>0?z():R():o>0?z():R()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},U=e=>{T&&(e.preventDefault(),e.deltaY>0?R():z())},ne=e=>{if(!x||!e)return;let t,n=()=>{t=setInterval(R,S)},r=()=>{clearInterval(t)};return e.addEventListener(`mouseenter`,r),e.addEventListener(`mouseleave`,n),n(),()=>{clearInterval(t),e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mouseleave`,n)}},W=()=>{let e=typeof document<`u`?document.querySelector(`.${k}`):null;if(!e)return;let t=[];e.addEventListener(`scroll`,te),t.push(()=>e.removeEventListener(`scroll`,te)),w&&(e.addEventListener(`touchstart`,B),e.addEventListener(`touchmove`,V,{passive:!1}),e.addEventListener(`touchend`,H),t.push(()=>e.removeEventListener(`touchstart`,B)),t.push(()=>e.removeEventListener(`touchmove`,V)),t.push(()=>e.removeEventListener(`touchend`,H))),T&&(e.addEventListener(`wheel`,U,{passive:!1}),t.push(()=>e.removeEventListener(`wheel`,U)));let n=ne(e);return n&&t.push(n),L(0),()=>t.forEach(e=>e())};typeof window<`u`&&typeof document<`u`&&setTimeout(W,0);let G=u`
|
232
232
|
<div class="${M}">
|
233
233
|
${Array.from({length:P},(e,t)=>u`
|
234
234
|
<button
|
@@ -237,25 +237,25 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
237
237
|
></button>
|
238
238
|
`)}
|
239
239
|
</div>
|
240
|
-
`,
|
240
|
+
`,K=u`
|
241
241
|
<div class="${M} fraction">
|
242
242
|
<span class="current">${F()+1}</span>
|
243
243
|
<span class="separator">/</span>
|
244
244
|
<span class="total">${P}</span>
|
245
245
|
</div>
|
246
|
-
`,
|
246
|
+
`,q=u`
|
247
247
|
<div class="${M} progressbar">
|
248
248
|
<div
|
249
249
|
class="progress"
|
250
250
|
style="width: ${P>1?F()/(P-1)*100:0}%"
|
251
251
|
></div>
|
252
252
|
</div>
|
253
|
-
`,
|
253
|
+
`,re=u`
|
254
254
|
<div class="${j}">
|
255
255
|
<button class="prev" @click=${z}>◀</button>
|
256
256
|
<button class="next" @click=${R}>▶</button>
|
257
257
|
</div>
|
258
|
-
`,
|
258
|
+
`,J=`
|
259
259
|
.${O} {
|
260
260
|
position: relative;
|
261
261
|
overflow: hidden;
|
@@ -360,13 +360,13 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
360
360
|
background-color: white;
|
361
361
|
transition: width 0.3s;
|
362
362
|
}
|
363
|
-
`,
|
363
|
+
`,Y=n(D??{});return t(`Swiper`,u`
|
364
364
|
<style>
|
365
|
-
${
|
365
|
+
${J}
|
366
366
|
</style>
|
367
367
|
|
368
368
|
<div
|
369
|
-
${m(e=>{e?
|
369
|
+
${m(e=>{e?Y.bind(e):Y.unbindAll()})}
|
370
370
|
class="${O}"
|
371
371
|
>
|
372
372
|
<div class="${k}">
|
@@ -377,12 +377,12 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
377
377
|
`)}
|
378
378
|
</div>
|
379
379
|
|
380
|
-
${_?
|
381
|
-
${y&&b===`dots`?
|
382
|
-
${y&&b===`fraction`?
|
383
|
-
${y&&b===`progressbar`?
|
380
|
+
${_?re:null}
|
381
|
+
${y&&b===`dots`?G:null}
|
382
|
+
${y&&b===`fraction`?K:null}
|
383
|
+
${y&&b===`progressbar`?q:null}
|
384
384
|
</div>
|
385
|
-
`)}const z={borderRadius:{small:`4px`,medium:`8px`,large:`16px`,full:`9999px`},elevation:{level1:`0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)`,level2:`0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12)`,level3:`0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10)`,level4:`0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05)`,level5:`0 20px 40px rgba(0,0,0,0.2)`},animation:{standard:`0.2s cubic-bezier(0.4, 0, 0.2, 1)`,emphasized:`0.3s cubic-bezier(0.4, 0, 0.2, 1)`,decelerated:`0.4s cubic-bezier(0, 0, 0.2, 1)`},colors:{primary:`#6750A4`,onPrimary:`#FFFFFF`,primaryContainer:`#EADDFF`,onPrimaryContainer:`#21005E`,secondary:`#625B71`,onSecondary:`#FFFFFF`,secondaryContainer:`#E8DEF8`,onSecondaryContainer:`#1E192B`,surface:`#FEF7FF`,onSurface:`#1C1B1F`,surfaceVariant:`#E7E0EB`,onSurfaceVariant:`#49454E`,error:`#B00020`}};function
|
385
|
+
`)}const z={borderRadius:{small:`4px`,medium:`8px`,large:`16px`,full:`9999px`},elevation:{level1:`0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)`,level2:`0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12)`,level3:`0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10)`,level4:`0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05)`,level5:`0 20px 40px rgba(0,0,0,0.2)`},animation:{standard:`0.2s cubic-bezier(0.4, 0, 0.2, 1)`,emphasized:`0.3s cubic-bezier(0.4, 0, 0.2, 1)`,decelerated:`0.4s cubic-bezier(0, 0, 0.2, 1)`},colors:{primary:`#6750A4`,onPrimary:`#FFFFFF`,primaryContainer:`#EADDFF`,onPrimaryContainer:`#21005E`,secondary:`#625B71`,onSecondary:`#FFFFFF`,secondaryContainer:`#E8DEF8`,onSecondaryContainer:`#1E192B`,surface:`#FEF7FF`,onSurface:`#1C1B1F`,surfaceVariant:`#E7E0EB`,onSurfaceVariant:`#49454E`,error:`#B00020`}};function te(e){let{checked:a=!1,disabled:o=!1,size:s=`medium`,color:c=z.colors.primary,onChange:l,className:d=``,on:f={}}=e??{},p=r(`SwitchInput`),h=i(`SwitchInput::switch`)+`-lyco-now-${p}`,g={small:{width:32,height:16,thumbSize:12},medium:{width:44,height:24,thumbSize:18},large:{width:56,height:32,thumbSize:24}},{width:_,height:v,thumbSize:y}=g[s],b=`
|
386
386
|
.${h} {
|
387
387
|
display: inline-block;
|
388
388
|
position: relative;
|
@@ -456,7 +456,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
456
456
|
/>
|
457
457
|
<span class="slider"></span>
|
458
458
|
</label>
|
459
|
-
`)}function
|
459
|
+
`)}function B(e,t){let r=e?.top?`top: ${e.top};`:``,i=e?.right?`right: ${e.right};`:``,o=e?.bottom?`bottom: ${e.bottom};`:``,s=e?.left?`left: ${e.left};`:``,l=e?.width?`width: ${e.width};`:``,d=e?.height?`height: ${e.height};`:``,f=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,p=e?.style?e.style:``,h=e?.className?e.className:``,g=n(e?.on??{}),_=e=>u`
|
460
460
|
<div
|
461
461
|
${m(e=>{e?g.bind(e):g.unbindAll()})}
|
462
462
|
class="${h}"
|
@@ -470,7 +470,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
470
470
|
>
|
471
471
|
${a(e)}
|
472
472
|
</div>
|
473
|
-
`;return c(t,_)}function
|
473
|
+
`;return c(t,_)}function V(e,t){let r=e?.width??`300px`,i=e?.height??`auto`,a=e?.top??`20%`,o=e?.bottom??`auto`,c=e?.left??`50%`,l=e?.right??`auto`,d=c===`auto`?``:`transform: translateX(-50%);`,f=e?.background??`rgba(255, 255, 255, 0.3)`,p=e?.blur??`10px`,h=e?.borderRadius??`12px`,g=e?.padding??`16px`,_=e?.zIndex??1e3,v=n(e?.on??{}),y=e=>u`
|
474
474
|
<div
|
475
475
|
${m(e=>{e?v.bind(e):v.unbindAll()})}
|
476
476
|
style="
|
@@ -535,7 +535,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
535
535
|
>
|
536
536
|
${a(o)}
|
537
537
|
</div>
|
538
|
-
`)}function
|
538
|
+
`)}function ne(e,t){if(t===void 0)return t=>ne(e,t??[u``]);let r=e?.size??`32px`,i=e?.overlap??`-8px`,a=n(e?.on??{}),s=(e,t)=>u`
|
539
539
|
<div
|
540
540
|
style="
|
541
541
|
width: ${r};
|
@@ -556,7 +556,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
556
556
|
>
|
557
557
|
${o(t,s)}
|
558
558
|
</div>
|
559
|
-
`}function
|
559
|
+
`}function W(e,t){if(t===void 0){let t=t=>W(e,t??u``);return t.html=(t,...n)=>W(e,u(t,...n)),t}let r=e?.position??`top-right`,i=e?.size??`16px`,o=e?.background??`red`,s=e?.color??`#fff`,[c,l,d,f]=[r.includes(`top`)?`0`:`auto`,r.includes(`right`)?`0`:`auto`,r.includes(`bottom`)?`0`:`auto`,r.includes(`left`)?`0`:`auto`],p=n(e?.on??{});return u`
|
560
560
|
<div style="position: relative; display: inline-block;">
|
561
561
|
${a(t)}
|
562
562
|
<div
|
@@ -582,13 +582,13 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
582
582
|
${e?.content??``}
|
583
583
|
</div>
|
584
584
|
</div>
|
585
|
-
`}function
|
585
|
+
`}function G(e,t){if(!t)return t=>G(e,t??p());let r=n(e?.on??{}),i=e=>{e?(r.bind(e),typeof t==`function`?t(e):t={value:e}):r.unbindAll()};return u`
|
586
586
|
<canvas
|
587
587
|
${m(i)}
|
588
588
|
.class=${e?.className}
|
589
589
|
style=${e?.style??``}
|
590
590
|
></canvas>
|
591
|
-
`}function
|
591
|
+
`}function K(e,t){if(t===void 0)return t=>K(e,t??[u``]);let r=e?.padding??`16px`,i=e?.borderRadius??`8px`,a=e?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,s=e?.background??`#fff`,c=n(e?.on??{});return u`
|
592
592
|
<div
|
593
593
|
${m(e=>{e?c.bind(e):c.unbindAll()})}
|
594
594
|
style="
|
@@ -601,7 +601,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
601
601
|
>
|
602
602
|
${o(t)}
|
603
603
|
</div>
|
604
|
-
`}function
|
604
|
+
`}function q(e,t){if(t===void 0){let t=t=>q(e,t??u``);return t.html=(t,...n)=>q(e,u(t,...n)),t}let r=e?.width?`width: ${e.width};`:``,i=e?.height?`height: ${e.height};`:``,o=e?.background?`background: ${e.background};`:``,s=n(e?.on??{});return u`
|
605
605
|
<div
|
606
606
|
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
607
607
|
style="
|
@@ -613,7 +613,97 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
613
613
|
>
|
614
614
|
${a(t)}
|
615
615
|
</div>
|
616
|
-
`}function
|
616
|
+
`}function re(e){let{value:a=``,options:o=[],placeholder:s=``,disabled:c=!1,error:l=!1,className:d=``,style:f=``,maxHeight:p=`300px`,onChange:h,onInput:g,onFocus:_,onBlur:v,on:y={},optionRender:b}=e??{},x=r(`Combobox`),S=i(`Combobox::combobox`)+`-lyco-now-${x}`,C=!1,w=null,T=`
|
617
|
+
.${S} {
|
618
|
+
position: relative;
|
619
|
+
width: 100%;
|
620
|
+
}
|
621
|
+
|
622
|
+
.${S} input {
|
623
|
+
width: 100%;
|
624
|
+
padding: 12px 16px;
|
625
|
+
font-size: 16px;
|
626
|
+
border: 1px solid ${l?z.colors.error:z.colors.surfaceVariant};
|
627
|
+
border-radius: ${z.borderRadius.small};
|
628
|
+
color: ${z.colors.onSurface};
|
629
|
+
transition: all ${z.animation.standard};
|
630
|
+
outline: none;
|
631
|
+
box-sizing: border-box;
|
632
|
+
}
|
633
|
+
|
634
|
+
.${S} input:focus {
|
635
|
+
border-color: ${z.colors.primary};
|
636
|
+
box-shadow: 0 0 0 2px ${z.colors.primaryContainer};
|
637
|
+
}
|
638
|
+
|
639
|
+
.${S} input:disabled {
|
640
|
+
background: ${z.colors.surfaceVariant};
|
641
|
+
color: ${z.colors.onSurfaceVariant};
|
642
|
+
cursor: not-allowed;
|
643
|
+
}
|
644
|
+
|
645
|
+
.${S} .options {
|
646
|
+
position: absolute;
|
647
|
+
top: 100%;
|
648
|
+
left: 0;
|
649
|
+
right: 0;
|
650
|
+
max-height: ${p};
|
651
|
+
overflow-y: auto;
|
652
|
+
border: 1px solid ${z.colors.surfaceVariant};
|
653
|
+
border-radius: ${z.borderRadius.small};
|
654
|
+
box-shadow: ${z.elevation.level2};
|
655
|
+
z-index: 1000;
|
656
|
+
display: none;
|
657
|
+
}
|
658
|
+
|
659
|
+
.${S} .options.open {
|
660
|
+
display: block;
|
661
|
+
}
|
662
|
+
|
663
|
+
.${S} .option {
|
664
|
+
padding: 12px 16px;
|
665
|
+
cursor: pointer;
|
666
|
+
transition: background ${z.animation.standard};
|
667
|
+
}
|
668
|
+
|
669
|
+
.${S} .option:hover {
|
670
|
+
background: ${z.colors.primaryContainer};
|
671
|
+
}
|
672
|
+
|
673
|
+
.${S} .option.selected {
|
674
|
+
background: ${z.colors.primaryContainer};
|
675
|
+
color: ${z.colors.onPrimaryContainer};
|
676
|
+
}
|
677
|
+
`,E=n(y),D=null,O=()=>{C?D?.classList.remove(`open`):D?.classList.add(`open`),C=!C},k=(e,t)=>{if(w){w.value=e.value;let n=t.currentTarget;Array.from(D?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),h?.(e.value)}O()},A=e=>{let t=e.target;t.closest(`.${S}`)||(C=!1,D?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,A),t(`Combobox`,u`
|
678
|
+
<style>
|
679
|
+
${T}
|
680
|
+
</style>
|
681
|
+
<div class="${S} ${d}" style="${f}">
|
682
|
+
<input
|
683
|
+
${m(e=>{e?(w=e,E.bind(e)):E.unbindAll()})}
|
684
|
+
type="text"
|
685
|
+
.value=${a}
|
686
|
+
placeholder=${s}
|
687
|
+
?disabled=${c}
|
688
|
+
@focus=${()=>{_?.(),O()}}
|
689
|
+
@input=${e=>{let t=e.target;g?.(t.value)}}
|
690
|
+
@change=${e=>{let t=e.target;h?.(t.value)}}
|
691
|
+
/>
|
692
|
+
<div
|
693
|
+
${m(e=>{e&&(D=e)})}
|
694
|
+
class="options"
|
695
|
+
>
|
696
|
+
${o.map(e=>u`
|
697
|
+
<div
|
698
|
+
class="option ${e.value===(w?.value??a)?`selected`:``}"
|
699
|
+
@click=${t=>k(e,t)}
|
700
|
+
>
|
701
|
+
${b?b(e):e.label}
|
702
|
+
</div>
|
703
|
+
`)}
|
704
|
+
</div>
|
705
|
+
</div>
|
706
|
+
`)}function J(e,t){if(t===void 0)return t=>J(e,t??[u``]);let r=e?.maxWidth??`1024px`,i=e?.padding??`0 16px`,a=e?.background?`background: ${e.background};`:``,s=e?.fullHeight?`height: 100%;`:``,c=n(e?.on??{});return u`
|
617
707
|
<div
|
618
708
|
${m(e=>{e?c.bind(e):c.unbindAll()})}
|
619
709
|
style="
|
@@ -629,7 +719,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
629
719
|
>
|
630
720
|
${o(t)}
|
631
721
|
</div>
|
632
|
-
`}function
|
722
|
+
`}function Y(e){let t=e?.orientation??`horizontal`,r=e?.thickness??`1px`,i=e?.color??`#e0e0e0`,a=e?.margin??(t===`horizontal`?`8px 0`:`0 8px`),o=n(e?.on??{}),s=t===`horizontal`?`width: 100%; height: ${r}; background: ${i}; margin: ${a};`:`width: ${r}; height: 100%; background: ${i}; margin: ${a};`;return u`<div
|
633
723
|
${m(e=>{e?o.bind(e):o.unbindAll()})}
|
634
724
|
style="${s}"
|
635
725
|
></div>`}function X(e,t){if(t===void 0){let t=t=>X(e,t??u``);return t.html=(t,...n)=>X(e,u(t,...n)),t}let r=e?.columns??4,i=e?.gap??`24px`,o=e?.background??`#f8f8f8`,s=e?.padding??`40px 16px`,c=n(e?.on??{});return u`
|
@@ -655,7 +745,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
655
745
|
© ${new Date().getFullYear()} Your Company. All rights reserved.
|
656
746
|
</div>
|
657
747
|
</div>
|
658
|
-
`}function
|
748
|
+
`}function ie(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function Z(e,o){if(o===void 0){let t=t=>Z(e,t??u``);return t.html=(t,...n)=>Z(e,u(t,...n)),t}let s=e.defaultColumns??1,c=e.gap??`16px`,l=r(`GridBreakpoint`),d=e.className??i(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+l,f=Object.entries(e.breakpoints).map(([e,t])=>`@media`+e+`{
|
659
749
|
`+d+`{ grid-template-columns: repeat(`+t+`, 1fr); }
|
660
750
|
}`).join(`
|
661
751
|
`),p=`
|
@@ -674,7 +764,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
674
764
|
>
|
675
765
|
${a(o)}
|
676
766
|
</div>
|
677
|
-
`)}function
|
767
|
+
`)}function ae(e,t){if(t===void 0)return t=>ae(e,t??[u``]);let r=e?.backgroundImage?`background-image: url('${e.backgroundImage}');`:``,i=e?.height??`400px`,a=e?.overlayColor??`rgba(0, 0, 0, 0.3)`,s=n(e?.on??{});return u`
|
678
768
|
<div
|
679
769
|
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
680
770
|
style="
|
@@ -727,7 +817,19 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
727
817
|
>
|
728
818
|
${a(o)}
|
729
819
|
</div>
|
730
|
-
`)}function
|
820
|
+
`)}function oe(t,n,r=.1,i={}){let a=Array(t.length).fill(!1),o=`${r*100}vh`,s=`100vw`,c=t.map((t,r)=>u`
|
821
|
+
<div
|
822
|
+
${m(o=>{if(o&&!a[r]){let s=new IntersectionObserver((o,s)=>{o.forEach(o=>{if(o.isIntersecting&&!a[r]){let c=o.target;a[r]=!0,f(n(t,r),c),e.applyAnimation(c,i);let l=c.querySelector(`[data-fallback]`);l&&l.remove(),s.unobserve(c)}})},{root:null,rootMargin:`0px`});s.observe(o)}})}
|
823
|
+
data-index="${r}"
|
824
|
+
style="transition: transform ${i.duration||`1s`} ease;"
|
825
|
+
>
|
826
|
+
<!-- 占位元素 -->
|
827
|
+
<div
|
828
|
+
data-fallback
|
829
|
+
style="height: ${o}; width: ${s};"
|
830
|
+
></div>
|
831
|
+
</div>
|
832
|
+
`);return c}function se(e){return u` <li>${o(e)}</li> `}function ce(e,n){let a=e?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,s=e?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,c=e?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,l=r(`List`),d=e?.className??i(`List::list`)+`-lyco-now-${l}`,f=`
|
731
833
|
ul.${d} {
|
732
834
|
list-style: none;
|
733
835
|
margin: 0;
|
@@ -750,7 +852,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
750
852
|
<ul class="${d}">
|
751
853
|
${o(e)}
|
752
854
|
</ul>
|
753
|
-
`);return n===void 0?p:p(n)}function
|
855
|
+
`);return n===void 0?p:p(n)}function le(e,a){let c=e?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,l=e?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,d=e?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,f=r(`ListGroup`),p=e?.className??i(`ListGroup::list-group`)+`-lyco-now-`+f,h=(e,t,n,r)=>n?u` <li>${e}</li> `:e,g=`
|
754
856
|
ul.${p} {
|
755
857
|
list-style: none;
|
756
858
|
margin: 0;
|
@@ -776,7 +878,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
776
878
|
>
|
777
879
|
${o(e,h)}
|
778
880
|
</ul>
|
779
|
-
`);return s(a,v)}function
|
881
|
+
`);return s(a,v)}function ue(e,t){if(t===void 0)return t=>ue(e,t??[u``]);let r=e?.background??`rgba(0, 0, 0, 0.5)`,i=e?.zIndex??1e3,a=e?.fullScreen!==!1,s=n(e?.on??{});return u`
|
780
882
|
<div
|
781
883
|
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
782
884
|
style="
|
@@ -791,7 +893,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
791
893
|
>
|
792
894
|
${o(t)}
|
793
895
|
</div>
|
794
|
-
`}function
|
896
|
+
`}function de(e,t){if(t===void 0){let t=t=>de(e,t??u``);return t.html=(t,...n)=>de(e,u(t,...n)),t}let r=e?.width?`width: ${e.width};`:``,i=e?.height?`height: ${e.height};`:``,o=e?.background?`background: ${e.background};`:``,s=n(e?.on??{});return u`
|
795
897
|
<div
|
796
898
|
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
797
899
|
style="
|
@@ -802,221 +904,7 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
802
904
|
>
|
803
905
|
${a(t)}
|
804
906
|
</div>
|
805
|
-
`}function
|
806
|
-
${m(e=>{e?i.bind(e):i.unbindAll()})}
|
807
|
-
style="${t} ${r}"
|
808
|
-
></div>`}function de(e){let{type:a=`rect`,width:o=`100%`,height:s=`16px`,borderRadius:c=`4px`,animation:l=!0,animationType:d=`shimmer`,bgColor:f=`#eee`,highlightColor:p=`#ddd`,count:h=1,spacing:g=`8px`,direction:_=`vertical`,delay:v=0,autoHide:y=!1,duration:b=2e3,on:x={}}=e??{},S=r(`SkeletonLoader`),C=i(`SkeletonLoader::skeleton`)+`-lyco-now-`+S,w=n(x),T=a===`circle`?`border-radius:50%;width:${o};height:${o}`:`border-radius:${c};width:${o};height:${s}`,E=``,D=``;l&&(d===`shimmer`?(E=`@keyframes ${C}-shimmer { 0% { background-color: ${f}; } 50% { background-color: ${p}; } 100% { background-color: ${f}; } }`,D=`animation:${C}-shimmer 1.2s infinite ease-in-out;`):(E=`@keyframes ${C}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,D=`animation:${C}-pulse 1.2s infinite ease-in-out;`));let O=_===`horizontal`?`display:flex;flex-direction:row;gap:${g}`:`display:flex;flex-direction:column;gap:${g}`,k=[];for(let e=0;e<h;e++)k.push(u`
|
809
|
-
<div
|
810
|
-
class="${C}"
|
811
|
-
style="${T};background-color:${f};${D};opacity:0;transition:opacity 0.3s"
|
812
|
-
${m(e=>{e&&w.bind(e)})}
|
813
|
-
></div>
|
814
|
-
`);function A(e){let t=Array.from(e.querySelectorAll(`.${C}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),y&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},b)},v)}return t(`SkeletonLoader`,u`
|
815
|
-
<style>
|
816
|
-
${E}
|
817
|
-
</style>
|
818
|
-
<div
|
819
|
-
style="${O}"
|
820
|
-
${m(e=>e&&A(e))}
|
821
|
-
>
|
822
|
-
${k}
|
823
|
-
</div>
|
824
|
-
`)}function fe(e){let t=n(e?.on??{});return u`<div
|
825
|
-
${m(e=>{e?t.bind(e):t.unbindAll()})}
|
826
|
-
style="flex: 1 1 auto;"
|
827
|
-
></div>`}function pe(e,t){if(t===void 0){let t=t=>pe(e,t??u``);return t.html=(t,...n)=>pe(e,u(t,...n)),t}let r=e?.top?`top: ${e.top};`:``,i=e?.bottom?`bottom: ${e.bottom};`:``,o=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,s=n(e?.on??{});return u`
|
828
|
-
<div
|
829
|
-
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
830
|
-
style="
|
831
|
-
position: sticky;
|
832
|
-
${r} ${i}
|
833
|
-
${o}
|
834
|
-
"
|
835
|
-
>
|
836
|
-
${a(t)}
|
837
|
-
</div>
|
838
|
-
`}function me(e,o){if(o===void 0){let t=t=>me(e,t??u``);return t.html=(t,...n)=>me(e,u(t,...n)),t}let s=r(`Table`),c=e?.className??i(`Table::table`)+`-lyco-now-${s}`,l=e?.striped?`
|
839
|
-
.${c} tr:nth-child(even) {
|
840
|
-
background: ${z.colors.surface};
|
841
|
-
}
|
842
|
-
`:``,d=e?.hover?`
|
843
|
-
.${c} tr:hover {
|
844
|
-
background: ${z.colors.primaryContainer};
|
845
|
-
cursor: pointer;
|
846
|
-
}
|
847
|
-
`:``,f=e?.bordered?`
|
848
|
-
.${c}, .${c} th, .${c} td {
|
849
|
-
border: 1px solid ${z.colors.surfaceVariant};
|
850
|
-
}
|
851
|
-
`:``,p=`
|
852
|
-
.${c} table {
|
853
|
-
width: 100%;
|
854
|
-
border-collapse: separate;
|
855
|
-
border-spacing: 0;
|
856
|
-
border-radius: ${z.borderRadius.medium};
|
857
|
-
overflow: hidden;
|
858
|
-
box-shadow: ${z.elevation.level1};
|
859
|
-
}
|
860
|
-
.${c} th,
|
861
|
-
.${c} td {
|
862
|
-
padding: 16px;
|
863
|
-
text-align: left;
|
864
|
-
transition: background ${z.animation.standard};
|
865
|
-
}
|
866
|
-
.${c} th {
|
867
|
-
background: ${z.colors.surfaceVariant};
|
868
|
-
color: ${z.colors.onSurfaceVariant};
|
869
|
-
font-weight: 500;
|
870
|
-
}
|
871
|
-
.${c} td {
|
872
|
-
border-bottom: 1px solid ${z.colors.surfaceVariant};
|
873
|
-
}
|
874
|
-
${l}
|
875
|
-
${d}
|
876
|
-
${f}
|
877
|
-
`,h=n(e?.on??{});return t(`Table`,u`
|
878
|
-
<style>
|
879
|
-
${p}
|
880
|
-
</style>
|
881
|
-
|
882
|
-
<div
|
883
|
-
${m(e=>{e?h.bind(e):h.unbindAll()})}
|
884
|
-
class="${c}"
|
885
|
-
>
|
886
|
-
<table>
|
887
|
-
${a(o)}
|
888
|
-
</table>
|
889
|
-
</div>
|
890
|
-
`)}function he(e,t){let r=e?.direction??`row`,i=n(e?.on??{});return t===void 0?t=>he(e,t??u``):u`
|
891
|
-
<div
|
892
|
-
${m(e=>{e?i.bind(e):i.unbindAll()})}
|
893
|
-
style="
|
894
|
-
display: flex;
|
895
|
-
flex-direction: ${r};
|
896
|
-
flex-wrap: wrap;
|
897
|
-
${e?.gap?`gap: ${e.gap};`:``}
|
898
|
-
${e?.align?`align-items: ${e.align};`:``}
|
899
|
-
${e?.justify?`justify-content: ${e.justify};`:``}
|
900
|
-
"
|
901
|
-
>
|
902
|
-
${o(t)}
|
903
|
-
</div>
|
904
|
-
`}function ge(e,t){let r=e?.width?`width: ${e.width};`:``,i=e?.height?`height: ${e.height};`:``,a=e?.background?`background: ${e.background};`:``,s=n(e?.on??{});if(t===void 0)return t=>ge(e,t??[u``]);let c=`flex-start`,l=`flex-start`;switch(e?.align){case`top-right`:c=`flex-end`,l=`flex-start`;break;case`center`:c=`center`,l=`center`;break;case`bottom-left`:c=`flex-start`,l=`flex-end`;break;case`bottom-right`:c=`flex-end`,l=`flex-end`;break;default:c=`flex-start`,l=`flex-start`}return u`
|
905
|
-
<div
|
906
|
-
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
907
|
-
style="
|
908
|
-
position: relative;
|
909
|
-
display: flex;
|
910
|
-
justify-content: ${c};
|
911
|
-
align-items: ${l};
|
912
|
-
${r} ${i} ${a}
|
913
|
-
"
|
914
|
-
>
|
915
|
-
${o(t)}
|
916
|
-
</div>
|
917
|
-
`}function _e(t,n,r=.1,i={}){let a=Array(t.length).fill(!1),o=`${r*100}vh`,s=`100vw`,c=t.map((t,r)=>u`
|
918
|
-
<div
|
919
|
-
${m(o=>{if(o&&!a[r]){let s=new IntersectionObserver((o,s)=>{o.forEach(o=>{if(o.isIntersecting&&!a[r]){let c=o.target;a[r]=!0,f(n(t,r),c),e.applyAnimation(c,i);let l=c.querySelector(`[data-fallback]`);l&&l.remove(),s.unobserve(c)}})},{root:null,rootMargin:`0px`});s.observe(o)}})}
|
920
|
-
data-index="${r}"
|
921
|
-
style="transition: transform ${i.duration||`1s`} ease;"
|
922
|
-
>
|
923
|
-
<!-- 占位元素 -->
|
924
|
-
<div
|
925
|
-
data-fallback
|
926
|
-
style="height: ${o}; width: ${s};"
|
927
|
-
></div>
|
928
|
-
</div>
|
929
|
-
`);return c}function ve(e){let{value:a=``,options:o=[],placeholder:s=``,disabled:c=!1,error:l=!1,className:d=``,style:f=``,maxHeight:p=`300px`,onChange:h,onInput:g,onFocus:_,onBlur:v,on:y={},optionRender:b}=e??{},x=r(`Combobox`),S=i(`Combobox::combobox`)+`-lyco-now-${x}`,C=!1,w=null,T=`
|
930
|
-
.${S} {
|
931
|
-
position: relative;
|
932
|
-
width: 100%;
|
933
|
-
}
|
934
|
-
|
935
|
-
.${S} input {
|
936
|
-
width: 100%;
|
937
|
-
padding: 12px 16px;
|
938
|
-
font-size: 16px;
|
939
|
-
border: 1px solid ${l?z.colors.error:z.colors.surfaceVariant};
|
940
|
-
border-radius: ${z.borderRadius.small};
|
941
|
-
color: ${z.colors.onSurface};
|
942
|
-
transition: all ${z.animation.standard};
|
943
|
-
outline: none;
|
944
|
-
box-sizing: border-box;
|
945
|
-
}
|
946
|
-
|
947
|
-
.${S} input:focus {
|
948
|
-
border-color: ${z.colors.primary};
|
949
|
-
box-shadow: 0 0 0 2px ${z.colors.primaryContainer};
|
950
|
-
}
|
951
|
-
|
952
|
-
.${S} input:disabled {
|
953
|
-
background: ${z.colors.surfaceVariant};
|
954
|
-
color: ${z.colors.onSurfaceVariant};
|
955
|
-
cursor: not-allowed;
|
956
|
-
}
|
957
|
-
|
958
|
-
.${S} .options {
|
959
|
-
position: absolute;
|
960
|
-
top: 100%;
|
961
|
-
left: 0;
|
962
|
-
right: 0;
|
963
|
-
max-height: ${p};
|
964
|
-
overflow-y: auto;
|
965
|
-
border: 1px solid ${z.colors.surfaceVariant};
|
966
|
-
border-radius: ${z.borderRadius.small};
|
967
|
-
box-shadow: ${z.elevation.level2};
|
968
|
-
z-index: 1000;
|
969
|
-
display: none;
|
970
|
-
}
|
971
|
-
|
972
|
-
.${S} .options.open {
|
973
|
-
display: block;
|
974
|
-
}
|
975
|
-
|
976
|
-
.${S} .option {
|
977
|
-
padding: 12px 16px;
|
978
|
-
cursor: pointer;
|
979
|
-
transition: background ${z.animation.standard};
|
980
|
-
}
|
981
|
-
|
982
|
-
.${S} .option:hover {
|
983
|
-
background: ${z.colors.primaryContainer};
|
984
|
-
}
|
985
|
-
|
986
|
-
.${S} .option.selected {
|
987
|
-
background: ${z.colors.primaryContainer};
|
988
|
-
color: ${z.colors.onPrimaryContainer};
|
989
|
-
}
|
990
|
-
`,E=n(y),D=null,O=()=>{C?D?.classList.remove(`open`):D?.classList.add(`open`),C=!C},k=(e,t)=>{if(w){w.value=e.value;let n=t.currentTarget;Array.from(D?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),h?.(e.value)}O()},A=e=>{let t=e.target;t.closest(`.${S}`)||(C=!1,D?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,A),t(`Combobox`,u`
|
991
|
-
<style>
|
992
|
-
${T}
|
993
|
-
</style>
|
994
|
-
<div class="${S} ${d}" style="${f}">
|
995
|
-
<input
|
996
|
-
${m(e=>{e?(w=e,E.bind(e)):E.unbindAll()})}
|
997
|
-
type="text"
|
998
|
-
.value=${a}
|
999
|
-
placeholder=${s}
|
1000
|
-
?disabled=${c}
|
1001
|
-
@focus=${()=>{_?.(),O()}}
|
1002
|
-
@input=${e=>{let t=e.target;g?.(t.value)}}
|
1003
|
-
@change=${e=>{let t=e.target;h?.(t.value)}}
|
1004
|
-
/>
|
1005
|
-
<div
|
1006
|
-
${m(e=>{e&&(D=e)})}
|
1007
|
-
class="options"
|
1008
|
-
>
|
1009
|
-
${o.map(e=>u`
|
1010
|
-
<div
|
1011
|
-
class="option ${e.value===(w?.value??a)?`selected`:``}"
|
1012
|
-
@click=${t=>k(e,t)}
|
1013
|
-
>
|
1014
|
-
${b?b(e):e.label}
|
1015
|
-
</div>
|
1016
|
-
`)}
|
1017
|
-
</div>
|
1018
|
-
</div>
|
1019
|
-
`)}function ye(e){let t=Math.min(100,Math.max(0,e?.value??0)),r=Math.min(100,Math.max(0,e?.bufferValue??0)),i=e?.color??`#1976d2`,a=e?.secondaryColor??`#90caf9`,o=e?.backgroundColor??`#e0e0e0`,s=e?.height??`4px`,c=e?.radius??`4px`,d=e?.showLabel??!1,f=e?.labelPosition??`inside`,p=e?.labelColor??(t>50?`white`:i),h=e?.labelFontSize??`12px`,g=e?.striped??!1,_=e?.animated??!1,v=e?.paused??!1,y=e?.transitionDuration??`0.3s`,b=e?.className??``,x=e?.style??``,S=n(e?.on??{}),C=g?`background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
|
907
|
+
`}function fe(e){let t=Math.min(100,Math.max(0,e?.value??0)),r=Math.min(100,Math.max(0,e?.bufferValue??0)),i=e?.color??`#1976d2`,a=e?.secondaryColor??`#90caf9`,o=e?.backgroundColor??`#e0e0e0`,s=e?.height??`4px`,c=e?.radius??`4px`,d=e?.showLabel??!1,f=e?.labelPosition??`inside`,p=e?.labelColor??(t>50?`white`:i),h=e?.labelFontSize??`12px`,g=e?.striped??!1,_=e?.animated??!1,v=e?.paused??!1,y=e?.transitionDuration??`0.3s`,b=e?.className??``,x=e?.style??``,S=n(e?.on??{}),C=g?`background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
|
1020
908
|
background-size: 1rem 1rem;
|
1021
909
|
animation: progress-stripes 1s linear infinite;
|
1022
910
|
animation-play-state: ${v?`paused`:`running`};`:``;return u`
|
@@ -1092,7 +980,29 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
1092
980
|
`:``}
|
1093
981
|
${e?.suffixIcon}
|
1094
982
|
</div>
|
1095
|
-
`}function
|
983
|
+
`}function pe(e){let t=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``,i=n(e?.on??{});return u`<div
|
984
|
+
${m(e=>{e?i.bind(e):i.unbindAll()})}
|
985
|
+
style="${t} ${r}"
|
986
|
+
></div>`}function me(e){let{type:a=`rect`,width:o=`100%`,height:s=`16px`,borderRadius:c=`4px`,animation:l=!0,animationType:d=`shimmer`,bgColor:f=`#eee`,highlightColor:p=`#ddd`,count:h=1,spacing:g=`8px`,direction:_=`vertical`,delay:v=0,autoHide:y=!1,duration:b=2e3,on:x={}}=e??{},S=r(`SkeletonLoader`),C=i(`SkeletonLoader::skeleton`)+`-lyco-now-`+S,w=n(x),T=a===`circle`?`border-radius:50%;width:${o};height:${o}`:`border-radius:${c};width:${o};height:${s}`,E=``,D=``;l&&(d===`shimmer`?(E=`@keyframes ${C}-shimmer { 0% { background-color: ${f}; } 50% { background-color: ${p}; } 100% { background-color: ${f}; } }`,D=`animation:${C}-shimmer 1.2s infinite ease-in-out;`):(E=`@keyframes ${C}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,D=`animation:${C}-pulse 1.2s infinite ease-in-out;`));let O=_===`horizontal`?`display:flex;flex-direction:row;gap:${g}`:`display:flex;flex-direction:column;gap:${g}`,k=[];for(let e=0;e<h;e++)k.push(u`
|
987
|
+
<div
|
988
|
+
class="${C}"
|
989
|
+
style="${T};background-color:${f};${D};opacity:0;transition:opacity 0.3s"
|
990
|
+
${m(e=>{e&&w.bind(e)})}
|
991
|
+
></div>
|
992
|
+
`);function A(e){let t=Array.from(e.querySelectorAll(`.${C}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),y&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},b)},v)}return t(`SkeletonLoader`,u`
|
993
|
+
<style>
|
994
|
+
${E}
|
995
|
+
</style>
|
996
|
+
<div
|
997
|
+
style="${O}"
|
998
|
+
${m(e=>e&&A(e))}
|
999
|
+
>
|
1000
|
+
${k}
|
1001
|
+
</div>
|
1002
|
+
`)}function he(e){let t=n(e?.on??{});return u`<div
|
1003
|
+
${m(e=>{e?t.bind(e):t.unbindAll()})}
|
1004
|
+
style="flex: 1 1 auto;"
|
1005
|
+
></div>`}function ge(e){let{size:i=`24px`,color:a=z.colors.primary,thickness:o=`2px`,speed:s=`1.2s`,className:c=``,opacity:d=1,startAngle:f=0,easing:p=`linear`,reverse:h=!1,style:g=``,on:_={},children:v,svgMode:y=!1,strokeLinecap:b=`butt`,strokeDasharray:x=``}=e??{},S=n(_),C=r(`Spinner`),w=u`
|
1096
1006
|
<div
|
1097
1007
|
class="${c}"
|
1098
1008
|
style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${g}"
|
@@ -1163,7 +1073,70 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
1163
1073
|
}
|
1164
1074
|
`.cssText}
|
1165
1075
|
</style>
|
1166
|
-
`;return t(`Spinner`,y?T:w)}
|
1076
|
+
`;return t(`Spinner`,y?T:w)}function _e(e,t){if(t===void 0){let t=t=>_e(e,t??u``);return t.html=(t,...n)=>_e(e,u(t,...n)),t}let r=e?.top?`top: ${e.top};`:``,i=e?.bottom?`bottom: ${e.bottom};`:``,o=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,s=n(e?.on??{});return u`
|
1077
|
+
<div
|
1078
|
+
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
1079
|
+
style="
|
1080
|
+
position: sticky;
|
1081
|
+
${r} ${i}
|
1082
|
+
${o}
|
1083
|
+
"
|
1084
|
+
>
|
1085
|
+
${a(t)}
|
1086
|
+
</div>
|
1087
|
+
`}function ve(e,o){if(o===void 0){let t=t=>ve(e,t??u``);return t.html=(t,...n)=>ve(e,u(t,...n)),t}let s=r(`Table`),c=e?.className??i(`Table::table`)+`-lyco-now-${s}`,l=e?.striped?`
|
1088
|
+
.${c} tr:nth-child(even) {
|
1089
|
+
background: ${z.colors.surface};
|
1090
|
+
}
|
1091
|
+
`:``,d=e?.hover?`
|
1092
|
+
.${c} tr:hover {
|
1093
|
+
background: ${z.colors.primaryContainer};
|
1094
|
+
cursor: pointer;
|
1095
|
+
}
|
1096
|
+
`:``,f=e?.bordered?`
|
1097
|
+
.${c}, .${c} th, .${c} td {
|
1098
|
+
border: 1px solid ${z.colors.surfaceVariant};
|
1099
|
+
}
|
1100
|
+
`:``,p=`
|
1101
|
+
.${c} table {
|
1102
|
+
width: 100%;
|
1103
|
+
border-collapse: separate;
|
1104
|
+
border-spacing: 0;
|
1105
|
+
border-radius: ${z.borderRadius.medium};
|
1106
|
+
overflow: hidden;
|
1107
|
+
box-shadow: ${z.elevation.level1};
|
1108
|
+
}
|
1109
|
+
.${c} th,
|
1110
|
+
.${c} td {
|
1111
|
+
padding: 16px;
|
1112
|
+
text-align: left;
|
1113
|
+
transition: background ${z.animation.standard};
|
1114
|
+
}
|
1115
|
+
.${c} th {
|
1116
|
+
background: ${z.colors.surfaceVariant};
|
1117
|
+
color: ${z.colors.onSurfaceVariant};
|
1118
|
+
font-weight: 500;
|
1119
|
+
}
|
1120
|
+
.${c} td {
|
1121
|
+
border-bottom: 1px solid ${z.colors.surfaceVariant};
|
1122
|
+
}
|
1123
|
+
${l}
|
1124
|
+
${d}
|
1125
|
+
${f}
|
1126
|
+
`,h=n(e?.on??{});return t(`Table`,u`
|
1127
|
+
<style>
|
1128
|
+
${p}
|
1129
|
+
</style>
|
1130
|
+
|
1131
|
+
<div
|
1132
|
+
${m(e=>{e?h.bind(e):h.unbindAll()})}
|
1133
|
+
class="${c}"
|
1134
|
+
>
|
1135
|
+
<table>
|
1136
|
+
${a(o)}
|
1137
|
+
</table>
|
1138
|
+
</div>
|
1139
|
+
`)}let $=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function ye(e,t){let{content:r,placement:i=$.Top,delay:o={show:200,hide:100},offset:s=8,hideOnClick:l=!1,interactive:d=!1,maxWidth:f=`200px`,theme:p=`dark`,className:h=``,style:g=``,zIndex:_=1e3,on:v={},onShow:y,onHide:b}=e,x=n(v),S,C;function w(e){clearTimeout(C),S=window.setTimeout(()=>{E.style.visibility=`visible`,E.style.opacity=`1`,y?.()},o.show)}function T(){clearTimeout(S),C=window.setTimeout(()=>{E.style.visibility=`hidden`,E.style.opacity=`0`,b?.()},o.hide)}let E,D=e=>u`
|
1167
1140
|
<div
|
1168
1141
|
${m(e=>{e?(x.bind(e),E=e.querySelector(`.lyco-tooltip-content`),e.addEventListener(`mouseenter`,()=>w(e)),e.addEventListener(`mouseleave`,()=>T()),l&&e.addEventListener(`click`,()=>T())):x.unbindAll()})}
|
1169
1142
|
class="lyco-tooltip lyco-tooltip--${p} ${h}"
|
@@ -1197,7 +1170,34 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
1197
1170
|
${r}
|
1198
1171
|
</div>
|
1199
1172
|
</div>
|
1200
|
-
`;return c(t,D)}
|
1173
|
+
`;return c(t,D)}function be(e,t){let r=e?.direction??`row`,i=n(e?.on??{});return t===void 0?t=>be(e,t??u``):u`
|
1174
|
+
<div
|
1175
|
+
${m(e=>{e?i.bind(e):i.unbindAll()})}
|
1176
|
+
style="
|
1177
|
+
display: flex;
|
1178
|
+
flex-direction: ${r};
|
1179
|
+
flex-wrap: wrap;
|
1180
|
+
${e?.gap?`gap: ${e.gap};`:``}
|
1181
|
+
${e?.align?`align-items: ${e.align};`:``}
|
1182
|
+
${e?.justify?`justify-content: ${e.justify};`:``}
|
1183
|
+
"
|
1184
|
+
>
|
1185
|
+
${o(t)}
|
1186
|
+
</div>
|
1187
|
+
`}function xe(e,t){let r=e?.width?`width: ${e.width};`:``,i=e?.height?`height: ${e.height};`:``,a=e?.background?`background: ${e.background};`:``,s=n(e?.on??{});if(t===void 0)return t=>xe(e,t??[u``]);let c=`flex-start`,l=`flex-start`;switch(e?.align){case`top-right`:c=`flex-end`,l=`flex-start`;break;case`center`:c=`center`,l=`center`;break;case`bottom-left`:c=`flex-start`,l=`flex-end`;break;case`bottom-right`:c=`flex-end`,l=`flex-end`;break;default:c=`flex-start`,l=`flex-start`}return u`
|
1188
|
+
<div
|
1189
|
+
${m(e=>{e?s.bind(e):s.unbindAll()})}
|
1190
|
+
style="
|
1191
|
+
position: relative;
|
1192
|
+
display: flex;
|
1193
|
+
justify-content: ${c};
|
1194
|
+
align-items: ${l};
|
1195
|
+
${r} ${i} ${a}
|
1196
|
+
"
|
1197
|
+
>
|
1198
|
+
${o(t)}
|
1199
|
+
</div>
|
1200
|
+
`}let Se=function(e){return e.Center=`center`,e.Left=`left`,e.Right=`right`,e.Top=`top`,e.Bottom=`bottom`,e.TopStart=`top-start`,e.TopEnd=`top-end`,e.BottomStart=`bottom-start`,e.BottomEnd=`bottom-end`,e.LeftStart=`left-start`,e.LeftEnd=`left-end`,e.RightStart=`right-start`,e.RightEnd=`right-end`,e}({});const Ce=typeof window>`u`,we=!Ce&&`HTMLDialogElement`in window,Te=e=>`
|
1201
1201
|
position: fixed;
|
1202
1202
|
top: 0;
|
1203
1203
|
left: 0;
|
@@ -1323,5 +1323,5 @@ import{AnimationAPI as e,LycoComponent as t,createEventBinder as n,getComponentC
|
|
1323
1323
|
>
|
1324
1324
|
${a(e)}
|
1325
1325
|
</div>
|
1326
|
-
`;return c(t,l)}function Me(e){return o(e)}export{Me as $Html,
|
1326
|
+
`;return c(t,l)}function Me(e){return o(e)}function Ne(e,n){let i=`__LYCO_ONCE_`+r(`$Once`);if(e[i])return e[i];{let r=t(`$Once`,n());return e[i]=r,e[i]}}export{Me as $Html,Ne as $Once,B as AbsoluteBox,V as AcrylicBar,H as AspectRatio,U as AutoFitGrid,ne as AvatarStack,W as Badge,G as Canvas,K as Card,q as Center,E as Column,F as ColumnSplit,re as Combobox,J as Container,De as Dialog,Oe as DialogActions,ke as DialogButton,Ae as DialogContent,Se as DialogPlacement,je as DialogTitle,Y as Divider,D as Flex,O as FlowItem,X as FooterLayout,ie as ForEach,k as Grid,Z as GridBreakpoint,A as GridCol,j as GridItem,M as GridRow,ae as HeroSection,Q as Hidden,oe as LazyForEach,T as LightboxContainer,ce as List,le as ListGroup,se as ListItem,ue as Overlay,de as PositionContainer,fe as Progress,N as Row,I as RowSplit,L as ScrollBar,R as SideBarContainer,pe as SizedBox,me as SkeletonLoader,he as Spacer,ge as Spinner,_e as Sticky,ee as Swiper,te as SwitchInput,ve as Table,w as Virtualizer,b as VirtualizerController,P as WaterFlow,ye as WithTooltip,be as Wrap,xe as ZStack};
|
1327
1327
|
//# sourceMappingURL=index.es.js.map
|