@ehfuse/overlay-scrollbar 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -43,5 +43,5 @@
43
43
  from { transform: rotate(0deg); }
44
44
  to { transform: rotate(360deg); }
45
45
  }
46
- `,document.head.appendChild(r),()=>{let a=document.getElementById(e);a&&a.remove()}},[]),(0,M.jsxs)("div",{ref:ge,className:`overlay-scrollbar-wrapper ${f}`,onMouseLeave:ht,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...h},children:[rt&&(0,M.jsx)("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${E-44}px)`,transition:te?"transform 0.15s ease-out":E===0?"transform 0.2s ease-out":"none",width:36,height:36,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:te?1:Math.min(oe*1.5,1)},children:te?(0,M.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:(0,M.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:Ne,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):(0,M.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{transform:`rotate(${oe*270}deg)`,opacity:oe>=1?1:.6},children:(0,M.jsx)("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:Ne})})}),(0,M.jsx)("div",{ref:i,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:Tt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:G?"none":"auto",...C},children:(0,M.jsx)("div",{ref:Y,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...b},children:H})}),$&&re&&(n.overflowY??!0)&&(0,M.jsxs)("div",{ref:q,className:"overlay-scrollbar-track",onMouseEnter:()=>{y(),Z.current=setTimeout(()=>{T(!0),Z.current=null},100)},onMouseLeave:()=>{we(),F||g(c.delay)},style:{position:"absolute",top:0,right:0,width:`${k}px`,height:"100%",opacity:ve?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,M.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),bt(e)},style:{position:"absolute",top:U?`${w.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-w.width)/2}px`,width:`${w.width}px`,height:U?`calc(100% - ${w.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,M.jsx)("div",{ref:ee,className:"overlay-scrollbar-thumb",onMouseDown:mt,onMouseEnter:()=>Ue(!0),onMouseLeave:()=>Ue(!1),style:{position:"absolute",top:`${(U?v+n.margin*2:n.margin)+lt}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${Math.max(ue,Re)}px`,backgroundColor:_e||F?w.hoverColor:w.color,opacity:_e||F?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),$&&re&&U&&(0,M.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:gt,onMouseEnter:()=>xe("up"),onMouseLeave:()=>xe(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${v}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(v*.75,8)}px`,color:ye==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ve?ye==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),$&&re&&U&&(0,M.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:vt,onMouseEnter:()=>xe("down"),onMouseLeave:()=>xe(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${v}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(v*.75,8)}px`,color:ye==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ve?ye==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),$&&X&&at&&(n.overflowX??!0)&&(0,M.jsxs)("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{y(),Z.current=setTimeout(()=>{T(!0),Z.current=null},100)},onMouseLeave:()=>{we(),_||g(c.delay)},style:{position:"absolute",bottom:`${ut}px`,left:0,width:"100%",height:`${k}px`,opacity:ve?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,M.jsx)("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),xt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(k-v)/2}px`,left:`${n.margin}px`,right:re?n.alignment==="outside"?`${k-n.margin}px`:`${k}px`:`${n.margin}px`,height:`${v}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,M.jsx)("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:yt,onMouseEnter:()=>qe(!0),onMouseLeave:()=>qe(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(k-v)/2}px`,left:`${n.margin+De}px`,right:re?n.alignment==="outside"?`${k-n.margin}px`:`${k}px`:"auto",maxWidth:re?n.alignment==="outside"?`calc(100% - ${n.margin+De+k-n.margin}px)`:`calc(100% - ${n.margin+De+k}px)`:"none",width:`${Math.max(Le,50)}px`,height:`${v}px`,backgroundColor:Ye||_?w.hoverColor:w.color,opacity:Ye||_?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]})]})}),ze=zt;
46
+ `,document.head.appendChild(r),()=>{let a=document.getElementById(e);a&&a.remove()}},[]),(0,M.jsxs)("div",{ref:ge,className:`overlay-scrollbar-wrapper ${f}`,onMouseLeave:ht,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...h},children:[rt&&(0,M.jsx)("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${E-56}px)`,transition:te?"transform 0.15s ease-out":E===0?"transform 0.2s ease-out":"none",width:48,height:48,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:te?1:Math.min(oe*1.5,1)},children:te?(0,M.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:(0,M.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:Ne,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):(0,M.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",style:{transform:`rotate(${oe*270}deg)`,opacity:oe>=1?1:.6},children:(0,M.jsx)("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:Ne})})}),(0,M.jsx)("div",{ref:i,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:Tt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:G?"none":"auto",...C},children:(0,M.jsx)("div",{ref:Y,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...b},children:H})}),$&&re&&(n.overflowY??!0)&&(0,M.jsxs)("div",{ref:q,className:"overlay-scrollbar-track",onMouseEnter:()=>{y(),Z.current=setTimeout(()=>{T(!0),Z.current=null},100)},onMouseLeave:()=>{we(),F||g(c.delay)},style:{position:"absolute",top:0,right:0,width:`${k}px`,height:"100%",opacity:ve?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,M.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),bt(e)},style:{position:"absolute",top:U?`${w.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-w.width)/2}px`,width:`${w.width}px`,height:U?`calc(100% - ${w.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,M.jsx)("div",{ref:ee,className:"overlay-scrollbar-thumb",onMouseDown:mt,onMouseEnter:()=>Ue(!0),onMouseLeave:()=>Ue(!1),style:{position:"absolute",top:`${(U?v+n.margin*2:n.margin)+lt}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${Math.max(ue,Re)}px`,backgroundColor:_e||F?w.hoverColor:w.color,opacity:_e||F?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),$&&re&&U&&(0,M.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:gt,onMouseEnter:()=>xe("up"),onMouseLeave:()=>xe(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${v}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(v*.75,8)}px`,color:ye==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ve?ye==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),$&&re&&U&&(0,M.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:vt,onMouseEnter:()=>xe("down"),onMouseLeave:()=>xe(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(k-v)/2}px`,width:`${v}px`,height:`${v}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(v*.75,8)}px`,color:ye==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:ve?ye==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),$&&X&&at&&(n.overflowX??!0)&&(0,M.jsxs)("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{y(),Z.current=setTimeout(()=>{T(!0),Z.current=null},100)},onMouseLeave:()=>{we(),_||g(c.delay)},style:{position:"absolute",bottom:`${ut}px`,left:0,width:"100%",height:`${k}px`,opacity:ve?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,M.jsx)("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),xt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(k-v)/2}px`,left:`${n.margin}px`,right:re?n.alignment==="outside"?`${k-n.margin}px`:`${k}px`:`${n.margin}px`,height:`${v}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,M.jsx)("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:yt,onMouseEnter:()=>qe(!0),onMouseLeave:()=>qe(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(k-v)/2}px`,left:`${n.margin+De}px`,right:re?n.alignment==="outside"?`${k-n.margin}px`:`${k}px`:"auto",maxWidth:re?n.alignment==="outside"?`calc(100% - ${n.margin+De+k-n.margin}px)`:`calc(100% - ${n.margin+De+k}px)`:"none",width:`${Math.max(Le,50)}px`,height:`${v}px`,backgroundColor:Ye||_?w.hoverColor:w.color,opacity:Ye||_?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]})]})}),ze=zt;
47
47
  //# sourceMappingURL=index.js.map