Merge branch 'dev' into feat/sh-240-week-day-nav

This commit is contained in:
Arthur Bassi 2026-08-20 09:44:33 -03:00 • committed by GitHub
commit 1a54cbd2af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 5 deletions

View file

@ -0,0 +1,25 @@
import { useState } from "react";
import { BrandLockup } from "@/components/common/brand-lockup";
import { cn } from "@/lib/utils";
export type AuthBrandLogoProps = {
className?: string;
};
export function AuthBrandLogo({ className }: AuthBrandLogoProps) {
const [useFallback, setUseFallback] = useState(false);
if (useFallback) {
return <BrandLockup className={className} />;
}
return (
<img
src="/seahaven-logo.svg"
alt="Seahaven"
onError={() => setUseFallback(true)}
className={cn("mx-auto block h-10 w-auto", className)}
/>
);
}

View file

@ -11,14 +11,17 @@ export type AuthCardHeaderProps = ComponentPropsWithoutRef<"div"> & {
export function AuthCardHeader({ title, subtitle, className, ...props }: AuthCardHeaderProps) { export function AuthCardHeader({ title, subtitle, className, ...props }: AuthCardHeaderProps) {
return ( return (
<div className={cn(className)} {...props}> <div className={cn(className)} {...props}>
<Text variant="title" className="m-0 text-center font-bold text-foreground"> <Text
variant="display"
className="m-0 text-center !font-bold ![font-size:var(--text-xl)] !leading-[1.5] text-foreground"
>
{title} {title}
</Text> </Text>
<Text <Text
variant="description" variant="description"
tone="muted" tone="muted"
when={Boolean(subtitle)} when={Boolean(subtitle)}
className="mb-6! mt-1.5! text-center font-normal" className="mb-6! mt-1.5! text-center font-normal ![font-size:var(--text-base)]"
> >
{subtitle} {subtitle}
</Text> </Text>

View file

@ -1,10 +1,10 @@
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
import { AuthBrandLogo } from "@/app/(auth)/_components/auth-brand-logo";
import { AuthCardHeader } from "@/app/(auth)/_components/auth-card-header"; import { AuthCardHeader } from "@/app/(auth)/_components/auth-card-header";
import { AuthPageShell } from "@/app/(auth)/_components/auth-page-shell"; import { AuthPageShell } from "@/app/(auth)/_components/auth-page-shell";
import { LoginForm } from "@/app/(auth)/_components/login-form"; import { LoginForm } from "@/app/(auth)/_components/login-form";
import { BrandLockup } from "@/components/common/brand-lockup";
import { Text } from "@/components/ui/text"; import { Text } from "@/components/ui/text";
import { loginSchema, type LoginFormValues } from "@/domain/auth/schemas/login-schema"; import { loginSchema, type LoginFormValues } from "@/domain/auth/schemas/login-schema";
import { useAuthContext } from "@/providers/auth-context"; import { useAuthContext } from "@/providers/auth-context";
@ -27,7 +27,7 @@ export default function LoginPage() {
return ( return (
<AuthPageShell> <AuthPageShell>
<BrandLockup className="mb-8" /> <AuthBrandLogo className="mb-8" />
<AuthCardHeader title="Welcome back" subtitle="Sign in to your account" /> <AuthCardHeader title="Welcome back" subtitle="Sign in to your account" />
<LoginForm <LoginForm
register={register} register={register}

View file

@ -18,7 +18,7 @@ type FormFieldProps = FormControlProps & {
const appearanceClassName: Record<FormFieldAppearance, string> = { const appearanceClassName: Record<FormFieldAppearance, string> = {
default: "gap-1", default: "gap-1",
auth: "gap-1.5 [&_.MuiFormLabel-root]:mb-0 [&_.MuiFormLabel-root]:!font-sans [&_.MuiFormLabel-root]:![font-size:var(--text-base-sm)] [&_.MuiFormLabel-root]:!font-medium [&_.MuiFormLabel-root]:!leading-[1.5] [&_.MuiFormLabel-root]:!normal-case [&_.MuiFormLabel-root]:!tracking-normal", auth: "gap-1.5 [&_.MuiFormLabel-root]:mb-0 [&_.MuiFormLabel-root]:!font-sans [&_.MuiFormLabel-root]:![font-size:var(--text-base-sm)] [&_.MuiFormLabel-root]:!font-medium [&_.MuiFormLabel-root]:!leading-[1.5] [&_.MuiFormLabel-root]:!normal-case [&_.MuiFormLabel-root]:!text-foreground [&_.MuiFormLabel-root]:!tracking-normal",
}; };
const appearanceLabelClassName: Record<FormFieldAppearance, string> = { const appearanceLabelClassName: Record<FormFieldAppearance, string> = {