task/improve-ui #8

Merged
jselesan merged 8 commits from task/improve-ui into development 2026-10-01 15:36:45 +00:00
12 changed files with 204 additions and 139 deletions
Showing only changes of commit 27bff32e76 - Show all commits

View File

@@ -15,9 +15,11 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
return (
<table className="w-full table-fixed text-left text-sm">
<thead>
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
<tr className="border-b border-foreground/10 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-3 pb-1.5">Nombre</th>
<th scope="col" className="px-3 pb-1.5">Teléfono</th>
<th scope="col" className="w-8 px-1 pb-1.5">
<span className="sr-only">Detalle</span>
</th>
@@ -28,7 +30,8 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
<tr
key={attendee.id}
tabIndex={0}
className="group cursor-pointer border-b border-border/70 transition-colors last:border-b-0 hover:bg-primary-soft/60 focus-visible:bg-primary-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
// El hover va a `surface` porque la fila ya vive sobre `primary-soft`.
className="group cursor-pointer border-b border-foreground/10 transition-colors last:border-b-0 hover:bg-surface/60 focus-visible:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
onClick={() => openAttendee(attendee.id)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
@@ -37,7 +40,9 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
}
}}
>
<td className="px-2 py-2">
{/* `px-3` alinea el texto con el chips y el search de arriba: es el
mismo eje izquierdo de 12px en toda la sección. */}
<td className="px-3 py-2">
<div className="flex min-w-0 items-center gap-2">
<div className="flex size-8 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent">
{attendee.fullName.charAt(0).toUpperCase()}
@@ -54,7 +59,7 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
</td>
{/* El nombre manda; el teléfono es un dato secundario: un nivel
más abajo en la escala de color, en un tamaño menor. */}
<td className="min-w-0 px-2 py-2 text-xs text-foreground/70">
<td className="min-w-0 px-3 py-2 text-xs text-foreground/70">
{attendee.phone ? (
<span className="block truncate tabular-nums" title={attendee.phone}>
{formatPhoneDisplay(attendee.phone)}

View File

@@ -28,7 +28,10 @@ export function MembersView() {
if (attendees.length === 0) {
return (
<div className="rounded-lg bg-primary-soft/50 px-4 py-10 text-center">
// Full-bleed y sin radio propio: el `overflow-hidden` del panel lo recorta
// contra la silueta redondeada. `surface` sobre `primary-soft` hunde el
// bloque; con el lavado anterior se camuflaba.
<div className="bg-surface px-4 py-10 text-center">
<Users className="mx-auto mb-2 size-10 text-foreground/40" />
<p className="text-sm font-semibold text-primary">
Todavía no hay miembros en este grupo

View File

@@ -9,11 +9,15 @@ export function MembersWaitlistSection() {
const { listSection, searchFilter, setSearchFilter } = useGroupDetail()
return (
// Radios concéntricos: `rounded-2xl` (16px) con `p-2` (8px) deja a las
// superficies interiores un radio de 16 - 8 = 8px, o sea `rounded-lg`.
// Sin bordes: el lavado `bg-primary-soft` separa la sección del fondo.
<div className="rounded-2xl bg-primary-soft p-2">
<div className="space-y-2 p-2 sm:p-3">
// Una sola superficie: la lista va directo sobre el lavado, como la info
// card de arriba, en vez de anidarse en una caja más clara. La separación
// entre controles y datos la dan los propios divisores de fila, el tono
// propio del input y el borde de los chips; una caja intermedia solo
// sumaba un nivel de contención y padding horizontal.
// `overflow-hidden` recorta el hover de las filas y el borde inferior
// contra el radio del panel: las filas son full-bleed.
<div className="overflow-hidden rounded-2xl bg-primary-soft">
<div className="space-y-2 p-3">
<div className="flex flex-col gap-2.5 lg:flex-row lg:items-center lg:justify-between">
<SectionChips />
@@ -40,9 +44,7 @@ export function MembersWaitlistSection() {
) : null}
</div>
<div className="rounded-lg bg-surface p-1 shadow-xs sm:p-2">
{listSection === 'members' ? <MembersView /> : <PendingView />}
</div>
{listSection === 'members' ? <MembersView /> : <PendingView />}
</div>
)
}

View File

@@ -37,7 +37,10 @@ export function PendingView() {
if (!hasAnyEntry && !query) {
return (
<div className="rounded-lg bg-primary-soft/50 px-4 py-10 text-center">
// Full-bleed y sin radio propio: el `overflow-hidden` del panel lo recorta
// contra la silueta redondeada. `surface` sobre `primary-soft` hunde el
// bloque; con el lavado anterior se camuflaba.
<div className="bg-surface px-4 py-10 text-center">
<Inbox className="mx-auto mb-2 size-10 text-foreground/40" />
<p className="text-sm font-semibold text-primary">No hay pendientes</p>
<p className="mx-auto mt-1 max-w-sm text-sm text-foreground/80">
@@ -94,7 +97,7 @@ export function PendingView() {
return (
<section key={section.key} aria-labelledby={titleId}>
<div className="flex items-center gap-2 border-b border-border/70 px-3 pb-1.5 pt-2">
<div className="flex items-center gap-2 border-b border-foreground/10 px-3 pb-1.5 pt-2">
<Icon className="size-4 shrink-0 text-accent" aria-hidden="true" />
<h3
id={titleId}
@@ -108,7 +111,7 @@ export function PendingView() {
'ml-auto inline-flex items-center justify-center rounded-full px-1.5 py-0.5 text-[10px] font-bold leading-none tabular-nums',
section.attention
? 'bg-warning-soft text-warning'
: 'bg-primary-soft text-foreground/70',
: 'bg-surface text-foreground/70',
)}
>
{section.count}

View File

@@ -9,11 +9,13 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
return (
<table className="w-full table-fixed text-left text-sm">
<thead>
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
<tr className="border-b border-foreground/10 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-3 pb-1.5">Nombre</th>
<th scope="col" className="px-3 pb-1.5">Teléfono</th>
{/* En móvil el teléfono manda: la fecha vive en el detalle. */}
<th scope="col" className="hidden px-2 pb-1.5 sm:table-cell">Solicitado</th>
<th scope="col" className="hidden px-3 pb-1.5 sm:table-cell">Solicitado</th>
<th scope="col" className="w-8 px-1 pb-1.5">
<span className="sr-only">Detalle</span>
</th>
@@ -24,7 +26,8 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
<tr
key={entry.id}
tabIndex={0}
className="group cursor-pointer border-b border-border/70 transition-colors last:border-b-0 hover:bg-primary-soft/60 focus-visible:bg-primary-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
// El hover va a `surface` porque la fila ya vive sobre `primary-soft`.
className="group cursor-pointer border-b border-foreground/10 transition-colors last:border-b-0 hover:bg-surface/60 focus-visible:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
onClick={() => setSelectedPreRegistration(entry)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
@@ -33,7 +36,9 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
}
}}
>
<td className="px-2 py-2">
{/* `px-3` alinea el texto con el chips y el search de arriba: es el
mismo eje izquierdo de 12px en toda la sección. */}
<td className="px-3 py-2">
<div className="flex min-w-0 items-center gap-2">
<div className="flex size-8 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent">
{entry.fullName.charAt(0).toUpperCase()}
@@ -50,12 +55,12 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
</div>
</div>
</td>
<td className="min-w-0 px-2 py-2 text-xs text-foreground/70">
<td className="min-w-0 px-3 py-2 text-xs text-foreground/70">
<span className="block truncate tabular-nums" title={entry.phone}>
{formatPhoneDisplay(entry.phone)}
</span>
</td>
<td className="hidden min-w-0 px-2 py-2 text-xs text-foreground/70 sm:table-cell">
<td className="hidden min-w-0 px-3 py-2 text-xs text-foreground/70 sm:table-cell">
{new Date(entry.createdAt).toLocaleDateString('es-ES', {
day: 'numeric',
month: 'short',

View File

@@ -9,9 +9,11 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
return (
<table className="w-full table-fixed text-left text-sm">
<thead>
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
<tr className="border-b border-foreground/10 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[47%] px-3 pb-1.5">Nombre</th>
<th scope="col" className="px-3 pb-1.5">Teléfono</th>
<th scope="col" className="w-8 px-1 pb-1.5">
<span className="sr-only">Detalle</span>
</th>
@@ -22,7 +24,8 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
<tr
key={entry.id}
tabIndex={0}
className="group cursor-pointer border-b border-border/70 transition-colors last:border-b-0 hover:bg-primary-soft/60 focus-visible:bg-primary-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
// El hover va a `surface` porque la fila ya vive sobre `primary-soft`.
className="group cursor-pointer border-b border-foreground/10 transition-colors last:border-b-0 hover:bg-surface/60 focus-visible:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent"
onClick={() => setSelectedWaitlistEntry(entry)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
@@ -31,7 +34,9 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
}
}}
>
<td className="px-2 py-2">
{/* `px-3` alinea el texto con el chips y el search de arriba: es el
mismo eje izquierdo de 12px en toda la sección. */}
<td className="px-3 py-2">
<div className="flex min-w-0 items-center gap-2">
<div className="flex size-8 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent">
{entry.fullName.charAt(0).toUpperCase()}
@@ -48,7 +53,7 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
</div>
</div>
</td>
<td className="min-w-0 px-2 py-2 text-xs text-foreground/70">
<td className="min-w-0 px-3 py-2 text-xs text-foreground/70">
{entry.phone ? (
<span className="block truncate tabular-nums" title={entry.phone}>
{formatPhoneDisplay(entry.phone)}