Rifinisce l'interfaccia su safe area, materiali, tipografia e accessibilità.

Nessun cambio di funzionalità: solo resa, accessibilità e correzioni al layout
su iPhone.

- Aggiunge `viewport-fit=cover`: senza, su iOS `env(safe-area-inset-*)` valeva 0
  e il margine per la barra gesture già presente nella bottom nav non aveva
  effetto. Aggiunge il margine superiore su hero, PageHeader e header dello
  scout, che in modalità standalone finivano sotto il notch.
- Attiva il tema scuro sulla preferenza di sistema e ne riscrive i valori:
  l'accento resta il rosso del brand (prima diventava grigio-blu) e i token
  semantici che mancavano ora ci sono. `theme-color` ha una tinta per tema.
- Sposta il feedback dal rilascio alla pressione su Button, bottom nav e comandi
  principali; aggiunge l'anello di focus da tastiera in `@layer base`, che
  mancava su tutti i bottoni scritti a mano fuori da components/ui/.
- Rende la bottom nav una superficie traslucida con sfumatura di scorrimento al
  posto della riga netta, alleggerisce il velo dei drawer e sostituisce l'alone
  rosso delle ombre con ombre neutre.
- Introduce una scala tipografica in rem con crenatura e interlinea per taglia,
  al posto dei 109 `text-[Npx]` fissi che non scalavano con l'impostazione di
  testo del sistema.
- Porta a 44px le aree di tocco dei comandi piccoli, mostra uno scheletro di
  pagina al posto della schermata bianca in home e profilo, conserva le
  dissolvenze con movimento ridotto e aggiunge il supporto a
  `prefers-reduced-transparency` e `prefers-contrast`.
- Anima l'apertura delle sezioni a tendina con Radix Collapsible, già fra le
  dipendenze, al posto di un montaggio secco.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Opus 5 committed 2026-09-04 21:59:14 +02:00
1 parent 952f7b43d3
commit f3b22583ed
30 files changed
+555 -202

No files matched your search

