feat: add brand assets, design tokens and light/dark theme

- Use real logo/isotype SVGs across app and emails
- Token-based color system aligned with landing (brand scale + semantic tokens)
- ThemeProvider (light/dark/system) with header toggle and settings card
- Embed logo in transactional emails; centralize email colors
This commit is contained in:
Jose Selesan
2026-09-16 17:35:24 -03:00
parent 35ab3f0c06
commit 6100c998be
34 changed files with 435 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
import type { ReactNode } from 'react'
import { Logo, LogoIcon } from '../brand'
import { Logo } from '../brand'
export type AuthShellProps = {
title: string
@@ -11,11 +11,10 @@ export function AuthShell({ title, subtitle, children }: AuthShellProps) {
return (
<div className="flex min-h-dvh items-center justify-center bg-background px-4 py-8">
<div className="w-full max-w-sm">
<div className="mb-6 flex items-center justify-center gap-2">
<LogoIcon className="size-9" />
<Logo className="text-xl" />
<div className="mb-6 flex items-center justify-center">
<Logo className="h-10" />
</div>
<div className="rounded-xl border border-border bg-white p-6 shadow-sm">
<div className="rounded-xl border border-border bg-surface p-6 shadow-sm">
<h1 className="text-xl font-bold text-primary">{title}</h1>
{subtitle ? <p className="mt-1 text-sm text-foreground/60">{subtitle}</p> : null}
<div className="mt-5">{children}</div>

View File

@@ -1,23 +1,35 @@
import { forwardRef, type HTMLAttributes } from 'react'
import { forwardRef, type SVGProps } from 'react'
import { cn } from '../../lib/utils'
export type LogoProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
className?: string
}
export type LogoProps = SVGProps<SVGSVGElement>
export const Logo = forwardRef<HTMLSpanElement, LogoProps>(
export const Logo = forwardRef<SVGSVGElement, LogoProps>(
({ className, ...props }, ref) => {
return (
<span
<svg
ref={ref}
className={cn('font-extrabold text-primary select-none', className)}
viewBox="250 42 624 206"
role="img"
aria-label="Gruperly"
className={cn('h-6 w-auto', className)}
{...props}
>
gruperl
<span className="text-accent">y</span>
</span>
<title>Gruperly</title>
<path
className="fill-brand-night dark:fill-brand-cloud"
d="m 358,111 v 65.55 q 0,9.75 -2.4,17.55 -2.4,7.95 -7.5,13.35 -4.95,5.55 -12.6,8.55 -7.65,3 -18.15,3 -4.35,0 -9.3,-0.75 -4.8,-0.75 -9.6,-2.25 -4.65,-1.5 -9,-3.75 -4.35,-2.25 -7.8,-5.1 L 292,193.2 q 5.25,4.95 11.85,7.5 6.6,2.7 13.35,2.7 6.45,0 10.8,-1.95 4.5,-1.8 7.05,-5.1 2.7,-3.3 3.75,-7.8 1.2,-4.5 1.2,-9.9 v -5.25 h -0.3 q -3.9,5.25 -10.05,8.1 -6,2.7 -13.5,2.7 -8.1,0 -14.7,-3 -6.6,-3 -11.25,-8.1 -4.5,-5.1 -7.05,-11.85 -2.55,-6.9 -2.55,-14.55 0,-7.8 2.4,-14.7 2.55,-6.9 7.05,-12 4.65,-5.1 11.1,-8.1 6.6,-3 14.7,-3 7.65,0 14.25,3.15 6.6,3.15 10.5,9.75 h 0.3 V 111 Z m -38.4,12.6 q -4.95,0 -8.85,1.8 -3.75,1.8 -6.45,4.95 -2.55,3 -4.05,7.2 -1.35,4.2 -1.35,9 0,4.35 1.35,8.4 1.5,4.05 4.05,7.35 2.7,3.15 6.45,5.1 3.9,1.95 8.7,1.95 4.95,0 8.85,-1.8 4.05,-1.95 6.75,-5.1 2.85,-3.15 4.35,-7.2 1.5,-4.2 1.5,-8.7 0,-4.65 -1.5,-8.85 -1.5,-4.2 -4.35,-7.35 -2.7,-3.15 -6.6,-4.95 -3.9,-1.8 -8.85,-1.8 z m 55,-12.6 h 17.25 v 12 h 0.3 q 3,-6.3 8.4,-10.2 5.4,-3.9 12.6,-3.9 1.05,0 2.25,0.15 1.2,0 2.1,0.3 v 16.5 q -1.8,-0.45 -3.15,-0.6 -1.2,-0.15 -2.4,-0.15 -6.15,0 -9.9,2.25 -3.75,2.25 -5.85,5.4 -2.1,3.15 -2.85,6.45 -0.75,3.3 -0.75,5.25 V 183 h -18 z m 115.30004,72 h -17.1 v -11.55 h -0.3 q -2.4,5.4 -8.4,9.6 -5.85,4.05 -13.95,4.05 -7.05,0 -12.15,-2.4 -4.95,-2.55 -8.25,-6.6 -3.15,-4.05 -4.65,-9.3 -1.5,-5.25 -1.5,-10.8 v -45 h 18 v 39.9 q 0,3.15 0.45,6.6 0.45,3.45 1.95,6.3 1.5,2.7 4.05,4.5 2.7,1.8 7.05,1.8 4.2,0 7.35,-1.65 3.3,-1.8 5.25,-4.5 2.1,-2.7 3.15,-6.15 1.05,-3.6 1.05,-7.2 V 111 h 18 z m 33.85011,-72 v 10.05 h 0.45 q 1.35,-2.1 3.45,-4.2 2.25,-2.25 5.4,-3.9 3.15,-1.8 7.05,-2.85 4.05,-1.2 9,-1.2 7.65,0 14.1,3 6.45,2.85 11.1,7.95 4.65,5.1 7.2,12 2.55,6.9 2.55,14.85 0,7.95 -2.55,15 -2.4,6.9 -7.05,12.15 -4.5,5.1 -11.1,8.25 -6.45,3 -14.7,3 -7.65,0 -14.1,-3.15 -6.3,-3.15 -9.75,-8.55 h -0.3 V 219 h -18 V 111 Z m 42,35.7 q 0,-4.2 -1.35,-8.25 -1.2,-4.2 -3.75,-7.5 -2.55,-3.3 -6.45,-5.25 -3.9,-2.1 -9.15,-2.1 -4.95,0 -8.85,2.1 -3.9,2.1 -6.75,5.4 -2.7,3.3 -4.2,7.5 -1.35,4.2 -1.35,8.4 0,4.2 1.35,8.4 1.5,4.05 4.2,7.35 2.85,3.3 6.75,5.4 3.9,1.95 8.85,1.95 5.25,0 9.15,-2.1 3.9,-2.1 6.45,-5.4 2.55,-3.3 3.75,-7.5 1.35,-4.2 1.35,-8.4 z m 81.3999,-6.9 q 0,-3.45 -1.05,-6.6 -0.9,-3.15 -3,-5.55 -2.1,-2.4 -5.4,-3.75 -3.15,-1.5 -7.5,-1.5 -8.1,0 -13.8,4.95 -5.55,4.8 -6.15,12.45 z m 18,8.1 q 0,1.2 0,2.4 0,1.2 -0.15,2.4 h -54.75 q 0.3,3.9 1.95,7.2 1.8,3.15 4.65,5.55 2.85,2.25 6.45,3.6 3.6,1.35 7.5,1.35 6.75,0 11.4,-2.4 4.65,-2.55 7.65,-6.9 l 12,9.6 q -10.65,14.4 -30.9,14.4 -8.4,0 -15.45,-2.55 -7.05,-2.7 -12.3,-7.5 -5.1,-4.8 -8.1,-11.7 -2.85,-7.05 -2.85,-15.9 0,-8.7 2.85,-15.75 3,-7.2 8.1,-12.15 5.1,-5.1 12,-7.8 7.05,-2.85 15.15,-2.85 7.5,0 13.8,2.55 6.45,2.4 11.1,7.35 4.65,4.8 7.2,12.15 2.7,7.2 2.7,16.95 z M 677.54997,111 h 17.25 v 12 h 0.3 q 3,-6.3 8.4,-10.2 5.4,-3.9 12.6,-3.9 1.05,0 2.25,0.15 1.2,0 2.1,0.3 v 16.5 q -1.8,-0.45 -3.15,-0.6 -1.2,-0.15 -2.4,-0.15 -6.15,0 -9.9,2.25 -3.75,2.25 -5.85,5.4 -2.1,3.15 -2.85,6.45 -0.75,3.3 -0.75,5.25 V 183 h -18 z m 49.90007,-41.4 h 18 V 183 h -18 z"
/>
<path
className="fill-brand-night dark:fill-brand-cloud"
d="M755 111 H767.4 Q771.3 111 772.6 114.8 C776.5 126.2 781.3 137.6 787.6 148.9 Q789.2 151.9 785.8 152.5 C781.9 153.2 777.8 153.4 774 152.9 Q770.2 152.4 768.5 149 C762.9 138 757.9 126.7 753.1 115.3 Q751.3 111 755 111 Z"
/>
<path
className="fill-brand-celeste"
d="M812.5 111 H824.4 Q828.8 111 827.2 115.1 C817.2 140.2 807.3 167 796.4 194.6 C790.1 210.7 783.2 219 767.2 219 C764.2 219 761.5 218.7 759 218.2 Q756.6 217.7 757 214.7 L758 205.1 Q758.3 202.4 761.1 203 C763.1 203.5 765.2 203.9 767 203.9 C774.9 203.9 778 198.7 781.6 189.4 C791.9 162.5 800.1 138.1 808.4 114 Q809.5 111 812.5 111 Z"
/>
</svg>
)
},
)
Logo.displayName = 'Logo'
Logo.displayName = 'Logo'

View File

@@ -10,30 +10,24 @@ export const LogoIcon = forwardRef<SVGSVGElement, LogoIconProps>(
return (
<svg
ref={ref}
viewBox="0 0 40 40"
fill="none"
viewBox="718.5 93 144 144"
role="img"
aria-label="Gruperly"
className={cn('size-8', className)}
{...props}
>
<rect
width="40"
height="40"
rx="10"
className="fill-accent-soft"
<title>Gruperly</title>
<path
className="fill-brand-night dark:fill-brand-cloud"
d="M755 111 H767.4 Q771.3 111 772.6 114.8 C776.5 126.2 781.3 137.6 787.6 148.9 Q789.2 151.9 785.8 152.5 C781.9 153.2 777.8 153.4 774 152.9 Q770.2 152.4 768.5 149 C762.9 138 757.9 126.7 753.1 115.3 Q751.3 111 755 111 Z"
/>
<path
d="M17 14.5c0-1.4 3-1.4 3 0V27.5c0 3-2.5 6-6.5 6-3.6 0-6-2.1-6-5 0-1.4 3-1.4 3 0 0 1 .6 2 3 2 2 0 3-1.2 3-3V17z"
className="fill-accent"
/>
<path
d="M20 15.5c0-1.4 3-1.4 3 0v6c0 3 2 5 5.5 5 1.4 0 3-1.2 3-3 0-1.4 3-1.4 3 0 0 3-2.6 4.6-6.5 4.6-4 0-5-3-5-6.6v-6z"
className="fill-accent"
className="fill-brand-celeste"
d="M812.5 111 H824.4 Q828.8 111 827.2 115.1 C817.2 140.2 807.3 167 796.4 194.6 C790.1 210.7 783.2 219 767.2 219 C764.2 219 761.5 218.7 759 218.2 Q756.6 217.7 757 214.7 L758 205.1 Q758.3 202.4 761.1 203 C763.1 203.5 765.2 203.9 767 203.9 C774.9 203.9 778 198.7 781.6 189.4 C791.9 162.5 800.1 138.1 808.4 114 Q809.5 111 812.5 111 Z"
/>
</svg>
)
},
)
LogoIcon.displayName = 'LogoIcon'
LogoIcon.displayName = 'LogoIcon'

View File

@@ -6,7 +6,7 @@ export function BottomNav() {
const location = useLocation()
return (
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-border bg-white/95 backdrop-blur lg:hidden">
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-border bg-surface/95 backdrop-blur lg:hidden">
<div className="mx-auto grid max-w-md grid-cols-4">
{NAV_ITEMS.map(({ label, to, icon: Icon }) => {
const isActive = location.pathname === to
@@ -16,7 +16,7 @@ export function BottomNav() {
to={to}
className={cn(
'flex flex-col items-center gap-0.5 py-2.5 text-[11px] font-medium transition-colors',
isActive ? 'text-accent' : 'text-foreground/50 hover:text-primary',
isActive ? 'text-accent-fg' : 'text-foreground/50 hover:text-primary',
)}
>
<Icon

View File

@@ -1,19 +1,38 @@
import { Logo, LogoIcon } from '../brand'
import { Moon, Sun } from 'lucide-react'
import { useTheme } from '../../context/ThemeProvider'
import { Logo } from '../brand'
import { Breadcrumb } from './Breadcrumb'
import { UserMenu } from './UserMenu'
function ThemeToggle() {
const { isDark, setTheme } = useTheme()
return (
<button
type="button"
onClick={() => setTheme(isDark ? 'light' : 'dark')}
aria-label={isDark ? 'Cambiar a tema claro' : 'Cambiar a tema oscuro'}
className="flex size-9 items-center justify-center rounded-full border border-border text-foreground/70 transition-colors hover:bg-primary-soft hover:text-primary"
>
{isDark ? <Sun className="size-4" /> : <Moon className="size-4" />}
</button>
)
}
export function Header() {
return (
<header className="sticky top-0 z-40 h-16 w-full border-b border-border bg-background/90 backdrop-blur">
<div className="mx-auto flex h-full w-full max-w-7xl items-center justify-between px-4 lg:px-6">
<div className="flex min-w-0 items-center">
<a href="/" className="flex items-center gap-2 lg:hidden" aria-label="Gruperly inicio">
<LogoIcon className="size-7" />
<Logo className="text-lg tracking-tight" />
<a href="/" className="flex items-center lg:hidden" aria-label="Gruperly inicio">
<Logo className="h-8" />
</a>
<Breadcrumb />
</div>
<UserMenu />
<div className="flex items-center gap-2">
<ThemeToggle />
<UserMenu />
</div>
</div>
</header>
)

View File

@@ -1,16 +1,15 @@
import { Link, useLocation } from '@tanstack/react-router'
import { cn } from '../../lib/utils'
import { Logo, LogoIcon } from '../brand'
import { Logo } from '../brand'
import { NAV_ITEMS } from './nav-items'
export function Sidebar() {
const location = useLocation()
return (
<aside className="sticky top-16 hidden h-[calc(100dvh-4rem)] w-64 shrink-0 flex-col border-r border-border bg-white px-4 py-6 lg:flex">
<a href="/" className="mb-8 flex items-center gap-2 px-1" aria-label="Gruperly inicio">
<LogoIcon className="size-8" />
<Logo className="text-lg tracking-tight" />
<aside className="sticky top-16 hidden h-[calc(100dvh-4rem)] w-64 shrink-0 flex-col border-r border-border bg-surface px-4 py-6 lg:flex">
<a href="/" className="mb-8 flex items-center px-1" aria-label="Gruperly inicio">
<Logo className="h-10" />
</a>
<nav className="flex flex-col gap-1">
@@ -23,7 +22,7 @@ export function Sidebar() {
className={cn(
'flex items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium transition-colors',
isActive
? 'bg-accent-soft text-accent'
? 'bg-accent-soft text-accent-fg'
: 'text-foreground/60 hover:bg-primary-soft hover:text-primary',
)}
>

View File

@@ -78,15 +78,15 @@ export function UserMenu() {
<div role="dialog" aria-modal="true" className="fixed inset-0 z-50 lg:hidden">
<div
aria-hidden="true"
className="absolute inset-0 animate-fade-in bg-black/20 backdrop-blur-sm"
className="absolute inset-0 animate-fade-in bg-overlay backdrop-blur-sm"
onClick={() => setOpen(false)}
/>
<div className="absolute inset-0 flex animate-fade-in flex-col overflow-y-auto bg-white/90 backdrop-blur">
<div className="absolute inset-0 flex animate-fade-in flex-col overflow-y-auto bg-surface/90 backdrop-blur">
<button
type="button"
onClick={() => setOpen(false)}
aria-label="Cerrar menú"
className="absolute right-4 top-4 z-20 rounded-full bg-white/90 p-2 text-foreground/70 shadow-md backdrop-blur transition-colors hover:bg-white"
className="absolute right-4 top-4 z-20 rounded-full bg-surface/90 p-2 text-foreground/70 shadow-md backdrop-blur transition-colors hover:bg-surface"
>
<X className="size-5" />
</button>
@@ -105,7 +105,7 @@ export function UserMenu() {
</div>
</div>
<div className="w-full space-y-1.5 rounded-2xl border border-border/60 bg-white/90 p-2 shadow-xl backdrop-blur">
<div className="w-full space-y-1.5 rounded-2xl border border-border/60 bg-surface/90 p-2 shadow-xl backdrop-blur">
<Link
role="menuitem"
to="/profile"
@@ -132,7 +132,7 @@ export function UserMenu() {
onClick={handleSignOut}
className={cn(
itemClass,
'w-full justify-center border border-border bg-white/90 py-3.5 shadow-sm backdrop-blur hover:bg-primary-soft',
'w-full justify-center border border-border bg-surface/90 py-3.5 shadow-sm backdrop-blur hover:bg-primary-soft',
)}
>
<LogOut className="size-5 text-foreground/60" />
@@ -147,7 +147,7 @@ export function UserMenu() {
: open ? (
<div
role="menu"
className="absolute right-0 top-full z-50 mt-2 w-60 rounded-xl border border-border bg-white p-1.5 shadow-lg"
className="absolute right-0 top-full z-50 mt-2 w-60 rounded-xl border border-border bg-surface p-1.5 shadow-lg"
>
<div className="px-3 py-2">
<p className="truncate text-sm font-semibold text-primary">{user?.name ?? 'Usuario'}</p>

View File

@@ -35,7 +35,7 @@ export function ConfirmationStep({ group, providerName }: ConfirmationStepProps)
</p>
</header>
<div className="rounded-xl border border-border bg-white p-5">
<div className="rounded-xl border border-border bg-surface p-5">
<div className="flex items-start justify-between gap-3">
<div className="min-w-0">
<h3 className="truncate text-base font-semibold text-primary">{group.name}</h3>

View File

@@ -89,8 +89,8 @@ export function FirstGroupStep({ onBack, onCompleted }: FirstGroupStepProps) {
className={cn(
'h-9 rounded-full border px-3.5 text-sm font-medium transition-colors',
isActive
? 'border-accent bg-accent text-white'
: 'border-border bg-white text-primary hover:bg-primary-soft',
? 'border-accent bg-accent text-on-accent'
: 'border-border bg-surface text-primary hover:bg-primary-soft',
)}
>
{label}
@@ -168,7 +168,7 @@ export function FirstGroupStep({ onBack, onCompleted }: FirstGroupStepProps) {
'rounded-xl border px-3 py-2.5 text-left transition-colors',
isActive
? 'border-accent bg-accent-soft'
: 'border-border bg-white hover:bg-primary-soft',
: 'border-border bg-surface hover:bg-primary-soft',
)}
>
<span

View File

@@ -46,7 +46,7 @@ export function PaymentStep({ initialResult, onConnected, onBack }: PaymentStepP
</header>
<div className="rounded-xl border border-success/30 bg-success-soft p-5 text-center">
<span className="mx-auto flex size-12 items-center justify-center rounded-full bg-white">
<span className="mx-auto flex size-12 items-center justify-center rounded-full bg-surface">
<CheckCircle2 className="size-6 text-success" />
</span>
<p className="mt-3 text-sm font-semibold text-success">Cuenta conectada</p>
@@ -96,7 +96,7 @@ export function PaymentStep({ initialResult, onConnected, onBack }: PaymentStepP
aria-checked={isSelected}
onClick={() => setSelected(provider.value)}
className={cn(
'flex w-full items-center gap-3 rounded-xl border bg-white p-4 text-left transition-colors',
'flex w-full items-center gap-3 rounded-xl border bg-surface p-4 text-left transition-colors',
isSelected
? 'border-accent ring-2 ring-accent/20'
: 'border-border hover:bg-primary-soft',
@@ -123,7 +123,7 @@ export function PaymentStep({ initialResult, onConnected, onBack }: PaymentStepP
<span
className={cn(
'flex size-5 shrink-0 items-center justify-center rounded-full border transition-colors',
isSelected ? 'border-accent bg-accent text-white' : 'border-border',
isSelected ? 'border-accent bg-accent text-on-accent' : 'border-border',
)}
>
{isSelected ? <Check className="size-3" strokeWidth={3} /> : null}

View File

@@ -22,7 +22,7 @@ export function Stepper({ steps, current }: StepperProps) {
<span
className={cn(
'flex size-8 items-center justify-center rounded-full border text-sm font-semibold transition-colors',
isDone && 'border-accent bg-accent text-white',
isDone && 'border-accent bg-accent text-on-accent',
isActive && 'border-accent text-accent ring-4 ring-accent/15',
!isDone && !isActive && 'border-border text-foreground/40',
)}

View File

@@ -41,7 +41,7 @@ export function WelcomeStep({ name, onNext }: WelcomeStepProps) {
{STEPS_TO_SETUP.map(({ icon: Icon, title, description }) => (
<li
key={title}
className="flex items-center gap-3 rounded-xl border border-border bg-white p-4"
className="flex items-center gap-3 rounded-xl border border-border bg-surface p-4"
>
<span className="rounded-lg bg-accent-soft p-2">
<Icon className="size-5 text-accent" />

View File

@@ -22,7 +22,7 @@ export const Avatar = forwardRef<HTMLDivElement, AvatarProps>(
<div
ref={ref}
className={cn(
'flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-accent text-sm font-semibold text-white',
'flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-accent text-sm font-semibold text-on-accent',
className,
)}
{...props}

View File

@@ -10,9 +10,9 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
}
const variants: Record<ButtonVariant, string> = {
primary: 'bg-accent text-white hover:bg-accent-strong',
primary: 'bg-accent text-on-accent hover:bg-accent-strong',
ghost: 'bg-transparent text-primary hover:bg-primary-soft',
outline: 'border border-border bg-white text-primary hover:bg-primary-soft',
outline: 'border border-border bg-surface text-primary hover:bg-primary-soft',
}
const sizes: Record<ButtonSize, string> = {

View File

@@ -11,7 +11,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
<input
ref={ref}
className={cn(
'h-10 w-full rounded-xl border border-border bg-white px-3 text-sm text-primary placeholder:text-foreground/40 transition-colors focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:cursor-not-allowed disabled:opacity-50',
'h-10 w-full rounded-xl border border-border bg-surface px-3 text-sm text-primary placeholder:text-foreground/40 transition-colors focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:cursor-not-allowed disabled:opacity-50',
invalid && 'border-danger focus:border-danger focus:ring-danger/30',
className,
)}