@@ -103,7 +103,7 @@ declare const __BUILD_COMMIT__: string;
103103declare const __BUILD_DATE__ : string ;
104104
105105const LI_STYLE =
106- "block rounded-lg text-kumo-strong hover:text-kumo-default hover:bg-kumo-tint p-2 my-[.05rem] cursor-pointer transition-colors no-underline relative z-10" ;
106+ "block rounded-lg text-kumo-strong hover:text-kumo-default hover:bg-kumo-tint p-2 my-[.05rem] cursor-pointer transition-colors no-underline relative z-10 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand " ;
107107const LI_ACTIVE_STYLE = "font-semibold text-kumo-default bg-kumo-tint" ;
108108
109109interface SidebarNavProps {
@@ -127,6 +127,9 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
127127
128128 const toggleSidebar = ( ) => setSidebarOpen ( ( v ) => ! v ) ;
129129 const toggleMobileMenu = ( ) => setMobileMenuOpen ( ( v ) => ! v ) ;
130+ const preventPointerFocus = ( e : React . MouseEvent < HTMLElement > ) => {
131+ e . preventDefault ( ) ;
132+ } ;
130133
131134 // Keyboard shortcut: Cmd+K / Ctrl+K + custom event from headers
132135 useEffect ( ( ) => {
@@ -195,7 +198,7 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
195198 < >
196199 < button
197200 onClick = { ( ) => setSearchOpen ( true ) }
198- className = "mb-3 flex w-full items-center gap-2 rounded-lg bg-kumo-control px-3 py-2 text-sm text-kumo-subtle ring-1 ring-kumo-hairline transition-all hover:ring-kumo-hairline"
201+ className = "mb-3 flex w-full items-center gap-2 rounded-lg bg-kumo-control px-3 py-2 text-sm text-kumo-subtle ring-1 ring-kumo-line transition-all hover:ring-kumo-hairline focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand "
199202 >
200203 < MagnifyingGlassIcon size = { 16 } className = "shrink-0" />
201204 < span > Search...</ span >
@@ -206,6 +209,7 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
206209 < li key = { item . href } >
207210 < a
208211 href = { item . href }
212+ onMouseDown = { preventPointerFocus }
209213 className = { cn (
210214 LI_STYLE ,
211215 isActivePath ( activePath , item . href ) && LI_ACTIVE_STYLE ,
@@ -223,7 +227,7 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
223227 { /* Components Section */ }
224228 < button
225229 type = "button"
226- className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint"
230+ className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand "
227231 onClick = { ( ) => setComponentsOpen ( ! componentsOpen ) }
228232 >
229233 < span > Components</ span >
@@ -237,14 +241,15 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
237241 </ button >
238242 < ul
239243 className = { cn (
240- "flex flex-col gap-px overflow-hidden transition-all duration-300 ease-in-out mt-1 " ,
244+ "mt-1 flex flex-col gap-px overflow-y- hidden overflow-x-visible transition-all duration-300 ease-in-out" ,
241245 componentsOpen ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0" ,
242246 ) }
243247 >
244248 { componentItems . map ( ( item ) => (
245249 < li key = { item . href } >
246250 < a
247251 href = { item . href }
252+ onMouseDown = { preventPointerFocus }
248253 className = { cn (
249254 LI_STYLE ,
250255 "pl-4" ,
@@ -262,7 +267,7 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
262267 < div className = "mb-4" >
263268 < button
264269 type = "button"
265- className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint"
270+ className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand "
266271 onClick = { ( ) => setChartsOpen ( ! chartsOpen ) }
267272 >
268273 < span > Charts</ span >
@@ -276,14 +281,15 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
276281 </ button >
277282 < ul
278283 className = { cn (
279- "flex flex-col gap-px overflow-hidden transition-all duration-300 ease-in-out mt-1 " ,
284+ "mt-1 flex flex-col gap-px overflow-y- hidden overflow-x-visible transition-all duration-300 ease-in-out" ,
280285 chartsOpen ? "max-h-[500px] opacity-100" : "max-h-0 opacity-0" ,
281286 ) }
282287 >
283288 { chartItems . map ( ( item ) => (
284289 < li key = { item . href } >
285290 < a
286291 href = { item . href }
292+ onMouseDown = { preventPointerFocus }
287293 className = { cn (
288294 LI_STYLE ,
289295 "pl-4" ,
@@ -301,7 +307,7 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
301307 { /* Blocks Section */ }
302308 < button
303309 type = "button"
304- className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint"
310+ className = "flex w-full cursor-pointer items-center justify-between rounded-lg px-2 py-2 text-sm font-medium text-kumo-default transition-colors hover:bg-kumo-tint focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand "
305311 onClick = { ( ) => setBlocksOpen ( ! blocksOpen ) }
306312 >
307313 < span > Blocks</ span >
@@ -315,14 +321,15 @@ export function SidebarNav({ currentPath }: SidebarNavProps) {
315321 </ button >
316322 < ul
317323 className = { cn (
318- "flex flex-col gap-px overflow-hidden transition-all duration-300 ease-in-out mt-1 " ,
324+ "mt-1 flex flex-col gap-px overflow-y- hidden overflow-x-visible transition-all duration-300 ease-in-out" ,
319325 blocksOpen ? "max-h-[500px] opacity-100" : "max-h-0 opacity-0" ,
320326 ) }
321327 >
322328 { blockItems . map ( ( item ) => (
323329 < li key = { item . href } >
324330 < a
325331 href = { item . href }
332+ onMouseDown = { preventPointerFocus }
326333 className = { cn (
327334 LI_STYLE ,
328335 "pl-4" ,
0 commit comments