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