@ehfuse/overlay-scrollbar 1.7.15 → 1.7.16

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.esm.js CHANGED
@@ -38,5 +38,5 @@ import{useRef as O,useEffect as A,useState as h,useCallback as m,useMemo as Me,f
38
38
  height: 0 !important;
39
39
  }
40
40
  ${n}::-webkit-scrollbar-track { display: none !important; }
41
- ${n}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]),Qe("div",{ref:Ae,className:`overlay-scrollbar-wrapper ${M}`,onMouseLeave:At,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...L},children:[Ct&&H("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${ze-56}px)`,transition:Ce?"transform 0.15s ease-out":ze===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:Ce?1:Math.min(Fe*1.5,1)},children:Ce?H("svg",{width:"28",height:"28",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:H("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:Je,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):H("svg",{width:"28",height:"28",viewBox:"0 0 24 24",style:{transform:`rotate(${Fe*270}deg)`,opacity:Fe>=1?1:.6},children:H("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:Je})})}),H("div",{ref:i,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Yt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...E},children:H("div",{ref:he,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...d},children:z})}),ie&&ae&&(r.overflowY??!0)&&Qe("div",{ref:me,className:"overlay-scrollbar-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),_||b(a.delay)},style:{position:"absolute",top:0,right:0,width:`${R}px`,height:"100%",opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ft(e)},style:{position:"absolute",top:Y?`${w.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-w.width)/2}px`,width:`${w.width}px`,height:Y?`calc(100% - ${w.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{ref:St,className:"overlay-scrollbar-thumb",onMouseDown:zt,onMouseEnter:()=>ot(!0),onMouseLeave:()=>ot(!1),style:{position:"absolute",top:`${(Y?g+r.margin*2:r.margin)+Lt}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${Math.max(be,Xe)}px`,backgroundColor:tt||_?w.hoverColor:w.color,opacity:tt||_?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-up-arrow",onClick:Nt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-down-arrow",onClick:Bt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ie&&Ee&&Dt&&(r.overflowX??!0)&&Qe("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),U||b(a.delay)},style:{position:"absolute",bottom:`${Pt}px`,left:0,width:"100%",height:`${R}px`,opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ut(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:`${r.margin}px`,height:`${g}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:_t,onMouseEnter:()=>it(!0),onMouseLeave:()=>it(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin+Ye}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:"auto",maxWidth:ae?r.alignment==="outside"?`calc(100% - ${r.margin+Ye+R-r.margin}px)`:`calc(100% - ${r.margin+Ye+R}px)`:"none",width:`${Math.max(Ue,50)}px`,height:`${g}px`,backgroundColor:lt||U?w.hoverColor:w.color,opacity:lt||U?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&H("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>i.current?.scrollTo({top:0,behavior:"smooth"}),style:{position:"absolute",[We]:pe,bottom:pe,zIndex:1200,width:Se,height:Se,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:wt,color:Tt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Oe?1:0,transform:Oe?"translateY(0) scale(1)":"translateY(8px) scale(0.9)",pointerEvents:Oe?"auto":"none",transition:"opacity 0.2s ease, transform 0.2s ease"},children:H("svg",{width:Math.round(Se*.5),height:Math.round(Se*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:H("polyline",{points:"18 15 12 9 6 15"})})})]})}),xt=ao;export{xt as OverlayScrollbar,xt as default};
41
+ ${n}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]),Qe("div",{ref:Ae,className:`overlay-scrollbar-wrapper ${M}`,onMouseLeave:At,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...L},children:[Ct&&H("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${ze-68}px)`,transition:Ce?"transform 0.15s ease-out":ze===0?"transform 0.2s ease-out":"none",width:60,height:60,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:Ce?1:Math.min(Fe*1.5,1)},children:Ce?H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:H("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:Je,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${Fe*270}deg)`,opacity:Fe>=1?1:.6},children:H("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:Je})})}),H("div",{ref:i,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Yt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...E},children:H("div",{ref:he,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...d},children:z})}),ie&&ae&&(r.overflowY??!0)&&Qe("div",{ref:me,className:"overlay-scrollbar-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),_||b(a.delay)},style:{position:"absolute",top:0,right:0,width:`${R}px`,height:"100%",opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ft(e)},style:{position:"absolute",top:Y?`${w.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-w.width)/2}px`,width:`${w.width}px`,height:Y?`calc(100% - ${w.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{ref:St,className:"overlay-scrollbar-thumb",onMouseDown:zt,onMouseEnter:()=>ot(!0),onMouseLeave:()=>ot(!1),style:{position:"absolute",top:`${(Y?g+r.margin*2:r.margin)+Lt}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${Math.max(be,Xe)}px`,backgroundColor:tt||_?w.hoverColor:w.color,opacity:tt||_?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-up-arrow",onClick:Nt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-down-arrow",onClick:Bt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ie&&Ee&&Dt&&(r.overflowX??!0)&&Qe("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),U||b(a.delay)},style:{position:"absolute",bottom:`${Pt}px`,left:0,width:"100%",height:`${R}px`,opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ut(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:`${r.margin}px`,height:`${g}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:_t,onMouseEnter:()=>it(!0),onMouseLeave:()=>it(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin+Ye}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:"auto",maxWidth:ae?r.alignment==="outside"?`calc(100% - ${r.margin+Ye+R-r.margin}px)`:`calc(100% - ${r.margin+Ye+R}px)`:"none",width:`${Math.max(Ue,50)}px`,height:`${g}px`,backgroundColor:lt||U?w.hoverColor:w.color,opacity:lt||U?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&H("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>i.current?.scrollTo({top:0,behavior:"smooth"}),style:{position:"absolute",[We]:pe,bottom:pe,zIndex:1200,width:Se,height:Se,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:wt,color:Tt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Oe?1:0,transform:Oe?"translateY(0) scale(1)":"translateY(8px) scale(0.9)",pointerEvents:Oe?"auto":"none",transition:"opacity 0.2s ease, transform 0.2s ease"},children:H("svg",{width:Math.round(Se*.5),height:Math.round(Se*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:H("polyline",{points:"18 15 12 9 6 15"})})})]})}),xt=ao;export{xt as OverlayScrollbar,xt as default};
42
42
  //# sourceMappingURL=index.esm.js.map