UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: glass-сайдбар, popup рабочей области и полировка layout

This commit is contained in:
DCCONSTRUCTIONS
2026-04-19 17:23:12 +03:00
parent 4ba06307ed
commit b46390ccdd
27 changed files with 589 additions and 133 deletions
@@ -45,6 +45,22 @@ export const useExpandableSearch = (options?: UseExpandableSearchOptions) => {
// Outside click detection
useOutsideClickDetector(containerRef, handleOutsideClick);
useEffect(() => {
if (!isOpen) return;
const handlePointerDown = (event: PointerEvent) => {
const target = event.target as Node | null;
if (!target) return;
if (containerRef.current?.contains(target)) return;
handleClose();
};
document.addEventListener("pointerdown", handlePointerDown, true);
return () => {
document.removeEventListener("pointerdown", handlePointerDown, true);
};
}, [isOpen, handleClose]);
// Track keyboard shortcuts that trigger focus (Cmd+F / Ctrl+F)
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {