fix broken dropzone placeholder

This commit is contained in:
Nate Kelley 2025-04-10 14:30:01 -06:00
parent 8359d1bcad
commit 4f6fa5e7aa
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 13 additions and 14 deletions

View File

@ -11,8 +11,8 @@ const itemVariants = cva(
{ {
variants: { variants: {
size: { size: {
sm: 'w-[8px] h-[12px]', sm: 'w-2 h-3',
default: 'w-[18px] h-[12px]' default: 'w-4.5 h-3'
} }
} }
} }
@ -25,9 +25,9 @@ const dotVariants = cva('bg-border transition-colors duration-100', {
default: '' default: ''
}, },
type: { type: {
bar: 'w-[18px] h-[12px] rounded-sm', bar: 'w-4.5 h-3 rounded-sm',
line: 'w-[18px] h-[4px] rounded-sm', line: 'w-4.5 h-1 rounded-sm',
scatter: 'w-[12px] h-[12px] rounded-full' scatter: 'w-3 h-3 rounded-full'
} }
}, },
@ -35,17 +35,17 @@ const dotVariants = cva('bg-border transition-colors duration-100', {
{ {
size: 'sm', size: 'sm',
type: 'bar', type: 'bar',
className: 'w-[8px] h-[8px] rounded-[1.5px]' className: 'w-2 h-2 rounded-[1.5px]'
}, },
{ {
size: 'sm', size: 'sm',
type: 'line', type: 'line',
className: 'w-[8px] h-[2px] rounded-1.5px' className: 'w-2 h-0.5 rounded-1.5px'
}, },
{ {
size: 'sm', size: 'sm',
type: 'scatter', type: 'scatter',
className: 'w-[8px] h-[8px]' className: 'w-2 h-2'
} }
] ]
}); });

View File

@ -211,10 +211,9 @@ const DropzonePlaceholder: React.FC<{
return ( return (
<div <div
className={cn( className={cn(
'pointer-events-none absolute top-0 bottom-0 h-full w-[4px] rounded-lg transition-opacity duration-200', 'bg-nav-item-hover pointer-events-none absolute top-0 bottom-0 z-[1] h-full w-1 rounded-lg transition-opacity duration-200',
'bg-nav-item-hover z-[1]',
isDropzoneActives && 'placeholder', isDropzoneActives && 'placeholder',
active && 'bg-primary! opacity-100' active && 'bg-primary! z-10 opacity-100'
)} )}
style={memoizedStyle} style={memoizedStyle}
/> />
@ -231,7 +230,7 @@ const ColumnSash: React.FC<{
return ( return (
<div <div
className={cn( className={cn(
'grid-column-sash h-full w-[4px] rounded-lg', 'grid-column-sash h-full w-1 rounded-lg',
'z-10 transition-colors duration-200 ease-in-out', 'z-10 transition-colors duration-200 ease-in-out',
allowEdit ? 'hover:bg-border' : 'hidden', allowEdit ? 'hover:bg-border' : 'hidden',
active ? 'bg-border' : '', active ? 'bg-border' : '',

View File

@ -167,7 +167,7 @@ const ResizeRowHandle: React.FC<{
className={cn( className={cn(
!readOnly && 'hover:bg-border cursor-row-resize', !readOnly && 'hover:bg-border cursor-row-resize',
showActive && 'bg-primary! z-10 opacity-100', showActive && 'bg-primary! z-10 opacity-100',
'h-[4px] w-full rounded-sm transition-colors duration-200 ease-in-out select-none', 'h-1 w-full rounded-sm transition-colors duration-200 ease-in-out select-none',
!top && 'dragger absolute' !top && 'dragger absolute'
)} )}
style={memoizedStyle} style={memoizedStyle}

View File

@ -32,7 +32,7 @@ const PopoverRoot: React.FC<PopoverProps> = ({ children, trigger = 'click', ...p
const content = const content =
trigger === 'hover' ? ( trigger === 'hover' ? (
<div className="relative" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}> <div className="relative" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
<div className="absolute -inset-[4px]" /> <div className="absolute -inset-1" />
<div className="relative z-10">{children}</div> <div className="relative z-10">{children}</div>
</div> </div>
) : ( ) : (