mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 03:58:27 +00:00
fix(webui): prevent white focus outline on folder and file cards during selection
This commit is contained in:
@@ -223,8 +223,8 @@ export function FileCard({
|
||||
}
|
||||
}}
|
||||
className={cn(
|
||||
'group relative flex cursor-pointer select-none flex-col overflow-hidden rounded-xl border border-border bg-card transition-all hover:border-primary h-full m-1',
|
||||
isSelected && 'outline-1 outline-primary border-primary',
|
||||
'group relative flex cursor-pointer select-none flex-col overflow-hidden rounded-xl border border-border bg-card transition-all hover:border-primary h-full m-1 outline-none focus:outline-none focus-visible:outline-none',
|
||||
(isSelected || isChecked) && 'outline-1 outline-primary border-primary',
|
||||
showDropFeedback && 'border-primary outline-1 outline-primary',
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -183,12 +183,12 @@ export function FileListItem({
|
||||
e.preventDefault()
|
||||
}
|
||||
}}
|
||||
className="group cursor-pointer select-none transition-colors whitespace-nowrap flex w-full"
|
||||
className="group cursor-pointer select-none transition-colors whitespace-nowrap flex w-full outline-none focus:outline-none focus-visible:outline-none"
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
'px-4 py-2 sticky left-0 z-10 transition-colors border-r shrink-0',
|
||||
isSelected ? 'bg-muted' : 'bg-card group-hover:bg-muted',
|
||||
isSelected || isChecked ? 'bg-muted' : 'bg-card group-hover:bg-muted',
|
||||
)}
|
||||
style={{
|
||||
width: columnSizing?.['name'] || 300,
|
||||
|
||||
@@ -272,7 +272,7 @@ export function FolderCard({
|
||||
: undefined
|
||||
}
|
||||
className={cn(
|
||||
'group relative w-full max-w-[340px] select-none cursor-pointer isolate flex flex-col items-center h-full',
|
||||
'group relative w-full max-w-[340px] select-none cursor-pointer isolate flex flex-col items-center h-full outline-none focus:outline-none focus-visible:outline-none',
|
||||
)}
|
||||
>
|
||||
<div className="absolute inset-0 z-10 pointer-events-none">
|
||||
|
||||
@@ -139,7 +139,7 @@ function ListRow({
|
||||
: undefined
|
||||
}
|
||||
className={cn(
|
||||
'group border-b border-border transition-colors hover:bg-primary/20 absolute top-0 left-0 w-full flex flex-col',
|
||||
'group border-b border-border transition-colors hover:bg-primary/20 absolute top-0 left-0 w-full flex flex-col outline-none focus:outline-none focus-visible:outline-none',
|
||||
isSelected && 'bg-primary/10',
|
||||
showDropFeedback && 'bg-primary/10',
|
||||
isTopOver && 'border-t-2 border-t-primary',
|
||||
|
||||
Reference in New Issue
Block a user