lyco 1.0.2 → 1.2.1
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/README.md +4 -0
- package/dist/index.cjs.js +235 -82
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +274 -121
- package/dist/index.es.js.map +1 -1
- package/dist/types/components/AbsoluteBox.d.ts +11 -1
- package/dist/types/components/AcrylicBar.d.ts +6 -2
- package/dist/types/components/AspectRatio.d.ts +6 -2
- package/dist/types/components/AutoFitGrid.d.ts +7 -2
- package/dist/types/components/AvatarStack.d.ts +4 -0
- package/dist/types/components/Badge.d.ts +7 -3
- package/dist/types/components/Card.d.ts +6 -2
- package/dist/types/components/Center.d.ts +8 -2
- package/dist/types/components/Column.d.ts +5 -1
- package/dist/types/components/ColumnSplit.d.ts +7 -2
- package/dist/types/components/Container.d.ts +5 -2
- package/dist/types/components/Flex.d.ts +7 -3
- package/dist/types/components/FlowItem.d.ts +1 -1
- package/dist/types/components/FooterLayout.d.ts +7 -3
- package/dist/types/components/Grid.d.ts +6 -1
- package/dist/types/components/GridBreakpoint.d.ts +6 -3
- package/dist/types/components/GridCol.d.ts +6 -2
- package/dist/types/components/GridItem.d.ts +6 -2
- package/dist/types/components/GridRow.d.ts +6 -2
- package/dist/types/components/HeroSection.d.ts +7 -1
- package/dist/types/components/Hidden.d.ts +6 -3
- package/dist/types/components/LightboxContainer.d.ts +7 -2
- package/dist/types/components/ListGroup.d.ts +9 -2
- package/dist/types/components/ScrollBar.d.ts +10 -2
- package/dist/types/components/SideBarContainer.d.ts +7 -1
- package/dist/types/components/Sticky.d.ts +7 -3
- package/dist/types/components/Swiper.d.ts +23 -3
- package/dist/types/components/Table.d.ts +6 -3
- package/dist/types/components/WaterFlow.d.ts +6 -3
- package/dist/types/components/Wrap.d.ts +6 -2
- package/dist/types/components/ZStack.d.ts +6 -2
- package/dist/types/components/core.d.ts +9 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{html as e
|
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}function o(n,r){if(r===void 0){let t=t=>o(n,t??e``);return t.html=(t,...r)=>o(n,e(t,...r)),t}let i=n?.fadeBg??`rgba(0,0,0,0.7)`,a=n?.zIndex??2e3;return e`
|
2
2
|
<div
|
3
3
|
style="
|
4
4
|
position: fixed;
|
@@ -10,9 +10,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
10
10
|
align-items: center;
|
11
11
|
"
|
12
12
|
>
|
13
|
-
${
|
13
|
+
${t(r)}
|
14
14
|
</div>
|
15
|
-
`}function
|
15
|
+
`}function s(t,r){return r===void 0?n=>s(t,n??[e``]):e`
|
16
16
|
<div
|
17
17
|
style="
|
18
18
|
display: flex;
|
@@ -20,25 +20,25 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
20
20
|
${t?.space?`gap: ${t.space};`:``}
|
21
21
|
"
|
22
22
|
>
|
23
|
-
${r
|
23
|
+
${n(r)}
|
24
24
|
</div>
|
25
|
-
`}function
|
25
|
+
`}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?.direction??`row`;return e`
|
26
26
|
<div
|
27
27
|
style="
|
28
28
|
display: flex;
|
29
29
|
flex-direction: ${i};
|
30
|
-
${
|
31
|
-
${
|
32
|
-
${
|
30
|
+
${n?.justify?`justify-content: ${n.justify};`:``}
|
31
|
+
${n?.align?`align-items: ${n.align};`:``}
|
32
|
+
${n?.gap?`gap: ${n.gap};`:``}
|
33
33
|
"
|
34
34
|
>
|
35
|
-
${
|
35
|
+
${t(r)}
|
36
36
|
</div>
|
37
|
-
`}function
|
37
|
+
`}function l(n){return e`
|
38
38
|
<div style="break-inside: avoid; margin-bottom: 16px;">
|
39
|
-
${n
|
39
|
+
${t(n)}
|
40
40
|
</div>
|
41
|
-
`}function
|
41
|
+
`}function u(t,r){if(r===void 0)return n=>u(t,n??[e``]);let i=t?.columns??1;return e`
|
42
42
|
<div
|
43
43
|
style="
|
44
44
|
display: grid;
|
@@ -46,52 +46,71 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
46
46
|
${t?.gap?`gap: ${t.gap};`:``}
|
47
47
|
"
|
48
48
|
>
|
49
|
-
${r
|
49
|
+
${n(r)}
|
50
50
|
</div>
|
51
|
-
`}function
|
51
|
+
`}function d(n,r){if(r===void 0){let t=t=>d(n,t??e``);return t.html=(t,...r)=>d(n,e(t,...r)),t}return e`
|
52
52
|
<div
|
53
53
|
style="
|
54
54
|
display: grid;
|
55
55
|
grid-auto-flow: column;
|
56
|
-
${
|
56
|
+
${n?.gap?`column-gap: ${n.gap};`:``}
|
57
57
|
"
|
58
58
|
>
|
59
|
-
${
|
59
|
+
${t(r)}
|
60
60
|
</div>
|
61
|
-
`}function
|
62
|
-
<div style="${
|
63
|
-
${
|
61
|
+
`}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}return e`
|
62
|
+
<div style="${n?.span?`grid-column: span ${n.span};`:``}">
|
63
|
+
${t(r)}
|
64
64
|
</div>
|
65
|
-
`}function
|
65
|
+
`}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}return e`
|
66
66
|
<div
|
67
67
|
style="
|
68
68
|
display: grid;
|
69
69
|
grid-auto-flow: row;
|
70
|
-
${
|
70
|
+
${n?.gap?`row-gap: ${n.gap};`:``}
|
71
71
|
"
|
72
72
|
>
|
73
|
-
${
|
73
|
+
${t(r)}
|
74
74
|
</div>
|
75
|
-
`}function
|
75
|
+
`}function m(t,r){return e`
|
76
76
|
<div
|
77
77
|
style="
|
78
78
|
display: flex;
|
79
79
|
flex-direction: row;
|
80
80
|
${t?.space?`gap: ${t.space};`:``}
|
81
|
-
"
|
82
|
-
>
|
83
|
-
${r(n)}
|
84
|
-
</div>
|
85
|
-
`}function m(t,r){let i=t?.columnCount??3,a=t?.gap??`16px`;return e`
|
86
|
-
<div
|
87
|
-
style="
|
88
|
-
column-count: ${i};
|
89
|
-
column-gap: ${a};
|
90
81
|
"
|
91
82
|
>
|
92
83
|
${n(r)}
|
93
84
|
</div>
|
94
|
-
`}function h(
|
85
|
+
`}function h(n,i){if(i===void 0){let t=t=>h(n,t??e``);return t.html=(t,...r)=>h(n,e(t,...r)),t}let a=n?.columnCount??3,o=n?.gap??`16px`,s=r(`waterflow`);return e`
|
86
|
+
<style>
|
87
|
+
/* 使用 CSS 类来控制多列布局 */
|
88
|
+
.${s} {
|
89
|
+
column-count: ${a};
|
90
|
+
column-gap: ${typeof o==`number`?`${o}px`:o};
|
91
|
+
}
|
92
|
+
/* 子元素如果是块级元素,需要让它们适应多列流式布局 */
|
93
|
+
.${s} > * {
|
94
|
+
display: inline-block;
|
95
|
+
width: 100%;
|
96
|
+
}
|
97
|
+
</style>
|
98
|
+
|
99
|
+
<div class="${s}">${t(i)}</div>
|
100
|
+
`}h().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 g(n,r){if(r===void 0){let t=t=>g(n,t??e``);return t.html=(t,...r)=>g(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`
|
95
114
|
<div
|
96
115
|
style="
|
97
116
|
display: flex;
|
@@ -104,7 +123,7 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
104
123
|
<div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
|
105
124
|
<div style="flex: 1 1 auto; overflow: auto;">${s}</div>
|
106
125
|
</div>
|
107
|
-
`}function
|
126
|
+
`}function _(n,r){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`
|
108
127
|
<div
|
109
128
|
style="
|
110
129
|
display: flex;
|
@@ -117,7 +136,7 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
117
136
|
<div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
|
118
137
|
<div style="flex: 1 1 auto; overflow: auto;">${s}</div>
|
119
138
|
</div>
|
120
|
-
`}function
|
139
|
+
`}function v(n,i){if(i===void 0){let t=t=>v(n,t??e``);return t.html=(t,...r)=>v(n,e(t,...r)),t}let a=n?.direction??`vertical`,o=n?.height??`100%`,s=n?.width??`100%`,c=n?.customCss??``,l=n?.className??r(`scrollbar-container`),u=a===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`;return e`
|
121
140
|
<style>
|
122
141
|
.${l} {
|
123
142
|
${u};
|
@@ -137,8 +156,8 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
137
156
|
}
|
138
157
|
${c}
|
139
158
|
</style>
|
140
|
-
<div class="${l}">${
|
141
|
-
`}function
|
159
|
+
<div class="${l}">${t(i)}</div>
|
160
|
+
`}function y(t,r){if(r===void 0)return n=>y(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`
|
142
161
|
<div
|
143
162
|
style="
|
144
163
|
display: flex;
|
@@ -151,48 +170,177 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
151
170
|
<div style="flex: 0 0 ${i}; overflow: auto;">${s}</div>
|
152
171
|
<div style="flex: 1 1 auto; overflow: auto;">${c}</div>
|
153
172
|
</div>
|
154
|
-
`}function
|
173
|
+
`}function b(t={},n){if(n===void 0)return n=>b(t,n??[e``]);let{gap:i=`8px`,snapType:a=`mandatory`,height:o=`auto`,width:s=`100%`,className:c=r(`swiper`),direction:l=`x`,scrollBehavior:u=`smooth`,align:d=`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:x=!1,onSlideChange:S}=t,C=c,w=C+`-container`,T=C+`-slide`,E=C+`-navigation`,D=C+`-pagination`,O;O=n?typeof n==`function`?n():n:[];let k=O.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,S?.(n))}]})(),M=e=>{let t=typeof document<`u`?document.querySelector(`.${w}`):null;if(!t)return;let n=t.querySelectorAll(`.${T}`);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})),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(`.${w}`):null;if(!e)return;let t=e.querySelectorAll(`.${T}`),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)}),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)||l===`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,s=Math.max(Math.abs(a),Math.abs(o))>30;s&&(l===`x`?a>0?P():N():o>0?P():N()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},z=e=>{x&&(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(`.${w}`):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))),x&&(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=e`
|
174
|
+
<div class="${D}">
|
175
|
+
${Array.from({length:k},(t,n)=>e`
|
176
|
+
<button
|
177
|
+
class="${n===A()?`active`:``}"
|
178
|
+
@click=${()=>M(n)}
|
179
|
+
></button>
|
180
|
+
`)}
|
181
|
+
</div>
|
182
|
+
`,U=e`
|
183
|
+
<div class="${D} fraction">
|
184
|
+
<span class="current">${A()+1}</span>
|
185
|
+
<span class="separator">/</span>
|
186
|
+
<span class="total">${k}</span>
|
187
|
+
</div>
|
188
|
+
`,W=e`
|
189
|
+
<div class="${D} progressbar">
|
190
|
+
<div
|
191
|
+
class="progress"
|
192
|
+
style="width: ${k>1?A()/(k-1)*100:0}%"
|
193
|
+
></div>
|
194
|
+
</div>
|
195
|
+
`,G=e`
|
196
|
+
<div class="${E}">
|
197
|
+
<button class="prev" @click=${P}>◀</button>
|
198
|
+
<button class="next" @click=${N}>▶</button>
|
199
|
+
</div>
|
200
|
+
`;return e`
|
155
201
|
<style>
|
156
|
-
.${
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
202
|
+
.${C} {
|
203
|
+
position: relative;
|
204
|
+
overflow: hidden;
|
205
|
+
width: ${s};
|
206
|
+
height: ${o};
|
207
|
+
}
|
208
|
+
|
209
|
+
.${w} {
|
210
|
+
width: 100%;
|
211
|
+
height: 100%;
|
212
|
+
overflow: auto;
|
213
|
+
scroll-snap-type: ${l+` `+a};
|
163
214
|
-webkit-overflow-scrolling: touch;
|
164
|
-
|
215
|
+
scroll-behavior: ${u};
|
216
|
+
gap: ${i};
|
217
|
+
display: flex;
|
218
|
+
flex-direction: ${l===`x`?`row`:`column`};
|
165
219
|
}
|
166
|
-
|
167
|
-
|
220
|
+
|
221
|
+
.${T} {
|
222
|
+
scroll-snap-align: ${d};
|
168
223
|
flex-shrink: 0;
|
169
224
|
}
|
225
|
+
|
226
|
+
.${E} {
|
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
|
+
}
|
237
|
+
|
238
|
+
.${E} 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
|
+
}
|
252
|
+
|
253
|
+
.${E} button:hover {
|
254
|
+
background-color: rgba(0, 0, 0, 0.8);
|
255
|
+
}
|
256
|
+
|
257
|
+
.${D} {
|
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
|
+
.${D} 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
|
+
.${D} button.active {
|
277
|
+
background-color: white;
|
278
|
+
transform: scale(1.2);
|
279
|
+
}
|
280
|
+
|
281
|
+
.${D}.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
|
+
}
|
292
|
+
|
293
|
+
.${D}.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
|
+
.${D}.progressbar .progress {
|
302
|
+
height: 100%;
|
303
|
+
background-color: white;
|
304
|
+
transition: width 0.3s;
|
305
|
+
}
|
170
306
|
</style>
|
171
|
-
|
172
|
-
|
307
|
+
|
308
|
+
<div class="${C}">
|
309
|
+
<div class="${w}">
|
310
|
+
${O.map((t,n)=>e`
|
311
|
+
<div class="${T} --slide-${n}" key=${n}>
|
312
|
+
${t}
|
313
|
+
</div>
|
314
|
+
`)}
|
315
|
+
</div>
|
316
|
+
|
317
|
+
${f?G:null}
|
318
|
+
${m&&h===`dots`?H:null}
|
319
|
+
${m&&h===`fraction`?U:null}
|
320
|
+
${m&&h===`progressbar`?W:null}
|
173
321
|
</div>
|
174
|
-
`}function
|
175
|
-
|
176
|
-
|
322
|
+
`}function x(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=>e`
|
323
|
+
<div
|
324
|
+
style="
|
177
325
|
position: absolute;
|
178
|
-
${
|
179
|
-
${
|
180
|
-
${
|
326
|
+
${a} ${o} ${s} ${c}
|
327
|
+
${l} ${u}
|
328
|
+
${d}
|
181
329
|
"
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
330
|
+
>
|
331
|
+
${t(n)}
|
332
|
+
</div>
|
333
|
+
`;return i(r,f)}function S(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`
|
334
|
+
<div
|
335
|
+
style="
|
188
336
|
position: fixed;
|
189
337
|
top: ${o};
|
190
338
|
bottom: ${s};
|
191
339
|
left: ${c};
|
192
340
|
right: ${l};
|
193
341
|
${u}
|
194
|
-
width: ${
|
195
|
-
height: ${
|
342
|
+
width: ${r};
|
343
|
+
height: ${i};
|
196
344
|
background: ${d};
|
197
345
|
backdrop-filter: blur(${f});
|
198
346
|
-webkit-backdrop-filter: blur(${f});
|
@@ -203,10 +351,10 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
203
351
|
display: flex;
|
204
352
|
flex-direction: column;
|
205
353
|
"
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
354
|
+
>
|
355
|
+
${t}
|
356
|
+
</div>
|
357
|
+
`;return a(n,void 0,g)}function C(t,r){if(r===void 0)return n=>C(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`
|
210
358
|
<div
|
211
359
|
style="
|
212
360
|
position: relative;
|
@@ -226,20 +374,20 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
226
374
|
height: 100%;
|
227
375
|
"
|
228
376
|
>
|
229
|
-
${r
|
377
|
+
${n(r)}
|
230
378
|
</div>
|
231
379
|
</div>
|
232
|
-
`}function
|
380
|
+
`}function w(n,r){if(r===void 0){let t=e=>w(n,e);return t.html=(t,...r)=>w(n,e(t,...r)),t}let i=n?.gap??`16px`;return e`
|
233
381
|
<div
|
234
382
|
style="
|
235
383
|
display: grid;
|
236
|
-
grid-template-columns: repeat(auto-fit, minmax(${
|
384
|
+
grid-template-columns: repeat(auto-fit, minmax(${n.minItemWidth}, 1fr));
|
237
385
|
gap: ${i};
|
238
386
|
"
|
239
387
|
>
|
240
|
-
${
|
388
|
+
${t(r)}
|
241
389
|
</div>
|
242
|
-
`}function
|
390
|
+
`}function T(t,r){if(r===void 0)return n=>T(t,n??[e``]);let i=t?.size??`32px`,a=t?.overlap??`-8px`,o=(t,n)=>e`
|
243
391
|
<div
|
244
392
|
style="
|
245
393
|
width: ${i};
|
@@ -255,11 +403,11 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
255
403
|
</div>
|
256
404
|
`;return e`
|
257
405
|
<div style="display: flex; align-items: center;">
|
258
|
-
${r
|
406
|
+
${n(r,o)}
|
259
407
|
</div>
|
260
|
-
`}function
|
408
|
+
`}function E(n,r){if(r===void 0){let t=t=>E(n,t??e``);return t.html=(t,...r)=>E(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`
|
261
409
|
<div style="position: relative; display: inline-block;">
|
262
|
-
${
|
410
|
+
${t(r)}
|
263
411
|
<div
|
264
412
|
style="
|
265
413
|
position: absolute;
|
@@ -279,10 +427,10 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
279
427
|
transform: translate(${d===`0`?`-50%`:`0`}, ${c===`0`?`-50%`:`0`});
|
280
428
|
"
|
281
429
|
>
|
282
|
-
${
|
430
|
+
${n?.content??``}
|
283
431
|
</div>
|
284
432
|
</div>
|
285
|
-
`}function
|
433
|
+
`}function D(t,r){if(r===void 0)return n=>D(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`
|
286
434
|
<div
|
287
435
|
style="
|
288
436
|
background: ${s};
|
@@ -292,9 +440,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
292
440
|
box-sizing: border-box;
|
293
441
|
"
|
294
442
|
>
|
295
|
-
${r
|
443
|
+
${n(r)}
|
296
444
|
</div>
|
297
|
-
`}function
|
445
|
+
`}function O(n,r){if(r===void 0){let t=t=>O(n,t??e``);return t.html=(t,...r)=>O(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`
|
298
446
|
<div
|
299
447
|
style="
|
300
448
|
display: flex;
|
@@ -303,9 +451,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
303
451
|
${i} ${a} ${o}
|
304
452
|
"
|
305
453
|
>
|
306
|
-
${
|
454
|
+
${t(r)}
|
307
455
|
</div>
|
308
|
-
`}function
|
456
|
+
`}function k(t,r){if(r===void 0)return n=>k(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`
|
309
457
|
<div
|
310
458
|
style="
|
311
459
|
width: 100%;
|
@@ -318,9 +466,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
318
466
|
box-sizing: border-box;
|
319
467
|
"
|
320
468
|
>
|
321
|
-
${r
|
469
|
+
${n(r)}
|
322
470
|
</div>
|
323
|
-
`}function
|
471
|
+
`}function A(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 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=n?.columns??4,a=n?.gap??`24px`,o=n?.background??`#f8f8f8`,s=n?.padding??`40px 16px`;return e`
|
324
472
|
<div
|
325
473
|
style="
|
326
474
|
width: 100%;
|
@@ -336,13 +484,13 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
336
484
|
gap: ${a};
|
337
485
|
"
|
338
486
|
>
|
339
|
-
${
|
487
|
+
${t(r)}
|
340
488
|
</div>
|
341
489
|
<div style="text-align: center; margin-top: 24px; color: #666;">
|
342
490
|
© ${new Date().getFullYear()} Your Company. All rights reserved.
|
343
491
|
</div>
|
344
492
|
</div>
|
345
|
-
`}function
|
493
|
+
`}function M(n,i){if(i===void 0){let t=t=>M(n,t??e``);return t.html=(t,...r)=>M(n,e(t,...r)),t}let a=n.defaultColumns??1,o=n.gap??`16px`,s=n.className??r(`grid-breakpoint`),c=Object.entries(n.breakpoints).map(([e,t])=>`
|
346
494
|
@media ${e} {
|
347
495
|
.${s} { grid-template-columns: repeat(${t}, 1fr); }
|
348
496
|
}
|
@@ -356,8 +504,8 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
356
504
|
}
|
357
505
|
${c}
|
358
506
|
</style>
|
359
|
-
<div class="${s}">${
|
360
|
-
`}function
|
507
|
+
<div class="${s}">${t(i)}</div>
|
508
|
+
`}function N(t,r){if(r===void 0)return n=>N(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`
|
361
509
|
<div
|
362
510
|
style="
|
363
511
|
position: relative;
|
@@ -391,10 +539,10 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
391
539
|
box-sizing: border-box;
|
392
540
|
"
|
393
541
|
>
|
394
|
-
${r
|
542
|
+
${n(r)}
|
395
543
|
</div>
|
396
544
|
</div>
|
397
|
-
`}function
|
545
|
+
`}function P(n,i){if(i===void 0){let t=t=>P(n,t??e``);return t.html=(t,...r)=>P(n,e(t,...r)),t}let a=n?.breakpoint??`(max-width: 600px)`,o=n?.mode??`hide`,s=n?.className??r(`hidden-container`),c=o===`hide`?`@media ${a} { .${s} { display: none !important; } }`:`@media ${a} { .${s} { display: block !important; } }
|
398
546
|
@media not ${a} { .${s} { display: none !important; } }`;return e`
|
399
547
|
<style>
|
400
548
|
.${s} {
|
@@ -402,29 +550,29 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
402
550
|
}
|
403
551
|
${c}
|
404
552
|
</style>
|
405
|
-
<div class="${s}">${
|
406
|
-
`}function
|
553
|
+
<div class="${s}">${t(i)}</div>
|
554
|
+
`}function F(t,i){let o=t?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,s=t?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,c=t?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,l=t?.className??r(`list-group`),u=(t,n,r,i)=>r?e` <li>${t}</li> `:t,d=r=>e`
|
407
555
|
<style>
|
408
|
-
ul.${
|
556
|
+
ul.${l} {
|
409
557
|
list-style: none;
|
410
558
|
margin: 0;
|
411
559
|
padding: 0;
|
412
|
-
${
|
560
|
+
${o};
|
413
561
|
}
|
414
|
-
ul.${
|
562
|
+
ul.${l} li {
|
415
563
|
padding: 12px 16px;
|
416
564
|
${t?.bordered?`border-bottom: 1px solid #ddd`:``};
|
417
565
|
}
|
418
|
-
ul.${
|
566
|
+
ul.${l} li:last-child {
|
419
567
|
${t?.bordered?`border-bottom: none`:``};
|
420
568
|
}
|
421
|
-
${o}
|
422
569
|
${s}
|
570
|
+
${c}
|
423
571
|
</style>
|
424
|
-
<ul class="${
|
425
|
-
${n(r)}
|
572
|
+
<ul class="${l}">
|
573
|
+
${n(r,u)}
|
426
574
|
</ul>
|
427
|
-
|
575
|
+
`;return a(i,d)}function I(t,r){let i=t?.background??`rgba(0, 0, 0, 0.5)`,a=t?.zIndex??1e3,o=t?.fullScreen!==!1;return e`
|
428
576
|
<div
|
429
577
|
style="
|
430
578
|
position: ${o?`fixed`:`absolute`};
|
@@ -436,9 +584,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
436
584
|
align-items: center;
|
437
585
|
"
|
438
586
|
>
|
439
|
-
${r
|
587
|
+
${n(r)}
|
440
588
|
</div>
|
441
|
-
`}function
|
589
|
+
`}function L(n,r){let i=n?.width?`width: ${n.width};`:``,a=n?.height?`height: ${n.height};`:``,o=n?.background?`background: ${n.background};`:``;return e`
|
442
590
|
<div
|
443
591
|
style="
|
444
592
|
position: relative;
|
@@ -446,9 +594,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
446
594
|
overflow: hidden;
|
447
595
|
"
|
448
596
|
>
|
449
|
-
${
|
597
|
+
${t(r)}
|
450
598
|
</div>
|
451
|
-
`}function
|
599
|
+
`}function R(t){let n=t?.width?`width: ${t.width};`:``,r=t?.height?`height: ${t.height};`:``;return e` <div style="${n} ${r}"></div> `}function z(t){let n=t?.type??`rect`,i=t?.width??`100%`,a=t?.height??`16px`,o=t?.borderRadius??`4px`,s=t?.animation!==!1,c=t?.className??r(`skeleton-shimmer`),l=n===`circle`?`border-radius: 50%; width: ${i}; height: ${i}`:`border-radius: ${o}; width: ${i}; height: ${a}`;return e`
|
452
600
|
<style>
|
453
601
|
${`
|
454
602
|
@keyframes ${c+`-shimmer`} {
|
@@ -464,7 +612,7 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
464
612
|
}
|
465
613
|
</style>
|
466
614
|
<div class="${c}"></div>
|
467
|
-
`}function
|
615
|
+
`}function B(){return e`<div style="flex: 1 1 auto;"></div>`}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}let i=n?.top?`top: ${n.top};`:``,a=n?.bottom?`bottom: ${n.bottom};`:``,o=typeof n?.zIndex==`number`?`z-index: ${n.zIndex};`:``;return e`
|
468
616
|
<div
|
469
617
|
style="
|
470
618
|
position: sticky;
|
@@ -472,21 +620,23 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
472
620
|
${o}
|
473
621
|
"
|
474
622
|
>
|
475
|
-
${
|
623
|
+
${t(r)}
|
476
624
|
</div>
|
477
|
-
`}function
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
.${a}
|
625
|
+
`}function H(n,i){if(i===void 0){let t=t=>H(n,t??e``);return t.html=(t,...r)=>H(n,e(t,...r)),t}let a=n?.className??r(`table`),o=n?.striped?`
|
626
|
+
.${a} tr:nth-child(even) { background: #f9f9f9; }
|
627
|
+
`:``,s=n?.hover?`
|
628
|
+
.${a} tr:hover { background: #f1f1f1; }
|
629
|
+
`:``,c=n?.bordered?`
|
630
|
+
.${a}, .${a} th, .${a} td { border: 1px solid #ddd; }
|
483
631
|
`:``;return e`
|
484
632
|
<style>
|
633
|
+
/* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
|
485
634
|
.${a} table {
|
486
635
|
width: 100%;
|
487
636
|
border-collapse: collapse;
|
488
637
|
}
|
489
|
-
.${a} th,
|
638
|
+
.${a} th,
|
639
|
+
.${a} td {
|
490
640
|
padding: 8px 12px;
|
491
641
|
text-align: left;
|
492
642
|
}
|
@@ -494,10 +644,13 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
494
644
|
${s}
|
495
645
|
${c}
|
496
646
|
</style>
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
647
|
+
|
648
|
+
<div class="${a}">
|
649
|
+
<table>
|
650
|
+
${t(i)}
|
651
|
+
</table>
|
652
|
+
</div>
|
653
|
+
`}function U(t,r){let i=t?.direction??`row`;return r===void 0?n=>U(t,n??e``):e`
|
501
654
|
<div
|
502
655
|
style="
|
503
656
|
display: flex;
|
@@ -508,9 +661,9 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
508
661
|
${t?.justify?`justify-content: ${t.justify};`:``}
|
509
662
|
"
|
510
663
|
>
|
511
|
-
${r
|
664
|
+
${n(r)}
|
512
665
|
</div>
|
513
|
-
`}function
|
666
|
+
`}function W(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=>W(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`
|
514
667
|
<div
|
515
668
|
style="
|
516
669
|
position: relative;
|
@@ -520,7 +673,7 @@ import{html as e,unsafeCSS as t}from"lit";function n(t){return t?typeof t==`func
|
|
520
673
|
${i} ${a} ${o}
|
521
674
|
"
|
522
675
|
>
|
523
|
-
${r
|
676
|
+
${n(r)}
|
524
677
|
</div>
|
525
|
-
`}export{
|
678
|
+
`}export{x as AbsoluteBox,S as AcrylicBar,C as AspectRatio,w as AutoFitGrid,T as AvatarStack,E as Badge,D as Card,O as Center,s as Column,g as ColumnSplit,k as Container,A as Divider,c as Flex,l as FlowItem,j as FooterLayout,u as Grid,M as GridBreakpoint,d as GridCol,f as GridItem,p as GridRow,N as HeroSection,P as Hidden,o as LightboxContainer,F as ListGroup,I as Overlay,L as PositionContainer,m as Row,_ as RowSplit,v as ScrollBar,y as SideBarContainer,R as SizedBox,z as SkeletonLoader,B as Spacer,V as Sticky,b as Swiper,H as Table,h as WaterFlow,U as Wrap,W as ZStack};
|
526
679
|
//# sourceMappingURL=index.es.js.map
|