Estende alla card degli eventi il fix delle date su iOS.

Il `min-w-0` di 366928b era finito solo in `ProfiloAmministrativo` perché
`Campo` e le classi degli input erano ricopiati identici in tre file: il
form «Nuovo evento» e la dashboard admin («Data tessera» in `grid-cols-2`)
sfondavano ancora la card. Ora `Campo` e `classiInput` stanno una volta
sola in `ui-bits` e le tre copie spariscono.

La regola CSS che rende ridimensionabili i controlli nativi copre anche
`input[type="time"]`, che nel form eventi sta affiancato alla data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-05 23:41:20 +02:00
co-authored by Claude Opus 5
parent 107407b854
commit 2a1a0839c0
6 changed files with 47 additions and 60 deletions
+6 -17
View File
@@ -3,7 +3,7 @@ import { createFileRoute, Link } from "@tanstack/react-router";
import { ArrowLeft, CalendarPlus, Loader2, Pencil, Trash2 } from "lucide-react";
import { toast } from "sonner";
import { cn } from "@/lib/utils";
import { PageHeader, Section } from "@/components/crapp/ui-bits";
import { Campo, classiInput, PageHeader, Section } from "@/components/crapp/ui-bits";
import { formatData } from "@/lib/crapp-data";
import { nomeCompleto, useGiocatoriSquadra } from "@/lib/giocatori-squadra";
import {
@@ -151,7 +151,7 @@ function GestioneEventi() {
maxLength={80}
onChange={(e) => aggiorna({ titolo: e.target.value })}
placeholder="Es. CRAP Volley vs Aurora Nera"
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
className={classiInput}
/>
</Campo>
@@ -161,7 +161,7 @@ function GestioneEventi() {
type="date"
value={bozza.data}
onChange={(e) => aggiorna({ data: e.target.value })}
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
className={classiInput}
/>
</Campo>
<Campo label="Ora">
@@ -169,7 +169,7 @@ function GestioneEventi() {
type="time"
value={bozza.ora}
onChange={(e) => aggiorna({ ora: e.target.value })}
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
className={classiInput}
/>
</Campo>
</div>
@@ -179,7 +179,7 @@ function GestioneEventi() {
value={bozza.luogo}
maxLength={80}
onChange={(e) => aggiorna({ luogo: e.target.value })}
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
className={classiInput}
/>
</Campo>
@@ -189,7 +189,7 @@ function GestioneEventi() {
maxLength={300}
rows={2}
onChange={(e) => aggiorna({ note: e.target.value })}
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
className={classiInput}
/>
</Campo>
@@ -322,17 +322,6 @@ function GestioneEventi() {
);
}
function Campo({ label, children }: { label: string; children: React.ReactNode }) {
return (
<label className="block">
<span className="text-xs font-bold uppercase tracking-wide text-muted-foreground">
{label}
</span>
<span className="mt-1 block">{children}</span>
</label>
);
}
function Interruttore({
attivo,
onClick,