@ehfuse/overlay-scrollbar 1.6.10 → 1.6.12

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
@@ -38,13 +38,5 @@
38
38
  .overlay-scrollbar-container .ehfuse-editor-content::-webkit-scrollbar-thumb:hover {
39
39
  background: #a1a1a1 !important;
40
40
  }
41
- .overlay-scrollbar-container:focus {
42
- outline: 2px solid rgba(0, 123, 255, 0.3);
43
- outline-offset: -2px;
44
- }
45
- .overlay-scrollbar-container:focus-visible {
46
- outline: 2px solid rgba(0, 123, 255, 0.5);
47
- outline-offset: -2px;
48
- }
49
41
  `,document.head.appendChild(r),()=>{let s=document.getElementById(e);s&&s.remove()}},[]),(0,S.jsxs)("div",{ref:se,className:`overlay-scrollbar-wrapper ${v}`,onMouseLeave:at,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"hidden",...y},children:[(0,S.jsx)("div",{ref:c,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:ht,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:P||W?"none":"auto",...E},children:(0,S.jsx)("div",{ref:B,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...C},children:T})}),K&&Y&&(n.overflowY??!0)&&(0,S.jsxs)("div",{ref:X,className:"overlay-scrollbar-track",onMouseEnter:()=>{f(),U.current=setTimeout(()=>{x(!0),U.current=null},100)},onMouseLeave:()=>{ne(),A||m(i.delay)},style:{position:"absolute",top:0,right:0,width:`${M}px`,height:"100%",opacity:ee?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,S.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),st(e)},style:{position:"absolute",top:$?`${b.width+n.margin*2}px`:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(M-b.width)/2}px`,width:`${b.width}px`,height:$?`calc(100% - ${b.width*2+n.margin*4}px)`:`calc(100% - ${n.margin*2}px)`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,S.jsx)("div",{ref:Ge,className:"overlay-scrollbar-thumb",onMouseDown:ct,onMouseEnter:()=>Ae(!0),onMouseLeave:()=>Ae(!1),style:{position:"absolute",top:`${($?h+n.margin*2:n.margin)+Ze}px`,right:n.alignment==="outside"?"0px":`${(M-h)/2}px`,width:`${h}px`,height:`${Math.max(Z,ge)}px`,backgroundColor:Ie||A?b.hoverColor:b.color,opacity:Ie||A?b.hoverOpacity:b.opacity,borderRadius:`${b.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),K&&Y&&$&&(0,S.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:ut,onMouseEnter:()=>oe("up"),onMouseLeave:()=>oe(null),style:{position:"absolute",top:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(M-h)/2}px`,width:`${h}px`,height:`${h}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(h*.75,8)}px`,color:te==="up"?R.hoverColor:R.color,userSelect:"none",zIndex:1001,opacity:ee?te==="up"?R.hoverOpacity:R.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),K&&Y&&$&&(0,S.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:dt,onMouseEnter:()=>oe("down"),onMouseLeave:()=>oe(null),style:{position:"absolute",bottom:`${n.margin}px`,right:n.alignment==="outside"?"0px":`${(M-h)/2}px`,width:`${h}px`,height:`${h}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(h*.75,8)}px`,color:te==="down"?R.hoverColor:R.color,userSelect:"none",zIndex:1001,opacity:ee?te==="down"?R.hoverOpacity:R.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),K&&et&&(n.overflowX??!0)&&(0,S.jsxs)("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{f(),U.current=setTimeout(()=>{x(!0),U.current=null},100)},onMouseLeave:()=>{ne(),O||m(i.delay)},style:{position:"absolute",bottom:`${rt}px`,left:0,width:"100%",height:`${M}px`,opacity:ee?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[n.visible&&(0,S.jsx)("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),mt(e)},style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(M-h)/2}px`,left:`${n.margin}px`,right:Y?n.alignment==="outside"?`${M-n.margin}px`:`${M}px`:`${n.margin}px`,height:`${h}px`,backgroundColor:n.color,borderRadius:`${n.radius}px`,cursor:"pointer"}}),(0,S.jsx)("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:pt,onMouseEnter:()=>ze(!0),onMouseLeave:()=>ze(!1),style:{position:"absolute",bottom:n.alignment==="outside"?"0px":`${(M-h)/2}px`,left:`${n.margin+me}px`,right:Y?n.alignment==="outside"?`${M-n.margin}px`:`${M}px`:"auto",maxWidth:Y?n.alignment==="outside"?`calc(100% - ${n.margin+me+M-n.margin}px)`:`calc(100% - ${n.margin+me+M}px)`:"none",width:`${Math.max(pe,50)}px`,height:`${h}px`,backgroundColor:$e||O?b.hoverColor:b.color,opacity:$e||O?b.hoverOpacity:b.opacity,borderRadius:`${b.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]})]})}),ke=kt;
50
42
  //# sourceMappingURL=index.js.map