+15 -22
View File
@@ -30,7 +30,7 @@ import {
function RuoloBadge({ ruolo }: { ruolo: string }) {
return (
<span className="inline-flex items-center rounded-full bg-accent px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-accent-foreground">
<span className="inline-flex items-center rounded-full bg-accent px-2 py-0.5 text-3xs font-bold uppercase tracking-wide text-accent-foreground">
{ruolo}
</span>
);
@@ -125,7 +125,7 @@ function Squadra() {
<span className="block truncate text-sm font-bold leading-tight">{g.nome}</span>
<span className="mt-1 flex items-center gap-2">
<RuoloBadge ruolo={g.ruolo} />
<span className="text-[11px] text-muted-foreground">
<span className="text-2xs text-muted-foreground">
{g.numero ? `#${g.numero}` : "n° da definire"}
</span>
</span>
@@ -136,7 +136,7 @@ function Squadra() {
const Icon = b.def.icon;
return (
<span key={b.def.id} className="cursor-help" title={b.def.nome}>
<Icon className={cn("h-3 w-3", gradoMeta[b.grado!].text)} />
<Icon className={cn("h-3.5 w-3.5", gradoMeta[b.grado!].text)} />
</span>
);
})}
@@ -170,14 +170,14 @@ function Squadra() {
].map((s) => (
<div key={s.l} className="rounded-2xl bg-secondary p-2.5 text-center">
<p className="font-display text-xl leading-none">{s.v}</p>
<p className="mt-1 text-[10px] font-semibold uppercase text-muted-foreground">
<p className="mt-1 text-3xs font-semibold uppercase text-muted-foreground">
{s.l}
</p>
</div>
))}
</div>
<p className="mt-4 text-[11px] font-bold uppercase tracking-wide text-muted-foreground">
<p className="mt-4 text-2xs font-bold uppercase tracking-wide text-muted-foreground">
Badge sbloccati · {collezioneBadge(g).ottenuti}/{collezioneBadge(g).totali}
</p>
{sbloccati.length === 0 ? (
@@ -194,18 +194,13 @@ function Squadra() {
<div className={cn("rounded-2xl p-2.5 ring-1", meta.bg, meta.ring)}>
<Icon className={cn("h-4 w-4", meta.text)} />
<p className="mt-1 text-xs font-bold leading-tight">{b.def.nome}</p>
<p className="text-[10px] text-muted-foreground">
<p className="text-3xs text-muted-foreground">
{b.valore} {b.def.unita}
{b.prossimaSoglia
? ` · ${b.prossimaSoglia} per ${gradoMeta[b.prossimo!].label.toLowerCase()}`
: ""}
</p>
<p
className={cn(
"mt-1.5 text-[10px] font-bold uppercase",
meta.text,
)}
>
<p className={cn("mt-1.5 text-3xs font-bold uppercase", meta.text)}>
{meta.label}
</p>
</div>
@@ -241,7 +236,7 @@ function Squadra() {
type="button"
onClick={() => setCriterio(c.id)}
className={cn(
"min-w-0 flex-1 truncate rounded-full px-1.5 py-1.5 text-center text-[10px] font-bold uppercase transition-colors",
"min-w-0 flex-1 truncate rounded-full px-1.5 py-1.5 text-center text-3xs font-bold uppercase transition-colors",
criterio === c.id
? "bg-accent text-accent-foreground shadow-pop"
: "bg-secondary text-muted-foreground",
@@ -264,7 +259,7 @@ function Squadra() {
{g.nome}
{i === 0 ? <Crown className="ml-1 inline h-3.5 w-3.5 text-warning" /> : null}
</p>
<p className="truncate text-[11px] text-muted-foreground">
<p className="truncate text-2xs text-muted-foreground">
#{g.numero} · {g.ruolo} · {g.streak} presenze consecutive
</p>
</div>
@@ -290,7 +285,7 @@ function Squadra() {
<div className="mb-3 rounded-3xl bg-hero p-4 text-primary-foreground shadow-card">
<div className="flex items-end justify-between gap-3">
<div>
<p className="text-[11px] font-semibold uppercase tracking-wide text-primary-foreground/60">
<p className="text-2xs font-semibold uppercase tracking-wide text-primary-foreground/60">
Progresso collettivo
</p>
<p className="font-display text-4xl leading-none">
@@ -326,7 +321,7 @@ function Squadra() {
</div>
<span
className={cn(
"rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide",
"rounded-full px-2 py-0.5 text-3xs font-bold uppercase tracking-wide",
fatto
? "bg-success text-success-foreground"
: "bg-secondary text-muted-foreground",
@@ -341,7 +336,7 @@ function Squadra() {
{o.scadenza ? ` · entro il ${formatData(o.scadenza)}` : ""}
</p>
<p className="mt-1 text-xs font-semibold text-accent">{microcopyObiettivo(o)}</p>
<p className="mt-0.5 text-[11px] text-muted-foreground">{o.impatto}</p>
<p className="mt-0.5 text-2xs text-muted-foreground">{o.impatto}</p>
</Reveal>
);
})}
@@ -358,9 +353,7 @@ function Squadra() {
<div className="flex items-center gap-2">
<Icon className="h-5 w-5 text-accent" />
<p className="text-sm font-bold leading-tight">{b.nome}</p>
<p className="ml-auto text-[10px] text-muted-foreground">
{descrizioneSoglie(b)}
</p>
<p className="ml-auto text-3xs text-muted-foreground">{descrizioneSoglie(b)}</p>
</div>
<div className="mt-2 grid grid-cols-3 gap-1.5">
{gradiOrdine.map((grado) => {
@@ -376,11 +369,11 @@ function Squadra() {
key={grado}
className={cn("rounded-2xl p-2 text-center ring-1", meta.bg, meta.ring)}
>
<p className={cn("text-[10px] font-bold uppercase", meta.text)}>
<p className={cn("text-3xs font-bold uppercase", meta.text)}>
{meta.label}
</p>
<p className="font-display text-lg leading-none">{b.soglie[grado]}</p>
<p className="text-[10px] text-muted-foreground">
<p className="text-3xs text-muted-foreground">
{quanti}/{rosa.length}
</p>
</div>