lyco 1.2.2 → 1.2.4

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