lyco 1.3.0 → 1.3.6
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/basic.cjs.js +2 -0
- package/dist/basic.cjs.js.map +1 -0
- package/dist/basic.es.js +2 -0
- package/dist/basic.es.js.map +1 -0
- package/dist/core-B-U2ZJO6.mjs +5 -0
- package/dist/core-B-U2ZJO6.mjs.map +1 -0
- package/dist/core-DkUSnSgK.js +5 -0
- package/dist/core-DkUSnSgK.js.map +1 -0
- package/dist/index.cjs.js +567 -570
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +461 -464
- package/dist/index.es.js.map +1 -1
- package/dist/types/basic.d.ts +1 -0
- package/dist/types/{src/components → components}/AbsoluteBox.d.ts +1 -1
- package/dist/types/{src/components → components}/AcrylicBar.d.ts +1 -1
- package/dist/types/{src/components → components}/AspectRatio.d.ts +1 -1
- package/dist/types/{src/components → components}/AutoFitGrid.d.ts +1 -1
- package/dist/types/{src/components → components}/AvatarStack.d.ts +1 -1
- package/dist/types/{src/components → components}/Badge.d.ts +1 -1
- package/dist/types/components/Basic/mod.d.ts +10551 -0
- package/dist/types/{src/components → components}/Canvas.d.ts +1 -1
- package/dist/types/{src/components → components}/Card.d.ts +1 -1
- package/dist/types/{src/components → components}/Center.d.ts +1 -1
- package/dist/types/{src/components → components}/Column.d.ts +1 -1
- package/dist/types/{src/components → components}/ColumnSplit.d.ts +1 -1
- package/dist/types/{src/components → components}/Combobox.d.ts +1 -1
- package/dist/types/{src/components → components}/Container.d.ts +1 -1
- package/dist/types/{src/components → components}/Dialog/Dialog.d.ts +1 -1
- package/dist/types/{src/components → components}/Dialog/DialogActions.d.ts +1 -1
- package/dist/types/{src/components → components}/Dialog/DialogButton.d.ts +1 -1
- package/dist/types/{src/components → components}/Dialog/DialogContent.d.ts +1 -1
- package/dist/types/{src/components → components}/Dialog/DialogTitle.d.ts +1 -1
- package/dist/types/{src/components → components}/Divider.d.ts +1 -1
- package/dist/types/{src/components → components}/Flex.d.ts +1 -1
- package/dist/types/{src/components → components}/FlowItem.d.ts +1 -1
- package/dist/types/{src/components → components}/FooterLayout.d.ts +1 -1
- package/dist/types/{src/components → components}/Grid.d.ts +1 -1
- package/dist/types/{src/components → components}/GridBreakpoint.d.ts +1 -1
- package/dist/types/{src/components → components}/GridCol.d.ts +1 -1
- package/dist/types/{src/components → components}/GridItem.d.ts +1 -1
- package/dist/types/{src/components → components}/GridRow.d.ts +1 -1
- package/dist/types/{src/components → components}/HeroSection.d.ts +1 -1
- package/dist/types/{src/components → components}/Hidden.d.ts +1 -1
- package/dist/types/{src/components → components}/LightboxContainer.d.ts +1 -1
- package/dist/types/{src/components → components}/List.d.ts +1 -1
- package/dist/types/{src/components → components}/ListGroup.d.ts +1 -1
- package/dist/types/{src/components → components}/Overlay.d.ts +1 -1
- package/dist/types/{src/components → components}/PositionContainer.d.ts +1 -1
- package/dist/types/{src/components → components}/Progress.d.ts +1 -1
- package/dist/types/{src/components → components}/Row.d.ts +1 -1
- package/dist/types/{src/components → components}/RowSplit.d.ts +1 -1
- package/dist/types/{src/components → components}/ScrollBar.d.ts +1 -1
- package/dist/types/{src/components → components}/SideBarContainer.d.ts +1 -1
- package/dist/types/{src/components → components}/SizedBox.d.ts +1 -1
- package/dist/types/{src/components → components}/SkeletonLoader.d.ts +1 -1
- package/dist/types/{src/components → components}/Spacer.d.ts +1 -1
- package/dist/types/{src/components → components}/Spinner.d.ts +1 -1
- package/dist/types/{src/components → components}/Sticky.d.ts +1 -1
- package/dist/types/{src/components → components}/Swiper.d.ts +1 -1
- package/dist/types/{src/components → components}/SwitchInput.d.ts +1 -1
- package/dist/types/{src/components → components}/Table.d.ts +1 -1
- package/dist/types/{src/components → components}/Tooltip.d.ts +1 -1
- package/dist/types/{src/components → components}/WaterFlow.d.ts +1 -1
- package/dist/types/{src/components → components}/Wrap.d.ts +1 -1
- package/dist/types/{src/components → components}/ZStack.d.ts +1 -1
- package/dist/types/{src/components/index.d.ts → components/mod.d.ts} +2 -0
- package/dist/types/{src/components/core.d.ts → core/index.d.ts} +3 -1
- package/dist/types/index.d.ts +1 -2
- package/package.json +13 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/stories/Dialog.stories.d.ts +0 -6
- package/dist/types/stories/Spinner.stories.d.ts +0 -15
- package/dist/types/stories/virtualizer-example.d.ts +0 -12
- package/dist/types/stories/virtualizer-example.stories.d.ts +0 -10
- /package/dist/types/{src/components → components}/Dialog/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/ForEach.d.ts +0 -0
- /package/dist/types/{src/components → components}/Style.d.ts +0 -0
- /package/dist/types/{src/components → components}/Virtualizer.labs.d.ts +0 -0
- /package/dist/types/{src/theme → theme}/md3.d.ts +0 -0
package/dist/index.cjs.js
CHANGED
@@ -1,289 +1,286 @@
|
|
1
|
-
|
2
|
-
${
|
3
|
-
.key=${
|
4
|
-
style=${(0,
|
5
|
-
data-index=${
|
6
|
-
.recycled=${
|
1
|
+
const e=require(`./core-DkUSnSgK.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(require(`lit/directives/ref.js`)),r=e.__toESM(require(`lit/directives/style-map.js`)),i=typeof window>`u`,a=100;var o=class{constructor(e){this._capacity=e,this.buffer=Array(e)}set(e,t){this.buffer[e%this._capacity]=t}get(e){return this.buffer[e%this._capacity]}clear(){this.buffer.fill(void 0)}get capacity(){return this._capacity}},s=class{constructor(){this.data=new Float64Array}set(e,t){let n=e*3;this.data[n]=t.start,this.data[n+1]=t.end,this.data[n+2]=t.total}get(e){let t=e*3;return t<0||t+2>=this.data.length?{start:0,end:0,total:0}:{start:this.data[t],end:this.data[t+1],total:this.data[t+2]}}initialize(e){this.data=new Float64Array(Math.ceil(e/a)*3),this.data.fill(0)}},c=class{constructor(e,r,c){this._items=[],this._itemSize=50,this._layout=`vertical`,this._preloadCount=5,this._cacheSize=200,this._renderItem=()=>t.html``,this._containerRef=(0,n.createRef)(),this._firstVisible=0,this._lastVisible=0,this._positionCache=new Float64Array,this._sizeCache=new Float32Array,this._cacheInitialized=!1,this._totalContentSize=0,this._blockStore=new s,this._recycledNodes=[],this.RECYCLE_POOL_SIZE=20,this._preRenderChunkSize=5,this.CHUNK_SIZE=1e3,this._chunks=new Map,this._visibleChunkIndexes=new Set,this._loadedChunks=new Set,this._estimatedItemHeight=0,this._isLoading=!1,this._hasMore=!1,this._pageSize=50,this._fetchMoreThreshold=.8,this._getItemSize=e=>typeof this._itemSize==`function`?this._itemSize(e):this._itemSize,this._calculateMetrics=()=>{if(this._items.length===0){this._positionCache=new Float64Array,this._sizeCache=new Float32Array,this._blockStore.initialize(0),this._totalContentSize=0,this._cacheInitialized=!0,this._templateBuffer.clear();return}this._positionCache=new Float64Array(this._items.length),this._sizeCache=new Float32Array(this._items.length),this._blockStore.initialize(this._items.length);let e=0,t=0,n=0;for(let r=0;r<this._items.length;r++){let i=this._getItemSize(r);if(this._positionCache[r]=e,this._sizeCache[r]=i,n+=i,(r+1)%a===0||r===this._items.length-1){let o=Math.floor(r/a);this._blockStore.set(o,{start:t,end:e+i,total:n}),t=e+i,n=0}e+=i}this._totalContentSize=e,this._cacheInitialized=!0,this._templateBuffer.clear()},this._findItemIndexByOffset=e=>{if(!this._cacheInitialized||this._items.length===0)return 0;let t=0,n=this._items.length-1,r=0;for(;t<=n;){let i=Math.floor((t+n)/2);this._positionCache[i]<=e?(r=i,t=i+1):n=i-1}return r},this._updateVisibleRange=()=>{if(!this._containerRef.value)return;let e=this._layout===`vertical`,t=e?this._containerRef.value.scrollTop:this._containerRef.value.scrollLeft,n=e?this._containerRef.value.clientHeight:this._containerRef.value.clientWidth;this._firstVisible=Math.floor(t/this._estimatedItemHeight),this._lastVisible=Math.ceil((t+n)/this._estimatedItemHeight),this._checkAndLoadMore(),this.host.requestUpdate()},this._ticking=!1,this._lastUpdate=0,this.FRAME_BUDGET=16,this._scheduleUpdate=async()=>{if(this._ticking)return;let e=performance.now(),t=e-this._lastUpdate;t>=this.FRAME_BUDGET&&(this._ticking=!0,requestAnimationFrame(()=>{this._updateVisibleRange(),this._ticking=!1,this._lastUpdate=performance.now()}))},this.host=e,e.addController(this),this.updateConfig(r,c),this._templateBuffer=new o(this._cacheSize),this._pageSize=r.pageSize??50,this._fetchMoreThreshold=r.fetchMoreThreshold??.8,i||(this._setupObservers(),this._setupResizeObserver(),this._initializeChunks())}_initializeItems(e){this._items=[...e],this._calculateMetrics(),this._initializeChunks(),this.host.requestUpdate()}_updateMetricsForRange(e,t){if(t>this._positionCache.length){let e=new Float64Array(Math.max(t*1.5,1e3));e.set(this._positionCache),this._positionCache=e;let n=new Float32Array(Math.max(t*1.5,1e3));n.set(this._sizeCache),this._sizeCache=n}let n=e===0?0:this._positionCache[e-1]+this._sizeCache[e-1];for(let r=e;r<t;r++){let e=this._getItemSize(r);this._positionCache[r]=n,this._sizeCache[r]=e,n+=e}this._totalContentSize=n,this._updateChunkMetrics()}_setupObservers(){this._intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&this._preRenderChunk()})},{rootMargin:`50%`}),this._mutationObserver=new MutationObserver(e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{e instanceof HTMLElement&&this._recycledNodes.length<this.RECYCLE_POOL_SIZE&&this._recycledNodes.push(e)})})})}_setupResizeObserver(){this._resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target instanceof HTMLElement){let e=t.contentRect.height;e>0&&(this._estimatedItemHeight=e,this._updateChunkMetrics())}})}_initializeChunks(){this._chunks.clear();let e=Math.ceil(this._items.length/this.CHUNK_SIZE);for(let t=0;t<e;t++){let e=t*this.CHUNK_SIZE,n=Math.min(e+this.CHUNK_SIZE,this._items.length);this._chunks.set(t,this._items.slice(e,n))}}_updateChunkMetrics(){if(!this._containerRef.value)return;let e=this._containerRef.value.clientHeight,t=this._items.length*this._estimatedItemHeight;this._blockStore.initialize(Math.ceil(this._items.length/this.CHUNK_SIZE));let n=0;for(let e=0;e<this._chunks.size;e++){let t=Math.min(this.CHUNK_SIZE,this._items.length-e*this.CHUNK_SIZE),r=t*this._estimatedItemHeight;this._blockStore.set(e,{start:n,end:n+r,total:r}),n+=r}this._totalContentSize=t,this._calculateVisibleChunks()}_calculateVisibleChunks(){if(!this._containerRef.value)return;let e=this._containerRef.value.scrollTop,t=this._containerRef.value.clientHeight,n=Math.floor(e/(this.CHUNK_SIZE*this._estimatedItemHeight)),r=Math.ceil((e+t)/(this.CHUNK_SIZE*this._estimatedItemHeight));this._visibleChunkIndexes.clear();for(let e=n;e<=r;e++)this._chunks.has(e)&&this._visibleChunkIndexes.add(e);this._preloadAdjacentChunks(n-1,r+1)}_preloadAdjacentChunks(e,t){for(let n=e;n<=t;n++)n>=0&&n<this._chunks.size&&!this._loadedChunks.has(n)&&requestIdleCallback(()=>{this._loadChunk(n)})}_loadChunk(e){if(this._loadedChunks.has(e))return;let t=e*this.CHUNK_SIZE,n=Math.min(t+this.CHUNK_SIZE,this._items.length),r=this._items.slice(t,n);this._chunks.set(e,r),this._loadedChunks.add(e),this._calculateMetricsForChunk(e)}_calculateMetricsForChunk(e){let t=e*this.CHUNK_SIZE,n=this._chunks.get(e)||[],r=t*this._estimatedItemHeight;for(let e=0;e<n.length;e++){let n=t+e;this._positionCache[n]=r,this._sizeCache[n]=this._estimatedItemHeight,r+=this._estimatedItemHeight}}_preRenderChunk(){this._idleCallbackId&&cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=requestIdleCallback(e=>{let t=this._lastVisible+1,n=0;for(;e.timeRemaining()>0&&n<this._preRenderChunkSize&&t<this._items.length;)this._prerenderItem(t),t++,n++;t<this._items.length&&this._preRenderChunk()})}_prerenderItem(e){let t=e%this._cacheSize;if(!this._templateBuffer.get(t)){let n=this._positionCache[e],r=this._sizeCache[e];if(n!==void 0&&r!==void 0){let i=this._getItemStyle(n,r),a=this._createItemTemplate(this._items[e],e,i);this._templateBuffer.set(t,a)}}}_getItemStyle(e,t){let n=this._layout===`vertical`;return{position:`absolute`,[n?`top`:`left`]:`${e}px`,[n?`height`:`width`]:`${t}px`,width:n?`100%`:`auto`,height:n?`auto`:`100%`,willChange:`transform`,contain:`content`,backfaceVisibility:`hidden`,WebkitFontSmoothing:`subpixel-antialiased`}}_createItemTemplate(e,n,i){let a=this._recycledNodes.pop(),o=`item-${n}`;return t.html`
|
2
|
+
${a?t.html`<div
|
3
|
+
.key=${o}
|
4
|
+
style=${(0,r.styleMap)(i)}
|
5
|
+
data-index=${n}
|
6
|
+
.recycled=${a}
|
7
7
|
>
|
8
|
-
${this._renderItem(e,
|
9
|
-
</div>`:
|
10
|
-
${this._renderItem(e,
|
8
|
+
${this._renderItem(e,n)}
|
9
|
+
</div>`:t.html`<div .key=${o} style=${(0,r.styleMap)(i)} data-index=${n}>
|
10
|
+
${this._renderItem(e,n)}
|
11
11
|
</div>`}
|
12
|
-
`}hostConnected(){if(
|
12
|
+
`}hostConnected(){if(i||this.host.updateComplete.then(()=>{this._containerRef.value&&(this._containerRef.value.addEventListener(`scroll`,this._scheduleUpdate),this._calculateMetrics(),this._updateVisibleRange(),this.host.requestUpdate())}),!i&&this._containerRef.value){var e,t,n;(e=this._intersectionObserver)?.observe(this._containerRef.value),(t=this._mutationObserver)?.observe(this._containerRef.value,{childList:!0,subtree:!0,attributes:!0}),(n=this._resizeObserver)?.observe(this._containerRef.value)}}hostDisconnected(){var e,t,n;!i&&this._containerRef.value&&this._containerRef.value.removeEventListener(`scroll`,this._scheduleUpdate),(e=this._intersectionObserver)?.disconnect(),(t=this._mutationObserver)?.disconnect(),(n=this._resizeObserver)?.disconnect(),this._idleCallbackId&&cancelIdleCallback(this._idleCallbackId)}hostUpdated(){!i&&!this._cacheInitialized&&this._containerRef.value&&this._items.length>0&&(this._calculateMetrics(),this._updateVisibleRange(),this.host.requestUpdate())}async updateConfig(e,t){let n=this._itemSize,r=this._cacheSize;this._itemSize=e.itemSize??50,this._layout=e.layout??`vertical`,this._preloadCount=e.preloadCount??5,this._cacheSize=e.cacheSize??200,this._renderItem=t,this._onLoadMore=e.onLoadMore,`items`in e&&this._initializeItems(e.items),this._pageSize=e.pageSize??this._pageSize,this._fetchMoreThreshold=e.fetchMoreThreshold??this._fetchMoreThreshold,r!==this._cacheSize&&(this._templateBuffer=new o(this._cacheSize)),n!==this._itemSize&&(this._calculateMetrics(),this._initializeChunks()),i||this._updateVisibleRange(),this.host.requestUpdate()}async _checkAndLoadMore(){if(!this._onLoadMore||this._isLoading||!this._containerRef.value)return;let e=this._lastVisible,t=this._pageSize||1e3,n=(e+1)%t===0;if(n){console.log(`Reached end of page, loading more...`,{lastVisibleIndex:e,pageSize:t,totalItems:this._items.length}),this._isLoading=!0;try{await this._onLoadMore()}finally{this._isLoading=!1}}}getRenderedItems(){if(!this._renderItem)return[];let e=[],t=new Set;for(let e of this._visibleChunkIndexes){let n=this._chunks.get(e);if(!n)continue;let r=e*this.CHUNK_SIZE;n.forEach((e,n)=>{let i=r+n;i>=this._firstVisible&&i<=this._lastVisible&&t.add(i)})}return Array.from(t).sort((e,t)=>e-t).forEach(t=>{let n=this._getItemStyle(this._positionCache[t]||t*this._estimatedItemHeight,this._sizeCache[t]||this._estimatedItemHeight);e.push(this._createItemTemplate(this._items[t],t,n))}),e}getContainerRef(){return this._containerRef}getTotalContentSize(){return this._totalContentSize}getLayout(){return this._layout}};const l=new WeakMap,u=()=>{if(i)return null;try{let e=document.currentScript;if(e&&`_$litElement$`in e)return e._$litElement$;if(customElements&&window.customElements){let e=document.querySelector(`virtualizer-example`);if(e&&`_$litElement$`in e)return e._$litElement$}}catch(e){console.warn(`Failed to get Lit host:`,e)}return null};function d(e){return e!==null&&typeof e.addController==`function`}function f(e,a){let o=u();if(!d(o)){console.warn(`Virtualizer: Running in fallback mode`);let n=a||e.renderItem||(e=>t.html`${String(e)}`),r=e.items;return t.html`
|
13
13
|
<div style="overflow: auto; height: 100%; position: relative;">
|
14
14
|
<div style="position: relative;">
|
15
15
|
${r.map((e,t)=>n(e,t))}
|
16
16
|
</div>
|
17
17
|
</div>
|
18
|
-
`}let
|
18
|
+
`}let s=l.get(o);if(!s){let n=a||e.renderItem||(e=>t.html`${e}`);s=new c(o,e,n),l.set(o,s)}let f=a=>{s.updateConfig(e,a);let o={position:`relative`,overflow:i?`visible`:`auto`,[s.getLayout()===`vertical`?`height`:`width`]:`100%`,[s.getLayout()===`vertical`?`minHeight`:`minWidth`]:`1px`},c={position:`relative`,[s.getLayout()===`vertical`?`height`:`width`]:`${s.getTotalContentSize()}px`,transform:s.getLayout()===`vertical`?`translateY(0)`:`translateX(0)`};return t.html`
|
19
19
|
<div
|
20
|
-
${(0,
|
21
|
-
style=${(0,
|
22
|
-
@scroll=${
|
20
|
+
${(0,n.ref)(s.getContainerRef())}
|
21
|
+
style=${(0,r.styleMap)(o)}
|
22
|
+
@scroll=${i?t.nothing:()=>s.host.requestUpdate()}
|
23
23
|
>
|
24
|
-
<div style=${(0,
|
25
|
-
${
|
24
|
+
<div style=${(0,r.styleMap)(c)}>
|
25
|
+
${s.getRenderedItems()}
|
26
26
|
</div>
|
27
27
|
</div>
|
28
|
-
`};return
|
29
|
-
<!-- ${e} - ${k[e].value} -->
|
30
|
-
${t}
|
31
|
-
`}function M(e,t,n){t.forEach(([t,r])=>{if(!r)return;n.has(t)&&e.removeEventListener(t,n.get(t));let i,a;if(typeof r==`function`?(i=r,a=void 0):(i=r.handler,a=r.options),!i)return;let o=e=>i(e);e.addEventListener(t,o,a),n.set(t,o)})}function N(e){let t=new Map,n=Object.entries(e);return{bind(e){M(e,n,t)},unbindAll(){t.clear()}}}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?.fadeBg??`rgba(0,0,0,0.7)`,r=e?.zIndex??2e3,i=N(e?.on??{});return c.html`
|
28
|
+
`};return a===void 0?`renderItem`in e?f(e.renderItem):e=>f(e):f(a)}function p(r,i){if(i===void 0){let e=e=>p(r,e??t.html``);return e.html=(e,...n)=>p(r,(0,t.html)(e,...n)),e}let a=r?.fadeBg??`rgba(0,0,0,0.7)`,o=r?.zIndex??2e3,s=e.createEventBinder(r?.on??{});return t.html`
|
32
29
|
<div
|
33
|
-
${(0,
|
30
|
+
${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
|
34
31
|
style="
|
35
32
|
position: fixed;
|
36
33
|
top: 0; left: 0; right: 0; bottom: 0;
|
37
|
-
background: ${
|
38
|
-
z-index: ${
|
34
|
+
background: ${a};
|
35
|
+
z-index: ${o};
|
39
36
|
display: flex;
|
40
37
|
justify-content: center;
|
41
38
|
align-items: center;
|
42
39
|
"
|
43
40
|
>
|
44
|
-
${
|
41
|
+
${e.renderFn(i)}
|
45
42
|
</div>
|
46
|
-
`}function
|
43
|
+
`}function m(r,i){let a=e.createEventBinder(r?.on??{});return i===void 0?e=>m(r,e??[t.html``]):t.html`
|
47
44
|
<div
|
48
|
-
${(0,
|
49
|
-
.class="${
|
45
|
+
${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
|
46
|
+
.class="${r?.className}"
|
50
47
|
style="
|
51
48
|
display: flex;
|
52
49
|
flex-direction: column;
|
53
|
-
${
|
54
|
-
${
|
55
|
-
${
|
50
|
+
${r?.center?`align-items: center;`:``}
|
51
|
+
${r?.space?`gap: ${r.space};`:``}
|
52
|
+
${r?.style??``}
|
56
53
|
"
|
57
54
|
>
|
58
|
-
${
|
55
|
+
${e.renderFnOrArray(i)}
|
59
56
|
</div>
|
60
|
-
`}function
|
57
|
+
`}function h(r,i){if(i===void 0){let e=e=>h(r,e??t.html``);return e.html=(e,...n)=>h(r,(0,t.html)(e,...n)),e}let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return t.html`
|
61
58
|
<div
|
62
|
-
${(0,
|
59
|
+
${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
|
63
60
|
style="
|
64
61
|
display: flex;
|
65
|
-
flex-direction: ${
|
66
|
-
${
|
67
|
-
${
|
68
|
-
${
|
62
|
+
flex-direction: ${a};
|
63
|
+
${r?.justify?`justify-content: ${r.justify};`:``}
|
64
|
+
${r?.align?`align-items: ${r.align};`:``}
|
65
|
+
${r?.gap?`gap: ${r.gap};`:``}
|
69
66
|
"
|
70
67
|
>
|
71
|
-
${
|
68
|
+
${e.renderFn(i)}
|
72
69
|
</div>
|
73
|
-
`}function
|
70
|
+
`}function g(r,i){if(i===void 0){let e=e=>g(r,e??t.html``);return e.html=(e,...n)=>g(r,(0,t.html)(e,...n)),e}let a=e.createEventBinder(r?.on??{});return t.html`
|
74
71
|
<div
|
75
|
-
${(0,
|
72
|
+
${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
|
76
73
|
style="break-inside: avoid; margin-bottom: 16px;"
|
77
74
|
>
|
78
|
-
${
|
75
|
+
${e.renderFn(i)}
|
79
76
|
</div>
|
80
|
-
`}function
|
77
|
+
`}function _(r,i){if(i===void 0)return e=>_(r,e??[t.html``]);let a=r?.columns??1,o=e.createEventBinder(r?.on??{});return t.html`
|
81
78
|
<div
|
82
|
-
${(0,
|
79
|
+
${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
|
83
80
|
style="
|
84
81
|
display: grid;
|
85
|
-
grid-template-columns: repeat(${
|
86
|
-
${
|
82
|
+
grid-template-columns: repeat(${a}, 1fr);
|
83
|
+
${r?.gap?`gap: ${r.gap};`:``}
|
87
84
|
"
|
88
85
|
>
|
89
|
-
${
|
86
|
+
${e.renderFnOrArray(i)}
|
90
87
|
</div>
|
91
|
-
`}function
|
92
|
-
.${
|
88
|
+
`}function v(r,i){if(i===void 0){let e=e=>v(r,e??t.html``);return e.html=(e,...n)=>v(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`GridCol`),o=e.getRandomClassName(`GridCol::grid-col`)+`-lyco-now-`+a,s=r?.gap?`column-gap: ${r.gap};`:``,c=`
|
89
|
+
.${o} {
|
93
90
|
display: grid;
|
94
91
|
grid-auto-flow: column;
|
95
|
-
${
|
92
|
+
${s}
|
96
93
|
}
|
97
|
-
`,
|
94
|
+
`,l=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridCol`,t.html`
|
98
95
|
<style>
|
99
|
-
${
|
96
|
+
${c}
|
100
97
|
</style>
|
101
98
|
<div
|
102
|
-
${(0,
|
103
|
-
class="${
|
99
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
100
|
+
class="${o}"
|
104
101
|
>
|
105
|
-
${
|
102
|
+
${e.renderFn(i)}
|
106
103
|
</div>
|
107
|
-
`)}function
|
104
|
+
`)}function y(r,i){if(i===void 0){let e=e=>y(r,e??t.html``);return e.html=(e,...n)=>y(r,(0,t.html)(e,...n)),e}let a=e.createEventBinder(r?.on??{});return t.html`
|
108
105
|
<div
|
109
|
-
${(0,
|
110
|
-
style="${
|
106
|
+
${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
|
107
|
+
style="${r?.span?`grid-column: span ${r.span};`:``}"
|
111
108
|
>
|
112
|
-
${
|
109
|
+
${e.renderFn(i)}
|
113
110
|
</div>
|
114
|
-
`}function
|
115
|
-
.${
|
111
|
+
`}function b(r,i){if(i===void 0){let e=e=>b(r,e??t.html``);return e.html=(e,...n)=>b(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`GridRow`),o=e.getRandomClassName(`GridRow::grid-row`)+`-lyco-now-`+a,s=r?.gap?`row-gap: ${r.gap};`:``,c=`
|
112
|
+
.${o} {
|
116
113
|
display: grid;
|
117
114
|
grid-auto-flow: row;
|
118
|
-
${
|
115
|
+
${s}
|
119
116
|
}
|
120
|
-
`,
|
117
|
+
`,l=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridRow`,t.html`
|
121
118
|
<style>
|
122
|
-
${
|
119
|
+
${c}
|
123
120
|
</style>
|
124
121
|
<div
|
125
|
-
${(0,
|
126
|
-
class="${
|
122
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
123
|
+
class="${o}"
|
127
124
|
>
|
128
|
-
${
|
125
|
+
${e.renderFn(i)}
|
129
126
|
</div>
|
130
|
-
`)}function
|
127
|
+
`)}function x(r,i){if(i===void 0)return e=>x(r,e??[t.html``]);let a=e.createEventBinder(r?.on??{});return t.html`
|
131
128
|
<div
|
132
|
-
${(0,
|
129
|
+
${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
|
133
130
|
style="
|
134
131
|
display: flex;
|
135
132
|
flex-direction: row;
|
136
|
-
${
|
137
|
-
${
|
133
|
+
${r?.center?`align-items: center;`:``}
|
134
|
+
${r?.space?`gap: ${r.space};`:``}
|
138
135
|
"
|
139
136
|
>
|
140
|
-
${
|
137
|
+
${e.renderFnOrArray(i)}
|
141
138
|
</div>
|
142
|
-
`}function
|
139
|
+
`}function S(r,i){if(i===void 0){let e=e=>S(r,e??t.html``);return e.html=(e,...n)=>S(r,(0,t.html)(e,...n)),e}let a=r?.columnCount??3,o=r?.gap??`16px`,s=e.getComponentCount(`WaterFlow`),c=e.getRandomClassName(`WaterFlow::waterflow`)+`-lyco-now-${s}`,l=`
|
143
140
|
/* 使用 CSS 类来控制多列布局 */
|
144
|
-
.${
|
145
|
-
column-count: ${
|
146
|
-
column-gap: ${typeof
|
141
|
+
.${c} {
|
142
|
+
column-count: ${a};
|
143
|
+
column-gap: ${typeof o==`number`?`${o}px`:o};
|
147
144
|
}
|
148
145
|
/* 子元素如果是块级元素,需要让它们适应多列流式布局 */
|
149
|
-
.${
|
146
|
+
.${c} > * {
|
150
147
|
display: inline-block;
|
151
148
|
width: 100%;
|
152
149
|
}
|
153
|
-
`,
|
150
|
+
`,u=e.createEventBinder(r?.on??{});return e.LycoComponent(`WaterFlow`,t.html`
|
154
151
|
<style>
|
155
|
-
${
|
152
|
+
${l}
|
156
153
|
</style>
|
157
154
|
|
158
155
|
<div
|
159
|
-
${(0,
|
160
|
-
class="${
|
156
|
+
${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
|
157
|
+
class="${c}"
|
161
158
|
>
|
162
|
-
${
|
159
|
+
${e.renderFn(i)}
|
163
160
|
</div>
|
164
|
-
`)}function
|
161
|
+
`)}function C(r,i){if(i===void 0){let e=e=>C(r,e??t.html``);return e.html=(e,...n)=>C(r,(0,t.html)(e,...n)),e}let a=r?.gap??`0px`,o=r?.firstHeight??`50%`,s=t.html``,c=t.html``;if(typeof i==`function`){var l;let e=(l=i.call)?.call(i,null)??[];s=e[0]??t.html``,c=e[1]??t.html``}else s=e.renderFn(i);let u=e.createEventBinder(r?.on??{});return t.html`
|
165
162
|
<div
|
166
|
-
${(0,
|
163
|
+
${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
|
167
164
|
style="
|
168
165
|
display: flex;
|
169
166
|
flex-direction: column;
|
170
167
|
width: 100%;
|
171
168
|
height: 100%;
|
172
|
-
gap: ${
|
169
|
+
gap: ${a};
|
173
170
|
"
|
174
171
|
>
|
175
|
-
<div style="flex: 0 0 ${
|
176
|
-
<div style="flex: 1 1 auto; overflow: auto;">${
|
172
|
+
<div style="flex: 0 0 ${o}; overflow: auto;">${s}</div>
|
173
|
+
<div style="flex: 1 1 auto; overflow: auto;">${c}</div>
|
177
174
|
</div>
|
178
|
-
`}function
|
175
|
+
`}function w(r,i){if(i===void 0){let e=e=>w(r,e??t.html``);return e.html=(e,...n)=>w(r,(0,t.html)(e,...n)),e}let a=r?.gap??`0px`,o=r?.firstWidth??`50%`,s=t.html``,c=t.html``;if(typeof i==`function`){var l;let e=(l=i.call)?.call(i,null)??[];s=e[0]??t.html``,c=e[1]??t.html``}else s=e.renderFn(i);let u=e.createEventBinder(r?.on??{});return t.html`
|
179
176
|
<div
|
180
|
-
${(0,
|
177
|
+
${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
|
181
178
|
style="
|
182
179
|
display: flex;
|
183
180
|
flex-direction: row;
|
184
181
|
width: 100%;
|
185
182
|
height: 100%;
|
186
|
-
gap: ${
|
183
|
+
gap: ${a};
|
187
184
|
"
|
188
185
|
>
|
189
|
-
<div style="flex: 0 0 ${
|
190
|
-
<div style="flex: 1 1 auto; overflow: auto;">${
|
186
|
+
<div style="flex: 0 0 ${o}; overflow: auto;">${s}</div>
|
187
|
+
<div style="flex: 1 1 auto; overflow: auto;">${c}</div>
|
191
188
|
</div>
|
192
|
-
`}function
|
193
|
-
.${
|
194
|
-
${
|
195
|
-
width: ${
|
196
|
-
height: ${
|
189
|
+
`}function T(r,i){if(i===void 0){let e=e=>T(r,e??t.html``);return e.html=(e,...n)=>T(r,(0,t.html)(e,...n)),e}let a=r?.direction??`vertical`,o=r?.height??`100%`,s=r?.width??`100%`,c=r?.customCss??``,l=e.getComponentCount(`ScrollBar`),u=r?.className??e.getRandomClassName(`ScrollBar::scrollbar-container`)+`-lyco-now-`+l,d=a===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`,f=`
|
190
|
+
.${u} {
|
191
|
+
${d};
|
192
|
+
width: ${s};
|
193
|
+
height: ${o};
|
197
194
|
}
|
198
|
-
.${
|
195
|
+
.${u}::-webkit-scrollbar {
|
199
196
|
width: 8px;
|
200
197
|
height: 8px;
|
201
198
|
}
|
202
|
-
.${
|
199
|
+
.${u}::-webkit-scrollbar-thumb {
|
203
200
|
background-color: rgba(0, 0, 0, 0.2);
|
204
201
|
border-radius: 4px;
|
205
202
|
}
|
206
|
-
.${
|
203
|
+
.${u}::-webkit-scrollbar-track {
|
207
204
|
background: rgba(0, 0, 0, 0.05);
|
208
205
|
}
|
209
|
-
${
|
210
|
-
`,
|
206
|
+
${c}
|
207
|
+
`,p=e.createEventBinder(r?.on??{});return e.LycoComponent(`ScrollBar`,t.html`
|
211
208
|
<style>
|
212
|
-
${
|
209
|
+
${f}
|
213
210
|
</style>
|
214
211
|
<div
|
215
|
-
${(0,
|
216
|
-
class="${
|
212
|
+
${(0,n.ref)(e=>{e?p.bind(e):p.unbindAll()})}
|
213
|
+
class="${u}"
|
217
214
|
>
|
218
|
-
${
|
215
|
+
${e.renderFn(i)}
|
219
216
|
</div>
|
220
|
-
`)}function
|
217
|
+
`)}function E(r,i){if(i===void 0)return e=>E(r,e??[t.html``]);let a=r?.sidebarWidth??`240px`,o=r?.sidebarPosition??`left`,s=r?.gap??`0px`,c=t.html``,l=t.html``;if(typeof i==`function`){var u;let e=(u=i.call)?.call(i,null)??[];c=e[0]??t.html``,l=e[1]??t.html``}else l=e.renderFnOrArray(i);let d=e.createEventBinder(r?.on??{});return t.html`
|
221
218
|
<div
|
222
|
-
${(0,
|
219
|
+
${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
|
223
220
|
style="
|
224
221
|
display: flex;
|
225
|
-
flex-direction: ${
|
222
|
+
flex-direction: ${o===`left`?`row`:`row-reverse`};
|
226
223
|
width: 100%;
|
227
224
|
height: 100%;
|
228
|
-
gap: ${
|
225
|
+
gap: ${s};
|
229
226
|
"
|
230
227
|
>
|
231
|
-
<div style="flex: 0 0 ${
|
232
|
-
<div style="flex: 1 1 auto; overflow: auto;">${
|
228
|
+
<div style="flex: 0 0 ${a}; overflow: auto;">${c}</div>
|
229
|
+
<div style="flex: 1 1 auto; overflow: auto;">${l}</div>
|
233
230
|
</div>
|
234
|
-
`}function
|
235
|
-
<div class="${
|
236
|
-
${Array.from({length:
|
231
|
+
`}function D(r={},i){if(i===void 0)return e=>D(r,e??[t.html``]);let a=e.getComponentCount(`Swiper`),{gap:o=`8px`,snapType:s=`mandatory`,height:c=`auto`,width:l=`100%`,className:u=e.getRandomClassName(`Swiper::swiper`)+`-lyco-now-${a}`,direction:d=`x`,scrollBehavior:f=`smooth`,align:p=`start`,showNavigation:m=!0,navigationPosition:h=`inside`,showPagination:g=!0,paginationType:_=`dots`,autoPlay:v=!1,interval:y=3e3,loop:b=!1,touchEnabled:x=!0,mouseWheel:S=!1,onSlideChange:C,on:w}=r,T=u,E=T+`-container`,O=T+`-slide`,k=T+`-navigation`,A=T+`-pagination`,j;j=i?typeof i==`function`?i():i:[];let M=j.length,[N,P]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,M-1));e.value!==n&&(e.value=n,C?.(n))}]})(),F=e=>{let t=typeof document<`u`?document.querySelector(`.${E}`):null;if(!t)return;let n=t.querySelectorAll(`.${O}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;d===`x`?(o=r.offsetLeft-t.offsetLeft,p===`center`?o-=(a.width-i.width)/2:p===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:f})):(o=r.offsetTop-t.offsetTop,p===`center`?o-=(a.height-i.height)/2:p===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:f})),P(e)},I=()=>{let e=N()+1>=M?b?0:N():N()+1;F(e)},L=()=>{let e=N()-1<0?b?M-1:N():N()-1;F(e)},R=()=>{let e=typeof document<`u`?document.querySelector(`.${E}`):null;if(!e)return;let t=e.querySelectorAll(`.${O}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(d===`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)}),P(n)},z=e=>{if(!x)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},B=e=>{if(!x)return;let t=e.touches[0],n=e.currentTarget,r=parseFloat(n.dataset.touchStartX||`0`),i=parseFloat(n.dataset.touchStartY||`0`),a=t.clientX-r,o=t.clientY-i;(Math.abs(a)>Math.abs(o)||d===`x`)&&e.preventDefault()},V=e=>{if(!x)return;let t=e.currentTarget,n=parseFloat(t.dataset.touchStartX||`0`),r=parseFloat(t.dataset.touchStartY||`0`);if(!n&&!r)return;let i=e.changedTouches[0],a=i.clientX-n,o=i.clientY-r,s=Math.max(Math.abs(a),Math.abs(o))>30;s&&(d===`x`?a>0?L():I():o>0?L():I()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},H=e=>{S&&(e.preventDefault(),e.deltaY>0?I():L())},U=e=>{if(!v||!e)return;let t,n=()=>{t=setInterval(I,y)},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)),x&&(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))),S&&(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=t.html`
|
232
|
+
<div class="${A}">
|
233
|
+
${Array.from({length:M},(e,n)=>t.html`
|
237
234
|
<button
|
238
|
-
class="${
|
239
|
-
@click=${()=>
|
235
|
+
class="${n===N()?`active`:``}"
|
236
|
+
@click=${()=>F(n)}
|
240
237
|
></button>
|
241
238
|
`)}
|
242
239
|
</div>
|
243
|
-
`,
|
244
|
-
<div class="${
|
245
|
-
<span class="current">${
|
240
|
+
`,K=t.html`
|
241
|
+
<div class="${A} fraction">
|
242
|
+
<span class="current">${N()+1}</span>
|
246
243
|
<span class="separator">/</span>
|
247
|
-
<span class="total">${
|
244
|
+
<span class="total">${M}</span>
|
248
245
|
</div>
|
249
|
-
`,
|
250
|
-
<div class="${
|
246
|
+
`,ee=t.html`
|
247
|
+
<div class="${A} progressbar">
|
251
248
|
<div
|
252
249
|
class="progress"
|
253
|
-
style="width: ${
|
250
|
+
style="width: ${M>1?N()/(M-1)*100:0}%"
|
254
251
|
></div>
|
255
252
|
</div>
|
256
|
-
`,
|
257
|
-
<div class="${
|
258
|
-
<button class="prev" @click=${
|
259
|
-
<button class="next" @click=${
|
253
|
+
`,q=t.html`
|
254
|
+
<div class="${k}">
|
255
|
+
<button class="prev" @click=${L}>◀</button>
|
256
|
+
<button class="next" @click=${I}>▶</button>
|
260
257
|
</div>
|
261
|
-
`,
|
262
|
-
.${
|
258
|
+
`,J=`
|
259
|
+
.${T} {
|
263
260
|
position: relative;
|
264
261
|
overflow: hidden;
|
265
|
-
width: ${
|
266
|
-
height: ${
|
262
|
+
width: ${l};
|
263
|
+
height: ${c};
|
267
264
|
}
|
268
265
|
|
269
|
-
.${
|
266
|
+
.${E} {
|
270
267
|
width: 100%;
|
271
268
|
height: 100%;
|
272
269
|
overflow: auto;
|
273
|
-
scroll-snap-type: ${
|
270
|
+
scroll-snap-type: ${d+` `+s};
|
274
271
|
-webkit-overflow-scrolling: touch;
|
275
|
-
scroll-behavior: ${
|
276
|
-
gap: ${
|
272
|
+
scroll-behavior: ${f};
|
273
|
+
gap: ${o};
|
277
274
|
display: flex;
|
278
|
-
flex-direction: ${
|
275
|
+
flex-direction: ${d===`x`?`row`:`column`};
|
279
276
|
}
|
280
277
|
|
281
|
-
.${
|
282
|
-
scroll-snap-align: ${
|
278
|
+
.${O} {
|
279
|
+
scroll-snap-align: ${p};
|
283
280
|
flex-shrink: 0;
|
284
281
|
}
|
285
282
|
|
286
|
-
.${
|
283
|
+
.${k} {
|
287
284
|
position: absolute;
|
288
285
|
top: 50%;
|
289
286
|
left: 0;
|
@@ -292,10 +289,10 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
292
289
|
display: flex;
|
293
290
|
justify-content: space-between;
|
294
291
|
pointer-events: none;
|
295
|
-
padding: ${
|
292
|
+
padding: ${h===`outside`?`0 1rem`:`0 0.5rem`};
|
296
293
|
}
|
297
294
|
|
298
|
-
.${
|
295
|
+
.${k} button {
|
299
296
|
width: 2.5rem;
|
300
297
|
height: 2.5rem;
|
301
298
|
border-radius: 50%;
|
@@ -310,11 +307,11 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
310
307
|
transition: background-color 0.3s;
|
311
308
|
}
|
312
309
|
|
313
|
-
.${
|
310
|
+
.${k} button:hover {
|
314
311
|
background-color: rgba(0, 0, 0, 0.8);
|
315
312
|
}
|
316
313
|
|
317
|
-
.${
|
314
|
+
.${A} {
|
318
315
|
position: absolute;
|
319
316
|
bottom: 1rem;
|
320
317
|
left: 0;
|
@@ -324,7 +321,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
324
321
|
gap: 0.5rem;
|
325
322
|
align-items: center;
|
326
323
|
}
|
327
|
-
.${
|
324
|
+
.${A} button {
|
328
325
|
width: 0.75rem;
|
329
326
|
height: 0.75rem;
|
330
327
|
border-radius: 50%;
|
@@ -333,12 +330,12 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
333
330
|
cursor: pointer;
|
334
331
|
transition: background-color 0.3s, transform 0.3s;
|
335
332
|
}
|
336
|
-
.${
|
333
|
+
.${A} button.active {
|
337
334
|
background-color: white;
|
338
335
|
transform: scale(1.2);
|
339
336
|
}
|
340
337
|
|
341
|
-
.${
|
338
|
+
.${A}.fraction {
|
342
339
|
position: absolute;
|
343
340
|
bottom: 1rem;
|
344
341
|
left: 50%;
|
@@ -350,7 +347,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
350
347
|
gap: 0.25rem;
|
351
348
|
}
|
352
349
|
|
353
|
-
.${
|
350
|
+
.${A}.progressbar {
|
354
351
|
position: absolute;
|
355
352
|
bottom: 0.5rem;
|
356
353
|
left: 0;
|
@@ -358,158 +355,158 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
358
355
|
height: 0.25rem;
|
359
356
|
background-color: rgba(255, 255, 255, 0.2);
|
360
357
|
}
|
361
|
-
.${
|
358
|
+
.${A}.progressbar .progress {
|
362
359
|
height: 100%;
|
363
360
|
background-color: white;
|
364
361
|
transition: width 0.3s;
|
365
362
|
}
|
366
|
-
`,Y=
|
363
|
+
`,Y=e.createEventBinder(w??{});return e.LycoComponent(`Swiper`,t.html`
|
367
364
|
<style>
|
368
|
-
${
|
365
|
+
${J}
|
369
366
|
</style>
|
370
367
|
|
371
368
|
<div
|
372
|
-
${(0,
|
373
|
-
class="${
|
369
|
+
${(0,n.ref)(e=>{e?Y.bind(e):Y.unbindAll()})}
|
370
|
+
class="${T}"
|
374
371
|
>
|
375
|
-
<div class="${
|
376
|
-
${
|
377
|
-
<div class="${
|
372
|
+
<div class="${E}">
|
373
|
+
${j.map((e,n)=>t.html`
|
374
|
+
<div class="${O} --slide-${n}" key=${n}>
|
378
375
|
${e}
|
379
376
|
</div>
|
380
377
|
`)}
|
381
378
|
</div>
|
382
379
|
|
383
|
-
${
|
384
|
-
${
|
385
|
-
${
|
386
|
-
${
|
380
|
+
${m?q:null}
|
381
|
+
${g&&_===`dots`?G:null}
|
382
|
+
${g&&_===`fraction`?K:null}
|
383
|
+
${g&&_===`progressbar`?ee:null}
|
387
384
|
</div>
|
388
|
-
`)}const
|
389
|
-
.${
|
385
|
+
`)}const O={borderRadius:{small:`4px`,medium:`8px`,large:`16px`,full:`9999px`},elevation:{level1:`0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)`,level2:`0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12)`,level3:`0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10)`,level4:`0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05)`,level5:`0 20px 40px rgba(0,0,0,0.2)`},animation:{standard:`0.2s cubic-bezier(0.4, 0, 0.2, 1)`,emphasized:`0.3s cubic-bezier(0.4, 0, 0.2, 1)`,decelerated:`0.4s cubic-bezier(0, 0, 0.2, 1)`},colors:{primary:`#6750A4`,onPrimary:`#FFFFFF`,primaryContainer:`#EADDFF`,onPrimaryContainer:`#21005E`,secondary:`#625B71`,onSecondary:`#FFFFFF`,secondaryContainer:`#E8DEF8`,onSecondaryContainer:`#1E192B`,surface:`#FEF7FF`,onSurface:`#1C1B1F`,surfaceVariant:`#E7E0EB`,onSurfaceVariant:`#49454E`,error:`#B00020`}};function k(r){let{checked:i=!1,disabled:a=!1,size:o=`medium`,color:s=O.colors.primary,onChange:c,className:l=``,on:u={}}=r??{},d=e.getComponentCount(`SwitchInput`),f=e.getRandomClassName(`SwitchInput::switch`)+`-lyco-now-${d}`,p={small:{width:32,height:16,thumbSize:12},medium:{width:44,height:24,thumbSize:18},large:{width:56,height:32,thumbSize:24}},{width:m,height:h,thumbSize:g}=p[o],_=`
|
386
|
+
.${f} {
|
390
387
|
display: inline-block;
|
391
388
|
position: relative;
|
392
|
-
width: ${
|
393
|
-
height: ${
|
394
|
-
cursor: ${
|
389
|
+
width: ${m}px;
|
390
|
+
height: ${h}px;
|
391
|
+
cursor: ${a?`not-allowed`:`pointer`};
|
395
392
|
}
|
396
393
|
|
397
|
-
.${
|
394
|
+
.${f} input {
|
398
395
|
opacity: 0;
|
399
396
|
width: 0;
|
400
397
|
height: 0;
|
401
398
|
}
|
402
399
|
|
403
|
-
.${
|
400
|
+
.${f} .slider {
|
404
401
|
position: absolute;
|
405
402
|
top: 0;
|
406
403
|
left: 0;
|
407
404
|
right: 0;
|
408
405
|
bottom: 0;
|
409
|
-
background-color: ${
|
410
|
-
transition: ${
|
411
|
-
border-radius: ${
|
412
|
-
opacity: ${
|
406
|
+
background-color: ${a?O.colors.surfaceVariant:O.colors.onSurfaceVariant};
|
407
|
+
transition: ${O.animation.standard};
|
408
|
+
border-radius: ${h}px;
|
409
|
+
opacity: ${a?.38:.5};
|
413
410
|
}
|
414
411
|
|
415
|
-
.${
|
412
|
+
.${f} .slider:before {
|
416
413
|
position: absolute;
|
417
414
|
content: "";
|
418
|
-
height: ${
|
419
|
-
width: ${
|
420
|
-
left: ${(
|
421
|
-
bottom: ${(
|
422
|
-
background-color: ${
|
423
|
-
transition: ${
|
415
|
+
height: ${g}px;
|
416
|
+
width: ${g}px;
|
417
|
+
left: ${(h-g)/2}px;
|
418
|
+
bottom: ${(h-g)/2}px;
|
419
|
+
background-color: ${O.colors.surface};
|
420
|
+
transition: ${O.animation.emphasized};
|
424
421
|
border-radius: 50%;
|
425
|
-
box-shadow: ${
|
422
|
+
box-shadow: ${O.elevation.level1};
|
426
423
|
}
|
427
424
|
|
428
|
-
.${
|
429
|
-
background-color: ${
|
430
|
-
opacity: ${
|
425
|
+
.${f} input:checked + .slider {
|
426
|
+
background-color: ${a?O.colors.surfaceVariant:s};
|
427
|
+
opacity: ${a?.38:1};
|
431
428
|
}
|
432
429
|
|
433
|
-
.${
|
434
|
-
transform: translateX(${
|
435
|
-
background-color: ${
|
430
|
+
.${f} input:checked + .slider:before {
|
431
|
+
transform: translateX(${m-h}px);
|
432
|
+
background-color: ${O.colors.onPrimary};
|
436
433
|
}
|
437
434
|
|
438
|
-
.${
|
439
|
-
box-shadow: ${
|
435
|
+
.${f}:hover .slider:before {
|
436
|
+
box-shadow: ${a?O.elevation.level1:O.elevation.level2};
|
440
437
|
}
|
441
438
|
|
442
|
-
.${
|
443
|
-
box-shadow: ${
|
444
|
-
width: ${
|
439
|
+
.${f}:active .slider:before {
|
440
|
+
box-shadow: ${a?O.elevation.level1:O.elevation.level3};
|
441
|
+
width: ${g*1.2}px;
|
445
442
|
}
|
446
|
-
`,
|
443
|
+
`,v=e.createEventBinder(u);return e.LycoComponent(`SwitchInput`,t.html`
|
447
444
|
<style>
|
448
|
-
${
|
445
|
+
${_}
|
449
446
|
</style>
|
450
447
|
<label
|
451
|
-
class="${
|
452
|
-
${(0,
|
448
|
+
class="${f} ${l}"
|
449
|
+
${(0,n.ref)(e=>{e?v.bind(e):v.unbindAll()})}
|
453
450
|
>
|
454
451
|
<input
|
455
452
|
type="checkbox"
|
456
|
-
?checked=${
|
457
|
-
?disabled=${
|
458
|
-
@change=${e=>{!
|
453
|
+
?checked=${i}
|
454
|
+
?disabled=${a}
|
455
|
+
@change=${e=>{!a&&c&&c(e.target.checked)}}
|
459
456
|
/>
|
460
457
|
<span class="slider"></span>
|
461
458
|
</label>
|
462
|
-
`)}function
|
459
|
+
`)}function A(r,i){let a=r?.top?`top: ${r.top};`:``,o=r?.right?`right: ${r.right};`:``,s=r?.bottom?`bottom: ${r.bottom};`:``,c=r?.left?`left: ${r.left};`:``,l=r?.width?`width: ${r.width};`:``,u=r?.height?`height: ${r.height};`:``,d=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,f=r?.style?r.style:``,p=r?.className?r.className:``,m=e.createEventBinder(r?.on??{}),h=r=>t.html`
|
463
460
|
<div
|
464
|
-
${(0,
|
465
|
-
class="${
|
461
|
+
${(0,n.ref)(e=>{e?m.bind(e):m.unbindAll()})}
|
462
|
+
class="${p}"
|
466
463
|
style="
|
467
464
|
position: absolute;
|
468
|
-
${
|
469
|
-
${
|
470
|
-
${
|
471
|
-
${
|
465
|
+
${a} ${o} ${s} ${c}
|
466
|
+
${l} ${u}
|
467
|
+
${d}
|
468
|
+
${f}
|
472
469
|
"
|
473
470
|
>
|
474
|
-
${
|
471
|
+
${e.renderFn(r)}
|
475
472
|
</div>
|
476
|
-
`;return
|
473
|
+
`;return e.renderFnOrCurry(i,h)}function j(r,i){let a=r?.width??`300px`,o=r?.height??`auto`,s=r?.top??`20%`,c=r?.bottom??`auto`,l=r?.left??`50%`,u=r?.right??`auto`,d=l===`auto`?``:`transform: translateX(-50%);`,f=r?.background??`rgba(255, 255, 255, 0.3)`,p=r?.blur??`10px`,m=r?.borderRadius??`12px`,h=r?.padding??`16px`,g=r?.zIndex??1e3,_=e.createEventBinder(r?.on??{}),v=e=>t.html`
|
477
474
|
<div
|
478
|
-
${(0,
|
475
|
+
${(0,n.ref)(e=>{e?_.bind(e):_.unbindAll()})}
|
479
476
|
style="
|
480
477
|
position: fixed;
|
481
|
-
top: ${
|
482
|
-
bottom: ${
|
483
|
-
left: ${
|
484
|
-
right: ${
|
485
|
-
${
|
486
|
-
width: ${
|
487
|
-
height: ${
|
488
|
-
background: ${
|
489
|
-
backdrop-filter: blur(${
|
490
|
-
-webkit-backdrop-filter: blur(${
|
491
|
-
border-radius: ${
|
492
|
-
padding: ${
|
478
|
+
top: ${s};
|
479
|
+
bottom: ${c};
|
480
|
+
left: ${l};
|
481
|
+
right: ${u};
|
482
|
+
${d}
|
483
|
+
width: ${a};
|
484
|
+
height: ${o};
|
485
|
+
background: ${f};
|
486
|
+
backdrop-filter: blur(${p});
|
487
|
+
-webkit-backdrop-filter: blur(${p});
|
488
|
+
border-radius: ${m};
|
489
|
+
padding: ${h};
|
493
490
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
|
494
|
-
z-index: ${
|
491
|
+
z-index: ${g};
|
495
492
|
display: flex;
|
496
493
|
flex-direction: column;
|
497
494
|
"
|
498
495
|
>
|
499
496
|
${e}
|
500
497
|
</div>
|
501
|
-
`;return
|
498
|
+
`;return e.renderFnOrArrayOrCurry(i,void 0,v)}function M(r,i){if(i===void 0)return e=>M(r,e??[t.html``]);let a=`${100/r.ratio}%`,o=r.maxWidth?`max-width: ${r.maxWidth};`:``,s=r.background?`background: ${r.background};`:``,c=r.overflow??`hidden`,l=e.createEventBinder(r.on??{});return t.html`
|
502
499
|
<div
|
503
|
-
${(0,
|
500
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
504
501
|
style="
|
505
502
|
position: relative;
|
506
503
|
width: 100%;
|
507
|
-
${
|
508
|
-
${
|
509
|
-
overflow: ${
|
504
|
+
${o}
|
505
|
+
${s}
|
506
|
+
overflow: ${c};
|
510
507
|
"
|
511
508
|
>
|
512
|
-
<div style="width: 100%; padding-top: ${
|
509
|
+
<div style="width: 100%; padding-top: ${a};"></div>
|
513
510
|
<div
|
514
511
|
style="
|
515
512
|
position: absolute;
|
@@ -519,172 +516,172 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
519
516
|
height: 100%;
|
520
517
|
"
|
521
518
|
>
|
522
|
-
${
|
519
|
+
${e.renderFnOrArray(i)}
|
523
520
|
</div>
|
524
521
|
</div>
|
525
|
-
`}function
|
526
|
-
.${
|
522
|
+
`}function N(r,i){if(i===void 0){let e=e=>N(r,e);return e.html=(e,...n)=>N(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`AutoFitGrid`),o=e.getRandomClassName(`AutoFitGrid::auto-fit-grid`)+`-lyco-now-`+a,s=r?.gap??`16px`,c=`
|
523
|
+
.${o} {
|
527
524
|
display: grid;
|
528
|
-
grid-template-columns: repeat(auto-fit, minmax(${
|
529
|
-
gap: ${
|
525
|
+
grid-template-columns: repeat(auto-fit, minmax(${r.minItemWidth}, 1fr));
|
526
|
+
gap: ${s};
|
530
527
|
}
|
531
|
-
`,
|
528
|
+
`,l=e.createEventBinder(r.on??{});return e.LycoComponent(`AutoFitGrid`,t.html`
|
532
529
|
<style>
|
533
|
-
${
|
530
|
+
${c}
|
534
531
|
</style>
|
535
532
|
<div
|
536
|
-
class="${
|
537
|
-
${(0,
|
533
|
+
class="${o}"
|
534
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
538
535
|
>
|
539
|
-
${
|
536
|
+
${e.renderFn(i)}
|
540
537
|
</div>
|
541
|
-
`)}function
|
538
|
+
`)}function P(r,i){if(i===void 0)return e=>P(r,e??[t.html``]);let a=r?.size??`32px`,o=r?.overlap??`-8px`,s=e.createEventBinder(r?.on??{}),c=(e,n)=>t.html`
|
542
539
|
<div
|
543
540
|
style="
|
544
|
-
width: ${
|
545
|
-
height: ${
|
541
|
+
width: ${a};
|
542
|
+
height: ${a};
|
546
543
|
border-radius: 50%;
|
547
544
|
overflow: hidden;
|
548
545
|
border: 2px solid #fff;
|
549
|
-
margin-left: ${
|
546
|
+
margin-left: ${n===0?`0`:o};
|
550
547
|
box-sizing: content-box;
|
551
548
|
"
|
552
549
|
>
|
553
550
|
${e}
|
554
551
|
</div>
|
555
|
-
`;return
|
552
|
+
`;return t.html`
|
556
553
|
<div
|
557
|
-
${(0,
|
554
|
+
${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
|
558
555
|
style="display: flex; align-items: center;"
|
559
556
|
>
|
560
|
-
${
|
557
|
+
${e.renderFnOrArray(i,c)}
|
561
558
|
</div>
|
562
|
-
`}function
|
559
|
+
`}function F(r,i){if(i===void 0){let e=e=>F(r,e??t.html``);return e.html=(e,...n)=>F(r,(0,t.html)(e,...n)),e}let a=r?.position??`top-right`,o=r?.size??`16px`,s=r?.background??`red`,c=r?.color??`#fff`,[l,u,d,f]=[a.includes(`top`)?`0`:`auto`,a.includes(`right`)?`0`:`auto`,a.includes(`bottom`)?`0`:`auto`,a.includes(`left`)?`0`:`auto`],p=e.createEventBinder(r?.on??{});return t.html`
|
563
560
|
<div style="position: relative; display: inline-block;">
|
564
|
-
${
|
561
|
+
${e.renderFn(i)}
|
565
562
|
<div
|
566
|
-
${(0,
|
563
|
+
${(0,n.ref)(e=>{e?p.bind(e):p.unbindAll()})}
|
567
564
|
style="
|
568
565
|
position: absolute;
|
569
|
-
top: ${
|
570
|
-
right: ${
|
571
|
-
bottom: ${
|
572
|
-
left: ${
|
573
|
-
width: ${
|
574
|
-
height: ${
|
575
|
-
background: ${
|
576
|
-
color: ${
|
577
|
-
font-size: calc(${
|
566
|
+
top: ${l};
|
567
|
+
right: ${u};
|
568
|
+
bottom: ${d};
|
569
|
+
left: ${f};
|
570
|
+
width: ${o};
|
571
|
+
height: ${o};
|
572
|
+
background: ${s};
|
573
|
+
color: ${c};
|
574
|
+
font-size: calc(${o} * 0.6);
|
578
575
|
border-radius: 50%;
|
579
576
|
display: flex;
|
580
577
|
justify-content: center;
|
581
578
|
align-items: center;
|
582
|
-
transform: translate(${
|
579
|
+
transform: translate(${f===`0`?`-50%`:`0`}, ${l===`0`?`-50%`:`0`});
|
583
580
|
"
|
584
581
|
>
|
585
|
-
${
|
582
|
+
${r?.content??``}
|
586
583
|
</div>
|
587
584
|
</div>
|
588
|
-
`}function
|
585
|
+
`}function I(e,t){return e?n=>{typeof e==`function`?e(n):e={value:n},typeof t==`function`?t(n):t={value:n}}:t}function L(r,i){if(!i)return e=>L(r,e??(0,n.createRef)());let a=e.createEventBinder(r?.on??{}),o=I(i,e=>{e?a.bind(e):a.unbindAll()});return t.html`
|
589
586
|
<canvas
|
590
|
-
${(0,
|
591
|
-
.class=${
|
592
|
-
style=${
|
587
|
+
${(0,n.ref)(o)}
|
588
|
+
.class=${r?.className}
|
589
|
+
style=${r?.style??``}
|
593
590
|
></canvas>
|
594
|
-
`}function
|
591
|
+
`}function R(r,i){if(i===void 0)return e=>R(r,e??[t.html``]);let a=r?.padding??`16px`,o=r?.borderRadius??`8px`,s=r?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,c=r?.background??`#fff`,l=e.createEventBinder(r?.on??{});return t.html`
|
595
592
|
<div
|
596
|
-
${(0,
|
593
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
597
594
|
style="
|
598
|
-
background: ${
|
599
|
-
border-radius: ${
|
600
|
-
box-shadow: ${
|
601
|
-
padding: ${
|
595
|
+
background: ${c};
|
596
|
+
border-radius: ${o};
|
597
|
+
box-shadow: ${s};
|
598
|
+
padding: ${a};
|
602
599
|
box-sizing: border-box;
|
603
600
|
"
|
604
601
|
>
|
605
|
-
${
|
602
|
+
${e.renderFnOrArray(i)}
|
606
603
|
</div>
|
607
|
-
`}function
|
604
|
+
`}function z(r,i){if(i===void 0){let e=e=>z(r,e??t.html``);return e.html=(e,...n)=>z(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
|
608
605
|
<div
|
609
|
-
${(0,
|
606
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
610
607
|
style="
|
611
608
|
display: flex;
|
612
609
|
justify-content: center;
|
613
610
|
align-items: center;
|
614
|
-
${
|
611
|
+
${a} ${o} ${s}
|
615
612
|
"
|
616
613
|
>
|
617
|
-
${
|
614
|
+
${e.renderFn(i)}
|
618
615
|
</div>
|
619
|
-
`}function
|
616
|
+
`}function B(r,i){if(i===void 0)return e=>B(r,e??[t.html``]);let a=r?.maxWidth??`1024px`,o=r?.padding??`0 16px`,s=r?.background?`background: ${r.background};`:``,c=r?.fullHeight?`height: 100%;`:``,l=e.createEventBinder(r?.on??{});return t.html`
|
620
617
|
<div
|
621
|
-
${(0,
|
618
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
622
619
|
style="
|
623
620
|
width: 100%;
|
624
|
-
max-width: ${
|
621
|
+
max-width: ${a};
|
625
622
|
margin-left: auto;
|
626
623
|
margin-right: auto;
|
627
|
-
padding: ${
|
628
|
-
${
|
629
|
-
${
|
624
|
+
padding: ${o};
|
625
|
+
${s}
|
626
|
+
${c}
|
630
627
|
box-sizing: border-box;
|
631
628
|
"
|
632
629
|
>
|
633
|
-
${
|
630
|
+
${e.renderFnOrArray(i)}
|
634
631
|
</div>
|
635
|
-
`}function
|
636
|
-
${(0,
|
637
|
-
style="${
|
638
|
-
></div>`}function
|
632
|
+
`}function V(r){let i=r?.orientation??`horizontal`,a=r?.thickness??`1px`,o=r?.color??`#e0e0e0`,s=r?.margin??(i===`horizontal`?`8px 0`:`0 8px`),c=e.createEventBinder(r?.on??{}),l=i===`horizontal`?`width: 100%; height: ${a}; background: ${o}; margin: ${s};`:`width: ${a}; height: 100%; background: ${o}; margin: ${s};`;return t.html`<div
|
633
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
634
|
+
style="${l}"
|
635
|
+
></div>`}function H(r,i){if(i===void 0){let e=e=>H(r,e??t.html``);return e.html=(e,...n)=>H(r,(0,t.html)(e,...n)),e}let a=r?.columns??4,o=r?.gap??`24px`,s=r?.background??`#f8f8f8`,c=r?.padding??`40px 16px`,l=e.createEventBinder(r?.on??{});return t.html`
|
639
636
|
<div
|
640
|
-
${(0,
|
637
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
641
638
|
style="
|
642
639
|
width: 100%;
|
643
|
-
background: ${
|
644
|
-
padding: ${
|
640
|
+
background: ${s};
|
641
|
+
padding: ${c};
|
645
642
|
box-sizing: border-box;
|
646
643
|
"
|
647
644
|
>
|
648
645
|
<div
|
649
646
|
style="
|
650
647
|
display: grid;
|
651
|
-
grid-template-columns: repeat(${
|
652
|
-
gap: ${
|
648
|
+
grid-template-columns: repeat(${a}, 1fr);
|
649
|
+
gap: ${o};
|
653
650
|
"
|
654
651
|
>
|
655
|
-
${
|
652
|
+
${e.renderFn(i)}
|
656
653
|
</div>
|
657
654
|
<div style="text-align: center; margin-top: 24px; color: #666;">
|
658
655
|
© ${new Date().getFullYear()} Your Company. All rights reserved.
|
659
656
|
</div>
|
660
657
|
</div>
|
661
|
-
`}function
|
662
|
-
`+
|
658
|
+
`}function U(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function W(r,i){if(i===void 0){let e=e=>W(r,e??t.html``);return e.html=(e,...n)=>W(r,(0,t.html)(e,...n)),e}let a=r.defaultColumns??1,o=r.gap??`16px`,s=e.getComponentCount(`GridBreakpoint`),c=r.className??e.getRandomClassName(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+s,l=Object.entries(r.breakpoints).map(([e,t])=>`@media`+e+`{
|
659
|
+
`+c+`{ grid-template-columns: repeat(`+t+`, 1fr); }
|
663
660
|
}`).join(`
|
664
|
-
`),
|
665
|
-
.${
|
661
|
+
`),u=`
|
662
|
+
.${c} {
|
666
663
|
display: grid;
|
667
|
-
grid-template-columns: repeat(${
|
668
|
-
gap: ${
|
664
|
+
grid-template-columns: repeat(${a}, 1fr);
|
665
|
+
gap: ${o};
|
669
666
|
}
|
670
|
-
${
|
667
|
+
${l}`,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridBreakpoint`,t.html`
|
671
668
|
<style>
|
672
|
-
${
|
669
|
+
${u}
|
673
670
|
</style>
|
674
671
|
<div
|
675
|
-
${(0,
|
676
|
-
class="${
|
672
|
+
${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
|
673
|
+
class="${c}"
|
677
674
|
>
|
678
|
-
${
|
675
|
+
${e.renderFn(i)}
|
679
676
|
</div>
|
680
|
-
`)}function
|
677
|
+
`)}function G(r,i){if(i===void 0)return e=>G(r,e??[t.html``]);let a=r?.backgroundImage?`background-image: url('${r.backgroundImage}');`:``,o=r?.height??`400px`,s=r?.overlayColor??`rgba(0, 0, 0, 0.3)`,c=e.createEventBinder(r?.on??{});return t.html`
|
681
678
|
<div
|
682
|
-
${(0,
|
679
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
683
680
|
style="
|
684
681
|
position: relative;
|
685
682
|
width: 100%;
|
686
|
-
height: ${
|
687
|
-
${
|
683
|
+
height: ${o};
|
684
|
+
${a}
|
688
685
|
background-size: cover;
|
689
686
|
background-position: center;
|
690
687
|
"
|
@@ -693,7 +690,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
693
690
|
style="
|
694
691
|
position: absolute;
|
695
692
|
top: 0; left: 0; right: 0; bottom: 0;
|
696
|
-
background: ${
|
693
|
+
background: ${s};
|
697
694
|
"
|
698
695
|
></div>
|
699
696
|
<div
|
@@ -712,307 +709,307 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
712
709
|
box-sizing: border-box;
|
713
710
|
"
|
714
711
|
>
|
715
|
-
${
|
712
|
+
${e.renderFnOrArray(i)}
|
716
713
|
</div>
|
717
714
|
</div>
|
718
|
-
`}function
|
719
|
-
@media not ${
|
720
|
-
.${
|
715
|
+
`}function K(r,i){if(i===void 0){let e=e=>K(r,e??t.html``);return e.html=(e,...n)=>K(r,(0,t.html)(e,...n)),e}let a=r?.breakpoint??`(max-width: 600px)`,o=r?.mode??`hide`,s=e.getComponentCount(`Hidden`),c=r?.className??e.getRandomClassName(`Hidden::hidden-container`)+`-lyco-now-`+s,l=o===`hide`?`@media ${a} { .${c} { display: none !important; } }`:`@media ${a} { .${c} { display: block !important; } }
|
716
|
+
@media not ${a} { .${c} { display: none !important; } }`,u=`
|
717
|
+
.${c} {
|
721
718
|
display: block;
|
722
719
|
}
|
723
|
-
${
|
720
|
+
${l}`,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Hidden`,t.html`
|
724
721
|
<style>
|
725
|
-
${
|
722
|
+
${u}
|
726
723
|
</style>
|
727
724
|
<div
|
728
|
-
${(0,
|
729
|
-
class="${
|
725
|
+
${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
|
726
|
+
class="${c}"
|
730
727
|
>
|
731
|
-
${
|
728
|
+
${e.renderFn(i)}
|
732
729
|
</div>
|
733
|
-
`)}function
|
734
|
-
ul.${
|
730
|
+
`)}function ee(n){return t.html` <li>${e.renderFnOrArray(n)}</li> `}function q(n,r){let i=n?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,a=n?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,o=n?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,s=e.getComponentCount(`List`),c=n?.className??e.getRandomClassName(`List::list`)+`-lyco-now-${s}`,l=`
|
731
|
+
ul.${c} {
|
735
732
|
list-style: none;
|
736
733
|
margin: 0;
|
737
734
|
padding: 0;
|
738
|
-
${
|
735
|
+
${i};
|
739
736
|
}
|
740
|
-
ul.${
|
737
|
+
ul.${c} li {
|
741
738
|
padding: 12px 16px;
|
742
|
-
${
|
739
|
+
${n?.bordered?`border-bottom: 1px solid #ddd`:``};
|
743
740
|
}
|
744
|
-
ul.${
|
745
|
-
${
|
741
|
+
ul.${c} li:last-child {
|
742
|
+
${n?.bordered?`border-bottom: none`:``};
|
746
743
|
}
|
747
|
-
${
|
748
|
-
${
|
749
|
-
`.toString(),
|
744
|
+
${a}
|
745
|
+
${o}
|
746
|
+
`.toString(),u=n=>e.LycoComponent(`List`,t.html`
|
750
747
|
<style>
|
751
|
-
${
|
748
|
+
${l}
|
752
749
|
</style>
|
753
|
-
<ul class="${
|
754
|
-
${
|
750
|
+
<ul class="${c}">
|
751
|
+
${e.renderFnOrArray(n)}
|
755
752
|
</ul>
|
756
|
-
`);return
|
757
|
-
ul.${
|
753
|
+
`);return r===void 0?u:u(r)}function J(r,i){let a=r?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,o=r?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=r?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,c=e.getComponentCount(`ListGroup`),l=r?.className??e.getRandomClassName(`ListGroup::list-group`)+`-lyco-now-`+c,u=(e,n,r,i)=>r?t.html` <li>${e}</li> `:e,d=`
|
754
|
+
ul.${l} {
|
758
755
|
list-style: none;
|
759
756
|
margin: 0;
|
760
757
|
padding: 0;
|
761
|
-
${
|
758
|
+
${a};
|
762
759
|
}
|
763
|
-
ul.${
|
760
|
+
ul.${l} li {
|
764
761
|
padding: 12px 16px;
|
765
|
-
${
|
762
|
+
${r?.bordered?`border-bottom: 1px solid #ddd`:``};
|
766
763
|
}
|
767
|
-
ul.${
|
768
|
-
${
|
764
|
+
ul.${l} li:last-child {
|
765
|
+
${r?.bordered?`border-bottom: none`:``};
|
769
766
|
}
|
770
|
-
${
|
771
|
-
${
|
772
|
-
`,
|
767
|
+
${o}
|
768
|
+
${s}
|
769
|
+
`,f=e.createEventBinder(r?.on??{}),p=r=>e.LycoComponent(`ListGroup`,t.html`
|
773
770
|
<style>
|
774
|
-
${
|
771
|
+
${d}
|
775
772
|
</style>
|
776
773
|
<ul
|
777
|
-
${(0,
|
778
|
-
class="${
|
774
|
+
${(0,n.ref)(e=>{e?f.bind(e):f.unbindAll()})}
|
775
|
+
class="${l}"
|
779
776
|
>
|
780
|
-
${
|
777
|
+
${e.renderFnOrArray(r,u)}
|
781
778
|
</ul>
|
782
|
-
`);return
|
779
|
+
`);return e.renderFnOrArrayOrCurry(i,p)}function Y(r,i){if(i===void 0)return e=>Y(r,e??[t.html``]);let a=r?.background??`rgba(0, 0, 0, 0.5)`,o=r?.zIndex??1e3,s=r?.fullScreen!==!1,c=e.createEventBinder(r?.on??{});return t.html`
|
783
780
|
<div
|
784
|
-
${(0,
|
781
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
785
782
|
style="
|
786
|
-
position: ${
|
783
|
+
position: ${s?`fixed`:`absolute`};
|
787
784
|
top: 0; left: 0; right: 0; bottom: 0;
|
788
|
-
background: ${
|
789
|
-
z-index: ${
|
785
|
+
background: ${a};
|
786
|
+
z-index: ${o};
|
790
787
|
display: flex;
|
791
788
|
justify-content: center;
|
792
789
|
align-items: center;
|
793
790
|
"
|
794
791
|
>
|
795
|
-
${
|
792
|
+
${e.renderFnOrArray(i)}
|
796
793
|
</div>
|
797
|
-
`}function
|
794
|
+
`}function X(r,i){if(i===void 0){let e=e=>X(r,e??t.html``);return e.html=(e,...n)=>X(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
|
798
795
|
<div
|
799
|
-
${(0,
|
796
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
800
797
|
style="
|
801
798
|
position: relative;
|
802
|
-
${
|
799
|
+
${a} ${o} ${s}
|
803
800
|
overflow: hidden;
|
804
801
|
"
|
805
802
|
>
|
806
|
-
${
|
803
|
+
${e.renderFn(i)}
|
807
804
|
</div>
|
808
|
-
`}function
|
809
|
-
${(0,
|
810
|
-
style="${
|
811
|
-
></div>`}function
|
805
|
+
`}function te(r){let i=r?.width?`width: ${r.width};`:``,a=r?.height?`height: ${r.height};`:``,o=e.createEventBinder(r?.on??{});return t.html`<div
|
806
|
+
${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
|
807
|
+
style="${i} ${a}"
|
808
|
+
></div>`}function ne(r){let{type:i=`rect`,width:a=`100%`,height:o=`16px`,borderRadius:s=`4px`,animation:c=!0,animationType:l=`shimmer`,bgColor:u=`#eee`,highlightColor:d=`#ddd`,count:f=1,spacing:p=`8px`,direction:m=`vertical`,delay:h=0,autoHide:g=!1,duration:_=2e3,on:v={}}=r??{},y=e.getComponentCount(`SkeletonLoader`),b=e.getRandomClassName(`SkeletonLoader::skeleton`)+`-lyco-now-`+y,x=e.createEventBinder(v),S=i===`circle`?`border-radius:50%;width:${a};height:${a}`:`border-radius:${s};width:${a};height:${o}`,C=``,w=``;c&&(l===`shimmer`?(C=`@keyframes ${b}-shimmer { 0% { background-color: ${u}; } 50% { background-color: ${d}; } 100% { background-color: ${u}; } }`,w=`animation:${b}-shimmer 1.2s infinite ease-in-out;`):(C=`@keyframes ${b}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,w=`animation:${b}-pulse 1.2s infinite ease-in-out;`));let T=m===`horizontal`?`display:flex;flex-direction:row;gap:${p}`:`display:flex;flex-direction:column;gap:${p}`,E=[];for(let e=0;e<f;e++)E.push(t.html`
|
812
809
|
<div
|
813
|
-
class="${
|
814
|
-
style="${
|
815
|
-
${(0,
|
810
|
+
class="${b}"
|
811
|
+
style="${S};background-color:${u};${w};opacity:0;transition:opacity 0.3s"
|
812
|
+
${(0,n.ref)(e=>{e&&x.bind(e)})}
|
816
813
|
></div>
|
817
|
-
`);function
|
814
|
+
`);function D(e){let t=Array.from(e.querySelectorAll(`.${b}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),g&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},_)},h)}return e.LycoComponent(`SkeletonLoader`,t.html`
|
818
815
|
<style>
|
819
|
-
${
|
816
|
+
${C}
|
820
817
|
</style>
|
821
818
|
<div
|
822
|
-
style="${
|
823
|
-
${(0,
|
819
|
+
style="${T}"
|
820
|
+
${(0,n.ref)(e=>e&&D(e))}
|
824
821
|
>
|
825
|
-
${
|
822
|
+
${E}
|
826
823
|
</div>
|
827
|
-
`)}function
|
828
|
-
${(0,
|
824
|
+
`)}function re(r){let i=e.createEventBinder(r?.on??{});return t.html`<div
|
825
|
+
${(0,n.ref)(e=>{e?i.bind(e):i.unbindAll()})}
|
829
826
|
style="flex: 1 1 auto;"
|
830
|
-
></div>`}function
|
827
|
+
></div>`}function Z(r,i){if(i===void 0){let e=e=>Z(r,e??t.html``);return e.html=(e,...n)=>Z(r,(0,t.html)(e,...n)),e}let a=r?.top?`top: ${r.top};`:``,o=r?.bottom?`bottom: ${r.bottom};`:``,s=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,c=e.createEventBinder(r?.on??{});return t.html`
|
831
828
|
<div
|
832
|
-
${(0,
|
829
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
833
830
|
style="
|
834
831
|
position: sticky;
|
835
|
-
${
|
836
|
-
${
|
832
|
+
${a} ${o}
|
833
|
+
${s}
|
837
834
|
"
|
838
835
|
>
|
839
|
-
${
|
836
|
+
${e.renderFn(i)}
|
840
837
|
</div>
|
841
|
-
`}function
|
842
|
-
.${
|
843
|
-
background: ${
|
838
|
+
`}function Q(r,i){if(i===void 0){let e=e=>Q(r,e??t.html``);return e.html=(e,...n)=>Q(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`Table`),o=r?.className??e.getRandomClassName(`Table::table`)+`-lyco-now-${a}`,s=r?.striped?`
|
839
|
+
.${o} tr:nth-child(even) {
|
840
|
+
background: ${O.colors.surface};
|
844
841
|
}
|
845
|
-
`:``,
|
846
|
-
.${
|
847
|
-
background: ${
|
842
|
+
`:``,c=r?.hover?`
|
843
|
+
.${o} tr:hover {
|
844
|
+
background: ${O.colors.primaryContainer};
|
848
845
|
cursor: pointer;
|
849
846
|
}
|
850
|
-
`:``,
|
851
|
-
.${
|
852
|
-
border: 1px solid ${
|
847
|
+
`:``,l=r?.bordered?`
|
848
|
+
.${o}, .${o} th, .${o} td {
|
849
|
+
border: 1px solid ${O.colors.surfaceVariant};
|
853
850
|
}
|
854
|
-
`:``,
|
855
|
-
.${
|
851
|
+
`:``,u=`
|
852
|
+
.${o} table {
|
856
853
|
width: 100%;
|
857
854
|
border-collapse: separate;
|
858
855
|
border-spacing: 0;
|
859
|
-
border-radius: ${
|
856
|
+
border-radius: ${O.borderRadius.medium};
|
860
857
|
overflow: hidden;
|
861
|
-
box-shadow: ${
|
858
|
+
box-shadow: ${O.elevation.level1};
|
862
859
|
}
|
863
|
-
.${
|
864
|
-
.${
|
860
|
+
.${o} th,
|
861
|
+
.${o} td {
|
865
862
|
padding: 16px;
|
866
863
|
text-align: left;
|
867
|
-
transition: background ${
|
864
|
+
transition: background ${O.animation.standard};
|
868
865
|
}
|
869
|
-
.${
|
870
|
-
background: ${
|
871
|
-
color: ${
|
866
|
+
.${o} th {
|
867
|
+
background: ${O.colors.surfaceVariant};
|
868
|
+
color: ${O.colors.onSurfaceVariant};
|
872
869
|
font-weight: 500;
|
873
870
|
}
|
874
|
-
.${
|
875
|
-
border-bottom: 1px solid ${
|
871
|
+
.${o} td {
|
872
|
+
border-bottom: 1px solid ${O.colors.surfaceVariant};
|
876
873
|
}
|
877
|
-
${
|
878
|
-
${
|
879
|
-
${
|
880
|
-
`,
|
874
|
+
${s}
|
875
|
+
${c}
|
876
|
+
${l}
|
877
|
+
`,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Table`,t.html`
|
881
878
|
<style>
|
882
|
-
${
|
879
|
+
${u}
|
883
880
|
</style>
|
884
881
|
|
885
882
|
<div
|
886
|
-
${(0,
|
887
|
-
class="${
|
883
|
+
${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
|
884
|
+
class="${o}"
|
888
885
|
>
|
889
886
|
<table>
|
890
|
-
${
|
887
|
+
${e.renderFn(i)}
|
891
888
|
</table>
|
892
889
|
</div>
|
893
|
-
`)}function
|
890
|
+
`)}function ie(r,i){let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return i===void 0?e=>ie(r,e??t.html``):t.html`
|
894
891
|
<div
|
895
|
-
${(0,
|
892
|
+
${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
|
896
893
|
style="
|
897
894
|
display: flex;
|
898
|
-
flex-direction: ${
|
895
|
+
flex-direction: ${a};
|
899
896
|
flex-wrap: wrap;
|
900
|
-
${
|
901
|
-
${
|
902
|
-
${
|
897
|
+
${r?.gap?`gap: ${r.gap};`:``}
|
898
|
+
${r?.align?`align-items: ${r.align};`:``}
|
899
|
+
${r?.justify?`justify-content: ${r.justify};`:``}
|
903
900
|
"
|
904
901
|
>
|
905
|
-
${
|
902
|
+
${e.renderFnOrArray(i)}
|
906
903
|
</div>
|
907
|
-
`}function
|
904
|
+
`}function ae(r,i){let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});if(i===void 0)return e=>ae(r,e??[t.html``]);let l=`flex-start`,u=`flex-start`;switch(r?.align){case`top-right`:l=`flex-end`,u=`flex-start`;break;case`center`:l=`center`,u=`center`;break;case`bottom-left`:l=`flex-start`,u=`flex-end`;break;case`bottom-right`:l=`flex-end`,u=`flex-end`;break;default:l=`flex-start`,u=`flex-start`}return t.html`
|
908
905
|
<div
|
909
|
-
${(0,
|
906
|
+
${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
|
910
907
|
style="
|
911
908
|
position: relative;
|
912
909
|
display: flex;
|
913
|
-
justify-content: ${
|
914
|
-
align-items: ${
|
915
|
-
${
|
910
|
+
justify-content: ${l};
|
911
|
+
align-items: ${u};
|
912
|
+
${a} ${o} ${s}
|
916
913
|
"
|
917
914
|
>
|
918
|
-
${
|
915
|
+
${e.renderFnOrArray(i)}
|
919
916
|
</div>
|
920
|
-
`}function
|
921
|
-
.${
|
917
|
+
`}function oe(r){let{value:i=``,options:a=[],placeholder:o=``,disabled:s=!1,error:c=!1,className:l=``,style:u=``,maxHeight:d=`300px`,onChange:f,onInput:p,onFocus:m,onBlur:h,on:g={},optionRender:_}=r??{},v=e.getComponentCount(`Combobox`),y=e.getRandomClassName(`Combobox::combobox`)+`-lyco-now-${v}`,b=!1,x=null,S=`
|
918
|
+
.${y} {
|
922
919
|
position: relative;
|
923
920
|
width: 100%;
|
924
921
|
}
|
925
922
|
|
926
|
-
.${
|
923
|
+
.${y} input {
|
927
924
|
width: 100%;
|
928
925
|
padding: 12px 16px;
|
929
926
|
font-size: 16px;
|
930
|
-
border: 1px solid ${
|
931
|
-
border-radius: ${
|
932
|
-
color: ${
|
933
|
-
transition: all ${
|
927
|
+
border: 1px solid ${c?O.colors.error:O.colors.surfaceVariant};
|
928
|
+
border-radius: ${O.borderRadius.small};
|
929
|
+
color: ${O.colors.onSurface};
|
930
|
+
transition: all ${O.animation.standard};
|
934
931
|
outline: none;
|
935
932
|
box-sizing: border-box;
|
936
933
|
}
|
937
934
|
|
938
|
-
.${
|
939
|
-
border-color: ${
|
940
|
-
box-shadow: 0 0 0 2px ${
|
935
|
+
.${y} input:focus {
|
936
|
+
border-color: ${O.colors.primary};
|
937
|
+
box-shadow: 0 0 0 2px ${O.colors.primaryContainer};
|
941
938
|
}
|
942
939
|
|
943
|
-
.${
|
944
|
-
background: ${
|
945
|
-
color: ${
|
940
|
+
.${y} input:disabled {
|
941
|
+
background: ${O.colors.surfaceVariant};
|
942
|
+
color: ${O.colors.onSurfaceVariant};
|
946
943
|
cursor: not-allowed;
|
947
944
|
}
|
948
945
|
|
949
|
-
.${
|
946
|
+
.${y} .options {
|
950
947
|
position: absolute;
|
951
948
|
top: 100%;
|
952
949
|
left: 0;
|
953
950
|
right: 0;
|
954
|
-
max-height: ${
|
951
|
+
max-height: ${d};
|
955
952
|
overflow-y: auto;
|
956
|
-
border: 1px solid ${
|
957
|
-
border-radius: ${
|
958
|
-
box-shadow: ${
|
953
|
+
border: 1px solid ${O.colors.surfaceVariant};
|
954
|
+
border-radius: ${O.borderRadius.small};
|
955
|
+
box-shadow: ${O.elevation.level2};
|
959
956
|
z-index: 1000;
|
960
957
|
display: none;
|
961
958
|
}
|
962
959
|
|
963
|
-
.${
|
960
|
+
.${y} .options.open {
|
964
961
|
display: block;
|
965
962
|
}
|
966
963
|
|
967
|
-
.${
|
964
|
+
.${y} .option {
|
968
965
|
padding: 12px 16px;
|
969
966
|
cursor: pointer;
|
970
|
-
transition: background ${
|
967
|
+
transition: background ${O.animation.standard};
|
971
968
|
}
|
972
969
|
|
973
|
-
.${
|
974
|
-
background: ${
|
970
|
+
.${y} .option:hover {
|
971
|
+
background: ${O.colors.primaryContainer};
|
975
972
|
}
|
976
973
|
|
977
|
-
.${
|
978
|
-
background: ${
|
979
|
-
color: ${
|
974
|
+
.${y} .option.selected {
|
975
|
+
background: ${O.colors.primaryContainer};
|
976
|
+
color: ${O.colors.onPrimaryContainer};
|
980
977
|
}
|
981
|
-
`,
|
978
|
+
`,C=e.createEventBinder(g),w=null,T=()=>{b?w?.classList.remove(`open`):w?.classList.add(`open`),b=!b},E=(e,t)=>{if(x){x.value=e.value;let n=t.currentTarget;Array.from(w?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),f?.(e.value)}T()},D=e=>{let t=e.target;t.closest(`.${y}`)||(b=!1,w?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,D),e.LycoComponent(`Combobox`,t.html`
|
982
979
|
<style>
|
983
|
-
${
|
980
|
+
${S}
|
984
981
|
</style>
|
985
|
-
<div class="${
|
982
|
+
<div class="${y} ${l}" style="${u}">
|
986
983
|
<input
|
987
|
-
${(0,
|
984
|
+
${(0,n.ref)(e=>{e?(x=e,C.bind(e)):C.unbindAll()})}
|
988
985
|
type="text"
|
989
|
-
.value=${
|
990
|
-
placeholder=${
|
991
|
-
?disabled=${
|
992
|
-
@focus=${()=>{
|
993
|
-
@input=${e=>{let t=e.target;
|
994
|
-
@change=${e=>{let t=e.target;
|
986
|
+
.value=${i}
|
987
|
+
placeholder=${o}
|
988
|
+
?disabled=${s}
|
989
|
+
@focus=${()=>{m?.(),T()}}
|
990
|
+
@input=${e=>{let t=e.target;p?.(t.value)}}
|
991
|
+
@change=${e=>{let t=e.target;f?.(t.value)}}
|
995
992
|
/>
|
996
993
|
<div
|
997
|
-
${(0,
|
994
|
+
${(0,n.ref)(e=>{e&&(w=e)})}
|
998
995
|
class="options"
|
999
996
|
>
|
1000
|
-
${
|
997
|
+
${a.map(e=>t.html`
|
1001
998
|
<div
|
1002
|
-
class="option ${e.value===(
|
1003
|
-
@click=${t=>
|
999
|
+
class="option ${e.value===(x?.value??i)?`selected`:``}"
|
1000
|
+
@click=${t=>E(e,t)}
|
1004
1001
|
>
|
1005
|
-
${
|
1002
|
+
${_?_(e):e.label}
|
1006
1003
|
</div>
|
1007
1004
|
`)}
|
1008
1005
|
</div>
|
1009
1006
|
</div>
|
1010
|
-
`)}function
|
1007
|
+
`)}function se(r){let i=Math.min(100,Math.max(0,r?.value??0)),a=Math.min(100,Math.max(0,r?.bufferValue??0)),o=r?.color??`#1976d2`,s=r?.secondaryColor??`#90caf9`,c=r?.backgroundColor??`#e0e0e0`,l=r?.height??`4px`,u=r?.radius??`4px`,d=r?.showLabel??!1,f=r?.labelPosition??`inside`,p=r?.labelColor??(i>50?`white`:o),m=r?.labelFontSize??`12px`,h=r?.striped??!1,g=r?.animated??!1,_=r?.paused??!1,v=r?.transitionDuration??`0.3s`,y=r?.className??``,b=r?.style??``,x=e.createEventBinder(r?.on??{}),S=h?`background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
|
1011
1008
|
background-size: 1rem 1rem;
|
1012
1009
|
animation: progress-stripes 1s linear infinite;
|
1013
|
-
animation-play-state: ${
|
1010
|
+
animation-play-state: ${_?`paused`:`running`};`:``;return t.html`
|
1014
1011
|
<style>
|
1015
|
-
${
|
1012
|
+
${t.css`
|
1016
1013
|
@keyframes progress-stripes {
|
1017
1014
|
from {
|
1018
1015
|
background-position: 1rem 0;
|
@@ -1025,170 +1022,170 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
1025
1022
|
</style>
|
1026
1023
|
|
1027
1024
|
<div
|
1028
|
-
${(0,
|
1029
|
-
class="lyco-progress ${
|
1025
|
+
${(0,n.ref)(e=>{e?x.bind(e):x.unbindAll()})}
|
1026
|
+
class="lyco-progress ${y}"
|
1030
1027
|
role="progressbar"
|
1031
1028
|
aria-valuemin="0"
|
1032
1029
|
aria-valuemax="100"
|
1033
|
-
aria-valuenow="${
|
1030
|
+
aria-valuenow="${i}"
|
1034
1031
|
style="
|
1035
1032
|
width: 100%;
|
1036
|
-
background: ${
|
1037
|
-
border-radius: ${
|
1038
|
-
height: ${
|
1033
|
+
background: ${c};
|
1034
|
+
border-radius: ${u};
|
1035
|
+
height: ${l};
|
1039
1036
|
position: relative;
|
1040
1037
|
overflow: hidden;
|
1041
1038
|
display: flex;
|
1042
1039
|
align-items: center;
|
1043
|
-
${
|
1040
|
+
${b}
|
1044
1041
|
"
|
1045
1042
|
>
|
1046
|
-
${
|
1043
|
+
${r?.prefixIcon}
|
1047
1044
|
<!-- 缓冲进度 -->
|
1048
1045
|
<div
|
1049
1046
|
style="
|
1050
1047
|
position: absolute;
|
1051
|
-
width: ${
|
1048
|
+
width: ${a}%;
|
1052
1049
|
height: 100%;
|
1053
|
-
background: ${
|
1054
|
-
transition: width ${
|
1050
|
+
background: ${s};
|
1051
|
+
transition: width ${v} ease;
|
1055
1052
|
"
|
1056
1053
|
></div>
|
1057
1054
|
<!-- 主进度 -->
|
1058
1055
|
<div
|
1059
1056
|
style="
|
1060
1057
|
position: absolute;
|
1061
|
-
width: ${
|
1058
|
+
width: ${i}%;
|
1062
1059
|
height: 100%;
|
1063
|
-
background: ${
|
1064
|
-
border-radius: ${
|
1065
|
-
transition: width ${
|
1066
|
-
${
|
1060
|
+
background: ${o};
|
1061
|
+
border-radius: ${u};
|
1062
|
+
transition: width ${v} ease;
|
1063
|
+
${S}
|
1067
1064
|
"
|
1068
1065
|
></div>
|
1069
1066
|
|
1070
1067
|
<!-- 文本标签 -->
|
1071
|
-
${
|
1068
|
+
${d?t.html`
|
1072
1069
|
<div
|
1073
1070
|
style="
|
1074
|
-
position: ${
|
1075
|
-
${
|
1076
|
-
font-size: ${
|
1077
|
-
color: ${
|
1071
|
+
position: ${f===`inside`?`absolute`:`relative`};
|
1072
|
+
${f===`inside`?`right: 8px; top: 50%; transform: translateY(-50%);`:`margin-left: auto; margin-right: 4px;`}
|
1073
|
+
font-size: ${m};
|
1074
|
+
color: ${p};
|
1078
1075
|
z-index: 1;
|
1079
1076
|
"
|
1080
1077
|
>
|
1081
|
-
${
|
1078
|
+
${i}%
|
1082
1079
|
</div>
|
1083
1080
|
`:``}
|
1084
|
-
${
|
1081
|
+
${r?.suffixIcon}
|
1085
1082
|
</div>
|
1086
|
-
`}function
|
1083
|
+
`}function ce(r){let{size:i=`24px`,color:a=O.colors.primary,thickness:o=`2px`,speed:s=`1.2s`,className:c=``,opacity:l=1,startAngle:u=0,easing:d=`linear`,reverse:f=!1,style:p=``,on:m={},children:h,svgMode:g=!1,strokeLinecap:_=`butt`,strokeDasharray:v=``}=r??{},y=e.createEventBinder(m),b=e.getComponentCount(`Spinner`),x=t.html`
|
1087
1084
|
<div
|
1088
|
-
class="${
|
1089
|
-
style="display: inline-flex; align-items: center; justify-content: center; width: ${
|
1090
|
-
${(0,
|
1085
|
+
class="${c}"
|
1086
|
+
style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${p}"
|
1087
|
+
${(0,n.ref)()}
|
1091
1088
|
>
|
1092
1089
|
<div
|
1093
1090
|
style="
|
1094
1091
|
width: 100%;
|
1095
1092
|
height: 100%;
|
1096
|
-
border: ${
|
1093
|
+
border: ${o} solid ${a};
|
1097
1094
|
border-right-color: transparent;
|
1098
1095
|
border-radius: 50%;
|
1099
1096
|
box-sizing: border-box;
|
1100
|
-
opacity: ${
|
1101
|
-
animation: lyco-spin-${
|
1097
|
+
opacity: ${l};
|
1098
|
+
animation: lyco-spin-${b} ${s} ${d} infinite ${f?`reverse`:`normal`};
|
1102
1099
|
"
|
1103
1100
|
></div>
|
1104
1101
|
</div>
|
1105
1102
|
<style>
|
1106
|
-
${
|
1107
|
-
@keyframes lyco-spin-${
|
1103
|
+
${t.css`
|
1104
|
+
@keyframes lyco-spin-${b} {
|
1108
1105
|
from {
|
1109
|
-
transform: rotate(${
|
1106
|
+
transform: rotate(${u}deg);
|
1110
1107
|
}
|
1111
1108
|
to {
|
1112
|
-
transform: rotate(${
|
1109
|
+
transform: rotate(${u+360}deg);
|
1113
1110
|
}
|
1114
1111
|
}
|
1115
1112
|
`.cssText}
|
1116
1113
|
</style>
|
1117
|
-
`,
|
1114
|
+
`,S=t.html`
|
1118
1115
|
<div
|
1119
|
-
class="${
|
1120
|
-
style="display: inline-flex; align-items: center; justify-content: center; width: ${
|
1121
|
-
${(0,
|
1116
|
+
class="${c}"
|
1117
|
+
style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${p}"
|
1118
|
+
${(0,n.ref)(e=>{e?y.bind(e):y.unbindAll()})}
|
1122
1119
|
>
|
1123
1120
|
<svg
|
1124
1121
|
width="100%"
|
1125
1122
|
height="100%"
|
1126
1123
|
viewBox="0 0 100 100"
|
1127
|
-
style="opacity: ${
|
1124
|
+
style="opacity: ${l}; overflow: visible; filter: drop-shadow(${O.elevation.level1});"
|
1128
1125
|
>
|
1129
1126
|
<circle
|
1130
1127
|
cx="50"
|
1131
1128
|
cy="50"
|
1132
1129
|
r="45"
|
1133
1130
|
fill="none"
|
1134
|
-
stroke="${
|
1131
|
+
stroke="${a}"
|
1135
1132
|
style="
|
1136
|
-
stroke-width: ${
|
1137
|
-
stroke-linecap: ${
|
1138
|
-
stroke-dasharray: ${
|
1133
|
+
stroke-width: ${o};
|
1134
|
+
stroke-linecap: ${_};
|
1135
|
+
stroke-dasharray: ${v};
|
1139
1136
|
transform-origin: 50% 50%;
|
1140
|
-
animation: lyco-svg-spin-${
|
1137
|
+
animation: lyco-svg-spin-${b} ${s} ${d} infinite ${f?`reverse`:`normal`};
|
1141
1138
|
"
|
1142
1139
|
></circle>
|
1143
1140
|
</svg>
|
1144
1141
|
</div>
|
1145
1142
|
<style>
|
1146
|
-
${
|
1147
|
-
@keyframes lyco-svg-spin-${
|
1143
|
+
${t.css`
|
1144
|
+
@keyframes lyco-svg-spin-${b} {
|
1148
1145
|
from {
|
1149
|
-
transform: rotate(${
|
1146
|
+
transform: rotate(${u}deg);
|
1150
1147
|
}
|
1151
1148
|
to {
|
1152
|
-
transform: rotate(${
|
1149
|
+
transform: rotate(${u+360}deg);
|
1153
1150
|
}
|
1154
1151
|
}
|
1155
1152
|
`.cssText}
|
1156
1153
|
</style>
|
1157
|
-
`;return
|
1154
|
+
`;return e.LycoComponent(`Spinner`,g?S:x)}let $=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function le(r,i){let{content:a,placement:o=$.Top,delay:s={show:200,hide:100},offset:c=8,hideOnClick:l=!1,interactive:u=!1,maxWidth:d=`200px`,theme:f=`dark`,className:p=``,style:m=``,zIndex:h=1e3,on:g={},onShow:_,onHide:v}=r,y=e.createEventBinder(g),b,x;function S(e){clearTimeout(x),b=window.setTimeout(()=>{w.style.visibility=`visible`,w.style.opacity=`1`,_?.()},s.show)}function C(){clearTimeout(b),x=window.setTimeout(()=>{w.style.visibility=`hidden`,w.style.opacity=`0`,v?.()},s.hide)}let w,T=r=>t.html`
|
1158
1155
|
<div
|
1159
|
-
${(0,
|
1160
|
-
class="lyco-tooltip lyco-tooltip--${
|
1161
|
-
style="position: relative; display: inline-block; ${
|
1156
|
+
${(0,n.ref)(e=>{e?(y.bind(e),w=e.querySelector(`.lyco-tooltip-content`),e.addEventListener(`mouseenter`,()=>S(e)),e.addEventListener(`mouseleave`,()=>C()),l&&e.addEventListener(`click`,()=>C())):y.unbindAll()})}
|
1157
|
+
class="lyco-tooltip lyco-tooltip--${f} ${p}"
|
1158
|
+
style="position: relative; display: inline-block; ${m}"
|
1162
1159
|
>
|
1163
|
-
${
|
1160
|
+
${e.renderFn(r)}
|
1164
1161
|
<div
|
1165
1162
|
class="lyco-tooltip-content"
|
1166
1163
|
style="
|
1167
1164
|
position: absolute;
|
1168
|
-
max-width: ${
|
1169
|
-
${
|
1170
|
-
${
|
1171
|
-
${
|
1172
|
-
${
|
1165
|
+
max-width: ${d};
|
1166
|
+
${o===$.Top?`bottom: 100%; left: 50%; transform: translateX(-50%)`:``}
|
1167
|
+
${o===$.Bottom?`top: 100%; left: 50%; transform: translateX(-50%)`:``}
|
1168
|
+
${o===$.Left?`right: 100%; top: 50%; transform: translateY(-50%)`:``}
|
1169
|
+
${o===$.Right?`left: 100%; top: 50%; transform: translateY(-50%)`:``}
|
1173
1170
|
padding: 4px 8px;
|
1174
1171
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
1175
|
-
background: ${
|
1172
|
+
background: ${f===`light`?`white; color: black`:`rgba(0,0,0,0.8); color: white`};
|
1176
1173
|
border-radius: 4px;
|
1177
1174
|
font-size: 12px;
|
1178
1175
|
white-space: normal;
|
1179
|
-
width: ${
|
1176
|
+
width: ${o===$.Left||o===$.Right?d:`auto`};
|
1180
1177
|
visibility: hidden;
|
1181
1178
|
opacity: 0;
|
1182
|
-
transition: opacity ${
|
1183
|
-
z-index: ${
|
1184
|
-
margin: ${typeof
|
1185
|
-
${
|
1179
|
+
transition: opacity ${s.show}ms;
|
1180
|
+
z-index: ${h};
|
1181
|
+
margin: ${typeof c==`number`?o===$.Top||o===$.Bottom?`${c}px 0`:`0 ${c}px`:`${c.y}px ${c.x}px`};
|
1182
|
+
${u?`pointer-events: auto`:`pointer-events: none`};
|
1186
1183
|
"
|
1187
1184
|
>
|
1188
|
-
${
|
1185
|
+
${a}
|
1189
1186
|
</div>
|
1190
1187
|
</div>
|
1191
|
-
`;return
|
1188
|
+
`;return e.renderFnOrCurry(i,T)}let ue=function(e){return e.Center=`center`,e.Left=`left`,e.Right=`right`,e.Top=`top`,e.Bottom=`bottom`,e.TopStart=`top-start`,e.TopEnd=`top-end`,e.BottomStart=`bottom-start`,e.BottomEnd=`bottom-end`,e.LeftStart=`left-start`,e.LeftEnd=`left-end`,e.RightStart=`right-start`,e.RightEnd=`right-end`,e}({});const de=typeof window>`u`,fe=!de&&`HTMLDialogElement`in window,pe=e=>`
|
1192
1189
|
position: fixed;
|
1193
1190
|
top: 0;
|
1194
1191
|
left: 0;
|
@@ -1199,78 +1196,78 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
1199
1196
|
justify-content: center;
|
1200
1197
|
z-index: 1000;
|
1201
1198
|
background: rgba(0,0,0,0.3);
|
1202
|
-
`;var
|
1203
|
-
${
|
1204
|
-
${
|
1199
|
+
`;var me=class{constructor(e,t){this.isOpen=!1,this.returnValue=``,this.element=e,this.contentElement=t}show(){this.element.style.display=`flex`,this.isOpen=!0}showModal(){this.show()}close(){this.element.style.display=`none`,this.isOpen=!1,this.element.dispatchEvent(new Event(`close`))}get open(){return this.isOpen}getBoundingClientRect(){return this.contentElement.getBoundingClientRect()}get style(){return this.contentElement.style}};function he(r,i){let a=r?.open??!1,o=r?.onClose,s=r?.className??``,c=r?.style??``,l=e.createEventBinder(r?.on?r?.on:{}),u=r?.movable??!1,d=r?.placement??ue.Center,f=r?.proxyRef??{value:null},p=null,m=!1,h={x:0,y:0},g=null,_=r?.mask??!0,v=e.getComponentCount(`Dialog`),y=e.getRandomClassName(`Dialog::dialog`)+`-lyco-now-`+v;function b(e){return u?u===`self`?e:u&&`value`in u?u.value:null:null}function x(){if(typeof window>`u`)return``;let e=300,t=150,n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;return`left: ${n}px; top: ${r}px;`}function S(){switch(d){case`left`:return`left: 32px; top: 50%;`;case`right`:return`right: 32px; top: 50%;`;case`top`:return`top: 32px; left: 50%;`;case`bottom`:return`bottom: 32px; left: 50%;`;case`top-start`:return`top: 32px; left: 32px;`;case`top-end`:return`top: 32px; right: 32px;`;case`bottom-start`:return`bottom: 32px; left: 32px;`;case`bottom-end`:return`bottom: 32px; right: 32px;`;case`left-start`:return`left: 32px; top: 32px;`;case`left-end`:return`left: 32px; bottom: 32px;`;case`right-start`:return`right: 32px; top: 32px;`;case`right-end`:return`right: 32px; bottom: 32px;`;default:return x()}}function C(){switch(d){case`top-start`:case`top-end`:case`bottom-start`:case`bottom-end`:case`left-start`:case`left-end`:case`right-start`:case`right-end`:return{txp:0,typ:0};case`left`:return{txp:0,typ:-50};case`right`:return{txp:0,typ:-50};case`top`:return{txp:-50,typ:0};case`bottom`:return{txp:-50,typ:0};default:return{txp:-50,typ:-50}}}function w(e,t){if(e.button!==0||(g=b(t),!g||!g.contains(e.target)))return;p=t,p.style.transform=`none`,e.preventDefault(),g.style.cursor=`grabbing`;let n=t.getBoundingClientRect(),{txp:r,typ:i}=C();h={x:e.clientX-(n.left+r/100*n.width),y:e.clientY-(n.top+i/100*n.height)},m=!0,document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E)}function T(e){if(!m||!g||!p)return;let t=p.getBoundingClientRect(),{txp:n,typ:r}=C(),i=e.clientX-h.x-n/100*t.width,a=e.clientY-h.y-r/100*t.height;p.style.left=`${i}px`,p.style.top=`${a}px`}function E(){m=!1,g=null,p=null,document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}function D(){let e=_?`rgba(0,0,0,0.5)`:`transparent`;return`
|
1200
|
+
${y}::-webkit-backdrop,
|
1201
|
+
${y}::backdrop {
|
1205
1202
|
background: ${e};
|
1206
|
-
transition: opacity ${
|
1203
|
+
transition: opacity ${O.animation.standard};
|
1207
1204
|
}
|
1208
|
-
`}function
|
1205
|
+
`}function k(r){let i=null,d=null;return e.LycoComponent(`Dialog`,t.html`
|
1209
1206
|
<div
|
1210
|
-
${(0,
|
1211
|
-
@click=${e=>{e.target===e.currentTarget&&
|
1212
|
-
style=${
|
1207
|
+
${(0,n.ref)(e=>{if(e){if(i=e,d){let e=new me(i,d);f.value=e,l.bind(i),a?e.showModal():e.close()}}else l.unbindAll()})}
|
1208
|
+
@click=${e=>{e.target===e.currentTarget&&o?.()}}
|
1209
|
+
style=${pe(a)}
|
1213
1210
|
>
|
1214
1211
|
<div
|
1215
|
-
${(0,
|
1216
|
-
class="${
|
1212
|
+
${(0,n.ref)(e=>{if(e&&(d=e,i)){let e=new me(i,d);f.value=e}})}
|
1213
|
+
class="${y} ${s}"
|
1217
1214
|
style="
|
1218
1215
|
padding: 0;
|
1219
1216
|
border: none;
|
1220
|
-
background: ${
|
1221
|
-
border-radius: ${
|
1217
|
+
background: ${O.colors.surface};
|
1218
|
+
border-radius: ${O.borderRadius.large};
|
1222
1219
|
min-width: 300px;
|
1223
|
-
${
|
1224
|
-
${typeof
|
1225
|
-
${
|
1220
|
+
${S()}
|
1221
|
+
${typeof u==`boolean`?``:`cursor: default;`}
|
1222
|
+
${c}
|
1226
1223
|
"
|
1227
1224
|
>
|
1228
|
-
${
|
1225
|
+
${e.renderFnOrArray(r)}
|
1229
1226
|
</div>
|
1230
1227
|
</div>
|
1231
|
-
`)}function
|
1228
|
+
`)}function A(r){return de||!fe?k(r):e.LycoComponent(`Dialog`,t.html`
|
1232
1229
|
<dialog
|
1233
|
-
${(0,
|
1234
|
-
@close=${
|
1230
|
+
${(0,n.ref)(e=>{if(e){f.value=e;let t=e;l.bind(t),requestAnimationFrame(()=>{try{a?t.showModal():t.close()}catch(e){console.warn(`Dialog operation failed:`,e)}})}else l.unbindAll()})}
|
1231
|
+
@close=${o}
|
1235
1232
|
@mousedown=${e=>w(e,e.currentTarget)}
|
1236
1233
|
style="
|
1237
1234
|
padding: 0;
|
1238
1235
|
border: none;
|
1239
|
-
background: ${
|
1240
|
-
border-radius: ${
|
1236
|
+
background: ${O.colors.surface};
|
1237
|
+
border-radius: ${O.borderRadius.large};
|
1241
1238
|
min-width: 300px;
|
1242
1239
|
margin: 0;
|
1243
1240
|
position: fixed;
|
1244
|
-
box-shadow: ${
|
1245
|
-
transition: transform ${
|
1246
|
-
${
|
1247
|
-
${typeof
|
1248
|
-
${
|
1241
|
+
box-shadow: ${O.elevation.level3};
|
1242
|
+
transition: transform ${O.animation.emphasized};
|
1243
|
+
${S()}
|
1244
|
+
${typeof u==`boolean`?``:`cursor: default;`}
|
1245
|
+
${c}
|
1249
1246
|
"
|
1250
1247
|
>
|
1251
|
-
${
|
1248
|
+
${e.renderFnOrArray(r)}
|
1252
1249
|
</dialog>
|
1253
1250
|
<style>
|
1254
|
-
${
|
1251
|
+
${D()}
|
1255
1252
|
</style>
|
1256
|
-
`)}return
|
1253
|
+
`)}return e.renderFnOrArrayOrCurry(i,A)}function ge(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r=>t.html`
|
1257
1254
|
<div
|
1258
|
-
${(0,
|
1259
|
-
class="lyco-dialog-actions ${
|
1255
|
+
${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
|
1256
|
+
class="lyco-dialog-actions ${a}"
|
1260
1257
|
style="
|
1261
1258
|
display: flex;
|
1262
1259
|
align-items: center;
|
1263
1260
|
justify-content: flex-end;
|
1264
1261
|
padding: 8px 24px;
|
1265
|
-
${
|
1262
|
+
${o}
|
1266
1263
|
"
|
1267
1264
|
>
|
1268
|
-
${
|
1265
|
+
${e.renderFnOrArray(r)}
|
1269
1266
|
</div>
|
1270
|
-
`;return
|
1267
|
+
`;return e.renderFnOrArrayOrCurry(i,c)}function _e(r,i){let a=r?.variant??`text`,o=r?.color??`default`,s=r?.className??``,c=r?.style??``,l=e.createEventBinder({click:r?.onClick?e=>{var t;e.preventDefault(),(t=r.onClick)?.call(r,e)}:void 0,...r?.on}),u=r=>t.html`
|
1271
1268
|
<button
|
1272
|
-
${(0,
|
1273
|
-
class="lyco-dialog-button ${
|
1269
|
+
${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
|
1270
|
+
class="lyco-dialog-button ${a} ${o} ${s}"
|
1274
1271
|
style="
|
1275
1272
|
padding: 6px 16px;
|
1276
1273
|
font-size: 14px;
|
@@ -1279,40 +1276,40 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
1279
1276
|
border: none;
|
1280
1277
|
outline: none;
|
1281
1278
|
margin: 0 4px;
|
1282
|
-
${
|
1283
|
-
${
|
1279
|
+
${a===`contained`?`background: #1976d2; color: white;`:`background: transparent;`}
|
1280
|
+
${c}
|
1284
1281
|
"
|
1285
1282
|
>
|
1286
|
-
${
|
1283
|
+
${e.renderFn(r)}
|
1287
1284
|
</button>
|
1288
|
-
`;return
|
1285
|
+
`;return e.renderFnOrCurry(i,u)}function ve(n,r){let i=n?.className??``,a=n?.style??``,o=e.createEventBinder(n?.on??{}),s=n=>t.html`
|
1289
1286
|
<div
|
1290
|
-
class="lyco-dialog-content ${
|
1287
|
+
class="lyco-dialog-content ${i}"
|
1291
1288
|
style="
|
1292
1289
|
background: white;
|
1293
1290
|
border-radius: 4px;
|
1294
1291
|
padding: 20px;
|
1295
1292
|
min-width: 300px;
|
1296
1293
|
position: relative;
|
1297
|
-
${
|
1294
|
+
${a}
|
1298
1295
|
"
|
1299
1296
|
>
|
1300
|
-
${
|
1297
|
+
${e.renderFnOrArray(n)}
|
1301
1298
|
</div>
|
1302
|
-
`;return
|
1299
|
+
`;return e.renderFnOrArrayOrCurry(r,s)}function ye(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r?.proxyRef??{value:null},l=r=>t.html`
|
1303
1300
|
<div
|
1304
|
-
${(0,
|
1305
|
-
class="lyco-dialog-title ${
|
1301
|
+
${(0,n.ref)(e=>{e?(c.value=e,s.bind(e)):s.unbindAll()})}
|
1302
|
+
class="lyco-dialog-title ${a}"
|
1306
1303
|
style="
|
1307
1304
|
padding: 16px 24px;
|
1308
1305
|
font-size: 20px;
|
1309
1306
|
font-weight: 500;
|
1310
1307
|
line-height: 1.6;
|
1311
1308
|
letter-spacing: 0.0075em;
|
1312
|
-
${
|
1309
|
+
${o}
|
1313
1310
|
"
|
1314
1311
|
>
|
1315
|
-
${
|
1312
|
+
${e.renderFn(r)}
|
1316
1313
|
</div>
|
1317
|
-
`;return
|
1314
|
+
`;return e.renderFnOrCurry(i,l)}function be(t){return e.renderFnOrArray(t)}exports.$Html=be,exports.AbsoluteBox=A,exports.AcrylicBar=j,exports.AspectRatio=M,exports.AutoFitGrid=N,exports.AvatarStack=P,exports.Badge=F,exports.Canvas=L,exports.Card=R,exports.Center=z,exports.Column=m,exports.ColumnSplit=C,exports.Combobox=oe,exports.Container=B,exports.Dialog=he,exports.DialogActions=ge,exports.DialogButton=_e,exports.DialogContent=ve,exports.DialogPlacement=ue,exports.DialogTitle=ye,exports.Divider=V,exports.Flex=h,exports.FlowItem=g,exports.FooterLayout=H,exports.ForEach=U,exports.Grid=_,exports.GridBreakpoint=W,exports.GridCol=v,exports.GridItem=y,exports.GridRow=b,exports.HeroSection=G,exports.Hidden=K,exports.LightboxContainer=p,exports.List=q,exports.ListGroup=J,exports.ListItem=ee,exports.Overlay=Y,exports.PositionContainer=X,exports.Progress=se,exports.Row=x,exports.RowSplit=w,exports.ScrollBar=T,exports.SideBarContainer=E,exports.SizedBox=te,exports.SkeletonLoader=ne,exports.Spacer=re,exports.Spinner=ce,exports.Sticky=Z,exports.Swiper=D,exports.SwitchInput=k,exports.Table=Q,exports.Virtualizer=f,exports.VirtualizerController=c,exports.WaterFlow=S,exports.WithTooltip=le,exports.Wrap=ie,exports.ZStack=ae;
|
1318
1315
|
//# sourceMappingURL=index.cjs.js.map
|