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/README.md
CHANGED
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));if(typeof e!=`function`)return n(e);let r=e();return Array.isArray(r)?r.map((e,t)=>n(l(e),t)):n(l(r))}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=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}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`
|
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
|
15
|
+
`}function h(e,t){return t===void 0?t=>h(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
|
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`
|
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
|
37
|
+
`}function _(e){return c.html`
|
38
38
|
<div style="break-inside: avoid; margin-bottom: 16px;">
|
39
|
-
${l(
|
39
|
+
${l(e)}
|
40
40
|
</div>
|
41
|
-
`}function
|
41
|
+
`}function v(e,t){if(t===void 0)return t=>v(e,t??[c.html``]);let n=e?.columns??1;return c.html`
|
42
42
|
<div
|
43
43
|
style="
|
44
44
|
display: grid;
|
@@ -48,7 +48,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
48
48
|
>
|
49
49
|
${u(t)}
|
50
50
|
</div>
|
51
|
-
`}function
|
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
52
|
<div
|
53
53
|
style="
|
54
54
|
display: grid;
|
@@ -58,11 +58,11 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
58
58
|
>
|
59
59
|
${l(t)}
|
60
60
|
</div>
|
61
|
-
`}function
|
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`
|
62
62
|
<div style="${e?.span?`grid-column: span ${e.span};`:``}">
|
63
63
|
${l(t)}
|
64
64
|
</div>
|
65
|
-
`}function
|
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
66
|
<div
|
67
67
|
style="
|
68
68
|
display: grid;
|
@@ -72,7 +72,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
72
72
|
>
|
73
73
|
${l(t)}
|
74
74
|
</div>
|
75
|
-
`}function
|
75
|
+
`}function S(e,t){return c.html`
|
76
76
|
<div
|
77
77
|
style="
|
78
78
|
display: flex;
|
@@ -82,16 +82,35 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
82
82
|
>
|
83
83
|
${u(t)}
|
84
84
|
</div>
|
85
|
-
`}function
|
86
|
-
<
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
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>
|
98
|
+
|
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`
|
95
114
|
<div
|
96
115
|
style="
|
97
116
|
display: flex;
|
@@ -104,7 +123,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
104
123
|
<div style="flex: 0 0 ${r}; overflow: auto;">${i}</div>
|
105
124
|
<div style="flex: 1 1 auto; overflow: auto;">${a}</div>
|
106
125
|
</div>
|
107
|
-
`}function
|
126
|
+
`}function T(e,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`
|
108
127
|
<div
|
109
128
|
style="
|
110
129
|
display: flex;
|
@@ -117,7 +136,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
117
136
|
<div style="flex: 0 0 ${r}; overflow: auto;">${i}</div>
|
118
137
|
<div style="flex: 1 1 auto; overflow: auto;">${a}</div>
|
119
138
|
</div>
|
120
|
-
`}function
|
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`
|
121
140
|
<style>
|
122
141
|
.${o} {
|
123
142
|
${s};
|
@@ -138,7 +157,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
138
157
|
${a}
|
139
158
|
</style>
|
140
159
|
<div class="${o}">${l(t)}</div>
|
141
|
-
`}function
|
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`
|
142
161
|
<div
|
143
162
|
style="
|
144
163
|
display: flex;
|
@@ -151,40 +170,169 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
151
170
|
<div style="flex: 0 0 ${n}; overflow: auto;">${a}</div>
|
152
171
|
<div style="flex: 1 1 auto; overflow: auto;">${o}</div>
|
153
172
|
</div>
|
154
|
-
`}function
|
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`
|
176
|
+
<button
|
177
|
+
class="${t===A()?`active`:``}"
|
178
|
+
@click=${()=>M(t)}
|
179
|
+
></button>
|
180
|
+
`)}
|
181
|
+
</div>
|
182
|
+
`,U=c.html`
|
183
|
+
<div class="${E} fraction">
|
184
|
+
<span class="current">${A()+1}</span>
|
185
|
+
<span class="separator">/</span>
|
186
|
+
<span class="total">${k}</span>
|
187
|
+
</div>
|
188
|
+
`,W=c.html`
|
189
|
+
<div class="${E} progressbar">
|
190
|
+
<div
|
191
|
+
class="progress"
|
192
|
+
style="width: ${k>1?A()/(k-1)*100:0}%"
|
193
|
+
></div>
|
194
|
+
</div>
|
195
|
+
`,G=c.html`
|
196
|
+
<div class="${T}">
|
197
|
+
<button class="prev" @click=${P}>◀</button>
|
198
|
+
<button class="next" @click=${N}>▶</button>
|
199
|
+
</div>
|
200
|
+
`;return c.html`
|
155
201
|
<style>
|
156
|
-
.${
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
202
|
+
.${S} {
|
203
|
+
position: relative;
|
204
|
+
overflow: hidden;
|
205
|
+
width: ${a};
|
206
|
+
height: ${i};
|
207
|
+
}
|
208
|
+
|
209
|
+
.${C} {
|
210
|
+
width: 100%;
|
211
|
+
height: 100%;
|
212
|
+
overflow: auto;
|
213
|
+
scroll-snap-type: ${s+` `+r};
|
163
214
|
-webkit-overflow-scrolling: touch;
|
164
|
-
|
215
|
+
scroll-behavior: ${l};
|
216
|
+
gap: ${n};
|
217
|
+
display: flex;
|
218
|
+
flex-direction: ${s===`x`?`row`:`column`};
|
165
219
|
}
|
166
|
-
|
167
|
-
|
220
|
+
|
221
|
+
.${w} {
|
222
|
+
scroll-snap-align: ${u};
|
168
223
|
flex-shrink: 0;
|
169
224
|
}
|
225
|
+
|
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
|
+
}
|
237
|
+
|
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
|
+
}
|
252
|
+
|
253
|
+
.${T} button:hover {
|
254
|
+
background-color: rgba(0, 0, 0, 0.8);
|
255
|
+
}
|
256
|
+
|
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
|
+
}
|
280
|
+
|
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
|
+
}
|
292
|
+
|
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
|
+
}
|
170
306
|
</style>
|
171
|
-
|
172
|
-
|
307
|
+
|
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>
|
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 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=>c.html`
|
323
|
+
<div
|
324
|
+
style="
|
177
325
|
position: absolute;
|
178
326
|
${n} ${r} ${i} ${a}
|
179
327
|
${o} ${s}
|
180
328
|
${u}
|
181
329
|
"
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
330
|
+
>
|
331
|
+
${l(e)}
|
332
|
+
</div>
|
333
|
+
`;return f(t,d)}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
|
+
<div
|
335
|
+
style="
|
188
336
|
position: fixed;
|
189
337
|
top: ${i};
|
190
338
|
bottom: ${a};
|
@@ -193,20 +341,20 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
193
341
|
${l}
|
194
342
|
width: ${n};
|
195
343
|
height: ${r};
|
196
|
-
background: ${
|
197
|
-
backdrop-filter: blur(${
|
198
|
-
-webkit-backdrop-filter: blur(${
|
199
|
-
border-radius: ${
|
344
|
+
background: ${u};
|
345
|
+
backdrop-filter: blur(${d});
|
346
|
+
-webkit-backdrop-filter: blur(${d});
|
347
|
+
border-radius: ${f};
|
200
348
|
padding: ${m};
|
201
349
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
|
202
350
|
z-index: ${h};
|
203
351
|
display: flex;
|
204
352
|
flex-direction: column;
|
205
353
|
"
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
354
|
+
>
|
355
|
+
${e}
|
356
|
+
</div>
|
357
|
+
`;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`
|
210
358
|
<div
|
211
359
|
style="
|
212
360
|
position: relative;
|
@@ -229,7 +377,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
229
377
|
${u(t)}
|
230
378
|
</div>
|
231
379
|
</div>
|
232
|
-
`}function
|
380
|
+
`}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`
|
233
381
|
<div
|
234
382
|
style="
|
235
383
|
display: grid;
|
@@ -239,7 +387,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
239
387
|
>
|
240
388
|
${l(t)}
|
241
389
|
</div>
|
242
|
-
`}function
|
390
|
+
`}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`
|
243
391
|
<div
|
244
392
|
style="
|
245
393
|
width: ${n};
|
@@ -257,7 +405,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
257
405
|
<div style="display: flex; align-items: center;">
|
258
406
|
${u(t,i)}
|
259
407
|
</div>
|
260
|
-
`}function
|
408
|
+
`}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`
|
261
409
|
<div style="position: relative; display: inline-block;">
|
262
410
|
${l(t)}
|
263
411
|
<div
|
@@ -282,7 +430,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
282
430
|
${e?.content??``}
|
283
431
|
</div>
|
284
432
|
</div>
|
285
|
-
`}function
|
433
|
+
`}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`
|
286
434
|
<div
|
287
435
|
style="
|
288
436
|
background: ${a};
|
@@ -294,7 +442,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
294
442
|
>
|
295
443
|
${u(t)}
|
296
444
|
</div>
|
297
|
-
`}function
|
445
|
+
`}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`
|
298
446
|
<div
|
299
447
|
style="
|
300
448
|
display: flex;
|
@@ -305,7 +453,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
305
453
|
>
|
306
454
|
${l(t)}
|
307
455
|
</div>
|
308
|
-
`}function
|
456
|
+
`}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`
|
309
457
|
<div
|
310
458
|
style="
|
311
459
|
width: 100%;
|
@@ -320,7 +468,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
320
468
|
>
|
321
469
|
${u(t)}
|
322
470
|
</div>
|
323
|
-
`}function
|
471
|
+
`}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`
|
324
472
|
<div
|
325
473
|
style="
|
326
474
|
width: 100%;
|
@@ -342,7 +490,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
342
490
|
© ${new Date().getFullYear()} Your Company. All rights reserved.
|
343
491
|
</div>
|
344
492
|
</div>
|
345
|
-
`}function
|
493
|
+
`}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])=>`
|
346
494
|
@media ${e} {
|
347
495
|
.${i} { grid-template-columns: repeat(${t}, 1fr); }
|
348
496
|
}
|
@@ -357,7 +505,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
357
505
|
${a}
|
358
506
|
</style>
|
359
507
|
<div class="${i}">${l(t)}</div>
|
360
|
-
`}function
|
508
|
+
`}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`
|
361
509
|
<div
|
362
510
|
style="
|
363
511
|
position: relative;
|
@@ -394,7 +542,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
394
542
|
${u(t)}
|
395
543
|
</div>
|
396
544
|
</div>
|
397
|
-
`}function
|
545
|
+
`}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; } }
|
398
546
|
@media not ${n} { .${i} { display: none !important; } }`;return c.html`
|
399
547
|
<style>
|
400
548
|
.${i} {
|
@@ -403,7 +551,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
403
551
|
${a}
|
404
552
|
</style>
|
405
553
|
<div class="${i}">${l(t)}</div>
|
406
|
-
`}function
|
554
|
+
`}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`
|
407
555
|
<style>
|
408
556
|
ul.${a} {
|
409
557
|
list-style: none;
|
@@ -422,9 +570,9 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
422
570
|
${i}
|
423
571
|
</style>
|
424
572
|
<ul class="${a}">
|
425
|
-
${
|
573
|
+
${u(t,o)}
|
426
574
|
</ul>
|
427
|
-
|
575
|
+
`;return p(t,s)}function W(e,t){let n=e?.background??`rgba(0, 0, 0, 0.5)`,r=e?.zIndex??1e3,i=e?.fullScreen!==!1;return c.html`
|
428
576
|
<div
|
429
577
|
style="
|
430
578
|
position: ${i?`fixed`:`absolute`};
|
@@ -438,7 +586,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
438
586
|
>
|
439
587
|
${u(t)}
|
440
588
|
</div>
|
441
|
-
`}function
|
589
|
+
`}function G(e,t){let n=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``,i=e?.background?`background: ${e.background};`:``;return c.html`
|
442
590
|
<div
|
443
591
|
style="
|
444
592
|
position: relative;
|
@@ -448,7 +596,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
448
596
|
>
|
449
597
|
${l(t)}
|
450
598
|
</div>
|
451
|
-
`}function
|
599
|
+
`}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`
|
452
600
|
<style>
|
453
601
|
${`
|
454
602
|
@keyframes ${o+`-shimmer`} {
|
@@ -464,7 +612,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
464
612
|
}
|
465
613
|
</style>
|
466
614
|
<div class="${o}"></div>
|
467
|
-
`}function
|
615
|
+
`}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`
|
468
616
|
<div
|
469
617
|
style="
|
470
618
|
position: sticky;
|
@@ -474,19 +622,21 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
474
622
|
>
|
475
623
|
${l(t)}
|
476
624
|
</div>
|
477
|
-
`}function
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
.${n}
|
625
|
+
`}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?`
|
626
|
+
.${n} tr:nth-child(even) { background: #f9f9f9; }
|
627
|
+
`:``,i=e?.hover?`
|
628
|
+
.${n} tr:hover { background: #f1f1f1; }
|
629
|
+
`:``,a=e?.bordered?`
|
630
|
+
.${n}, .${n} th, .${n} td { border: 1px solid #ddd; }
|
483
631
|
`:``;return c.html`
|
484
632
|
<style>
|
633
|
+
/* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
|
485
634
|
.${n} table {
|
486
635
|
width: 100%;
|
487
636
|
border-collapse: collapse;
|
488
637
|
}
|
489
|
-
.${n} th,
|
638
|
+
.${n} th,
|
639
|
+
.${n} td {
|
490
640
|
padding: 8px 12px;
|
491
641
|
text-align: left;
|
492
642
|
}
|
@@ -494,10 +644,13 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
494
644
|
${i}
|
495
645
|
${a}
|
496
646
|
</style>
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
647
|
+
|
648
|
+
<div class="${n}">
|
649
|
+
<table>
|
650
|
+
${l(t)}
|
651
|
+
</table>
|
652
|
+
</div>
|
653
|
+
`}function Z(e,t){let n=e?.direction??`row`;return t===void 0?t=>Z(e,t??c.html``):c.html`
|
501
654
|
<div
|
502
655
|
style="
|
503
656
|
display: flex;
|
@@ -510,7 +663,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
510
663
|
>
|
511
664
|
${u(t)}
|
512
665
|
</div>
|
513
|
-
`}function
|
666
|
+
`}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`
|
514
667
|
<div
|
515
668
|
style="
|
516
669
|
position: relative;
|
@@ -522,5 +675,5 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
522
675
|
>
|
523
676
|
${u(t)}
|
524
677
|
</div>
|
525
|
-
`}exports.AbsoluteBox=
|
678
|
+
`}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;
|
526
679
|
//# sourceMappingURL=index.cjs.js.map
|