feat(web): green, warm-paper theme with a matching dark mode

- New light palette (warm off-white background, white cards, grocery green
  primary) and a green-tinted charcoal dark mode; larger radius.
- Items render as one grouped card; bought items live in a collapsible
  "Comprados · N" card with a muted header.
- Pill-shaped add-item input (shadcn input-group) with a round add button.
- Progress summary ("N pendientes · M comprados" + bar) above the input.
- Active bottom-nav item uses the primary color with a dot.
- theme-color metas and PWA manifest follow the new background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-10-19 14:55:48 -03:00
parent 123601939c
commit 812d4b7170
13 changed files with 399 additions and 167 deletions

View File

@@ -1,11 +1,15 @@
import { zodResolver } from '@hookform/resolvers/zod'
import { PlusIcon } from 'lucide-react'
import { PlusIcon, SearchIcon } from 'lucide-react'
import { useForm } from 'react-hook-form'
import { z } from 'zod'
import { Button } from '@/components/ui/button'
import { Field, FieldError } from '@/components/ui/field'
import { Input } from '@/components/ui/input'
import {
InputGroup,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
} from '@/components/ui/input-group'
import { useCreateItem } from '@/hooks/use-items'
import { ApiError } from '@/lib/api-client'
@@ -70,23 +74,36 @@ export function CreateItemForm({ listId, autoFocus = false }: CreateItemFormProp
})
return (
<form onSubmit={onSubmit} className="flex items-start gap-2">
<Field className="flex-1" data-invalid={!!form.formState.errors.name}>
<Input
id={NEW_ITEM_INPUT_ID}
aria-label="Nuevo artículo"
autoComplete="off"
placeholder="Añade un artículo…"
autoFocus={autoFocus}
{...form.register('name')}
/>
<FieldError errors={[form.formState.errors.name]} />
<form onSubmit={onSubmit}>
<Field data-invalid={!!form.formState.errors.name}>
<InputGroup className="bg-card h-14 rounded-full shadow-xs dark:bg-card">
<InputGroupAddon className="pl-5">
<SearchIcon className="size-5" />
</InputGroupAddon>
<InputGroupInput
id={NEW_ITEM_INPUT_ID}
aria-label="Nuevo artículo"
aria-invalid={!!form.formState.errors.name}
autoComplete="off"
placeholder="Añadir un artículo…"
autoFocus={autoFocus}
className="text-base"
{...form.register('name')}
/>
<InputGroupAddon align="inline-end" className="pr-2">
<InputGroupButton
type="submit"
variant="default"
size="icon-sm"
aria-label="Agregar"
className="size-10 rounded-full"
>
<PlusIcon className="size-5" strokeWidth={2.5} />
</InputGroupButton>
</InputGroupAddon>
</InputGroup>
<FieldError errors={[form.formState.errors.name]} className="px-5" />
</Field>
<Button type="submit">
<PlusIcon />
Agregar
</Button>
</form>
)
}