From 2d738073bf64138f2dd96be8bbdd4e088275594a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Mon, 3 Aug 2026 13:39:21 -0300 Subject: [PATCH] Make app navigation mobile usable --- src/components/DateRangePicker.tsx | 10 ++--- src/components/Layout.tsx | 60 +++++++++++++++++++++--------- src/index.css | 30 +++++++++++++++ 3 files changed, 77 insertions(+), 23 deletions(-) diff --git a/src/components/DateRangePicker.tsx b/src/components/DateRangePicker.tsx index f4b26b9..b4a0580 100644 --- a/src/components/DateRangePicker.tsx +++ b/src/components/DateRangePicker.tsx @@ -94,12 +94,12 @@ const DateRangePicker: React.FC = ({ dateRange, onChange, }; return ( -
+
{/* Date Presets Dropdown */} -
+
{!isSidebarCollapsed && ( - )}
{isSidebarCollapsed && ( -
+
@@ -120,10 +133,10 @@ const Layout = () => {
- {!isSidebarCollapsed && ( + {showSidebarLabels && (
{section.label}
@@ -134,8 +147,9 @@ const Layout = () => { setIsMobileNavOpen(false)} className={`group flex min-h-11 items-center rounded-lg px-3 py-2.5 text-sm transition-all ${ - isSidebarCollapsed ? 'justify-center' : 'gap-3' + isSidebarCollapsed ? 'gap-3 md:justify-center' : 'gap-3' } ${ isActive ? 'bg-brand-primary/12 text-brand-primary font-semibold shadow-sm shadow-brand-primary/10 ring-1 ring-brand-primary/15' @@ -144,7 +158,7 @@ const Layout = () => { title={isSidebarCollapsed ? item.name : undefined} > - {!isSidebarCollapsed && {item.name}} + {showSidebarLabels && {item.name}} ); })} @@ -155,23 +169,33 @@ const Layout = () => {
{/* Main Content */} -
+
{/* Header */} -
-

Painel de Análise

+
+
+ +

Painel de Análise

+
{/* Content Area */} -
+
diff --git a/src/index.css b/src/index.css index a7df43f..0b8e902 100644 --- a/src/index.css +++ b/src/index.css @@ -149,6 +149,36 @@ linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 16rem), transparent; } + + @media (max-width: 767px) { + html, + body, + #root { + min-width: 0; + overflow-x: hidden; + } + + .app-content { + scroll-padding-bottom: 5rem; + -webkit-overflow-scrolling: touch; + } + + .app-content .overflow-x-auto { + overscroll-behavior-x: contain; + scrollbar-width: thin; + scrollbar-color: var(--color-dark-border) transparent; + } + + .app-content .overflow-x-auto::-webkit-scrollbar { + height: 5px; + } + + .app-content input, + .app-content select, + .app-content textarea { + font-size: 16px; + } + } } @layer utilities {