lyco 1.3.8 → 1.3.9

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 CHANGED
@@ -243,19 +243,19 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
243
243
  <span class="separator">/</span>
244
244
  <span class="total">${M}</span>
245
245
  </div>
246
- `,ee=t.html`
246
+ `,q=t.html`
247
247
  <div class="${A} progressbar">
248
248
  <div
249
249
  class="progress"
250
250
  style="width: ${M>1?N()/(M-1)*100:0}%"
251
251
  ></div>
252
252
  </div>
253
- `,q=t.html`
253
+ `,J=t.html`
254
254
  <div class="${k}">
255
255
  <button class="prev" @click=${L}>◀</button>
256
256
  <button class="next" @click=${I}>▶</button>
257
257
  </div>
258
- `,J=`
258
+ `,ee=`
259
259
  .${T} {
260
260
  position: relative;
261
261
  overflow: hidden;
@@ -362,7 +362,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
362
362
  }
363
363
  `,Y=e.createEventBinder(w??{});return e.LycoComponent(`Swiper`,t.html`
364
364
  <style>
365
- ${J}
365
+ ${ee}
366
366
  </style>
367
367
 
368
368
  <div
@@ -377,10 +377,10 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
377
377
  `)}
378
378
  </div>
379
379
 
380
- ${m?q:null}
380
+ ${m?J:null}
381
381
  ${g&&_===`dots`?G:null}
382
382
  ${g&&_===`fraction`?K:null}
383
- ${g&&_===`progressbar`?ee:null}
383
+ ${g&&_===`progressbar`?q:null}
384
384
  </div>
385
385
  `)}const O={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 k(r){let{checked:i=!1,disabled:a=!1,size:o=`medium`,color:s=O.colors.primary,onChange:c,className:l=``,on:u={}}=r??{},d=e.getComponentCount(`SwitchInput`),f=e.getRandomClassName(`SwitchInput::switch`)+`-lyco-now-${d}`,p={small:{width:32,height:16,thumbSize:12},medium:{width:44,height:24,thumbSize:18},large:{width:56,height:32,thumbSize:24}},{width:m,height:h,thumbSize:g}=p[o],_=`
386
386
  .${f} {
@@ -588,7 +588,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
588
588
  .class=${r?.className}
589
589
  style=${r?.style??``}
590
590
  ></canvas>
591
- `}function L(r,i){if(i===void 0)return e=>L(r,e??[t.html``]);let a=r?.padding??`16px`,o=r?.borderRadius??`8px`,s=r?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,c=r?.background??`#fff`,l=e.createEventBinder(r?.on??{});return t.html`
591
+ `}function L(e,t){return e.$__LYCO_INIT_CANVAS__$||=t(),e.$__LYCO_INIT_CANVAS__$}function R(r,i){if(i===void 0)return e=>R(r,e??[t.html``]);let a=r?.padding??`16px`,o=r?.borderRadius??`8px`,s=r?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,c=r?.background??`#fff`,l=e.createEventBinder(r?.on??{});return t.html`
592
592
  <div
593
593
  ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
594
594
  style="
@@ -601,7 +601,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
601
601
  >
602
602
  ${e.renderFnOrArray(i)}
603
603
  </div>
604
- `}function R(r,i){if(i===void 0){let e=e=>R(r,e??t.html``);return e.html=(e,...n)=>R(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
604
+ `}function z(r,i){if(i===void 0){let e=e=>z(r,e??t.html``);return e.html=(e,...n)=>z(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
605
605
  <div
606
606
  ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
607
607
  style="
@@ -613,7 +613,97 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
613
613
  >
614
614
  ${e.renderFn(i)}
615
615
  </div>
616
- `}function z(r,i){if(i===void 0)return e=>z(r,e??[t.html``]);let a=r?.maxWidth??`1024px`,o=r?.padding??`0 16px`,s=r?.background?`background: ${r.background};`:``,c=r?.fullHeight?`height: 100%;`:``,l=e.createEventBinder(r?.on??{});return t.html`
616
+ `}function B(r){let{value:i=``,options:a=[],placeholder:o=``,disabled:s=!1,error:c=!1,className:l=``,style:u=``,maxHeight:d=`300px`,onChange:f,onInput:p,onFocus:m,onBlur:h,on:g={},optionRender:_}=r??{},v=e.getComponentCount(`Combobox`),y=e.getRandomClassName(`Combobox::combobox`)+`-lyco-now-${v}`,b=!1,x=null,S=`
617
+ .${y} {
618
+ position: relative;
619
+ width: 100%;
620
+ }
621
+
622
+ .${y} input {
623
+ width: 100%;
624
+ padding: 12px 16px;
625
+ font-size: 16px;
626
+ border: 1px solid ${c?O.colors.error:O.colors.surfaceVariant};
627
+ border-radius: ${O.borderRadius.small};
628
+ color: ${O.colors.onSurface};
629
+ transition: all ${O.animation.standard};
630
+ outline: none;
631
+ box-sizing: border-box;
632
+ }
633
+
634
+ .${y} input:focus {
635
+ border-color: ${O.colors.primary};
636
+ box-shadow: 0 0 0 2px ${O.colors.primaryContainer};
637
+ }
638
+
639
+ .${y} input:disabled {
640
+ background: ${O.colors.surfaceVariant};
641
+ color: ${O.colors.onSurfaceVariant};
642
+ cursor: not-allowed;
643
+ }
644
+
645
+ .${y} .options {
646
+ position: absolute;
647
+ top: 100%;
648
+ left: 0;
649
+ right: 0;
650
+ max-height: ${d};
651
+ overflow-y: auto;
652
+ border: 1px solid ${O.colors.surfaceVariant};
653
+ border-radius: ${O.borderRadius.small};
654
+ box-shadow: ${O.elevation.level2};
655
+ z-index: 1000;
656
+ display: none;
657
+ }
658
+
659
+ .${y} .options.open {
660
+ display: block;
661
+ }
662
+
663
+ .${y} .option {
664
+ padding: 12px 16px;
665
+ cursor: pointer;
666
+ transition: background ${O.animation.standard};
667
+ }
668
+
669
+ .${y} .option:hover {
670
+ background: ${O.colors.primaryContainer};
671
+ }
672
+
673
+ .${y} .option.selected {
674
+ background: ${O.colors.primaryContainer};
675
+ color: ${O.colors.onPrimaryContainer};
676
+ }
677
+ `,C=e.createEventBinder(g),w=null,T=()=>{b?w?.classList.remove(`open`):w?.classList.add(`open`),b=!b},E=(e,t)=>{if(x){x.value=e.value;let n=t.currentTarget;Array.from(w?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),f?.(e.value)}T()},D=e=>{let t=e.target;t.closest(`.${y}`)||(b=!1,w?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,D),e.LycoComponent(`Combobox`,t.html`
678
+ <style>
679
+ ${S}
680
+ </style>
681
+ <div class="${y} ${l}" style="${u}">
682
+ <input
683
+ ${(0,n.ref)(e=>{e?(x=e,C.bind(e)):C.unbindAll()})}
684
+ type="text"
685
+ .value=${i}
686
+ placeholder=${o}
687
+ ?disabled=${s}
688
+ @focus=${()=>{m?.(),T()}}
689
+ @input=${e=>{let t=e.target;p?.(t.value)}}
690
+ @change=${e=>{let t=e.target;f?.(t.value)}}
691
+ />
692
+ <div
693
+ ${(0,n.ref)(e=>{e&&(w=e)})}
694
+ class="options"
695
+ >
696
+ ${a.map(e=>t.html`
697
+ <div
698
+ class="option ${e.value===(x?.value??i)?`selected`:``}"
699
+ @click=${t=>E(e,t)}
700
+ >
701
+ ${_?_(e):e.label}
702
+ </div>
703
+ `)}
704
+ </div>
705
+ </div>
706
+ `)}function V(r,i){if(i===void 0)return e=>V(r,e??[t.html``]);let a=r?.maxWidth??`1024px`,o=r?.padding??`0 16px`,s=r?.background?`background: ${r.background};`:``,c=r?.fullHeight?`height: 100%;`:``,l=e.createEventBinder(r?.on??{});return t.html`
617
707
  <div
618
708
  ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
619
709
  style="
@@ -629,10 +719,10 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
629
719
  >
630
720
  ${e.renderFnOrArray(i)}
631
721
  </div>
632
- `}function B(r){let i=r?.orientation??`horizontal`,a=r?.thickness??`1px`,o=r?.color??`#e0e0e0`,s=r?.margin??(i===`horizontal`?`8px 0`:`0 8px`),c=e.createEventBinder(r?.on??{}),l=i===`horizontal`?`width: 100%; height: ${a}; background: ${o}; margin: ${s};`:`width: ${a}; height: 100%; background: ${o}; margin: ${s};`;return t.html`<div
722
+ `}function H(r){let i=r?.orientation??`horizontal`,a=r?.thickness??`1px`,o=r?.color??`#e0e0e0`,s=r?.margin??(i===`horizontal`?`8px 0`:`0 8px`),c=e.createEventBinder(r?.on??{}),l=i===`horizontal`?`width: 100%; height: ${a}; background: ${o}; margin: ${s};`:`width: ${a}; height: 100%; background: ${o}; margin: ${s};`;return t.html`<div
633
723
  ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
634
724
  style="${l}"
635
- ></div>`}function V(r,i){if(i===void 0){let e=e=>V(r,e??t.html``);return e.html=(e,...n)=>V(r,(0,t.html)(e,...n)),e}let a=r?.columns??4,o=r?.gap??`24px`,s=r?.background??`#f8f8f8`,c=r?.padding??`40px 16px`,l=e.createEventBinder(r?.on??{});return t.html`
725
+ ></div>`}function U(r,i){if(i===void 0){let e=e=>U(r,e??t.html``);return e.html=(e,...n)=>U(r,(0,t.html)(e,...n)),e}let a=r?.columns??4,o=r?.gap??`24px`,s=r?.background??`#f8f8f8`,c=r?.padding??`40px 16px`,l=e.createEventBinder(r?.on??{});return t.html`
636
726
  <div
637
727
  ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
638
728
  style="
@@ -655,7 +745,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
655
745
  © ${new Date().getFullYear()} Your Company. All rights reserved.
656
746
  </div>
657
747
  </div>
658
- `}function H(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function U(r,i){if(i===void 0){let e=e=>U(r,e??t.html``);return e.html=(e,...n)=>U(r,(0,t.html)(e,...n)),e}let a=r.defaultColumns??1,o=r.gap??`16px`,s=e.getComponentCount(`GridBreakpoint`),c=r.className??e.getRandomClassName(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+s,l=Object.entries(r.breakpoints).map(([e,t])=>`@media`+e+`{
748
+ `}function W(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function G(r,i){if(i===void 0){let e=e=>G(r,e??t.html``);return e.html=(e,...n)=>G(r,(0,t.html)(e,...n)),e}let a=r.defaultColumns??1,o=r.gap??`16px`,s=e.getComponentCount(`GridBreakpoint`),c=r.className??e.getRandomClassName(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+s,l=Object.entries(r.breakpoints).map(([e,t])=>`@media`+e+`{
659
749
  `+c+`{ grid-template-columns: repeat(`+t+`, 1fr); }
660
750
  }`).join(`
661
751
  `),u=`
@@ -674,7 +764,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
674
764
  >
675
765
  ${e.renderFn(i)}
676
766
  </div>
677
- `)}function W(r,i){if(i===void 0)return e=>W(r,e??[t.html``]);let a=r?.backgroundImage?`background-image: url('${r.backgroundImage}');`:``,o=r?.height??`400px`,s=r?.overlayColor??`rgba(0, 0, 0, 0.3)`,c=e.createEventBinder(r?.on??{});return t.html`
767
+ `)}function K(r,i){if(i===void 0)return e=>K(r,e??[t.html``]);let a=r?.backgroundImage?`background-image: url('${r.backgroundImage}');`:``,o=r?.height??`400px`,s=r?.overlayColor??`rgba(0, 0, 0, 0.3)`,c=e.createEventBinder(r?.on??{});return t.html`
678
768
  <div
679
769
  ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
680
770
  style="
@@ -712,7 +802,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
712
802
  ${e.renderFnOrArray(i)}
713
803
  </div>
714
804
  </div>
715
- `}function G(r,i){if(i===void 0){let e=e=>G(r,e??t.html``);return e.html=(e,...n)=>G(r,(0,t.html)(e,...n)),e}let a=r?.breakpoint??`(max-width: 600px)`,o=r?.mode??`hide`,s=e.getComponentCount(`Hidden`),c=r?.className??e.getRandomClassName(`Hidden::hidden-container`)+`-lyco-now-`+s,l=o===`hide`?`@media ${a} { .${c} { display: none !important; } }`:`@media ${a} { .${c} { display: block !important; } }
805
+ `}function q(r,i){if(i===void 0){let e=e=>q(r,e??t.html``);return e.html=(e,...n)=>q(r,(0,t.html)(e,...n)),e}let a=r?.breakpoint??`(max-width: 600px)`,o=r?.mode??`hide`,s=e.getComponentCount(`Hidden`),c=r?.className??e.getRandomClassName(`Hidden::hidden-container`)+`-lyco-now-`+s,l=o===`hide`?`@media ${a} { .${c} { display: none !important; } }`:`@media ${a} { .${c} { display: block !important; } }
716
806
  @media not ${a} { .${c} { display: none !important; } }`,u=`
717
807
  .${c} {
718
808
  display: block;
@@ -727,7 +817,19 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
727
817
  >
728
818
  ${e.renderFn(i)}
729
819
  </div>
730
- `)}function K(n){return t.html` <li>${e.renderFnOrArray(n)}</li> `}function ee(n,r){let i=n?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,a=n?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,o=n?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,s=e.getComponentCount(`List`),c=n?.className??e.getRandomClassName(`List::list`)+`-lyco-now-${s}`,l=`
820
+ `)}function J(r,i,a=.1,o={}){let s=Array(r.length).fill(!1),c=`${a*100}vh`,l=`100vw`,u=r.map((r,a)=>t.html`
821
+ <div
822
+ ${(0,n.ref)(n=>{if(n&&!s[a]){let c=new IntersectionObserver((n,c)=>{n.forEach(n=>{if(n.isIntersecting&&!s[a]){let l=n.target;s[a]=!0,(0,t.render)(i(r,a),l),e.AnimationAPI.applyAnimation(l,o);let u=l.querySelector(`[data-fallback]`);u&&u.remove(),c.unobserve(l)}})},{root:null,rootMargin:`0px`});c.observe(n)}})}
823
+ data-index="${a}"
824
+ style="transition: transform ${o.duration||`1s`} ease;"
825
+ >
826
+ <!-- 占位元素 -->
827
+ <div
828
+ data-fallback
829
+ style="height: ${c}; width: ${l};"
830
+ ></div>
831
+ </div>
832
+ `);return u}function ee(n){return t.html` <li>${e.renderFnOrArray(n)}</li> `}function Y(n,r){let i=n?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,a=n?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,o=n?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,s=e.getComponentCount(`List`),c=n?.className??e.getRandomClassName(`List::list`)+`-lyco-now-${s}`,l=`
731
833
  ul.${c} {
732
834
  list-style: none;
733
835
  margin: 0;
@@ -750,7 +852,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
750
852
  <ul class="${c}">
751
853
  ${e.renderFnOrArray(n)}
752
854
  </ul>
753
- `);return r===void 0?u:u(r)}function q(r,i){let a=r?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,o=r?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=r?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,c=e.getComponentCount(`ListGroup`),l=r?.className??e.getRandomClassName(`ListGroup::list-group`)+`-lyco-now-`+c,u=(e,n,r,i)=>r?t.html` <li>${e}</li> `:e,d=`
855
+ `);return r===void 0?u:u(r)}function te(r,i){let a=r?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,o=r?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=r?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,c=e.getComponentCount(`ListGroup`),l=r?.className??e.getRandomClassName(`ListGroup::list-group`)+`-lyco-now-`+c,u=(e,n,r,i)=>r?t.html` <li>${e}</li> `:e,d=`
754
856
  ul.${l} {
755
857
  list-style: none;
756
858
  margin: 0;
@@ -776,7 +878,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
776
878
  >
777
879
  ${e.renderFnOrArray(r,u)}
778
880
  </ul>
779
- `);return e.renderFnOrArrayOrCurry(i,p)}function J(r,i){if(i===void 0)return e=>J(r,e??[t.html``]);let a=r?.background??`rgba(0, 0, 0, 0.5)`,o=r?.zIndex??1e3,s=r?.fullScreen!==!1,c=e.createEventBinder(r?.on??{});return t.html`
881
+ `);return e.renderFnOrArrayOrCurry(i,p)}function ne(r,i){if(i===void 0)return e=>ne(r,e??[t.html``]);let a=r?.background??`rgba(0, 0, 0, 0.5)`,o=r?.zIndex??1e3,s=r?.fullScreen!==!1,c=e.createEventBinder(r?.on??{});return t.html`
780
882
  <div
781
883
  ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
782
884
  style="
@@ -791,7 +893,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
791
893
  >
792
894
  ${e.renderFnOrArray(i)}
793
895
  </div>
794
- `}function Y(r,i){if(i===void 0){let e=e=>Y(r,e??t.html``);return e.html=(e,...n)=>Y(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
896
+ `}function X(r,i){if(i===void 0){let e=e=>X(r,e??t.html``);return e.html=(e,...n)=>X(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
795
897
  <div
796
898
  ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
797
899
  style="
@@ -802,221 +904,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
802
904
  >
803
905
  ${e.renderFn(i)}
804
906
  </div>
805
- `}function te(r){let i=r?.width?`width: ${r.width};`:``,a=r?.height?`height: ${r.height};`:``,o=e.createEventBinder(r?.on??{});return t.html`<div
806
- ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
807
- style="${i} ${a}"
808
- ></div>`}function ne(r){let{type:i=`rect`,width:a=`100%`,height:o=`16px`,borderRadius:s=`4px`,animation:c=!0,animationType:l=`shimmer`,bgColor:u=`#eee`,highlightColor:d=`#ddd`,count:f=1,spacing:p=`8px`,direction:m=`vertical`,delay:h=0,autoHide:g=!1,duration:_=2e3,on:v={}}=r??{},y=e.getComponentCount(`SkeletonLoader`),b=e.getRandomClassName(`SkeletonLoader::skeleton`)+`-lyco-now-`+y,x=e.createEventBinder(v),S=i===`circle`?`border-radius:50%;width:${a};height:${a}`:`border-radius:${s};width:${a};height:${o}`,C=``,w=``;c&&(l===`shimmer`?(C=`@keyframes ${b}-shimmer { 0% { background-color: ${u}; } 50% { background-color: ${d}; } 100% { background-color: ${u}; } }`,w=`animation:${b}-shimmer 1.2s infinite ease-in-out;`):(C=`@keyframes ${b}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,w=`animation:${b}-pulse 1.2s infinite ease-in-out;`));let T=m===`horizontal`?`display:flex;flex-direction:row;gap:${p}`:`display:flex;flex-direction:column;gap:${p}`,E=[];for(let e=0;e<f;e++)E.push(t.html`
809
- <div
810
- class="${b}"
811
- style="${S};background-color:${u};${w};opacity:0;transition:opacity 0.3s"
812
- ${(0,n.ref)(e=>{e&&x.bind(e)})}
813
- ></div>
814
- `);function D(e){let t=Array.from(e.querySelectorAll(`.${b}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),g&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},_)},h)}return e.LycoComponent(`SkeletonLoader`,t.html`
815
- <style>
816
- ${C}
817
- </style>
818
- <div
819
- style="${T}"
820
- ${(0,n.ref)(e=>e&&D(e))}
821
- >
822
- ${E}
823
- </div>
824
- `)}function re(r){let i=e.createEventBinder(r?.on??{});return t.html`<div
825
- ${(0,n.ref)(e=>{e?i.bind(e):i.unbindAll()})}
826
- style="flex: 1 1 auto;"
827
- ></div>`}function X(r,i){if(i===void 0){let e=e=>X(r,e??t.html``);return e.html=(e,...n)=>X(r,(0,t.html)(e,...n)),e}let a=r?.top?`top: ${r.top};`:``,o=r?.bottom?`bottom: ${r.bottom};`:``,s=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,c=e.createEventBinder(r?.on??{});return t.html`
828
- <div
829
- ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
830
- style="
831
- position: sticky;
832
- ${a} ${o}
833
- ${s}
834
- "
835
- >
836
- ${e.renderFn(i)}
837
- </div>
838
- `}function Z(r,i){if(i===void 0){let e=e=>Z(r,e??t.html``);return e.html=(e,...n)=>Z(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`Table`),o=r?.className??e.getRandomClassName(`Table::table`)+`-lyco-now-${a}`,s=r?.striped?`
839
- .${o} tr:nth-child(even) {
840
- background: ${O.colors.surface};
841
- }
842
- `:``,c=r?.hover?`
843
- .${o} tr:hover {
844
- background: ${O.colors.primaryContainer};
845
- cursor: pointer;
846
- }
847
- `:``,l=r?.bordered?`
848
- .${o}, .${o} th, .${o} td {
849
- border: 1px solid ${O.colors.surfaceVariant};
850
- }
851
- `:``,u=`
852
- .${o} table {
853
- width: 100%;
854
- border-collapse: separate;
855
- border-spacing: 0;
856
- border-radius: ${O.borderRadius.medium};
857
- overflow: hidden;
858
- box-shadow: ${O.elevation.level1};
859
- }
860
- .${o} th,
861
- .${o} td {
862
- padding: 16px;
863
- text-align: left;
864
- transition: background ${O.animation.standard};
865
- }
866
- .${o} th {
867
- background: ${O.colors.surfaceVariant};
868
- color: ${O.colors.onSurfaceVariant};
869
- font-weight: 500;
870
- }
871
- .${o} td {
872
- border-bottom: 1px solid ${O.colors.surfaceVariant};
873
- }
874
- ${s}
875
- ${c}
876
- ${l}
877
- `,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Table`,t.html`
878
- <style>
879
- ${u}
880
- </style>
881
-
882
- <div
883
- ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
884
- class="${o}"
885
- >
886
- <table>
887
- ${e.renderFn(i)}
888
- </table>
889
- </div>
890
- `)}function ie(r,i){let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return i===void 0?e=>ie(r,e??t.html``):t.html`
891
- <div
892
- ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
893
- style="
894
- display: flex;
895
- flex-direction: ${a};
896
- flex-wrap: wrap;
897
- ${r?.gap?`gap: ${r.gap};`:``}
898
- ${r?.align?`align-items: ${r.align};`:``}
899
- ${r?.justify?`justify-content: ${r.justify};`:``}
900
- "
901
- >
902
- ${e.renderFnOrArray(i)}
903
- </div>
904
- `}function Q(r,i){let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});if(i===void 0)return e=>Q(r,e??[t.html``]);let l=`flex-start`,u=`flex-start`;switch(r?.align){case`top-right`:l=`flex-end`,u=`flex-start`;break;case`center`:l=`center`,u=`center`;break;case`bottom-left`:l=`flex-start`,u=`flex-end`;break;case`bottom-right`:l=`flex-end`,u=`flex-end`;break;default:l=`flex-start`,u=`flex-start`}return t.html`
905
- <div
906
- ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
907
- style="
908
- position: relative;
909
- display: flex;
910
- justify-content: ${l};
911
- align-items: ${u};
912
- ${a} ${o} ${s}
913
- "
914
- >
915
- ${e.renderFnOrArray(i)}
916
- </div>
917
- `}function ae(r,i,a=.1,o={}){let s=Array(r.length).fill(!1),c=`${a*100}vh`,l=`100vw`,u=r.map((r,a)=>t.html`
918
- <div
919
- ${(0,n.ref)(n=>{if(n&&!s[a]){let c=new IntersectionObserver((n,c)=>{n.forEach(n=>{if(n.isIntersecting&&!s[a]){let l=n.target;s[a]=!0,(0,t.render)(i(r,a),l),e.AnimationAPI.applyAnimation(l,o);let u=l.querySelector(`[data-fallback]`);u&&u.remove(),c.unobserve(l)}})},{root:null,rootMargin:`0px`});c.observe(n)}})}
920
- data-index="${a}"
921
- style="transition: transform ${o.duration||`1s`} ease;"
922
- >
923
- <!-- 占位元素 -->
924
- <div
925
- data-fallback
926
- style="height: ${c}; width: ${l};"
927
- ></div>
928
- </div>
929
- `);return u}function oe(r){let{value:i=``,options:a=[],placeholder:o=``,disabled:s=!1,error:c=!1,className:l=``,style:u=``,maxHeight:d=`300px`,onChange:f,onInput:p,onFocus:m,onBlur:h,on:g={},optionRender:_}=r??{},v=e.getComponentCount(`Combobox`),y=e.getRandomClassName(`Combobox::combobox`)+`-lyco-now-${v}`,b=!1,x=null,S=`
930
- .${y} {
931
- position: relative;
932
- width: 100%;
933
- }
934
-
935
- .${y} input {
936
- width: 100%;
937
- padding: 12px 16px;
938
- font-size: 16px;
939
- border: 1px solid ${c?O.colors.error:O.colors.surfaceVariant};
940
- border-radius: ${O.borderRadius.small};
941
- color: ${O.colors.onSurface};
942
- transition: all ${O.animation.standard};
943
- outline: none;
944
- box-sizing: border-box;
945
- }
946
-
947
- .${y} input:focus {
948
- border-color: ${O.colors.primary};
949
- box-shadow: 0 0 0 2px ${O.colors.primaryContainer};
950
- }
951
-
952
- .${y} input:disabled {
953
- background: ${O.colors.surfaceVariant};
954
- color: ${O.colors.onSurfaceVariant};
955
- cursor: not-allowed;
956
- }
957
-
958
- .${y} .options {
959
- position: absolute;
960
- top: 100%;
961
- left: 0;
962
- right: 0;
963
- max-height: ${d};
964
- overflow-y: auto;
965
- border: 1px solid ${O.colors.surfaceVariant};
966
- border-radius: ${O.borderRadius.small};
967
- box-shadow: ${O.elevation.level2};
968
- z-index: 1000;
969
- display: none;
970
- }
971
-
972
- .${y} .options.open {
973
- display: block;
974
- }
975
-
976
- .${y} .option {
977
- padding: 12px 16px;
978
- cursor: pointer;
979
- transition: background ${O.animation.standard};
980
- }
981
-
982
- .${y} .option:hover {
983
- background: ${O.colors.primaryContainer};
984
- }
985
-
986
- .${y} .option.selected {
987
- background: ${O.colors.primaryContainer};
988
- color: ${O.colors.onPrimaryContainer};
989
- }
990
- `,C=e.createEventBinder(g),w=null,T=()=>{b?w?.classList.remove(`open`):w?.classList.add(`open`),b=!b},E=(e,t)=>{if(x){x.value=e.value;let n=t.currentTarget;Array.from(w?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),f?.(e.value)}T()},D=e=>{let t=e.target;t.closest(`.${y}`)||(b=!1,w?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,D),e.LycoComponent(`Combobox`,t.html`
991
- <style>
992
- ${S}
993
- </style>
994
- <div class="${y} ${l}" style="${u}">
995
- <input
996
- ${(0,n.ref)(e=>{e?(x=e,C.bind(e)):C.unbindAll()})}
997
- type="text"
998
- .value=${i}
999
- placeholder=${o}
1000
- ?disabled=${s}
1001
- @focus=${()=>{m?.(),T()}}
1002
- @input=${e=>{let t=e.target;p?.(t.value)}}
1003
- @change=${e=>{let t=e.target;f?.(t.value)}}
1004
- />
1005
- <div
1006
- ${(0,n.ref)(e=>{e&&(w=e)})}
1007
- class="options"
1008
- >
1009
- ${a.map(e=>t.html`
1010
- <div
1011
- class="option ${e.value===(x?.value??i)?`selected`:``}"
1012
- @click=${t=>E(e,t)}
1013
- >
1014
- ${_?_(e):e.label}
1015
- </div>
1016
- `)}
1017
- </div>
1018
- </div>
1019
- `)}function se(r){let i=Math.min(100,Math.max(0,r?.value??0)),a=Math.min(100,Math.max(0,r?.bufferValue??0)),o=r?.color??`#1976d2`,s=r?.secondaryColor??`#90caf9`,c=r?.backgroundColor??`#e0e0e0`,l=r?.height??`4px`,u=r?.radius??`4px`,d=r?.showLabel??!1,f=r?.labelPosition??`inside`,p=r?.labelColor??(i>50?`white`:o),m=r?.labelFontSize??`12px`,h=r?.striped??!1,g=r?.animated??!1,_=r?.paused??!1,v=r?.transitionDuration??`0.3s`,y=r?.className??``,b=r?.style??``,x=e.createEventBinder(r?.on??{}),S=h?`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 re(r){let i=Math.min(100,Math.max(0,r?.value??0)),a=Math.min(100,Math.max(0,r?.bufferValue??0)),o=r?.color??`#1976d2`,s=r?.secondaryColor??`#90caf9`,c=r?.backgroundColor??`#e0e0e0`,l=r?.height??`4px`,u=r?.radius??`4px`,d=r?.showLabel??!1,f=r?.labelPosition??`inside`,p=r?.labelColor??(i>50?`white`:o),m=r?.labelFontSize??`12px`,h=r?.striped??!1,g=r?.animated??!1,_=r?.paused??!1,v=r?.transitionDuration??`0.3s`,y=r?.className??``,b=r?.style??``,x=e.createEventBinder(r?.on??{}),S=h?`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: ${_?`paused`:`running`};`:``;return t.html`
@@ -1092,7 +980,29 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1092
980
  `:``}
1093
981
  ${r?.suffixIcon}
1094
982
  </div>
1095
- `}function ce(r){let{size:i=`24px`,color:a=O.colors.primary,thickness:o=`2px`,speed:s=`1.2s`,className:c=``,opacity:l=1,startAngle:u=0,easing:d=`linear`,reverse:f=!1,style:p=``,on:m={},children:h,svgMode:g=!1,strokeLinecap:_=`butt`,strokeDasharray:v=``}=r??{},y=e.createEventBinder(m),b=e.getComponentCount(`Spinner`),x=t.html`
983
+ `}function ie(r){let i=r?.width?`width: ${r.width};`:``,a=r?.height?`height: ${r.height};`:``,o=e.createEventBinder(r?.on??{});return t.html`<div
984
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
985
+ style="${i} ${a}"
986
+ ></div>`}function ae(r){let{type:i=`rect`,width:a=`100%`,height:o=`16px`,borderRadius:s=`4px`,animation:c=!0,animationType:l=`shimmer`,bgColor:u=`#eee`,highlightColor:d=`#ddd`,count:f=1,spacing:p=`8px`,direction:m=`vertical`,delay:h=0,autoHide:g=!1,duration:_=2e3,on:v={}}=r??{},y=e.getComponentCount(`SkeletonLoader`),b=e.getRandomClassName(`SkeletonLoader::skeleton`)+`-lyco-now-`+y,x=e.createEventBinder(v),S=i===`circle`?`border-radius:50%;width:${a};height:${a}`:`border-radius:${s};width:${a};height:${o}`,C=``,w=``;c&&(l===`shimmer`?(C=`@keyframes ${b}-shimmer { 0% { background-color: ${u}; } 50% { background-color: ${d}; } 100% { background-color: ${u}; } }`,w=`animation:${b}-shimmer 1.2s infinite ease-in-out;`):(C=`@keyframes ${b}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,w=`animation:${b}-pulse 1.2s infinite ease-in-out;`));let T=m===`horizontal`?`display:flex;flex-direction:row;gap:${p}`:`display:flex;flex-direction:column;gap:${p}`,E=[];for(let e=0;e<f;e++)E.push(t.html`
987
+ <div
988
+ class="${b}"
989
+ style="${S};background-color:${u};${w};opacity:0;transition:opacity 0.3s"
990
+ ${(0,n.ref)(e=>{e&&x.bind(e)})}
991
+ ></div>
992
+ `);function D(e){let t=Array.from(e.querySelectorAll(`.${b}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),g&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},_)},h)}return e.LycoComponent(`SkeletonLoader`,t.html`
993
+ <style>
994
+ ${C}
995
+ </style>
996
+ <div
997
+ style="${T}"
998
+ ${(0,n.ref)(e=>e&&D(e))}
999
+ >
1000
+ ${E}
1001
+ </div>
1002
+ `)}function oe(r){let i=e.createEventBinder(r?.on??{});return t.html`<div
1003
+ ${(0,n.ref)(e=>{e?i.bind(e):i.unbindAll()})}
1004
+ style="flex: 1 1 auto;"
1005
+ ></div>`}function se(r){let{size:i=`24px`,color:a=O.colors.primary,thickness:o=`2px`,speed:s=`1.2s`,className:c=``,opacity:l=1,startAngle:u=0,easing:d=`linear`,reverse:f=!1,style:p=``,on:m={},children:h,svgMode:g=!1,strokeLinecap:_=`butt`,strokeDasharray:v=``}=r??{},y=e.createEventBinder(m),b=e.getComponentCount(`Spinner`),x=t.html`
1096
1006
  <div
1097
1007
  class="${c}"
1098
1008
  style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${p}"
@@ -1163,7 +1073,70 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1163
1073
  }
1164
1074
  `.cssText}
