@ehfuse/overlay-scrollbar 1.7.25 → 1.7.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,EAMV,SAAS,EAKZ,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAGD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AA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,EAAE,mBAAmB,CAAC;IAGpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAAC;CAC/C;AAGD,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,mBAAmB;IAChC,kBAAkB,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACxB;AAUD,QAAA,MAAM,gBAAgB,mGA2hErB,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
package/dist/index.esm.js CHANGED
@@ -38,5 +38,5 @@ import{useRef as O,useEffect as W,useState as g,useCallback as v,useMemo as he,f
38
38
  height: 0 !important;
39
39
  }
40
40
  ${l}::-webkit-scrollbar-track { display: none !important; }
41
- ${l}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]);let{normalizedContainerStyle:Qt,normalizedContentStyle:Jt,bottomSpacerHeight:xt}=he(()=>{let e=tt(f),t=tt(c);return{normalizedContainerStyle:e.style,normalizedContentStyle:t.style,bottomSpacerHeight:e.spacerHeight+t.spacerHeight}},[f,c]);return We("div",{ref:Fe,className:`overlay-scrollbar-wrapper ${r}`,onMouseLeave:Xt,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...s},children:[It&&R("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${Ne-68}px)`,transition:Le?"transform 0.15s ease-out":Ne===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:Le?1:Math.min(_e*1.5,1)},children:Le?R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:R("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:nt,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${_e*270}deg)`,opacity:_e>=1?1:.6},children:R("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:nt})})}),R("div",{ref:a,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Zt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...Qt},children:We("div",{ref:ge,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...Jt},children:[M,xt>0&&R("div",{className:"overlay-scrollbar-bottom-spacer","aria-hidden":"true",style:{flex:"0 0 auto",height:xt}})]})}),ae&&ce&&(n.overflowY??!0)&&We("div",{ref:ve,className:"overlay-scrollbar-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),_||y(u.delay)},style:{position:"absolute",top:0,right:0,width:`${I}px`,height:"100%",opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Yt(e)},style:{position:"absolute",top:X?`${E.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-E.width)/2}px`,width:`${E.width}px`,height:X?`calc(100% - ${E.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{ref:Pt,className:"overlay-scrollbar-thumb",onMouseDown:qt,onMouseEnter:()=>at(!0),onMouseLeave:()=>at(!1),style:{position:"absolute",top:`${(X?x+n.margin*2:n.margin)+Ot}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${Math.max(ye,Ge)}px`,backgroundColor:it||_?E.hoverColor:E.color,opacity:it||_?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-up-arrow",onClick:jt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="up"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="up"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-down-arrow",onClick:Gt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="down"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="down"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ae&&Me&&zt&&(n.overflowX??!0)&&We("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),U||y(u.delay)},style:{position:"absolute",bottom:`${Ft}px`,left:0,width:"100%",height:`${I}px`,opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Vt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:`${n.margin}px`,height:`${x}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:Kt,onMouseEnter:()=>dt(!0),onMouseLeave:()=>dt(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin+je}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:"auto",maxWidth:ce?n.alignment==="outside"?`calc(100% - ${n.margin+je+I-n.margin}px)`:`calc(100% - ${n.margin+je+I}px)`:"none",width:`${Math.max(Ye,50)}px`,height:`${x}px`,backgroundColor:ut||U?E.hoverColor:E.color,opacity:ut||U?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&R("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>{be(!1),a.current?.scrollTo({top:0,behavior:"smooth"})},onPointerDown:()=>be(!0),onPointerUp:()=>be(!1),onPointerLeave:()=>be(!1),onPointerCancel:()=>be(!1),style:{position:"absolute",[Ht]:ot,bottom:ot,zIndex:1200,width:He,height:He,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:Lt,color:Dt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Be?Rt?1:Ae:0,pointerEvents:Be?"auto":"none",transition:Be?"opacity 0.15s ease":"opacity 0.45s ease"},children:R("svg",{width:Math.round(He*.5),height:Math.round(He*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R("polyline",{points:"18 15 12 9 6 15"})})})]})}),Mt=xo;export{Mt as OverlayScrollbar,Mt as default};
41
+ ${l}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]);let{normalizedContainerStyle:Qt,normalizedContentStyle:Jt,bottomSpacerHeight:xt}=he(()=>{let e=tt(f),t=tt(c);return{normalizedContainerStyle:e.style,normalizedContentStyle:t.style,bottomSpacerHeight:e.spacerHeight+t.spacerHeight}},[f,c]);return We("div",{ref:Fe,className:`overlay-scrollbar-wrapper ${r}`,onMouseLeave:Xt,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...s},children:[It&&R("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${Ne-68}px)`,transition:Le?"transform 0.15s ease-out":Ne===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:Le?1:Math.min(_e*1.5,1)},children:Le?R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:R("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:nt,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):R("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${_e*270}deg)`,opacity:_e>=1?1:.6},children:R("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:nt})})}),R("div",{ref:a,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Zt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...Qt},children:We("div",{ref:ge,className:"overlay-scrollbar-content",style:{flex:"1 1 auto",display:"flex",flexDirection:"column",boxSizing:"border-box",...Jt},children:[M,xt>0&&R("div",{className:"overlay-scrollbar-bottom-spacer","aria-hidden":"true",style:{flex:"0 0 auto",height:xt}})]})}),ae&&ce&&(n.overflowY??!0)&&We("div",{ref:ve,className:"overlay-scrollbar-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),_||y(u.delay)},style:{position:"absolute",top:0,right:0,width:`${I}px`,height:"100%",opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Yt(e)},style:{position:"absolute",top:X?`${E.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-E.width)/2}px`,width:`${E.width}px`,height:X?`calc(100% - ${E.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{ref:Pt,className:"overlay-scrollbar-thumb",onMouseDown:qt,onMouseEnter:()=>at(!0),onMouseLeave:()=>at(!1),style:{position:"absolute",top:`${(X?x+n.margin*2:n.margin)+Ot}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${Math.max(ye,Ge)}px`,backgroundColor:it||_?E.hoverColor:E.color,opacity:it||_?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-up-arrow",onClick:jt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="up"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="up"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ae&&ce&&X&&R("div",{className:"overlay-scrollbar-down-arrow",onClick:Gt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(I-x)/2}px`,width:`${x}px`,height:`${x}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(x*.75,8)}px`,color:Re==="down"?F.hoverColor:F.color,userSelect:"none",zIndex:1001,opacity:De?Re==="down"?F.hoverOpacity:F.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ae&&Me&&zt&&(n.overflowX??!0)&&We("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{w(),oe.current=setTimeout(()=>{C(!0),oe.current=null},100)},onMouseLeave:()=>{Ie(),U||y(u.delay)},style:{position:"absolute",bottom:`${Ft}px`,left:0,width:"100%",height:`${I}px`,opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&R("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Vt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:`${n.margin}px`,height:`${x}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),R("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:Kt,onMouseEnter:()=>dt(!0),onMouseLeave:()=>dt(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(I-x)/2}px`,left:`${n.margin+je}px`,right:ce?n.alignment==="outside"?`${I-n.margin}px`:`${I}px`:"auto",maxWidth:ce?n.alignment==="outside"?`calc(100% - ${n.margin+je+I-n.margin}px)`:`calc(100% - ${n.margin+je+I}px)`:"none",width:`${Math.max(Ye,50)}px`,height:`${x}px`,backgroundColor:ut||U?E.hoverColor:E.color,opacity:ut||U?E.hoverOpacity:E.opacity,borderRadius:`${E.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&R("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>{be(!1),a.current?.scrollTo({top:0,behavior:"smooth"})},onPointerDown:()=>be(!0),onPointerUp:()=>be(!1),onPointerLeave:()=>be(!1),onPointerCancel:()=>be(!1),style:{position:"absolute",[Ht]:ot,bottom:ot,zIndex:1200,width:He,height:He,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:Lt,color:Dt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Be?Rt?1:Ae:0,pointerEvents:Be?"auto":"none",transition:Be?"opacity 0.15s ease":"opacity 0.45s ease"},children:R("svg",{width:Math.round(He*.5),height:Math.round(He*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:R("polyline",{points:"18 15 12 9 6 15"})})})]})}),Mt=xo;export{Mt as OverlayScrollbar,Mt as default};
42
42
  //# sourceMappingURL=index.esm.js.map