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