1165
1075
  </style>
1166
- `;return e.LycoComponent(`Spinner`,g?S:x)}let $=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function le(r,i){let{content:a,placement:o=$.Top,delay:s={show:200,hide:100},offset:c=8,hideOnClick:l=!1,interactive:u=!1,maxWidth:d=`200px`,theme:f=`dark`,className:p=``,style:m=``,zIndex:h=1e3,on:g={},onShow:_,onHide:v}=r,y=e.createEventBinder(g),b,x;function S(e){clearTimeout(x),b=window.setTimeout(()=>{w.style.visibility=`visible`,w.style.opacity=`1`,_?.()},s.show)}function C(){clearTimeout(b),x=window.setTimeout(()=>{w.style.visibility=`hidden`,w.style.opacity=`0`,v?.()},s.hide)}let w,T=r=>t.html`
1076
+ `;return e.LycoComponent(`Spinner`,g?S:x)}function Z(r,i){if(i===void 0){let e=e=>Z(r,e??t.html``);return e.html=(e,...n)=>Z(r,(0,t.html)(e,...n)),e}let a=r?.top?`top: ${r.top};`:``,o=r?.bottom?`bottom: ${r.bottom};`:``,s=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,c=e.createEventBinder(r?.on??{});return t.html`
1077
+ <div
1078
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
1079
+ style="
1080
+ position: sticky;
1081
+ ${a} ${o}
1082
+ ${s}
1083
+ "
1084
+ >
1085
+ ${e.renderFn(i)}
1086
+ </div>
1087
+ `}function Q(r,i){if(i===void 0){let e=e=>Q(r,e??t.html``);return e.html=(e,...n)=>Q(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`Table`),o=r?.className??e.getRandomClassName(`Table::table`)+`-lyco-now-${a}`,s=r?.striped?`
1088
+ .${o} tr:nth-child(even) {
1089
+ background: ${O.colors.surface};
1090
+ }
1091
+ `:``,c=r?.hover?`
1092
+ .${o} tr:hover {
1093
+ background: ${O.colors.primaryContainer};
1094
+ cursor: pointer;
1095
+ }
1096
+ `:``,l=r?.bordered?`
1097
+ .${o}, .${o} th, .${o} td {
1098
+ border: 1px solid ${O.colors.surfaceVariant};
1099
+ }
1100
+ `:``,u=`
1101
+ .${o} table {
1102
+ width: 100%;
1103
+ border-collapse: separate;
1104
+ border-spacing: 0;
1105
+ border-radius: ${O.borderRadius.medium};
1106
+ overflow: hidden;
1107
+ box-shadow: ${O.elevation.level1};
1108
+ }
1109
+ .${o} th,
1110
+ .${o} td {
1111
+ padding: 16px;
1112
+ text-align: left;
1113
+ transition: background ${O.animation.standard};
1114
+ }
1115
+ .${o} th {
1116
+ background: ${O.colors.surfaceVariant};
1117
+ color: ${O.colors.onSurfaceVariant};
1118
+ font-weight: 500;
1119
+ }
1120
+ .${o} td {
1121
+ border-bottom: 1px solid ${O.colors.surfaceVariant};
1122
+ }
1123
+ ${s}
1124
+ ${c}
1125
+ ${l}
1126
+ `,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Table`,t.html`
1127
+ <style>
1128
+ ${u}
1129
+ </style>
1130
+
1131
+ <div
1132
+ ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
1133
+ class="${o}"
1134
+ >
1135
+ <table>
1136
+ ${e.renderFn(i)}
1137
+ </table>
1138
+ </div>
1139
+ `)}let $=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function ce(r,i){let{content:a,placement:o=$.Top,delay:s={show:200,hide:100},offset:c=8,hideOnClick:l=!1,interactive:u=!1,maxWidth:d=`200px`,theme:f=`dark`,className:p=``,style:m=``,zIndex:h=1e3,on:g={},onShow:_,onHide:v}=r,y=e.createEventBinder(g),b,x;function S(e){clearTimeout(x),b=window.setTimeout(()=>{w.style.visibility=`visible`,w.style.opacity=`1`,_?.()},s.show)}function C(){clearTimeout(b),x=window.setTimeout(()=>{w.style.visibility=`hidden`,w.style.opacity=`0`,v?.()},s.hide)}let w,T=r=>t.html`
1167
1140
  <div
1168
1141
  ${(0,n.ref)(e=>{e?(y.bind(e),w=e.querySelector(`.lyco-tooltip-content`),e.addEventListener(`mouseenter`,()=>S(e)),e.addEventListener(`mouseleave`,()=>C()),l&&e.addEventListener(`click`,()=>C())):y.unbindAll()})}
1169
1142
  class="lyco-tooltip lyco-tooltip--${f} ${p}"
@@ -1197,7 +1170,34 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1197
1170
  ${a}
1198
1171
  </div>
1199
1172
  </div>
1200
- `;return e.renderFnOrCurry(i,T)}let ue=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 de=typeof window>`u`,fe=!de&&`HTMLDialogElement`in window,pe=e=>`
1173
+ `;return e.renderFnOrCurry(i,T)}function le(r,i){let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return i===void 0?e=>le(r,e??t.html``):t.html`
1174
+ <div
1175
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
1176
+ style="
1177
+ display: flex;
1178
+ flex-direction: ${a};
1179
+ flex-wrap: wrap;
1180
+ ${r?.gap?`gap: ${r.gap};`:``}
1181
+ ${r?.align?`align-items: ${r.align};`:``}
1182
+ ${r?.justify?`justify-content: ${r.justify};`:``}
1183
+ "
1184
+ >
1185
+ ${e.renderFnOrArray(i)}
1186
+ </div>
1187
+ `}function ue(r,i){let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});if(i===void 0)return e=>ue(r,e??[t.html``]);let l=`flex-start`,u=`flex-start`;switch(r?.align){case`top-right`:l=`flex-end`,u=`flex-start`;break;case`center`:l=`center`,u=`center`;break;case`bottom-left`:l=`flex-start`,u=`flex-end`;break;case`bottom-right`:l=`flex-end`,u=`flex-end`;break;default:l=`flex-start`,u=`flex-start`}return t.html`
1188
+ <div
1189
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
1190
+ style="
1191
+ position: relative;
1192
+ display: flex;
1193
+ justify-content: ${l};
1194
+ align-items: ${u};
1195
+ ${a} ${o} ${s}
1196
+ "
1197
+ >
1198
+ ${e.renderFnOrArray(i)}
1199
+ </div>
1200
+ `}let de=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 fe=typeof window>`u`,pe=!fe&&`HTMLDialogElement`in window,me=e=>`
1201
1201
  position: fixed;
1202
1202
  top: 0;
1203
1203
  left: 0;
@@ -1208,7 +1208,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1208
1208
  justify-content: center;
1209
1209
  z-index: 1000;
1210
1210
  background: rgba(0,0,0,0.3);
1211
- `;var me=class{constructor(e,t){this.isOpen=!1,this.returnValue=``,this.element=e,this.contentElement=t}show(){this.element.style.display=`flex`,this.isOpen=!0}showModal(){this.show()}close(){this.element.style.display=`none`,this.isOpen=!1,this.element.dispatchEvent(new Event(`close`))}get open(){return this.isOpen}getBoundingClientRect(){return this.contentElement.getBoundingClientRect()}get style(){return this.contentElement.style}};function he(r,i){let a=r?.open??!1,o=r?.onClose,s=r?.className??``,c=r?.style??``,l=e.createEventBinder(r?.on?r?.on:{}),u=r?.movable??!1,d=r?.placement??ue.Center,f=r?.proxyRef??{value:null},p=null,m=!1,h={x:0,y:0},g=null,_=r?.mask??!0,v=e.getComponentCount(`Dialog`),y=e.getRandomClassName(`Dialog::dialog`)+`-lyco-now-`+v;function b(e){return u?u===`self`?e:u&&`value`in u?u.value:null:null}function x(){if(typeof window>`u`)return``;let e=300,t=150,n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;return`left: ${n}px; top: ${r}px;`}function S(){switch(d){case`left`:return`left: 32px; top: 50%;`;case`right`:return`right: 32px; top: 50%;`;case`top`:return`top: 32px; left: 50%;`;case`bottom`:return`bottom: 32px; left: 50%;`;case`top-start`:return`top: 32px; left: 32px;`;case`top-end`:return`top: 32px; right: 32px;`;case`bottom-start`:return`bottom: 32px; left: 32px;`;case`bottom-end`:return`bottom: 32px; right: 32px;`;case`left-start`:return`left: 32px; top: 32px;`;case`left-end`:return`left: 32px; bottom: 32px;`;case`right-start`:return`right: 32px; top: 32px;`;case`right-end`:return`right: 32px; bottom: 32px;`;default:return x()}}function C(){switch(d){case`top-start`:case`top-end`:case`bottom-start`:case`bottom-end`:case`left-start`:case`left-end`:case`right-start`:case`right-end`:return{txp:0,typ:0};case`left`:return{txp:0,typ:-50};case`right`:return{txp:0,typ:-50};case`top`:return{txp:-50,typ:0};case`bottom`:return{txp:-50,typ:0};default:return{txp:-50,typ:-50}}}function w(e,t){if(e.button!==0||(g=b(t),!g||!g.contains(e.target)))return;p=t,p.style.transform=`none`,e.preventDefault(),g.style.cursor=`grabbing`;let n=t.getBoundingClientRect(),{txp:r,typ:i}=C();h={x:e.clientX-(n.left+r/100*n.width),y:e.clientY-(n.top+i/100*n.height)},m=!0,document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E)}function T(e){if(!m||!g||!p)return;let t=p.getBoundingClientRect(),{txp:n,typ:r}=C(),i=e.clientX-h.x-n/100*t.width,a=e.clientY-h.y-r/100*t.height;p.style.left=`${i}px`,p.style.top=`${a}px`}function E(){m=!1,g=null,p=null,document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}function D(){let e=_?`rgba(0,0,0,0.5)`:`transparent`;return`
1211
+ `;var he=class{constructor(e,t){this.isOpen=!1,this.returnValue=``,this.element=e,this.contentElement=t}show(){this.element.style.display=`flex`,this.isOpen=!0}showModal(){this.show()}close(){this.element.style.display=`none`,this.isOpen=!1,this.element.dispatchEvent(new Event(`close`))}get open(){return this.isOpen}getBoundingClientRect(){return this.contentElement.getBoundingClientRect()}get style(){return this.contentElement.style}};function ge(r,i){let a=r?.open??!1,o=r?.onClose,s=r?.className??``,c=r?.style??``,l=e.createEventBinder(r?.on?r?.on:{}),u=r?.movable??!1,d=r?.placement??de.Center,f=r?.proxyRef??{value:null},p=null,m=!1,h={x:0,y:0},g=null,_=r?.mask??!0,v=e.getComponentCount(`Dialog`),y=e.getRandomClassName(`Dialog::dialog`)+`-lyco-now-`+v;function b(e){return u?u===`self`?e:u&&`value`in u?u.value:null:null}function x(){if(typeof window>`u`)return``;let e=300,t=150,n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;return`left: ${n}px; top: ${r}px;`}function S(){switch(d){case`left`:return`left: 32px; top: 50%;`;case`right`:return`right: 32px; top: 50%;`;case`top`:return`top: 32px; left: 50%;`;case`bottom`:return`bottom: 32px; left: 50%;`;case`top-start`:return`top: 32px; left: 32px;`;case`top-end`:return`top: 32px; right: 32px;`;case`bottom-start`:return`bottom: 32px; left: 32px;`;case`bottom-end`:return`bottom: 32px; right: 32px;`;case`left-start`:return`left: 32px; top: 32px;`;case`left-end`:return`left: 32px; bottom: 32px;`;case`right-start`:return`right: 32px; top: 32px;`;case`right-end`:return`right: 32px; bottom: 32px;`;default:return x()}}function C(){switch(d){case`top-start`:case`top-end`:case`bottom-start`:case`bottom-end`:case`left-start`:case`left-end`:case`right-start`:case`right-end`:return{txp:0,typ:0};case`left`:return{txp:0,typ:-50};case`right`:return{txp:0,typ:-50};case`top`:return{txp:-50,typ:0};case`bottom`:return{txp:-50,typ:0};default:return{txp:-50,typ:-50}}}function w(e,t){if(e.button!==0||(g=b(t),!g||!g.contains(e.target)))return;p=t,p.style.transform=`none`,e.preventDefault(),g.style.cursor=`grabbing`;let n=t.getBoundingClientRect(),{txp:r,typ:i}=C();h={x:e.clientX-(n.left+r/100*n.width),y:e.clientY-(n.top+i/100*n.height)},m=!0,document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E)}function T(e){if(!m||!g||!p)return;let t=p.getBoundingClientRect(),{txp:n,typ:r}=C(),i=e.clientX-h.x-n/100*t.width,a=e.clientY-h.y-r/100*t.height;p.style.left=`${i}px`,p.style.top=`${a}px`}function E(){m=!1,g=null,p=null,document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}function D(){let e=_?`rgba(0,0,0,0.5)`:`transparent`;return`
1212
1212
  ${y}::-webkit-backdrop,
1213
1213
  ${y}::backdrop {
1214
1214
  background: ${e};
@@ -1216,12 +1216,12 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1216
1216
  }
1217
1217
  `}function k(r){let i=null,d=null;return e.LycoComponent(`Dialog`,t.html`
1218
1218
  <div
1219
- ${(0,n.ref)(e=>{if(e){if(i=e,d){let e=new me(i,d);f.value=e,l.bind(i),a?e.showModal():e.close()}}else l.unbindAll()})}
1219
+ ${(0,n.ref)(e=>{if(e){if(i=e,d){let e=new he(i,d);f.value=e,l.bind(i),a?e.showModal():e.close()}}else l.unbindAll()})}
1220
1220
  @click=${e=>{e.target===e.currentTarget&&o?.()}}
1221
- style=${pe(a)}
1221
+ style=${me(a)}
1222
1222
  >
1223
1223
  <div
1224
- ${(0,n.ref)(e=>{if(e&&(d=e,i)){let e=new me(i,d);f.value=e}})}
1224
+ ${(0,n.ref)(e=>{if(e&&(d=e,i)){let e=new he(i,d);f.value=e}})}
1225
1225
  class="${y} ${s}"
1226
1226
  style="
1227
1227
  padding: 0;
@@ -1237,7 +1237,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1237
1237
  ${e.renderFnOrArray(r)}
1238
1238
  </div>
1239
1239
  </div>
1240
- `)}function A(r){return de||!fe?k(r):e.LycoComponent(`Dialog`,t.html`
1240
+ `)}function A(r){return fe||!pe?k(r):e.LycoComponent(`Dialog`,t.html`
1241
1241
  <dialog
1242
1242
  ${(0,n.ref)(e=>{if(e){f.value=e;let t=e;l.bind(t),requestAnimationFrame(()=>{try{a?t.showModal():t.close()}catch(e){console.warn(`Dialog operation failed:`,e)}})}else l.unbindAll()})}
1243
1243
  @close=${o}
@@ -1262,7 +1262,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1262
1262
  <style>
1263
1263
  ${D()}
1264
1264
  </style>
1265
- `)}return e.renderFnOrArrayOrCurry(i,A)}function ge(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r=>t.html`
1265
+ `)}return e.renderFnOrArrayOrCurry(i,A)}function _e(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r=>t.html`
1266
1266
  <div
1267
1267
  ${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
1268
1268
  class="lyco-dialog-actions ${a}"
@@ -1276,7 +1276,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1276
1276
  >
1277
1277
  ${e.renderFnOrArray(r)}
1278
1278
  </div>
1279
- `;return e.renderFnOrArrayOrCurry(i,c)}function _e(r,i){let a=r?.variant??`text`,o=r?.color??`default`,s=r?.className??``,c=r?.style??``,l=e.createEventBinder({click:r?.onClick?e=>{var t;e.preventDefault(),(t=r.onClick)?.call(r,e)}:void 0,...r?.on}),u=r=>t.html`
1279
+ `;return e.renderFnOrArrayOrCurry(i,c)}function ve(r,i){let a=r?.variant??`text`,o=r?.color??`default`,s=r?.className??``,c=r?.style??``,l=e.createEventBinder({click:r?.onClick?e=>{var t;e.preventDefault(),(t=r.onClick)?.call(r,e)}:void 0,...r?.on}),u=r=>t.html`
1280
1280
  <button
1281
1281
  ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
1282
1282
  class="lyco-dialog-button ${a} ${o} ${s}"
@@ -1294,7 +1294,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1294
1294
  >
1295
1295
  ${e.renderFn(r)}
1296
1296
  </button>
1297
- `;return e.renderFnOrCurry(i,u)}function ve(n,r){let i=n?.className??``,a=n?.style??``,o=e.createEventBinder(n?.on??{}),s=n=>t.html`
1297
+ `;return e.renderFnOrCurry(i,u)}function ye(n,r){let i=n?.className??``,a=n?.style??``,o=e.createEventBinder(n?.on??{}),s=n=>t.html`
1298
1298
  <div
1299
1299
  class="lyco-dialog-content ${i}"
1300
1300
  style="
@@ -1308,7 +1308,7 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1308
1308
  >
1309
1309
  ${e.renderFnOrArray(n)}
1310
1310
  </div>
1311
- `;return e.renderFnOrArrayOrCurry(r,s)}function ye(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r?.proxyRef??{value:null},l=r=>t.html`
1311
+ `;return e.renderFnOrArrayOrCurry(r,s)}function be(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r?.proxyRef??{value:null},l=r=>t.html`
1312
1312
  <div
1313
1313
  ${(0,n.ref)(e=>{e?(c.value=e,s.bind(e)):s.unbindAll()})}
1314
1314
  class="lyco-dialog-title ${a}"
@@ -1323,5 +1323,5 @@ const e=require(`./core-BoB7sDMv.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(re
1323
1323
  >
1324
1324
  ${e.renderFn(r)}
1325
1325
  </div>
1326
- `;return e.renderFnOrCurry(i,l)}function be(t){return e.renderFnOrArray(t)}exports.$Html=be,exports.AbsoluteBox=A,exports.AcrylicBar=j,exports.AspectRatio=M,exports.AutoFitGrid=N,exports.AvatarStack=P,exports.Badge=F,exports.Canvas=I,exports.Card=L,exports.Center=R,exports.Column=m,exports.ColumnSplit=C,exports.Combobox=oe,exports.Container=z,exports.Dialog=he,exports.DialogActions=ge,exports.DialogButton=_e,exports.DialogContent=ve,exports.DialogPlacement=ue,exports.DialogTitle=ye,exports.Divider=B,exports.Flex=h,exports.FlowItem=g,exports.FooterLayout=V,exports.ForEach=H,exports.Grid=_,exports.GridBreakpoint=U,exports.GridCol=v,exports.GridItem=y,exports.GridRow=b,exports.HeroSection=W,exports.Hidden=G,exports.LazyForEach=ae,exports.LightboxContainer=p,exports.List=ee,exports.ListGroup=q,exports.ListItem=K,exports.Overlay=J,exports.PositionContainer=Y,exports.Progress=se,exports.Row=x,exports.RowSplit=w,exports.ScrollBar=T,exports.SideBarContainer=E,exports.SizedBox=te,exports.SkeletonLoader=ne,exports.Spacer=re,exports.Spinner=ce,exports.Sticky=X,exports.Swiper=D,exports.SwitchInput=k,exports.Table=Z,exports.Virtualizer=f,exports.VirtualizerController=c,exports.WaterFlow=S,exports.WithTooltip=le,exports.Wrap=ie,exports.ZStack=Q;
1326
+ `;return e.renderFnOrCurry(i,l)}function xe(t){return e.renderFnOrArray(t)}exports.$Html=xe,exports.AbsoluteBox=A,exports.AcrylicBar=j,exports.AspectRatio=M,exports.AutoFitGrid=N,exports.AvatarStack=P,exports.Badge=F,exports.Canvas=I,exports.CanvasOnce=L,exports.Card=R,exports.Center=z,exports.Column=m,exports.ColumnSplit=C,exports.Combobox=B,exports.Container=V,exports.Dialog=ge,exports.DialogActions=_e,exports.DialogButton=ve,exports.DialogContent=ye,exports.DialogPlacement=de,exports.DialogTitle=be,exports.Divider=H,exports.Flex=h,exports.FlowItem=g,exports.FooterLayout=U,exports.ForEach=W,exports.Grid=_,exports.GridBreakpoint=G,exports.GridCol=v,exports.GridItem=y,exports.GridRow=b,exports.HeroSection=K,exports.Hidden=q,exports.LazyForEach=J,exports.LightboxContainer=p,exports.List=Y,exports.ListGroup=te,exports.ListItem=ee,exports.Overlay=ne,exports.PositionContainer=X,exports.Progress=re,exports.Row=x,exports.RowSplit=w,exports.ScrollBar=T,exports.SideBarContainer=E,exports.SizedBox=ie,exports.SkeletonLoader=ae,exports.Spacer=oe,exports.Spinner=se,exports.Sticky=Z,exports.Swiper=D,exports.SwitchInput=k,exports.Table=Q,exports.Virtualizer=f,exports.VirtualizerController=c,exports.WaterFlow=S,exports.WithTooltip=ce,exports.Wrap=le,exports.ZStack=ue;
1327
1327
  //# sourceMappingURL=index.cjs.js.map