@@ -350,14 +350,15 @@ export const RelationshipEditorWindow: React.FC<RelationshipEditorWindowProps> =
350350 ` } </ style >
351351 < div
352352 ref = { windowRef }
353- className = "fixed bg-black/90 backdrop-blur-xl border border-white/10 rounded-2xl shadow-2xl overflow-hidden z-[60]"
353+ className = "fixed bg-gradient-to-br from-gray-900/95 via-slate-900/95 to-gray-900/95 backdrop-blur-2xl border-2 border-white/20 rounded-3xl shadow-2xl overflow-visible z-[60]"
354354 style = { {
355355 left : `${ position . x } px` ,
356356 top : `${ position . y } px` ,
357357 width : `${ size . width } px` ,
358358 height : `${ size . height } px` ,
359359 maxHeight : 'calc(100vh - 20px)' ,
360- pointerEvents : 'all'
360+ pointerEvents : 'all' ,
361+ boxShadow : '0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1)'
361362 } }
362363 onClick = { ( e ) => e . stopPropagation ( ) }
363364 >
@@ -393,7 +394,7 @@ export const RelationshipEditorWindow: React.FC<RelationshipEditorWindowProps> =
393394
394395 { /* Content */ }
395396 { isExpanded && (
396- < div className = "p-4 space-y-4" >
397+ < div className = "p-4 space-y-4 overflow-y-auto max-h-[calc(100vh-180px)] " >
397398 { /* Status indicator */ }
398399 < div className = "text-center space-y-2" >
399400 { ! canEdit && (
@@ -515,36 +516,40 @@ export const RelationshipEditorWindow: React.FC<RelationshipEditorWindowProps> =
515516 return (
516517 < button
517518 key = { option . type }
518- onClick = { ( ) => handleRelationshipTypeChange ( option . type ) }
519+ onClick = { ( e ) => {
520+ e . stopPropagation ( ) ;
521+ handleRelationshipTypeChange ( option . type ) ;
522+ } }
519523 className = { `
520- group relative p-4 rounded-2xl border-2 transition-all duration-300 transform overflow-hidden
521- hover:scale-110 hover:z-20 hover:-translate-y-1
524+ group relative p-4 rounded-2xl border-2 transition-all duration-300 transform
525+ cursor-pointer hover:scale-110 hover:z-20 hover:-translate-y-1 active:scale-105
522526 ${ isSelected
523527 ? `border-${ config . color } -400/70 bg-gradient-to-br ${ colors . from } ${ colors . via } ${ colors . to } shadow-xl ${ colors . shadow } `
524- : 'border-white/10 bg-gradient-to-br from-white/5 via-transparent to-transparent hover:border-white/40 hover:from-white/15 hover:via-white/8 hover:shadow-lg '
528+ : 'border-white/20 bg-gradient-to-br from-white/8 via-white/4 to-transparent hover:border-white/50 hover:from-white/20 hover:via-white/12 hover:shadow-xl '
525529 }
526530 ` }
527531 style = { {
528532 animation : `fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${ index * 0.04 } s both` ,
533+ pointerEvents : 'auto' ,
529534 ...( isSelected && {
530- boxShadow : `0 0 30px ${ colors . glow } , 0 10px 25px rgba(0,0,0,0.3 )`
535+ boxShadow : `0 0 35px ${ colors . glow } , 0 12px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1 )`
531536 } )
532537 } }
533538 title = { option . description }
534539 >
535540 { isSelected && (
536541 < >
537- < div className = "absolute inset-0 rounded-2xl bg-gradient-to-br from-white/15 via-transparent to-transparent opacity-60 animate-pulse" > </ div >
538- < div className = "absolute -inset-1 bg-gradient-to-r from-transparent via-white/20 to-transparent animate-shimmer" > </ div >
542+ < div className = "absolute inset-0 rounded-2xl bg-gradient-to-br from-white/20 via-transparent to-transparent opacity-70 animate-pulse pointer-events-none " > </ div >
543+ < div className = "absolute -inset-1 bg-gradient-to-r from-transparent via-white/25 to-transparent animate-shimmer pointer-events-none " > </ div >
539544 </ >
540545 ) }
541- < div className = "absolute inset-0 rounded-2xl bg-gradient-to-br from-white/0 via-white/5 to-white/0 opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ div >
542- < div className = "relative flex flex-col items-center space-y-2" >
546+ < div className = "absolute inset-0 rounded-2xl bg-gradient-to-br from-white/0 via-white/10 to-white/0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none " > </ div >
547+ < div className = "relative flex flex-col items-center space-y-2 pointer-events-none " >
543548 < div className = { `transition-all duration-300 ${ isSelected ? 'scale-125 drop-shadow-lg' : 'group-hover:scale-125 group-hover:drop-shadow-lg' } ` } >
544549 { getRelationshipIconElement ( option . type , "h-6 w-6" ) }
545550 </ div >
546551 < span className = { `text-[11px] font-bold text-center leading-tight transition-all duration-300 ${
547- isSelected ? 'text-white drop-shadow-md' : 'text-gray-300 group-hover:text-white group-hover:drop-shadow-md'
552+ isSelected ? 'text-white drop-shadow-md' : 'text-gray-200 group-hover:text-white group-hover:drop-shadow-md'
548553 } `} >
549554 { option . label }
550555 </ span >
@@ -558,22 +563,30 @@ export const RelationshipEditorWindow: React.FC<RelationshipEditorWindowProps> =
558563
559564 { /* Actions */ }
560565 { isEditingMode && (
561- < div className = "pt-4 border-t border-gradient-to-r from-transparent via- white/10 to-transparent space-y-3" >
566+ < div className = "pt-4 border-t border-white/10 space-y-3" >
562567 < button
563- onClick = { handleFlipDirection }
568+ onClick = { ( e ) => {
569+ e . stopPropagation ( ) ;
570+ handleFlipDirection ( ) ;
571+ } }
564572 disabled = { isFlippingEdge }
565- className = "group w-full relative overflow-hidden bg-gradient-to-r from-blue-600/60 via-blue-700/60 to-blue-600/60 hover:from-blue-700/70 hover:via-blue-800/70 hover:to-blue-700/70 text-white py-3 px-4 rounded-xl border-2 border-blue-500/40 hover:border-blue-400/50 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-xl hover:shadow-2xl shadow-blue-500/30 hover:shadow-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-105 backdrop-blur-sm"
573+ className = "group w-full relative overflow-hidden cursor-pointer bg-gradient-to-r from-blue-600/70 via-blue-700/70 to-blue-600/70 hover:from-blue-700/80 hover:via-blue-800/80 hover:to-blue-700/80 active:from-blue-800/90 active:via-blue-900/90 active:to-blue-800/90 text-white py-3.5 px-5 rounded-xl border-2 border-blue-400/50 hover:border-blue-300/60 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-xl hover:shadow-2xl shadow-blue-500/40 hover:shadow-blue-400/50 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-105 active:scale-100 backdrop-blur-sm"
574+ style = { { pointerEvents : isFlippingEdge ? 'none' : 'auto' } }
566575 >
567- < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/15 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ div >
576+ < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none " > </ div >
568577 < Move className = "h-5 w-5 relative z-10" />
569578 < span className = "relative z-10" > { isFlippingEdge ? 'Flipping...' : 'Flip Direction' } </ span >
570579 </ button >
571580
572581 < button
573- onClick = { handleDeleteEdge }
574- className = "group w-full relative overflow-hidden bg-gradient-to-r from-red-600/60 via-red-700/60 to-red-600/60 hover:from-red-700/70 hover:via-red-800/70 hover:to-red-700/70 text-white py-3 px-4 rounded-xl border-2 border-red-500/40 hover:border-red-400/50 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-xl hover:shadow-2xl shadow-red-500/30 hover:shadow-red-500/40 hover:scale-105 backdrop-blur-sm"
582+ onClick = { ( e ) => {
583+ e . stopPropagation ( ) ;
584+ handleDeleteEdge ( ) ;
585+ } }
586+ className = "group w-full relative overflow-hidden cursor-pointer bg-gradient-to-r from-red-600/70 via-red-700/70 to-red-600/70 hover:from-red-700/80 hover:via-red-800/80 hover:to-red-700/80 active:from-red-800/90 active:via-red-900/90 active:to-red-800/90 text-white py-3.5 px-5 rounded-xl border-2 border-red-400/50 hover:border-red-300/60 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-xl hover:shadow-2xl shadow-red-500/40 hover:shadow-red-400/50 hover:scale-105 active:scale-100 backdrop-blur-sm"
587+ style = { { pointerEvents : 'auto' } }
575588 >
576- < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/15 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ div >
589+ < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none " > </ div >
577590 < X className = "h-5 w-5 relative z-10" />
578591 < span className = "relative z-10" > Delete Relationship</ span >
579592 </ button >
@@ -582,13 +595,17 @@ export const RelationshipEditorWindow: React.FC<RelationshipEditorWindowProps> =
582595
583596 { /* Create mode actions */ }
584597 { ! isEditingMode && canEdit && (
585- < div className = "pt-4 border-t border-gradient-to-r from-transparent via- white/10 to-transparent space-y-2" >
598+ < div className = "pt-4 border-t border-white/10 space-y-2" >
586599 < button
587- onClick = { ( ) => onClearSelection ?.( ) }
588- className = "group w-full relative overflow-hidden bg-gradient-to-r from-gray-600/50 via-gray-700/50 to-gray-600/50 hover:from-gray-700/60 hover:via-gray-800/60 hover:to-gray-700/60 text-white py-3 px-4 rounded-xl border-2 border-gray-500/30 hover:border-gray-400/40 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-lg hover:shadow-xl hover:shadow-gray-500/20 hover:scale-105 backdrop-blur-sm"
600+ onClick = { ( e ) => {
601+ e . stopPropagation ( ) ;
602+ onClearSelection ?.( ) ;
603+ } }
604+ className = "group w-full relative overflow-hidden cursor-pointer bg-gradient-to-r from-gray-600/60 via-gray-700/60 to-gray-600/60 hover:from-gray-700/70 hover:via-gray-800/70 hover:to-gray-700/70 active:from-gray-800/80 active:via-gray-900/80 active:to-gray-800/80 text-white py-3.5 px-5 rounded-xl border-2 border-gray-400/40 hover:border-gray-300/50 flex items-center justify-center space-x-2 font-bold transition-all duration-300 shadow-lg hover:shadow-xl hover:shadow-gray-500/30 hover:scale-105 active:scale-100 backdrop-blur-sm"
605+ style = { { pointerEvents : 'auto' } }
589606 >
590- < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" > </ div >
591- < X className = "h-4 w-4 relative z-10" />
607+ < div className = "absolute inset-0 bg-gradient-to-r from-transparent via-white/15 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none " > </ div >
608+ < X className = "h-5 w-5 relative z-10" />
592609 < span className = "relative z-10" > Clear Selection</ span >
593610 </ button >
594611 </ div >
0 commit comments