lyco 1.2.4 → 1.2.5

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.es.js CHANGED
@@ -1,4 +1,7 @@
1
- import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`function`?e():e:t``}function r(e,r){let i=r??(e=>e);if(e===void 0)return t``;if(Array.isArray(e))return e.map((e,t)=>i(n(e),t,!0,!1));if(typeof e!=`function`)return i(n(e),void 0,!1,!1);let a=e();return Array.isArray(a)?a.map((e,t)=>i(n(e),t,!0,!1)):i(n(a),void 0,!1,!0)}function i(e){let t=Math.random().toString(36).substring(2,15);return e?`lyco-${e}-${t}`:`lyco-${t}`}function a(e,t){let r=t??(e=>e),i=e=>r(n(e));return e?i(e):i}function o(e,t,n){let i=t??(e=>e),a=e=>i(r(e,n));return e?a(e):a}const s=e=>({init:!1,prefix:e,className:`___LYCO_NULL___`}),c={"GridBreakpoint::grid-breakpoint":s(`grid-breakpoint`),"Hidden::hidden-container":s(`hidden-container`),"ListGroup::list-group":s(`list-group`),"ScrollBar::scrollbar-container":s(`scrollbar-container`),"SkeletonLoader::skeleton-shimmer":s(`skeleton-shimmer`),"Swiper::swiper":s(`swiper`),"Table::table":s(`table`),"WaterFlow::waterflow":s(`waterflow`),"AutoFitGrid::auto-fit-grid":s(`auto-fit-grid`),"GridCol::grid-col":s(`grid-col`),"GridRow::grid-row":s(`grid-row`)};function l(e){let t=c[e];return t.init||(c[e].init=!0,c[e].className=i(t.prefix)),c[e].className===`___LYCO_NULL___`?i(t.prefix):c[e].className}const u={value:0};var d=class extends e{constructor(){super(),this.shadowRoot=this.attachShadow({mode:`closed`}),u.value++}render(){return t` <slot></slot> `}};customElements.define(`lyco-component`,d);function f(e,r){if(r===void 0){let n=n=>f(e,n??t``);return n.html=(n,...r)=>f(e,t(n,...r)),n}let i=e?.fadeBg??`rgba(0,0,0,0.7)`,a=e?.zIndex??2e3;return t`
1
+ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``}function n(n,r){let i=r??(e=>e);if(n===void 0)return e``;if(Array.isArray(n))return n.map((e,n)=>i(t(e),n,!0,!1));if(typeof n!=`function`)return i(t(n),void 0,!1,!1);let a=n();return Array.isArray(a)?a.map((e,n)=>i(t(e),n,!0,!1)):i(t(a),void 0,!1,!0)}function r(e){let t=Math.random().toString(36).substring(2,15);return e?`lyco-${e}-${t}`:`lyco-${t}`}function i(e,n){let r=n??(e=>e),i=e=>r(t(e));return e?i(e):i}function a(e,t,r){let i=t??(e=>e),a=e=>i(n(e,r));return e?a(e):a}const o=e=>({init:!1,prefix:e,className:`___LYCO_NULL___`}),s={"GridBreakpoint::grid-breakpoint":o(`grid-breakpoint`),"Hidden::hidden-container":o(`hidden-container`),"ListGroup::list-group":o(`list-group`),"ScrollBar::scrollbar-container":o(`scrollbar-container`),"SkeletonLoader::skeleton-shimmer":o(`skeleton-shimmer`),"Swiper::swiper":o(`swiper`),"Table::table":o(`table`),"WaterFlow::waterflow":o(`waterflow`),"AutoFitGrid::auto-fit-grid":o(`auto-fit-grid`),"GridCol::grid-col":o(`grid-col`),"GridRow::grid-row":o(`grid-row`)};function c(e){let t=s[e];return t.init||(s[e].init=!0,s[e].className=r(t.prefix)),s[e].className===`___LYCO_NULL___`?r(t.prefix):s[e].className}const l={all:{value:0}};function u(e){var t;return(t=l[e])?.value||(l[e]={value:0}),l[e].value}function d(t,n){return l.all={value:l.all.value+1},l[t]===void 0?l[t]={value:0}:l[t].value=l[t].value+1,console.debug(`LycoComponent: ${t} - ${l[t].value} - ${l.all.value}`),e`
2
+ <!-- ${t} - ${l[t].value} -->
3
+ ${n}
4
+ `}function f(n,r){if(r===void 0){let t=t=>f(n,t??e``);return t.html=(t,...r)=>f(n,e(t,...r)),t}let i=n?.fadeBg??`rgba(0,0,0,0.7)`,a=n?.zIndex??2e3;return e`
2
5
  <div
3
6
  style="
4
7
  position: fixed;
@@ -10,102 +13,98 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
10
13
  align-items: center;
11
14
  "
12
15
  >
13
- ${n(r)}
16
+ ${t(r)}
14
17
  </div>
15
- `}function p(e,n){return n===void 0?n=>p(e,n??[t``]):t`
18
+ `}function p(t,r){return r===void 0?n=>p(t,n??[e``]):e`
16
19
  <div
17
20
  style="
18
21
  display: flex;
19
22
  flex-direction: column;
20
- ${e?.space?`gap: ${e.space};`:``}
23
+ ${t?.space?`gap: ${t.space};`:``}
21
24
  "
22
25
  >
23
- ${r(n)}
26
+ ${n(r)}
24
27
  </div>
25
- `}function m(e,r){if(r===void 0){let n=n=>m(e,n??t``);return n.html=(n,...r)=>m(e,t(n,...r)),n}let i=e?.direction??`row`;return t`
28
+ `}function m(n,r){if(r===void 0){let t=t=>m(n,t??e``);return t.html=(t,...r)=>m(n,e(t,...r)),t}let i=n?.direction??`row`;return e`
26
29
  <div
27
30
  style="
28
31
  display: flex;
29
32
  flex-direction: ${i};
30
- ${e?.justify?`justify-content: ${e.justify};`:``}
31
- ${e?.align?`align-items: ${e.align};`:``}
32
- ${e?.gap?`gap: ${e.gap};`:``}
33
+ ${n?.justify?`justify-content: ${n.justify};`:``}
34
+ ${n?.align?`align-items: ${n.align};`:``}
35
+ ${n?.gap?`gap: ${n.gap};`:``}
33
36
  "
34
37
  >
35
- ${n(r)}
38
+ ${t(r)}
36
39
  </div>
37
- `}function h(e){return t`
40
+ `}function h(n){return e`
38
41
  <div style="break-inside: avoid; margin-bottom: 16px;">
39
- ${n(e)}
42
+ ${t(n)}
40
43
  </div>
41
- `}function g(e,n){if(n===void 0)return n=>g(e,n??[t``]);let i=e?.columns??1;return t`
44
+ `}function g(t,r){if(r===void 0)return n=>g(t,n??[e``]);let i=t?.columns??1;return e`
42
45
  <div
43
46
  style="
44
47
  display: grid;
45
48
  grid-template-columns: repeat(${i}, 1fr);
46
- ${e?.gap?`gap: ${e.gap};`:``}
49
+ ${t?.gap?`gap: ${t.gap};`:``}
47
50
  "
48
51
  >
49
- ${r(n)}
52
+ ${n(r)}
50
53
  </div>
51
- `}function _(e,r){if(r===void 0){let n=n=>_(e,n??t``);return n.html=(n,...r)=>_(e,t(n,...r)),n}let i=u.value,a=l(`GridCol::grid-col`)+ +`-lyco-now-${i}`,o=e?.gap?`column-gap: ${e.gap};`:``,s=`
54
+ `}function _(n,r){if(r===void 0){let t=t=>_(n,t??e``);return t.html=(t,...r)=>_(n,e(t,...r)),t}let i=u(`GridCol`),a=c(`GridCol::grid-col`)+`-lyco-now-`+i,o=n?.gap?`column-gap: ${n.gap};`:``,s=`
52
55
  .${a} {
53
56
  display: grid;
54
57
  grid-auto-flow: column;
55
58
  ${o}
56
59
  }
57
- `;return t`
58
- <lyco-component name="GridCol">
60
+ `;return d(`GridCol`,e`
59
61
  <style>
60
62
  ${s}
61
63
  </style>
62
- <div class="${a}">${n(r)}</div>
63
- </lyco-component>
64
- `}function v(e,r){if(r===void 0){let n=n=>v(e,n??t``);return n.html=(n,...r)=>v(e,t(n,...r)),n}return t`
65
- <div style="${e?.span?`grid-column: span ${e.span};`:``}">
66
- ${n(r)}
64
+ <div class="${a}">${t(r)}</div>
65
+ `)}function v(n,r){if(r===void 0){let t=t=>v(n,t??e``);return t.html=(t,...r)=>v(n,e(t,...r)),t}return e`
66
+ <div style="${n?.span?`grid-column: span ${n.span};`:``}">
67
+ ${t(r)}
67
68
  </div>
68
- `}function y(e,r){if(r===void 0){let n=n=>y(e,n??t``);return n.html=(n,...r)=>y(e,t(n,...r)),n}let i=u.value,a=l(`GridRow::grid-row`)+`-lyco-now-${i}`,o=e?.gap?`row-gap: ${e.gap};`:``,s=`
69
+ `}function y(n,r){if(r===void 0){let t=t=>y(n,t??e``);return t.html=(t,...r)=>y(n,e(t,...r)),t}let i=u(`GridRow`),a=c(`GridRow::grid-row`)+`-lyco-now-`+i,o=n?.gap?`row-gap: ${n.gap};`:``,s=`
69
70
  .${a} {
70
71
  display: grid;
71
72
  grid-auto-flow: row;
72
73
  ${o}
73
74
  }
74
- `;return t`
75
- <lyco-component name="GridRow">
75
+ `;return d(`GridRow`,e`
76
76
  <style>
77
77
  ${s}
78
78
  </style>
79
- <div class="${a}">${n(r)}</div>
80
- </lyco-component>
81
- `}function b(e,n){return n===void 0?n=>b(e,n??[t``]):t`
79
+ <div class="${a}">${t(r)}</div>
80
+ `)}function b(t,r){return r===void 0?n=>b(t,n??[e``]):e`
82
81
  <div
83
82
  style="
84
83
  display: flex;
85
84
  flex-direction: row;
86
- ${e?.space?`gap: ${e.space};`:``}
85
+ ${t?.space?`gap: ${t.space};`:``}
87
86
  "
88
87
  >
89
- ${r(n)}
88
+ ${n(r)}
90
89
  </div>
91
- `}function x(e,r){if(r===void 0){let n=n=>x(e,n??t``);return n.html=(n,...r)=>x(e,t(n,...r)),n}let i=e?.columnCount??3,a=e?.gap??`16px`,o=u.value,s=l(`WaterFlow::waterflow`)+`-lyco-now-${o}`;return t`
92
- <lyco-component name="WaterFlow">
90
+ `}function x(n,r){if(r===void 0){let t=t=>x(n,t??e``);return t.html=(t,...r)=>x(n,e(t,...r)),t}let i=n?.columnCount??3,a=n?.gap??`16px`,o=u(`WaterFlow`),s=c(`WaterFlow::waterflow`)+`-lyco-now-${o}`,l=`
91
+ /* 使用 CSS 类来控制多列布局 */
92
+ .${s} {
93
+ column-count: ${i};
94
+ column-gap: ${typeof a==`number`?`${a}px`:a};
95
+ }
96
+ /* 子元素如果是块级元素,需要让它们适应多列流式布局 */
97
+ .${s} > * {
98
+ display: inline-block;
99
+ width: 100%;
100
+ }
101
+ `;return d(`WaterFlow`,e`
93
102
  <style>
94
- /* 使用 CSS 类来控制多列布局 */
95
- .${s} {
96
- column-count: ${i};
97
- column-gap: ${typeof a==`number`?`${a}px`:a};
98
- }
99
- /* 子元素如果是块级元素,需要让它们适应多列流式布局 */
100
- .${s} > * {
101
- display: inline-block;
102
- width: 100%;
103
- }
103
+ ${l}
104
104
  </style>
105
105
 
106
- <div class="${s}">${n(r)}</div>
107
- </lyco-component>
108
- `}function S(e,r){if(r===void 0){let n=n=>S(e,n??t``);return n.html=(n,...r)=>S(e,t(n,...r)),n}let i=e?.gap??`0px`,a=e?.firstHeight??`50%`,o=t``,s=t``;if(typeof r==`function`){var c;let e=(c=r.call)?.call(r,null)??[];o=e[0]??t``,s=e[1]??t``}else o=n(r);return t`
106
+ <div class="${s}">${t(r)}</div>
107
+ `)}function S(n,r){if(r===void 0){let t=t=>S(n,t??e``);return t.html=(t,...r)=>S(n,e(t,...r)),t}let i=n?.gap??`0px`,a=n?.firstHeight??`50%`,o=e``,s=e``;if(typeof r==`function`){var c;let t=(c=r.call)?.call(r,null)??[];o=t[0]??e``,s=t[1]??e``}else o=t(r);return e`
109
108
  <div
110
109
  style="
111
110
  display: flex;
@@ -118,7 +117,7 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
118
117
  <div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
119
118
  <div style="flex: 1 1 auto; overflow: auto;">${s}</div>
120
119
  </div>
121
- `}function C(e,r){if(r===void 0){let n=n=>C(e,n??t``);return n.html=(n,...r)=>C(e,t(n,...r)),n}let i=e?.gap??`0px`,a=e?.firstWidth??`50%`,o=t``,s=t``;if(typeof r==`function`){var c;let e=(c=r.call)?.call(r,null)??[];o=e[0]??t``,s=e[1]??t``}else o=n(r);return t`
120
+ `}function C(n,r){if(r===void 0){let t=t=>C(n,t??e``);return t.html=(t,...r)=>C(n,e(t,...r)),t}let i=n?.gap??`0px`,a=n?.firstWidth??`50%`,o=e``,s=e``;if(typeof r==`function`){var c;let t=(c=r.call)?.call(r,null)??[];o=t[0]??e``,s=t[1]??e``}else o=t(r);return e`
122
121
  <div
123
122
  style="
124
123
  display: flex;
@@ -131,30 +130,30 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
131
130
  <div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
132
131
  <div style="flex: 1 1 auto; overflow: auto;">${s}</div>
133
132
  </div>
134
- `}function w(e,r){if(r===void 0){let n=n=>w(e,n??t``);return n.html=(n,...r)=>w(e,t(n,...r)),n}let i=e?.direction??`vertical`,a=e?.height??`100%`,o=e?.width??`100%`,s=e?.customCss??``,c=u.value,d=e?.className??l(`ScrollBar::scrollbar-container`)+`-lyco-now-${c}`,f=i===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`;return t`
135
- <lyco-component name="ScrollBar">
133
+ `}function w(n,r){if(r===void 0){let t=t=>w(n,t??e``);return t.html=(t,...r)=>w(n,e(t,...r)),t}let i=n?.direction??`vertical`,a=n?.height??`100%`,o=n?.width??`100%`,s=n?.customCss??``,l=u(`ScrollBar`),f=n?.className??c(`ScrollBar::scrollbar-container`)+`-lyco-now-`+l,p=i===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`,m=`
134
+ .${f} {
135
+ ${p};
136
+ width: ${o};
137
+ height: ${a};
138
+ }
139
+ .${f}::-webkit-scrollbar {
140
+ width: 8px;
141
+ height: 8px;
142
+ }
143
+ .${f}::-webkit-scrollbar-thumb {
144
+ background-color: rgba(0, 0, 0, 0.2);
145
+ border-radius: 4px;
146
+ }
147
+ .${f}::-webkit-scrollbar-track {
148
+ background: rgba(0, 0, 0, 0.05);
149
+ }
150
+ ${s}
151
+ `;return d(`ScrollBar`,e`
136
152
  <style>
137
- .${d} {
138
- ${f};
139
- width: ${o};
140
- height: ${a};
141
- }
142
- .${d}::-webkit-scrollbar {
143
- width: 8px;
144
- height: 8px;
145
- }
146
- .${d}::-webkit-scrollbar-thumb {
147
- background-color: rgba(0, 0, 0, 0.2);
148
- border-radius: 4px;
149
- }
150
- .${d}::-webkit-scrollbar-track {
151
- background: rgba(0, 0, 0, 0.05);
152
- }
153
- ${s}
153
+ ${m}
154
154
  </style>
155
- <div class="${d}">${n(r)}</div>
156
- </lyco-component>
157
- `}function T(e,n){if(n===void 0)return n=>T(e,n??[t``]);let i=e?.sidebarWidth??`240px`,a=e?.sidebarPosition??`left`,o=e?.gap??`0px`,s=t``,c=t``;if(typeof n==`function`){var l;let e=(l=n.call)?.call(n,null)??[];s=e[0]??t``,c=e[1]??t``}else c=r(n);return t`
155
+ <div class="${f}">${t(r)}</div>
156
+ `)}function T(t,r){if(r===void 0)return n=>T(t,n??[e``]);let i=t?.sidebarWidth??`240px`,a=t?.sidebarPosition??`left`,o=t?.gap??`0px`,s=e``,c=e``;if(typeof r==`function`){var l;let t=(l=r.call)?.call(r,null)??[];s=t[0]??e``,c=t[1]??e``}else c=n(r);return e`
158
157
  <div
159
158
  style="
160
159
  display: flex;
@@ -167,175 +166,175 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
167
166
  <div style="flex: 0 0 ${i}; overflow: auto;">${s}</div>
168
167
  <div style="flex: 1 1 auto; overflow: auto;">${c}</div>
169
168
  </div>
170
- `}function E(e={},n){if(n===void 0)return n=>E(e,n??[t``]);let r=u.value,{gap:i=`8px`,snapType:a=`mandatory`,height:o=`auto`,width:s=`100%`,className:c=l(`Swiper::swiper`)+`-lyco-now-${r}`,direction:d=`x`,scrollBehavior:f=`smooth`,align:p=`start`,showNavigation:m=!0,navigationPosition:h=`inside`,showPagination:g=!0,paginationType:_=`dots`,autoPlay:v=!1,interval:y=3e3,loop:b=!1,touchEnabled:x=!0,mouseWheel:S=!1,onSlideChange:C}=e,w=c,T=w+`-container`,D=w+`-slide`,O=w+`-navigation`,k=w+`-pagination`,A;A=n?typeof n==`function`?n():n:[];let j=A.length,[M,N]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,j-1));e.value!==n&&(e.value=n,C?.(n))}]})(),P=e=>{let t=typeof document<`u`?document.querySelector(`.${T}`):null;if(!t)return;let n=t.querySelectorAll(`.${D}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;d===`x`?(o=r.offsetLeft-t.offsetLeft,p===`center`?o-=(a.width-i.width)/2:p===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:f})):(o=r.offsetTop-t.offsetTop,p===`center`?o-=(a.height-i.height)/2:p===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:f})),N(e)},F=()=>{let e=M()+1>=j?b?0:M():M()+1;P(e)},I=()=>{let e=M()-1<0?b?j-1:M():M()-1;P(e)},L=()=>{let e=typeof document<`u`?document.querySelector(`.${T}`):null;if(!e)return;let t=e.querySelectorAll(`.${D}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(d===`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)}),N(n)},R=e=>{if(!x)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},z=e=>{if(!x)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)||d===`x`)&&e.preventDefault()},B=e=>{if(!x)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&&(d===`x`?a>0?I():F():o>0?I():F()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},V=e=>{S&&(e.preventDefault(),e.deltaY>0?F():I())},H=e=>{if(!v||!e)return;let t,n=()=>{t=setInterval(F,y)},r=()=>{clearInterval(t)};return e.addEventListener(`mouseenter`,r),e.addEventListener(`mouseleave`,n),n(),()=>{clearInterval(t),e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mouseleave`,n)}},U=()=>{let e=typeof document<`u`?document.querySelector(`.${T}`):null;if(!e)return;let t=[];e.addEventListener(`scroll`,L),t.push(()=>e.removeEventListener(`scroll`,L)),x&&(e.addEventListener(`touchstart`,R),e.addEventListener(`touchmove`,z,{passive:!1}),e.addEventListener(`touchend`,B),t.push(()=>e.removeEventListener(`touchstart`,R)),t.push(()=>e.removeEventListener(`touchmove`,z)),t.push(()=>e.removeEventListener(`touchend`,B))),S&&(e.addEventListener(`wheel`,V,{passive:!1}),t.push(()=>e.removeEventListener(`wheel`,V)));let n=H(e);return n&&t.push(n),P(0),()=>t.forEach(e=>e())};typeof window<`u`&&typeof document<`u`&&setTimeout(U,0);let W=t`
171
- <div class="${k}">
172
- ${Array.from({length:j},(e,n)=>t`
169
+ `}function E(t={},n){if(n===void 0)return n=>E(t,n??[e``]);let r=u(`Swiper`),{gap:i=`8px`,snapType:a=`mandatory`,height:o=`auto`,width:s=`100%`,className:l=c(`Swiper::swiper`)+`-lyco-now-${r}`,direction:f=`x`,scrollBehavior:p=`smooth`,align:m=`start`,showNavigation:h=!0,navigationPosition:g=`inside`,showPagination:_=!0,paginationType:v=`dots`,autoPlay:y=!1,interval:b=3e3,loop:x=!1,touchEnabled:S=!0,mouseWheel:C=!1,onSlideChange:w}=t,T=l,D=T+`-container`,O=T+`-slide`,k=T+`-navigation`,A=T+`-pagination`,j;j=n?typeof n==`function`?n():n:[];let M=j.length,[N,P]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,M-1));e.value!==n&&(e.value=n,w?.(n))}]})(),F=e=>{let t=typeof document<`u`?document.querySelector(`.${D}`):null;if(!t)return;let n=t.querySelectorAll(`.${O}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;f===`x`?(o=r.offsetLeft-t.offsetLeft,m===`center`?o-=(a.width-i.width)/2:m===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:p})):(o=r.offsetTop-t.offsetTop,m===`center`?o-=(a.height-i.height)/2:m===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:p})),P(e)},I=()=>{let e=N()+1>=M?x?0:N():N()+1;F(e)},L=()=>{let e=N()-1<0?x?M-1:N():N()-1;F(e)},R=()=>{let e=typeof document<`u`?document.querySelector(`.${D}`):null;if(!e)return;let t=e.querySelectorAll(`.${O}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(f===`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)}),P(n)},z=e=>{if(!S)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},B=e=>{if(!S)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)||f===`x`)&&e.preventDefault()},V=e=>{if(!S)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&&(f===`x`?a>0?L():I():o>0?L():I()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},H=e=>{C&&(e.preventDefault(),e.deltaY>0?I():L())},U=e=>{if(!y||!e)return;let t,n=()=>{t=setInterval(I,b)},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(`.${D}`):null;if(!e)return;let t=[];e.addEventListener(`scroll`,R),t.push(()=>e.removeEventListener(`scroll`,R)),S&&(e.addEventListener(`touchstart`,z),e.addEventListener(`touchmove`,B,{passive:!1}),e.addEventListener(`touchend`,V),t.push(()=>e.removeEventListener(`touchstart`,z)),t.push(()=>e.removeEventListener(`touchmove`,B)),t.push(()=>e.removeEventListener(`touchend`,V))),C&&(e.addEventListener(`wheel`,H,{passive:!1}),t.push(()=>e.removeEventListener(`wheel`,H)));let n=U(e);return n&&t.push(n),F(0),()=>t.forEach(e=>e())};typeof window<`u`&&typeof document<`u`&&setTimeout(W,0);let G=e`
170
+ <div class="${A}">
171
+ ${Array.from({length:M},(t,n)=>e`
173
172
  <button
174
- class="${n===M()?`active`:``}"
175
- @click=${()=>P(n)}
173
+ class="${n===N()?`active`:``}"
174
+ @click=${()=>F(n)}
176
175
  ></button>
177
176
  `)}
178
177
  </div>
179
- `,G=t`
180
- <div class="${k} fraction">
181
- <span class="current">${M()+1}</span>
178
+ `,K=e`
179
+ <div class="${A} fraction">
180
+ <span class="current">${N()+1}</span>
182
181
  <span class="separator">/</span>
183
- <span class="total">${j}</span>
182
+ <span class="total">${M}</span>
184
183
  </div>
185
- `,K=t`
186
- <div class="${k} progressbar">
184
+ `,q=e`
185
+ <div class="${A} progressbar">
187
186
  <div
188
187
  class="progress"
189
- style="width: ${j>1?M()/(j-1)*100:0}%"
188
+ style="width: ${M>1?N()/(M-1)*100:0}%"
190
189
  ></div>
191
190
  </div>
192
- `,q=t`
193
- <div class="${O}">
194
- <button class="prev" @click=${I}>◀</button>
195
- <button class="next" @click=${F}>▶</button>
191
+ `,J=e`
192
+ <div class="${k}">
193
+ <button class="prev" @click=${L}>◀</button>
194
+ <button class="next" @click=${I}>▶</button>
196
195
  </div>
197
- `;return t`
198
- <lyco-component name="Swiper">
199
- <style>
200
- .${w} {
201
- position: relative;
202
- overflow: hidden;
203
- width: ${s};
204
- height: ${o};
205
- }
196
+ `,Y=`
197
+ .${T} {
198
+ position: relative;
199
+ overflow: hidden;
200
+ width: ${s};
201
+ height: ${o};
202
+ }
206
203
 
207
- .${T} {
208
- width: 100%;
209
- height: 100%;
210
- overflow: auto;
211
- scroll-snap-type: ${d+` `+a};
212
- -webkit-overflow-scrolling: touch;
213
- scroll-behavior: ${f};
214
- gap: ${i};
215
- display: flex;
216
- flex-direction: ${d===`x`?`row`:`column`};
217
- }
204
+ .${D} {
205
+ width: 100%;
206
+ height: 100%;
207
+ overflow: auto;
208
+ scroll-snap-type: ${f+` `+a};
209
+ -webkit-overflow-scrolling: touch;
210
+ scroll-behavior: ${p};
211
+ gap: ${i};
212
+ display: flex;
213
+ flex-direction: ${f===`x`?`row`:`column`};
214
+ }
218
215
 
219
- .${D} {
220
- scroll-snap-align: ${p};
221
- flex-shrink: 0;
222
- }
216
+ .${O} {
217
+ scroll-snap-align: ${m};
218
+ flex-shrink: 0;
219
+ }
223
220
 
224
- .${O} {
225
- position: absolute;
226
- top: 50%;
227
- left: 0;
228
- right: 0;
229
- transform: translateY(-50%);
230
- display: flex;
231
- justify-content: space-between;
232
- pointer-events: none;
233
- padding: ${h===`outside`?`0 1rem`:`0 0.5rem`};
234
- }
221
+ .${k} {
222
+ position: absolute;
223
+ top: 50%;
224
+ left: 0;
225
+ right: 0;
226
+ transform: translateY(-50%);
227
+ display: flex;
228
+ justify-content: space-between;
229
+ pointer-events: none;
230
+ padding: ${g===`outside`?`0 1rem`:`0 0.5rem`};
231
+ }
235
232
 
236
- .${O} button {
237
- width: 2.5rem;
238
- height: 2.5rem;
239
- border-radius: 50%;
240
- background-color: rgba(0, 0, 0, 0.5);
241
- color: white;
242
- border: none;
243
- display: flex;
244
- align-items: center;
245
- justify-content: center;
246
- cursor: pointer;
247
- pointer-events: auto;
248
- transition: background-color 0.3s;
249
- }
233
+ .${k} button {
234
+ width: 2.5rem;
235
+ height: 2.5rem;
236
+ border-radius: 50%;
237
+ background-color: rgba(0, 0, 0, 0.5);
238
+ color: white;
239
+ border: none;
240
+ display: flex;
241
+ align-items: center;
242
+ justify-content: center;
243
+ cursor: pointer;
244
+ pointer-events: auto;
245
+ transition: background-color 0.3s;
246
+ }
250
247
 
251
- .${O} button:hover {
252
- background-color: rgba(0, 0, 0, 0.8);
253
- }
248
+ .${k} button:hover {
249
+ background-color: rgba(0, 0, 0, 0.8);
250
+ }
254
251
 
255
- .${k} {
256
- position: absolute;
257
- bottom: 1rem;
258
- left: 0;
259
- right: 0;
260
- display: flex;
261
- justify-content: center;
262
- gap: 0.5rem;
263
- align-items: center;
264
- }
265
- .${k} button {
266
- width: 0.75rem;
267
- height: 0.75rem;
268
- border-radius: 50%;
269
- background-color: rgba(255, 255, 255, 0.5);
270
- border: none;
271
- cursor: pointer;
272
- transition: background-color 0.3s, transform 0.3s;
273
- }
274
- .${k} button.active {
275
- background-color: white;
276
- transform: scale(1.2);
277
- }
252
+ .${A} {
253
+ position: absolute;
254
+ bottom: 1rem;
255
+ left: 0;
256
+ right: 0;
257
+ display: flex;
258
+ justify-content: center;
259
+ gap: 0.5rem;
260
+ align-items: center;
261
+ }
262
+ .${A} button {
263
+ width: 0.75rem;
264
+ height: 0.75rem;
265
+ border-radius: 50%;
266
+ background-color: rgba(255, 255, 255, 0.5);
267
+ border: none;
268
+ cursor: pointer;
269
+ transition: background-color 0.3s, transform 0.3s;
270
+ }
271
+ .${A} button.active {
272
+ background-color: white;
273
+ transform: scale(1.2);
274
+ }
278
275
 
279
- .${k}.fraction {
280
- position: absolute;
281
- bottom: 1rem;
282
- left: 50%;
283
- transform: translateX(-50%);
284
- color: white;
285
- font-size: 1rem;
286
- display: flex;
287
- align-items: center;
288
- gap: 0.25rem;
289
- }
276
+ .${A}.fraction {
277
+ position: absolute;
278
+ bottom: 1rem;
279
+ left: 50%;
280
+ transform: translateX(-50%);
281
+ color: white;
282
+ font-size: 1rem;
283
+ display: flex;
284
+ align-items: center;
285
+ gap: 0.25rem;
286
+ }
290
287
 
291
- .${k}.progressbar {
292
- position: absolute;
293
- bottom: 0.5rem;
294
- left: 0;
295
- right: 0;
296
- height: 0.25rem;
297
- background-color: rgba(255, 255, 255, 0.2);
298
- }
299
- .${k}.progressbar .progress {
300
- height: 100%;
301
- background-color: white;
302
- transition: width 0.3s;
303
- }
288
+ .${A}.progressbar {
289
+ position: absolute;
290
+ bottom: 0.5rem;
291
+ left: 0;
292
+ right: 0;
293
+ height: 0.25rem;
294
+ background-color: rgba(255, 255, 255, 0.2);
295
+ }
296
+ .${A}.progressbar .progress {
297
+ height: 100%;
298
+ background-color: white;
299
+ transition: width 0.3s;
300
+ }
301
+ `;return d(`Swiper`,e`
302
+ <style>
303
+ ${Y}
304
304
  </style>
305
305
 
306
- <div class="${w}">
307
- <div class="${T}">
308
- ${A.map((e,n)=>t`
309
- <div class="${D} --slide-${n}" key=${n}>
310
- ${e}
306
+ <div class="${T}">
307
+ <div class="${D}">
308
+ ${j.map((t,n)=>e`
309
+ <div class="${O} --slide-${n}" key=${n}>
310
+ ${t}
311
311
  </div>
312
312
  `)}
313
313
  </div>
314
314
 
315
- ${m?q:null}
316
- ${g&&_===`dots`?W:null}
317
- ${g&&_===`fraction`?G:null}
318
- ${g&&_===`progressbar`?K:null}
315
+ ${h?J:null}
316
+ ${_&&v===`dots`?G:null}
317
+ ${_&&v===`fraction`?K:null}
318
+ ${_&&v===`progressbar`?q:null}
319
319
  </div>
320
- </lyco-component>
321
- `}function D(e,r){let i=e?.top?`top: ${e.top};`:``,o=e?.right?`right: ${e.right};`:``,s=e?.bottom?`bottom: ${e.bottom};`:``,c=e?.left?`left: ${e.left};`:``,l=e?.width?`width: ${e.width};`:``,u=e?.height?`height: ${e.height};`:``,d=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,f=e?.style?e.style:``,p=e?.className?e.className:``,m=e=>t`
320
+ `)}function D(n,r){let a=n?.top?`top: ${n.top};`:``,o=n?.right?`right: ${n.right};`:``,s=n?.bottom?`bottom: ${n.bottom};`:``,c=n?.left?`left: ${n.left};`:``,l=n?.width?`width: ${n.width};`:``,u=n?.height?`height: ${n.height};`:``,d=typeof n?.zIndex==`number`?`z-index: ${n.zIndex};`:``,f=n?.style?n.style:``,p=n?.className?n.className:``,m=n=>e`
322
321
  <div
323
322
  class="${p}"
324
323
  style="
325
324
  position: absolute;
326
- ${i} ${o} ${s} ${c}
325
+ ${a} ${o} ${s} ${c}
327
326
  ${l} ${u}
328
327
  ${d}
329
328
  ${f}
330
329
  "
331
330
  >
332
- ${n(e)}
331
+ ${t(n)}
333
332
  </div>
334
- `;return a(r,m)}function O(e,n){let r=e?.width??`300px`,i=e?.height??`auto`,a=e?.top??`20%`,s=e?.bottom??`auto`,c=e?.left??`50%`,l=e?.right??`auto`,u=c===`auto`?``:`transform: translateX(-50%);`,d=e?.background??`rgba(255, 255, 255, 0.3)`,f=e?.blur??`10px`,p=e?.borderRadius??`12px`,m=e?.padding??`16px`,h=e?.zIndex??1e3,g=e=>t`
333
+ `;return i(r,m)}function O(t,n){let r=t?.width??`300px`,i=t?.height??`auto`,o=t?.top??`20%`,s=t?.bottom??`auto`,c=t?.left??`50%`,l=t?.right??`auto`,u=c===`auto`?``:`transform: translateX(-50%);`,d=t?.background??`rgba(255, 255, 255, 0.3)`,f=t?.blur??`10px`,p=t?.borderRadius??`12px`,m=t?.padding??`16px`,h=t?.zIndex??1e3,g=t=>e`
335
334
  <div
336
335
  style="
337
336
  position: fixed;
338
- top: ${a};
337
+ top: ${o};
339
338
  bottom: ${s};
340
339
  left: ${c};
341
340
  right: ${l};
@@ -353,9 +352,9 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
353
352
  flex-direction: column;
354
353
  "
355
354
  >
356
- ${e}
355
+ ${t}
357
356
  </div>
358
- `;return o(n,void 0,g)}function k(e,n){if(n===void 0)return n=>k(e,n??[t``]);let i=`${100/e.ratio}%`,a=e.maxWidth?`max-width: ${e.maxWidth};`:``,o=e.background?`background: ${e.background};`:``,s=e.overflow??`hidden`;return t`
357
+ `;return a(n,void 0,g)}function k(t,r){if(r===void 0)return n=>k(t,n??[e``]);let i=`${100/t.ratio}%`,a=t.maxWidth?`max-width: ${t.maxWidth};`:``,o=t.background?`background: ${t.background};`:``,s=t.overflow??`hidden`;return e`
359
358
  <div
360
359
  style="
361
360
  position: relative;
@@ -375,23 +374,21 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
375
374
  height: 100%;
376
375
  "
377
376
  >
378
- ${r(n)}
377
+ ${n(r)}
379
378
  </div>
380
379
  </div>
381
- `}function A(e,r){if(r===void 0){let n=t=>A(e,t);return n.html=(n,...r)=>A(e,t(n,...r)),n}let i=u.value,a=l(`AutoFitGrid::auto-fit-grid`)+`-lyco-now-${i}`,o=e?.gap??`16px`,s=`
380
+ `}function A(n,r){if(r===void 0){let t=e=>A(n,e);return t.html=(t,...r)=>A(n,e(t,...r)),t}let i=u(`AutoFitGrid`),a=c(`AutoFitGrid::auto-fit-grid`)+`-lyco-now-`+i,o=n?.gap??`16px`,s=`
382
381
  .${a} {
383
382
  display: grid;
384
- grid-template-columns: repeat(auto-fit, minmax(${e.minItemWidth}, 1fr));
383
+ grid-template-columns: repeat(auto-fit, minmax(${n.minItemWidth}, 1fr));
385
384
  gap: ${o};
386
385
  }
387
- `;return t`
388
- <lyco-component name="AutoFitGrid">
386
+ `;return d(`AutoFitGrid`,e`
389
387
  <style>
390
388
  ${s}
391
389
  </style>
392
- <div class="${a}">${n(r)}</div>
393
- </lyco-component>
394
- `}function j(e,n){if(n===void 0)return n=>j(e,n??[t``]);let i=e?.size??`32px`,a=e?.overlap??`-8px`,o=(e,n)=>t`
390
+ <div class="${a}">${t(r)}</div>
391
+ `)}function j(t,r){if(r===void 0)return n=>j(t,n??[e``]);let i=t?.size??`32px`,a=t?.overlap??`-8px`,o=(t,n)=>e`
395
392
  <div
396
393
  style="
397
394
  width: ${i};
@@ -403,15 +400,15 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
403
400
  box-sizing: content-box;
404
401
  "
405
402
  >
406
- ${e}
403
+ ${t}
407
404
  </div>
408
- `;return t`
405
+ `;return e`
409
406
  <div style="display: flex; align-items: center;">
410
- ${r(n,o)}
407
+ ${n(r,o)}
411
408
  </div>
412
- `}function M(e,r){if(r===void 0){let n=n=>M(e,n??t``);return n.html=(n,...r)=>M(e,t(n,...r)),n}let i=e?.position??`top-right`,a=e?.size??`16px`,o=e?.background??`red`,s=e?.color??`#fff`,[c,l,u,d]=[i.includes(`top`)?`0`:`auto`,i.includes(`right`)?`0`:`auto`,i.includes(`bottom`)?`0`:`auto`,i.includes(`left`)?`0`:`auto`];return t`
409
+ `}function M(n,r){if(r===void 0){let t=t=>M(n,t??e``);return t.html=(t,...r)=>M(n,e(t,...r)),t}let i=n?.position??`top-right`,a=n?.size??`16px`,o=n?.background??`red`,s=n?.color??`#fff`,[c,l,u,d]=[i.includes(`top`)?`0`:`auto`,i.includes(`right`)?`0`:`auto`,i.includes(`bottom`)?`0`:`auto`,i.includes(`left`)?`0`:`auto`];return e`
413
410
  <div style="position: relative; display: inline-block;">
414
- ${n(r)}
411
+ ${t(r)}
415
412
  <div
416
413
  style="
417
414
  position: absolute;
@@ -431,10 +428,10 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
431
428
  transform: translate(${d===`0`?`-50%`:`0`}, ${c===`0`?`-50%`:`0`});
432
429
  "
433
430
  >
434
- ${e?.content??``}
431
+ ${n?.content??``}
435
432
  </div>
436
433
  </div>
437
- `}function N(e,n){if(n===void 0)return n=>N(e,n??[t``]);let i=e?.padding??`16px`,a=e?.borderRadius??`8px`,o=e?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,s=e?.background??`#fff`;return t`
434
+ `}function N(t,r){if(r===void 0)return n=>N(t,n??[e``]);let i=t?.padding??`16px`,a=t?.borderRadius??`8px`,o=t?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,s=t?.background??`#fff`;return e`
438
435
  <div
439
436
  style="
440
437
  background: ${s};
@@ -444,9 +441,9 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
444
441
  box-sizing: border-box;
445
442
  "
446
443
  >
447
- ${r(n)}
444
+ ${n(r)}
448
445
  </div>
449
- `}function P(e,r){if(r===void 0){let n=n=>P(e,n??t``);return n.html=(n,...r)=>P(e,t(n,...r)),n}let i=e?.width?`width: ${e.width};`:``,a=e?.height?`height: ${e.height};`:``,o=e?.background?`background: ${e.background};`:``;return t`
446
+ `}function P(n,r){if(r===void 0){let t=t=>P(n,t??e``);return t.html=(t,...r)=>P(n,e(t,...r)),t}let i=n?.width?`width: ${n.width};`:``,a=n?.height?`height: ${n.height};`:``,o=n?.background?`background: ${n.background};`:``;return e`
450
447
  <div
451
448
  style="
452
449
  display: flex;
@@ -455,9 +452,9 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
455
452
  ${i} ${a} ${o}
456
453
  "
457
454
  >
458
- ${n(r)}
455
+ ${t(r)}
459
456
  </div>
460
- `}function F(e,n){if(n===void 0)return n=>F(e,n??[t``]);let i=e?.maxWidth??`1024px`,a=e?.padding??`0 16px`,o=e?.background?`background: ${e.background};`:``,s=e?.fullHeight?`height: 100%;`:``;return t`
457
+ `}function F(t,r){if(r===void 0)return n=>F(t,n??[e``]);let i=t?.maxWidth??`1024px`,a=t?.padding??`0 16px`,o=t?.background?`background: ${t.background};`:``,s=t?.fullHeight?`height: 100%;`:``;return e`
461
458
  <div
462
459
  style="
463
460
  width: 100%;
@@ -470,9 +467,9 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
470
467
  box-sizing: border-box;
471
468
  "
472
469
  >
473
- ${r(n)}
470
+ ${n(r)}
474
471
  </div>
475
- `}function I(e){let n=e?.orientation??`horizontal`,r=e?.thickness??`1px`,i=e?.color??`#e0e0e0`,a=e?.margin??(n===`horizontal`?`8px 0`:`0 8px`),o=n===`horizontal`?`width: 100%; height: ${r}; background: ${i}; margin: ${a};`:`width: ${r}; height: 100%; background: ${i}; margin: ${a};`;return t`<div style="${o}"></div>`}function L(e,r){if(r===void 0){let n=n=>L(e,n??t``);return n.html=(n,...r)=>L(e,t(n,...r)),n}let i=e?.columns??4,a=e?.gap??`24px`,o=e?.background??`#f8f8f8`,s=e?.padding??`40px 16px`;return t`
472
+ `}function I(t){let n=t?.orientation??`horizontal`,r=t?.thickness??`1px`,i=t?.color??`#e0e0e0`,a=t?.margin??(n===`horizontal`?`8px 0`:`0 8px`),o=n===`horizontal`?`width: 100%; height: ${r}; background: ${i}; margin: ${a};`:`width: ${r}; height: 100%; background: ${i}; margin: ${a};`;return e`<div style="${o}"></div>`}function L(n,r){if(r===void 0){let t=t=>L(n,t??e``);return t.html=(t,...r)=>L(n,e(t,...r)),t}let i=n?.columns??4,a=n?.gap??`24px`,o=n?.background??`#f8f8f8`,s=n?.padding??`40px 16px`;return e`
476
473
  <div
477
474
  style="
478
475
  width: 100%;
@@ -488,30 +485,27 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
488
485
  gap: ${a};
489
486
  "
490
487
  >
491
- ${n(r)}
488
+ ${t(r)}
492
489
  </div>
493
490
  <div style="text-align: center; margin-top: 24px; color: #666;">
494
491
  © ${new Date().getFullYear()} Your Company. All rights reserved.
495
492
  </div>
496
493
  </div>
497
- `}function R(e,r){if(r===void 0){let n=n=>R(e,n??t``);return n.html=(n,...r)=>R(e,t(n,...r)),n}let i=e.defaultColumns??1,a=e.gap??`16px`,o=u.value,s=e.className??l(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-${o}`,c=Object.entries(e.breakpoints).map(([e,t])=>`
498
- @media ${e} {
499
- .${s} { grid-template-columns: repeat(${t}, 1fr); }
500
- }
501
- `).join(`
502
- `);return t`
503
- <lyco-component name="GridBreakpoint">
494
+ `}function R(n,r){if(r===void 0){let t=t=>R(n,t??e``);return t.html=(t,...r)=>R(n,e(t,...r)),t}let i=n.defaultColumns??1,a=n.gap??`16px`,o=u(`GridBreakpoint`),s=n.className??c(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+o,l=Object.entries(n.breakpoints).map(([e,t])=>`@media`+e+`{
495
+ `+s+`{ grid-template-columns: repeat(`+t+`, 1fr); }
496
+ }`).join(`
497
+ `),f=`
498
+ .${s} {
499
+ display: grid;
500
+ grid-template-columns: repeat(${i}, 1fr);
501
+ gap: ${a};
502
+ }
503
+ ${l}`;return d(`GridBreakpoint`,e`
504
504
  <style>
505
- .${s} {
506
- display: grid;
507
- grid-template-columns: repeat(${i}, 1fr);
508
- gap: ${a};
509
- }
510
- ${c}
505
+ ${f}
511
506
  </style>
512
- <div class="${s}">${n(r)}</div>
513
- </lyco-component>
514
- `}function z(e,n){if(n===void 0)return n=>z(e,n??[t``]);let i=e?.backgroundImage?`background-image: url('${e.backgroundImage}');`:``,a=e?.height??`400px`,o=e?.overlayColor??`rgba(0, 0, 0, 0.3)`;return t`
507
+ <div class="${s}">${t(r)}</div>
508
+ `)}function z(t,r){if(r===void 0)return n=>z(t,n??[e``]);let i=t?.backgroundImage?`background-image: url('${t.backgroundImage}');`:``,a=t?.height??`400px`,o=t?.overlayColor??`rgba(0, 0, 0, 0.3)`;return e`
515
509
  <div
516
510
  style="
517
511
  position: relative;
@@ -545,44 +539,43 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
545
539
  box-sizing: border-box;
546
540
  "
547
541
  >
548
- ${r(n)}
542
+ ${n(r)}
549
543
  </div>
550
544
  </div>
551
- `}function B(e,r){if(r===void 0){let n=n=>B(e,n??t``);return n.html=(n,...r)=>B(e,t(n,...r)),n}let i=e?.breakpoint??`(max-width: 600px)`,a=e?.mode??`hide`,o=u.value,s=e?.className??l(`Hidden::hidden-container`)+`-lyco-now-${o}`,c=a===`hide`?`@media ${i} { .${s} { display: none !important; } }`:`@media ${i} { .${s} { display: block !important; } }
552
- @media not ${i} { .${s} { display: none !important; } }`;return t`
553
- <lyco-component name="Hidden">
545
+ `}function B(n,r){if(r===void 0){let t=t=>B(n,t??e``);return t.html=(t,...r)=>B(n,e(t,...r)),t}let i=n?.breakpoint??`(max-width: 600px)`,a=n?.mode??`hide`,o=u(`Hidden`),s=n?.className??c(`Hidden::hidden-container`)+`-lyco-now-`+o,l=a===`hide`?`@media ${i} { .${s} { display: none !important; } }`:`@media ${i} { .${s} { display: block !important; } }
546
+ @media not ${i} { .${s} { display: none !important; } }`,f=`
547
+ .${s} {
548
+ display: block;
549
+ }
550
+ ${l}`;return d(`Hidden`,e`
554
551
  <style>
555
- .${s} {
556
- display: block;
557
- }
558
- ${c}
552
+ ${f}
559
553
  </style>
560
- <div class="${s}">${n(r)}</div>
561
- </lyco-component>
562
- `}function V(e,n){let i=e?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,a=e?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=e?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,c=u.value,d=e?.className??l(`ListGroup::list-group`)+`-lyco-now-${c}`,f=(e,n,r,i)=>r?t` <li>${e}</li> `:e,p=n=>t`
563
- <lyco-component name="ListGroup">
564
- <style>
565
- ul.${d} {
566
- list-style: none;
567
- margin: 0;
568
- padding: 0;
569
- ${i};
570
- }
571
- ul.${d} li {
572
- padding: 12px 16px;
573
- ${e?.bordered?`border-bottom: 1px solid #ddd`:``};
574
- }
575
- ul.${d} li:last-child {
576
- ${e?.bordered?`border-bottom: none`:``};
577
- }
578
- ${a}
579
- ${s}
580
- </style>
581
- <ul class="${d}">
582
- ${r(n,f)}
583
- </ul>
584
- </lyco-component>
585
- `;return o(n,p)}function H(e,n){if(n===void 0)return n=>H(e,n??[t``]);let i=e?.background??`rgba(0, 0, 0, 0.5)`,a=e?.zIndex??1e3,o=e?.fullScreen!==!1;return t`
554
+ <div class="${s}">${t(r)}</div>
555
+ `)}function V(t,r){let i=t?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,o=t?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=t?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,l=u(`ListGroup`),f=t?.className??c(`ListGroup::list-group`)+`-lyco-now-`+l,p=(t,n,r,i)=>r?e` <li>${t}</li> `:t,m=`
556
+ ul.${f} {
557
+ list-style: none;
558
+ margin: 0;
559
+ padding: 0;
560
+ ${i};
561
+ }
562
+ ul.${f} li {
563
+ padding: 12px 16px;
564
+ ${t?.bordered?`border-bottom: 1px solid #ddd`:``};
565
+ }
566
+ ul.${f} li:last-child {
567
+ ${t?.bordered?`border-bottom: none`:``};
568
+ }
569
+ ${o}
570
+ ${s}
571
+ `,h=t=>d(`ListGroup`,e`
572
+ <style>
573
+ ${m}
574
+ </style>
575
+ <ul class="${f}">
576
+ ${n(t,p)}
577
+ </ul>
578
+ `);return a(r,h)}function H(t,r){if(r===void 0)return n=>H(t,n??[e``]);let i=t?.background??`rgba(0, 0, 0, 0.5)`,a=t?.zIndex??1e3,o=t?.fullScreen!==!1;return e`
586
579
  <div
587
580
  style="
588
581
  position: ${o?`fixed`:`absolute`};
@@ -594,9 +587,9 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
594
587
  align-items: center;
595
588
  "
596
589
  >
597
- ${r(n)}
590
+ ${n(r)}
598
591
  </div>
599
- `}function U(e,r){if(r===void 0){let n=n=>U(e,n??t``);return n.html=(n,...r)=>U(e,t(n,...r)),n}let i=e?.width?`width: ${e.width};`:``,a=e?.height?`height: ${e.height};`:``,o=e?.background?`background: ${e.background};`:``;return t`
592
+ `}function U(n,r){if(r===void 0){let t=t=>U(n,t??e``);return t.html=(t,...r)=>U(n,e(t,...r)),t}let i=n?.width?`width: ${n.width};`:``,a=n?.height?`height: ${n.height};`:``,o=n?.background?`background: ${n.background};`:``;return e`
600
593
  <div
601
594
  style="
602
595
  position: relative;
@@ -604,27 +597,25 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
604
597
  overflow: hidden;
605
598
  "
606
599
  >
607
- ${n(r)}
600
+ ${t(r)}
608
601
  </div>
609
- `}function W(e){let n=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``;return t` <div style="${n} ${r}"></div> `}function G(e){let n=e?.type??`rect`,r=e?.width??`100%`,i=e?.height??`16px`,a=e?.borderRadius??`4px`,o=e?.animation!==!1,s=u.value,c=e?.className??l(`SkeletonLoader::skeleton-shimmer`)+`-lyco-now-${s}`,d=n===`circle`?`border-radius: 50%; width: ${r}; height: ${r}`:`border-radius: ${a}; width: ${r}; height: ${i}`;return t`
610
- <lyco-component>
602
+ `}function W(t){let n=t?.width?`width: ${t.width};`:``,r=t?.height?`height: ${t.height};`:``;return e` <div style="${n} ${r}"></div> `}function G(t){let n=t?.type??`rect`,r=t?.width??`100%`,i=t?.height??`16px`,a=t?.borderRadius??`4px`,o=t?.animation!==!1,s=u(`SkeletonLoader`),l=t?.className??c(`SkeletonLoader::skeleton-shimmer`)+`-lyco-now-`+s,f=n===`circle`?`border-radius: 50%; width: ${r}; height: ${r}`:`border-radius: ${a}; width: ${r}; height: ${i}`;return d(`SkeletonLoader`,e`
611
603
  <style>
612
604
  ${`
613
- @keyframes ${c+`-shimmer`} {
614
- 0% { background-color: #eee; }
615
- 50% { background-color: #ddd; }
616
- 100% { background-color: #eee; }
617
- }
618
- `}
619
- .${c} {
620
- ${d};
605
+ @keyframes ${l+`-shimmer`} {
606
+ 0% { background-color: #eee; }
607
+ 50% { background-color: #ddd; }
608
+ 100% { background-color: #eee; }
609
+ }
610
+ `}
611
+ .${l} {
612
+ ${f};
621
613
  background-color: #eee;
622
- ${o?`animation: ${c+`-shimmer`} 1.2s infinite ease-in-out`:``};
614
+ ${o?`animation: ${l+`-shimmer`} 1.2s infinite ease-in-out`:``};
623
615
  }
624
616
  </style>
625
- <div class="${c}"></div>
626
- </lyco-component>
627
- `}function K(){return t`<div style="flex: 1 1 auto;"></div>`}function q(e,r){if(r===void 0){let n=n=>q(e,n??t``);return n.html=(n,...r)=>q(e,t(n,...r)),n}let i=e?.top?`top: ${e.top};`:``,a=e?.bottom?`bottom: ${e.bottom};`:``,o=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``;return t`
617
+ <div class="${l}"></div>
618
+ `)}function K(){return e`<div style="flex: 1 1 auto;"></div>`}function q(n,r){if(r===void 0){let t=t=>q(n,t??e``);return t.html=(t,...r)=>q(n,e(t,...r)),t}let i=n?.top?`top: ${n.top};`:``,a=n?.bottom?`bottom: ${n.bottom};`:``,o=typeof n?.zIndex==`number`?`z-index: ${n.zIndex};`:``;return e`
628
619
  <div
629
620
  style="
630
621
  position: sticky;
@@ -632,52 +623,52 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
632
623
  ${o}
633
624
  "
634
625
  >
635
- ${n(r)}
626
+ ${t(r)}
636
627
  </div>
637
- `}function J(e,r){if(r===void 0){let n=n=>J(e,n??t``);return n.html=(n,...r)=>J(e,t(n,...r)),n}let i=u.value,a=e?.className??l(`Table::table`)+`-lyco-now-${i}`,o=e?.striped?`
628
+ `}function J(n,r){if(r===void 0){let t=t=>J(n,t??e``);return t.html=(t,...r)=>J(n,e(t,...r)),t}let i=u(`Table`),a=n?.className??c(`Table::table`)+`-lyco-now-${i}`,o=n?.striped?`
638
629
  .${a} tr:nth-child(even) { background: #f9f9f9; }
639
- `:``,s=e?.hover?`
630
+ `:``,s=n?.hover?`
640
631
  .${a} tr:hover { background: #f1f1f1; }
641
- `:``,c=e?.bordered?`
632
+ `:``,l=n?.bordered?`
642
633
  .${a}, .${a} th, .${a} td { border: 1px solid #ddd; }
643
- `:``;return t`
644
- <lyco-component name="Table">
634
+ `:``,f=`
635
+ /* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
636
+ .${a} table {
637
+ width: 100%;
638
+ border-collapse: collapse;
639
+ }
640
+ .${a} th,
641
+ .${a} td {
642
+ padding: 8px 12px;
643
+ text-align: left;
644
+ }
645
+ ${o}
646
+ ${s}
647
+ ${l}
648
+ `;return d(`Table`,e`
645
649
  <style>
646
- /* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
647
- .${a} table {
648
- width: 100%;
649
- border-collapse: collapse;
650
- }
651
- .${a} th,
652
- .${a} td {
653
- padding: 8px 12px;
654
- text-align: left;
655
- }
656
- ${o}
657
- ${s}
658
- ${c}
650
+ ${f}
659
651
  </style>
660
652
 
661
653
  <div class="${a}">
662
654
  <table>
663
- ${n(r)}
655
+ ${t(r)}
664
656
  </table>
665
657
  </div>
666
- </lyco-component>
667
- `}function Y(e,n){let i=e?.direction??`row`;return n===void 0?n=>Y(e,n??t``):t`
658
+ `)}function Y(t,r){let i=t?.direction??`row`;return r===void 0?n=>Y(t,n??e``):e`
668
659
  <div
669
660
  style="
670
661
  display: flex;
671
662
  flex-direction: ${i};
672
663
  flex-wrap: wrap;
673
- ${e?.gap?`gap: ${e.gap};`:``}
674
- ${e?.align?`align-items: ${e.align};`:``}
675
- ${e?.justify?`justify-content: ${e.justify};`:``}
664
+ ${t?.gap?`gap: ${t.gap};`:``}
665
+ ${t?.align?`align-items: ${t.align};`:``}
666
+ ${t?.justify?`justify-content: ${t.justify};`:``}
676
667
  "
677
668
  >
678
- ${r(n)}
669
+ ${n(r)}
679
670
  </div>
680
- `}function X(e,n){let i=e?.width?`width: ${e.width};`:``,a=e?.height?`height: ${e.height};`:``,o=e?.background?`background: ${e.background};`:``;if(n===void 0)return n=>X(e,n??[t``]);let s=`flex-start`,c=`flex-start`;switch(e?.align){case`top-right`:s=`flex-end`,c=`flex-start`;break;case`center`:s=`center`,c=`center`;break;case`bottom-left`:s=`flex-start`,c=`flex-end`;break;case`bottom-right`:s=`flex-end`,c=`flex-end`;break;default:s=`flex-start`,c=`flex-start`}return t`
671
+ `}function X(t,r){let i=t?.width?`width: ${t.width};`:``,a=t?.height?`height: ${t.height};`:``,o=t?.background?`background: ${t.background};`:``;if(r===void 0)return n=>X(t,n??[e``]);let s=`flex-start`,c=`flex-start`;switch(t?.align){case`top-right`:s=`flex-end`,c=`flex-start`;break;case`center`:s=`center`,c=`center`;break;case`bottom-left`:s=`flex-start`,c=`flex-end`;break;case`bottom-right`:s=`flex-end`,c=`flex-end`;break;default:s=`flex-start`,c=`flex-start`}return e`
681
672
  <div
682
673
  style="
683
674
  position: relative;
@@ -687,7 +678,7 @@ import{LitElement as e,html as t}from"lit";function n(e){return e?typeof e==`fun
687
678
  ${i} ${a} ${o}
688
679
  "
689
680
  >
690
- ${r(n)}
681
+ ${n(r)}
691
682
  </div>
692
683
  `}export{D as AbsoluteBox,O as AcrylicBar,k as AspectRatio,A as AutoFitGrid,j as AvatarStack,M as Badge,N as Card,P as Center,p as Column,S as ColumnSplit,F as Container,I as Divider,m as Flex,h as FlowItem,L as FooterLayout,g as Grid,R as GridBreakpoint,_ as GridCol,v as GridItem,y as GridRow,z as HeroSection,B as Hidden,f as LightboxContainer,V as ListGroup,H as Overlay,U as PositionContainer,b as Row,C as RowSplit,w as ScrollBar,T as SideBarContainer,W as SizedBox,G as SkeletonLoader,K as Spacer,q as Sticky,E as Swiper,J as Table,x as WaterFlow,Y as Wrap,X as ZStack};
693
684
  //# sourceMappingURL=index.es.js.map