lyco 1.2.1 → 1.2.3
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 +80 -75
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +112 -107
- package/dist/index.es.js.map +1 -1
- package/dist/types/components/AbsoluteBox.d.ts +7 -11
- package/dist/types/components/Overlay.d.ts +7 -1
- package/dist/types/components/PositionContainer.d.ts +8 -2
- package/dist/types/components/Row.d.ts +5 -1
- package/dist/types/components/RowSplit.d.ts +7 -2
- package/dist/types/components/core.d.ts +59 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
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}
|
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}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?.fadeBg??`rgba(0,0,0,0.7)`,a=n?.zIndex??2e3;return e`
|
2
2
|
<div
|
3
3
|
style="
|
4
4
|
position: fixed;
|
@@ -12,7 +12,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
12
12
|
>
|
13
13
|
${t(r)}
|
14
14
|
</div>
|
15
|
-
`}function
|
15
|
+
`}function u(t,r){return r===void 0?n=>u(t,n??[e``]):e`
|
16
16
|
<div
|
17
17
|
style="
|
18
18
|
display: flex;
|
@@ -22,7 +22,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
22
22
|
>
|
23
23
|
${n(r)}
|
24
24
|
</div>
|
25
|
-
`}function
|
25
|
+
`}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}let i=n?.direction??`row`;return e`
|
26
26
|
<div
|
27
27
|
style="
|
28
28
|
display: flex;
|
@@ -34,11 +34,11 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
34
34
|
>
|
35
35
|
${t(r)}
|
36
36
|
</div>
|
37
|
-
`}function
|
37
|
+
`}function f(n){return e`
|
38
38
|
<div style="break-inside: avoid; margin-bottom: 16px;">
|
39
39
|
${t(n)}
|
40
40
|
</div>
|
41
|
-
`}function
|
41
|
+
`}function p(t,r){if(r===void 0)return n=>p(t,n??[e``]);let i=t?.columns??1;return e`
|
42
42
|
<div
|
43
43
|
style="
|
44
44
|
display: grid;
|
@@ -48,31 +48,33 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
48
48
|
>
|
49
49
|
${n(r)}
|
50
50
|
</div>
|
51
|
-
`}function
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
>
|
59
|
-
${
|
60
|
-
</
|
61
|
-
|
51
|
+
`}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=c(`GridCol::grid-col`),a=n?.gap?`column-gap: ${n.gap};`:``,o=`
|
52
|
+
.${i} {
|
53
|
+
display: grid;
|
54
|
+
grid-auto-flow: column;
|
55
|
+
${a}
|
56
|
+
}
|
57
|
+
`;return e`
|
58
|
+
<style>
|
59
|
+
${o}
|
60
|
+
</style>
|
61
|
+
<div class="${i}">${t(r)}</div>
|
62
|
+
`}function h(n,r){if(r===void 0){let t=t=>h(n,t??e``);return t.html=(t,...r)=>h(n,e(t,...r)),t}return e`
|
62
63
|
<div style="${n?.span?`grid-column: span ${n.span};`:``}">
|
63
64
|
${t(r)}
|
64
65
|
</div>
|
65
|
-
`}function
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
>
|
73
|
-
${
|
74
|
-
</
|
75
|
-
|
66
|
+
`}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=c(`GridRow::grid-row`),a=n?.gap?`row-gap: ${n.gap};`:``,o=`
|
67
|
+
.${i} {
|
68
|
+
display: grid;
|
69
|
+
grid-auto-flow: row;
|
70
|
+
${a}
|
71
|
+
}
|
72
|
+
`;return e`
|
73
|
+
<style>
|
74
|
+
${o}
|
75
|
+
</style>
|
76
|
+
<div class="${i}">${t(r)}</div>
|
77
|
+
`}function _(t,r){return r===void 0?n=>_(t,n??[e``]):e`
|
76
78
|
<div
|
77
79
|
style="
|
78
80
|
display: flex;
|
@@ -82,22 +84,22 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
82
84
|
>
|
83
85
|
${n(r)}
|
84
86
|
</div>
|
85
|
-
`}function
|
87
|
+
`}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?.columnCount??3,a=n?.gap??`16px`,o=c(`WaterFlow::waterflow`);return e`
|
86
88
|
<style>
|
87
89
|
/* 使用 CSS 类来控制多列布局 */
|
88
|
-
.${
|
89
|
-
column-count: ${
|
90
|
-
column-gap: ${typeof
|
90
|
+
.${o} {
|
91
|
+
column-count: ${i};
|
92
|
+
column-gap: ${typeof a==`number`?`${a}px`:a};
|
91
93
|
}
|
92
94
|
/* 子元素如果是块级元素,需要让它们适应多列流式布局 */
|
93
|
-
.${
|
95
|
+
.${o} > * {
|
94
96
|
display: inline-block;
|
95
97
|
width: 100%;
|
96
98
|
}
|
97
99
|
</style>
|
98
100
|
|
99
|
-
<div class="${
|
100
|
-
`}
|
101
|
+
<div class="${o}">${t(r)}</div>
|
102
|
+
`}v().html`
|
101
103
|
<div>
|
102
104
|
<div>1</div>
|
103
105
|
<div>2</div>
|
@@ -110,7 +112,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
110
112
|
<div>9</div>
|
111
113
|
<div>10</div>
|
112
114
|
</div>
|
113
|
-
`;function
|
115
|
+
`;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=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`
|
114
116
|
<div
|
115
117
|
style="
|
116
118
|
display: flex;
|
@@ -123,7 +125,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
123
125
|
<div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
|
124
126
|
<div style="flex: 1 1 auto; overflow: auto;">${s}</div>
|
125
127
|
</div>
|
126
|
-
`}function
|
128
|
+
`}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?.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`
|
127
129
|
<div
|
128
130
|
style="
|
129
131
|
display: flex;
|
@@ -136,12 +138,12 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
136
138
|
<div style="flex: 0 0 ${a}; overflow: auto;">${o}</div>
|
137
139
|
<div style="flex: 1 1 auto; overflow: auto;">${s}</div>
|
138
140
|
</div>
|
139
|
-
`}function
|
141
|
+
`}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?.direction??`vertical`,a=n?.height??`100%`,o=n?.width??`100%`,s=n?.customCss??``,l=n?.className??c(`ScrollBar::scrollbar-container`),u=i===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`;return e`
|
140
142
|
<style>
|
141
143
|
.${l} {
|
142
144
|
${u};
|
143
|
-
width: ${
|
144
|
-
height: ${
|
145
|
+
width: ${o};
|
146
|
+
height: ${a};
|
145
147
|
}
|
146
148
|
.${l}::-webkit-scrollbar {
|
147
149
|
width: 8px;
|
@@ -154,10 +156,10 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
154
156
|
.${l}::-webkit-scrollbar-track {
|
155
157
|
background: rgba(0, 0, 0, 0.05);
|
156
158
|
}
|
157
|
-
${
|
159
|
+
${s}
|
158
160
|
</style>
|
159
|
-
<div class="${l}">${t(
|
160
|
-
`}function
|
161
|
+
<div class="${l}">${t(r)}</div>
|
162
|
+
`}function S(t,r){if(r===void 0)return n=>S(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`
|
161
163
|
<div
|
162
164
|
style="
|
163
165
|
display: flex;
|
@@ -170,7 +172,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
170
172
|
<div style="flex: 0 0 ${i}; overflow: auto;">${s}</div>
|
171
173
|
<div style="flex: 1 1 auto; overflow: auto;">${c}</div>
|
172
174
|
</div>
|
173
|
-
`}function
|
175
|
+
`}function C(t={},n){if(n===void 0)return n=>C(t,n??[e``]);let{gap:r=`8px`,snapType:i=`mandatory`,height:a=`auto`,width:o=`100%`,className:s=c(`Swiper::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:b=!1,onSlideChange:x}=t,S=s,w=S+`-container`,T=S+`-slide`,E=S+`-navigation`,D=S+`-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,x?.(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=>{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(`.${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))),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=e`
|
174
176
|
<div class="${D}">
|
175
177
|
${Array.from({length:k},(t,n)=>e`
|
176
178
|
<button
|
@@ -199,21 +201,21 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
199
201
|
</div>
|
200
202
|
`;return e`
|
201
203
|
<style>
|
202
|
-
.${
|
204
|
+
.${S} {
|
203
205
|
position: relative;
|
204
206
|
overflow: hidden;
|
205
|
-
width: ${
|
206
|
-
height: ${
|
207
|
+
width: ${o};
|
208
|
+
height: ${a};
|
207
209
|
}
|
208
210
|
|
209
211
|
.${w} {
|
210
212
|
width: 100%;
|
211
213
|
height: 100%;
|
212
214
|
overflow: auto;
|
213
|
-
scroll-snap-type: ${l+` `+
|
215
|
+
scroll-snap-type: ${l+` `+i};
|
214
216
|
-webkit-overflow-scrolling: touch;
|
215
217
|
scroll-behavior: ${u};
|
216
|
-
gap: ${
|
218
|
+
gap: ${r};
|
217
219
|
display: flex;
|
218
220
|
flex-direction: ${l===`x`?`row`:`column`};
|
219
221
|
}
|
@@ -305,7 +307,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
305
307
|
}
|
306
308
|
</style>
|
307
309
|
|
308
|
-
<div class="${
|
310
|
+
<div class="${S}">
|
309
311
|
<div class="${w}">
|
310
312
|
${O.map((t,n)=>e`
|
311
313
|
<div class="${T} --slide-${n}" key=${n}>
|
@@ -319,18 +321,20 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
319
321
|
${m&&h===`fraction`?U:null}
|
320
322
|
${m&&h===`progressbar`?W:null}
|
321
323
|
</div>
|
322
|
-
`}function
|
324
|
+
`}function w(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`
|
323
325
|
<div
|
326
|
+
class="${p}"
|
324
327
|
style="
|
325
328
|
position: absolute;
|
326
329
|
${a} ${o} ${s} ${c}
|
327
330
|
${l} ${u}
|
328
331
|
${d}
|
332
|
+
${f}
|
329
333
|
"
|
330
334
|
>
|
331
335
|
${t(n)}
|
332
336
|
</div>
|
333
|
-
`;return i(r,
|
337
|
+
`;return i(r,m)}function T(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
338
|
<div
|
335
339
|
style="
|
336
340
|
position: fixed;
|
@@ -354,7 +358,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
354
358
|
>
|
355
359
|
${t}
|
356
360
|
</div>
|
357
|
-
`;return a(n,void 0,g)}function
|
361
|
+
`;return a(n,void 0,g)}function E(t,r){if(r===void 0)return n=>E(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`
|
358
362
|
<div
|
359
363
|
style="
|
360
364
|
position: relative;
|
@@ -377,17 +381,18 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
377
381
|
${n(r)}
|
378
382
|
</div>
|
379
383
|
</div>
|
380
|
-
`}function
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
>
|
388
|
-
${
|
389
|
-
</
|
390
|
-
|
384
|
+
`}function D(n,r){if(r===void 0){let t=e=>D(n,e);return t.html=(t,...r)=>D(n,e(t,...r)),t}let i=c(`AutoFitGrid::auto-fit-grid`),a=n?.gap??`16px`,o=`
|
385
|
+
.${i} {
|
386
|
+
display: grid;
|
387
|
+
grid-template-columns: repeat(auto-fit, minmax(${n.minItemWidth}, 1fr));
|
388
|
+
gap: ${a};
|
389
|
+
}
|
390
|
+
`;return e`
|
391
|
+
<style>
|
392
|
+
${o}
|
393
|
+
</style>
|
394
|
+
<div class="${i}">${t(r)}</div>
|
395
|
+
`}function O(t,r){if(r===void 0)return n=>O(t,n??[e``]);let i=t?.size??`32px`,a=t?.overlap??`-8px`,o=(t,n)=>e`
|
391
396
|
<div
|
392
397
|
style="
|
393
398
|
width: ${i};
|
@@ -405,7 +410,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
405
410
|
<div style="display: flex; align-items: center;">
|
406
411
|
${n(r,o)}
|
407
412
|
</div>
|
408
|
-
`}function
|
413
|
+
`}function k(n,r){if(r===void 0){let t=t=>k(n,t??e``);return t.html=(t,...r)=>k(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`
|
409
414
|
<div style="position: relative; display: inline-block;">
|
410
415
|
${t(r)}
|
411
416
|
<div
|
@@ -430,7 +435,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
430
435
|
${n?.content??``}
|
431
436
|
</div>
|
432
437
|
</div>
|
433
|
-
`}function
|
438
|
+
`}function A(t,r){if(r===void 0)return n=>A(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`
|
434
439
|
<div
|
435
440
|
style="
|
436
441
|
background: ${s};
|
@@ -442,7 +447,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
442
447
|
>
|
443
448
|
${n(r)}
|
444
449
|
</div>
|
445
|
-
`}function
|
450
|
+
`}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?.width?`width: ${n.width};`:``,a=n?.height?`height: ${n.height};`:``,o=n?.background?`background: ${n.background};`:``;return e`
|
446
451
|
<div
|
447
452
|
style="
|
448
453
|
display: flex;
|
@@ -453,7 +458,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
453
458
|
>
|
454
459
|
${t(r)}
|
455
460
|
</div>
|
456
|
-
`}function
|
461
|
+
`}function M(t,r){if(r===void 0)return n=>M(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`
|
457
462
|
<div
|
458
463
|
style="
|
459
464
|
width: 100%;
|
@@ -468,7 +473,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
468
473
|
>
|
469
474
|
${n(r)}
|
470
475
|
</div>
|
471
|
-
`}function
|
476
|
+
`}function N(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 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?.columns??4,a=n?.gap??`24px`,o=n?.background??`#f8f8f8`,s=n?.padding??`40px 16px`;return e`
|
472
477
|
<div
|
473
478
|
style="
|
474
479
|
width: 100%;
|
@@ -490,22 +495,22 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
490
495
|
© ${new Date().getFullYear()} Your Company. All rights reserved.
|
491
496
|
</div>
|
492
497
|
</div>
|
493
|
-
`}function
|
498
|
+
`}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.defaultColumns??1,a=n.gap??`16px`,o=n.className??c(`GridBreakpoint::grid-breakpoint`),s=Object.entries(n.breakpoints).map(([e,t])=>`
|
494
499
|
@media ${e} {
|
495
|
-
.${
|
500
|
+
.${o} { grid-template-columns: repeat(${t}, 1fr); }
|
496
501
|
}
|
497
502
|
`).join(`
|
498
503
|
`);return e`
|
499
504
|
<style>
|
500
|
-
.${
|
505
|
+
.${o} {
|
501
506
|
display: grid;
|
502
|
-
grid-template-columns: repeat(${
|
503
|
-
gap: ${
|
507
|
+
grid-template-columns: repeat(${i}, 1fr);
|
508
|
+
gap: ${a};
|
504
509
|
}
|
505
|
-
${
|
510
|
+
${s}
|
506
511
|
</style>
|
507
|
-
<div class="${
|
508
|
-
`}function
|
512
|
+
<div class="${o}">${t(r)}</div>
|
513
|
+
`}function I(t,r){if(r===void 0)return n=>I(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`
|
509
514
|
<div
|
510
515
|
style="
|
511
516
|
position: relative;
|
@@ -542,22 +547,22 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
542
547
|
${n(r)}
|
543
548
|
</div>
|
544
549
|
</div>
|
545
|
-
`}function
|
546
|
-
@media not ${
|
550
|
+
`}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?.breakpoint??`(max-width: 600px)`,a=n?.mode??`hide`,o=n?.className??c(`Hidden::hidden-container`),s=a===`hide`?`@media ${i} { .${o} { display: none !important; } }`:`@media ${i} { .${o} { display: block !important; } }
|
551
|
+
@media not ${i} { .${o} { display: none !important; } }`;return e`
|
547
552
|
<style>
|
548
|
-
.${
|
553
|
+
.${o} {
|
549
554
|
display: block;
|
550
555
|
}
|
551
|
-
${
|
556
|
+
${s}
|
552
557
|
</style>
|
553
|
-
<div class="${
|
554
|
-
`}function
|
558
|
+
<div class="${o}">${t(r)}</div>
|
559
|
+
`}function R(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=t?.className??c(`ListGroup::list-group`),u=(t,n,r,i)=>r?e` <li>${t}</li> `:t,d=r=>e`
|
555
560
|
<style>
|
556
561
|
ul.${l} {
|
557
562
|
list-style: none;
|
558
563
|
margin: 0;
|
559
564
|
padding: 0;
|
560
|
-
${
|
565
|
+
${i};
|
561
566
|
}
|
562
567
|
ul.${l} li {
|
563
568
|
padding: 12px 16px;
|
@@ -566,13 +571,13 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
566
571
|
ul.${l} li:last-child {
|
567
572
|
${t?.bordered?`border-bottom: none`:``};
|
568
573
|
}
|
574
|
+
${o}
|
569
575
|
${s}
|
570
|
-
${c}
|
571
576
|
</style>
|
572
577
|
<ul class="${l}">
|
573
578
|
${n(r,u)}
|
574
579
|
</ul>
|
575
|
-
`;return a(
|
580
|
+
`;return a(r,d)}function z(t,r){if(r===void 0)return n=>z(t,n??[e``]);let i=t?.background??`rgba(0, 0, 0, 0.5)`,a=t?.zIndex??1e3,o=t?.fullScreen!==!1;return e`
|
576
581
|
<div
|
577
582
|
style="
|
578
583
|
position: ${o?`fixed`:`absolute`};
|
@@ -586,7 +591,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
586
591
|
>
|
587
592
|
${n(r)}
|
588
593
|
</div>
|
589
|
-
`}function
|
594
|
+
`}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?.width?`width: ${n.width};`:``,a=n?.height?`height: ${n.height};`:``,o=n?.background?`background: ${n.background};`:``;return e`
|
590
595
|
<div
|
591
596
|
style="
|
592
597
|
position: relative;
|
@@ -596,23 +601,23 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
596
601
|
>
|
597
602
|
${t(r)}
|
598
603
|
</div>
|
599
|
-
`}function
|
604
|
+
`}function V(t){let n=t?.width?`width: ${t.width};`:``,r=t?.height?`height: ${t.height};`:``;return e` <div style="${n} ${r}"></div> `}function H(t){let n=t?.type??`rect`,r=t?.width??`100%`,i=t?.height??`16px`,a=t?.borderRadius??`4px`,o=t?.animation!==!1,s=t?.className??c(`SkeletonLoader::skeleton-shimmer`),l=n===`circle`?`border-radius: 50%; width: ${r}; height: ${r}`:`border-radius: ${a}; width: ${r}; height: ${i}`;return e`
|
600
605
|
<style>
|
601
606
|
${`
|
602
|
-
@keyframes ${
|
607
|
+
@keyframes ${s+`-shimmer`} {
|
603
608
|
0% { background-color: #eee; }
|
604
609
|
50% { background-color: #ddd; }
|
605
610
|
100% { background-color: #eee; }
|
606
611
|
}
|
607
612
|
`}
|
608
|
-
.${
|
613
|
+
.${s} {
|
609
614
|
${l};
|
610
615
|
background-color: #eee;
|
611
|
-
${
|
616
|
+
${o?`animation: ${s+`-shimmer`} 1.2s infinite ease-in-out`:``};
|
612
617
|
}
|
613
618
|
</style>
|
614
|
-
<div class="${
|
615
|
-
`}function
|
619
|
+
<div class="${s}"></div>
|
620
|
+
`}function U(){return e`<div style="flex: 1 1 auto;"></div>`}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?.top?`top: ${n.top};`:``,a=n?.bottom?`bottom: ${n.bottom};`:``,o=typeof n?.zIndex==`number`?`z-index: ${n.zIndex};`:``;return e`
|
616
621
|
<div
|
617
622
|
style="
|
618
623
|
position: sticky;
|
@@ -622,35 +627,35 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
622
627
|
>
|
623
628
|
${t(r)}
|
624
629
|
</div>
|
625
|
-
`}function
|
626
|
-
.${
|
627
|
-
`:``,
|
628
|
-
.${
|
629
|
-
`:``,
|
630
|
-
.${
|
630
|
+
`}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?.className??c(`Table::table`),a=n?.striped?`
|
631
|
+
.${i} tr:nth-child(even) { background: #f9f9f9; }
|
632
|
+
`:``,o=n?.hover?`
|
633
|
+
.${i} tr:hover { background: #f1f1f1; }
|
634
|
+
`:``,s=n?.bordered?`
|
635
|
+
.${i}, .${i} th, .${i} td { border: 1px solid #ddd; }
|
631
636
|
`:``;return e`
|
632
637
|
<style>
|
633
638
|
/* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
|
634
|
-
.${
|
639
|
+
.${i} table {
|
635
640
|
width: 100%;
|
636
641
|
border-collapse: collapse;
|
637
642
|
}
|
638
|
-
.${
|
639
|
-
.${
|
643
|
+
.${i} th,
|
644
|
+
.${i} td {
|
640
645
|
padding: 8px 12px;
|
641
646
|
text-align: left;
|
642
647
|
}
|
648
|
+
${a}
|
643
649
|
${o}
|
644
650
|
${s}
|
645
|
-
${c}
|
646
651
|
</style>
|
647
652
|
|
648
|
-
<div class="${
|
653
|
+
<div class="${i}">
|
649
654
|
<table>
|
650
|
-
${t(
|
655
|
+
${t(r)}
|
651
656
|
</table>
|
652
657
|
</div>
|
653
|
-
`}function
|
658
|
+
`}function K(t,r){let i=t?.direction??`row`;return r===void 0?n=>K(t,n??e``):e`
|
654
659
|
<div
|
655
660
|
style="
|
656
661
|
display: flex;
|
@@ -663,7 +668,7 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
663
668
|
>
|
664
669
|
${n(r)}
|
665
670
|
</div>
|
666
|
-
`}function
|
671
|
+
`}function q(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=>q(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`
|
667
672
|
<div
|
668
673
|
style="
|
669
674
|
position: relative;
|
@@ -675,5 +680,5 @@ import{html as e}from"lit";function t(t){return t?typeof t==`function`?t():t:e``
|
|
675
680
|
>
|
676
681
|
${n(r)}
|
677
682
|
</div>
|
678
|
-
`}export{
|
683
|
+
`}export{w as AbsoluteBox,T as AcrylicBar,E as AspectRatio,D as AutoFitGrid,O as AvatarStack,k as Badge,A as Card,j as Center,u as Column,y as ColumnSplit,M as Container,N as Divider,d as Flex,f as FlowItem,P as FooterLayout,p as Grid,F as GridBreakpoint,m as GridCol,h as GridItem,g as GridRow,I as HeroSection,L as Hidden,l as LightboxContainer,R as ListGroup,z as Overlay,B as PositionContainer,_ as Row,b as RowSplit,x as ScrollBar,S as SideBarContainer,V as SizedBox,H as SkeletonLoader,U as Spacer,W as Sticky,C as Swiper,G as Table,v as WaterFlow,K as Wrap,q as ZStack};
|
679
684
|
//# sourceMappingURL=index.es.js.map
|