diff --git a/src/app/demo/combined-date-picker/page.tsx b/src/app/demo/combined-date-picker/page.tsx index 4a5bc69..392ed3e 100644 --- a/src/app/demo/combined-date-picker/page.tsx +++ b/src/app/demo/combined-date-picker/page.tsx @@ -1,3 +1,5 @@ +"use client"; + import { Badge } from "@/components/ui/badge"; import { Card, @@ -7,10 +9,19 @@ import { CardTitle, } from "@/components/ui/card"; import { CombinedDatePickerDemo } from "@/components/ui/combined-date-picker-demo"; +import { useIsMobile } from "@/hooks/use-mobile"; export default function CombinedDatePickerDemoPage() { + const isMobile = useIsMobile(); + return ( -
+
Demo Route @@ -19,7 +30,13 @@ export default function CombinedDatePickerDemoPage() {

Date & Time Picker

-

+

Inline date input paired with a locale-aware time picker. The return calendar disables dates before departure, and time fields switch between 24-hour and 12-hour formats automatically. diff --git a/src/app/page.tsx b/src/app/page.tsx index 1d48b9e..7e3803e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -27,6 +27,7 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { useIsMobile } from "@/hooks/use-mobile"; import { getAiCreateOutcome } from "@/lib/ai-create-flow"; import { getAiDisabledMessage, @@ -51,17 +52,14 @@ import { appendImagesDeduped } from "@/lib/multi-image"; import type { CalendarEvent } from "@/lib/types"; import { APP_ACTION_BAR_CLASSES, - APP_HEADER_SURFACE_CLASSES, - APP_NAV_SURFACE_CLASSES, - APP_SECTION_SURFACE_CLASSES, + getAppHeaderSurfaceClasses, + getAppNavSurfaceClasses, + getAppSectionSurfaceClasses, getConnectionBadgeClasses, } from "@/lib/ui-shell-contract"; import { useUserSettings } from "@/lib/user-settings"; import { cn } from "@/lib/utils"; -const APP_FRAME_CLASSES = - "mx-auto flex min-h-screen w-full max-w-6xl flex-col px-4 pb-24 pt-4 sm:px-6 lg:px-8"; - const NAV_BUTTON_CLASSES = "flex-1 gap-2"; const getNavButtonClasses = (isActive: boolean) => @@ -83,6 +81,7 @@ const validateImageFile = (file: File): string | null => { }; export default function HomePage() { + const isMobile = useIsMobile(); const [activeView, setActiveView] = useState<"list" | "settings">("list"); const [events, setEvents] = useState([]); const [dialogOpen, setDialogOpen] = useState(false); @@ -428,6 +427,18 @@ export default function HomePage() { setDialogOpen(true); }; + const appFrameClasses = cn( + "mx-auto flex min-h-screen w-full max-w-6xl flex-col", + isMobile ? "px-4 pb-24 pt-4" : "px-8 py-4", + ); + const appHeaderSurfaceClasses = getAppHeaderSurfaceClasses(isMobile); + const appSectionSurfaceClasses = getAppSectionSurfaceClasses(isMobile); + const appNavSurfaceClasses = getAppNavSurfaceClasses(isMobile); + const mainContentClasses = cn( + "grid items-start gap-4", + isMobile ? "grid-cols-1" : "grid-cols-[minmax(0,0.75fr)_minmax(0,1.25fr)]", + ); + return ( handleImagesSelect([file])} > -

-
+
+

Local Calendar @@ -499,15 +510,15 @@ export default function HomePage() { {activeView === "settings" ? ( ) : ( -

-
-
+
+
+

AI capture @@ -543,8 +554,8 @@ export default function HomePage() {

-
-
+
+

@@ -593,7 +604,7 @@ export default function HomePage() { )} -

) : isAuthenticated ? ( -
+