From 7a3b31b9578ef280e25c88f2657a62bf7272f216 Mon Sep 17 00:00:00 2001 From: "Zimin A.N." Date: Mon, 11 May 2026 15:39:23 +0300 Subject: [PATCH] feat(mobile): Sidebar drawer <1024px + Modal/Sheet fullscreen <880px MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per design_handoff_ordinis_mdm/README.md responsive table (line 464-465): - ≤1024px: Sidebar becomes overlay drawer (hamburger в TopBar) - ≤880px: Drawers и modals fullscreen (100vw × 100dvh, no border-radius) Implementation: src/components/layout/Sidebar.tsx - Extracted SidebarContent (logo + nav + user block) для DRY - Desktop wraps SidebarContent в hidden lg:flex aside - New — Sheet с тем же содержимым, 260px wide, slides from left - SidebarLink принимает onClick → drawer auto-close при navigate src/components/layout/TopBar.tsx - Optional onMenuClick prop — рендерит hamburger button (Menu icon из lucide-react) с lg:hidden - VersionBadge скрыт + + + ) +} + +/** + * SidebarContent — внутренности (logo + nav + user). Используется в desktop + * rail (Sidebar) И в mobile drawer (MobileSidebar) — DRY. + */ +function SidebarContent({ + sections, + auth, + onNavigate, +}: { + sections: NavSection[] + auth: ReturnType + /** Called после клика на nav item — для close drawer в mobile mode. */ + onNavigate?: () => void +}) { + return ( + <> {/* Logo block */} -
- +
+ ORDINIS
{/* Nav sections */}