task/improve-ui #8
@@ -15,9 +15,11 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
|
|||||||
return (
|
return (
|
||||||
<table className="w-full table-fixed text-left text-sm">
|
<table className="w-full table-fixed text-left text-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
|
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
|
||||||
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
|
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
|
||||||
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
|
<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">
|
<th scope="col" className="w-8 px-1 pb-1.5">
|
||||||
<span className="sr-only">Detalle</span>
|
<span className="sr-only">Detalle</span>
|
||||||
</th>
|
</th>
|
||||||
@@ -28,7 +30,8 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
|
|||||||
<tr
|
<tr
|
||||||
key={attendee.id}
|
key={attendee.id}
|
||||||
tabIndex={0}
|
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)}
|
onClick={() => openAttendee(attendee.id)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
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 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">
|
<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()}
|
{attendee.fullName.charAt(0).toUpperCase()}
|
||||||
@@ -54,7 +59,7 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
|
|||||||
</td>
|
</td>
|
||||||
{/* El nombre manda; el teléfono es un dato secundario: un nivel
|
{/* 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. */}
|
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 ? (
|
{attendee.phone ? (
|
||||||
<span className="block truncate tabular-nums" title={attendee.phone}>
|
<span className="block truncate tabular-nums" title={attendee.phone}>
|
||||||
{formatPhoneDisplay(attendee.phone)}
|
{formatPhoneDisplay(attendee.phone)}
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ export function MembersView() {
|
|||||||
|
|
||||||
if (attendees.length === 0) {
|
if (attendees.length === 0) {
|
||||||
return (
|
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" />
|
<Users className="mx-auto mb-2 size-10 text-foreground/40" />
|
||||||
<p className="text-sm font-semibold text-primary">
|
<p className="text-sm font-semibold text-primary">
|
||||||
Todavía no hay miembros en este grupo
|
Todavía no hay miembros en este grupo
|
||||||
|
|||||||
@@ -9,11 +9,15 @@ export function MembersWaitlistSection() {
|
|||||||
const { listSection, searchFilter, setSearchFilter } = useGroupDetail()
|
const { listSection, searchFilter, setSearchFilter } = useGroupDetail()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// Radios concéntricos: `rounded-2xl` (16px) con `p-2` (8px) deja a las
|
// Una sola superficie: la lista va directo sobre el lavado, como la info
|
||||||
// superficies interiores un radio de 16 - 8 = 8px, o sea `rounded-lg`.
|
// card de arriba, en vez de anidarse en una caja más clara. La separación
|
||||||
// Sin bordes: el lavado `bg-primary-soft` separa la sección del fondo.
|
// entre controles y datos la dan los propios divisores de fila, el tono
|
||||||
<div className="rounded-2xl bg-primary-soft p-2">
|
// propio del input y el borde de los chips; una caja intermedia solo
|
||||||
<div className="space-y-2 p-2 sm:p-3">
|
// 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">
|
<div className="flex flex-col gap-2.5 lg:flex-row lg:items-center lg:justify-between">
|
||||||
<SectionChips />
|
<SectionChips />
|
||||||
|
|
||||||
@@ -40,9 +44,7 @@ export function MembersWaitlistSection() {
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="rounded-lg bg-surface p-1 shadow-xs sm:p-2">
|
{listSection === 'members' ? <MembersView /> : <PendingView />}
|
||||||
{listSection === 'members' ? <MembersView /> : <PendingView />}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ export function PendingView() {
|
|||||||
|
|
||||||
if (!hasAnyEntry && !query) {
|
if (!hasAnyEntry && !query) {
|
||||||
return (
|
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" />
|
<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="text-sm font-semibold text-primary">No hay pendientes</p>
|
||||||
<p className="mx-auto mt-1 max-w-sm text-sm text-foreground/80">
|
<p className="mx-auto mt-1 max-w-sm text-sm text-foreground/80">
|
||||||
@@ -94,7 +97,7 @@ export function PendingView() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section key={section.key} aria-labelledby={titleId}>
|
<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" />
|
<Icon className="size-4 shrink-0 text-accent" aria-hidden="true" />
|
||||||
<h3
|
<h3
|
||||||
id={titleId}
|
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',
|
'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
|
section.attention
|
||||||
? 'bg-warning-soft text-warning'
|
? 'bg-warning-soft text-warning'
|
||||||
: 'bg-primary-soft text-foreground/70',
|
: 'bg-surface text-foreground/70',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{section.count}
|
{section.count}
|
||||||
|
|||||||
@@ -9,11 +9,13 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
|
|||||||
return (
|
return (
|
||||||
<table className="w-full table-fixed text-left text-sm">
|
<table className="w-full table-fixed text-left text-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
|
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
|
||||||
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
|
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
|
||||||
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
|
<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. */}
|
{/* 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">
|
<th scope="col" className="w-8 px-1 pb-1.5">
|
||||||
<span className="sr-only">Detalle</span>
|
<span className="sr-only">Detalle</span>
|
||||||
</th>
|
</th>
|
||||||
@@ -24,7 +26,8 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
|
|||||||
<tr
|
<tr
|
||||||
key={entry.id}
|
key={entry.id}
|
||||||
tabIndex={0}
|
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)}
|
onClick={() => setSelectedPreRegistration(entry)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
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 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">
|
<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()}
|
{entry.fullName.charAt(0).toUpperCase()}
|
||||||
@@ -50,12 +55,12 @@ export function PreRegistrationsTable({ entries }: { entries: GroupPreRegistrati
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</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}>
|
<span className="block truncate tabular-nums" title={entry.phone}>
|
||||||
{formatPhoneDisplay(entry.phone)}
|
{formatPhoneDisplay(entry.phone)}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</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', {
|
{new Date(entry.createdAt).toLocaleDateString('es-ES', {
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
|
|||||||
return (
|
return (
|
||||||
<table className="w-full table-fixed text-left text-sm">
|
<table className="w-full table-fixed text-left text-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
|
{/* `border-foreground/10` y no `border`: en dark `--border` es igual a
|
||||||
<th scope="col" className="w-[47%] px-2 pb-1.5">Nombre</th>
|
`primary-soft`, el fondo de la fila, y el separador desaparecería. */}
|
||||||
<th scope="col" className="px-2 pb-1.5">Teléfono</th>
|
<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">
|
<th scope="col" className="w-8 px-1 pb-1.5">
|
||||||
<span className="sr-only">Detalle</span>
|
<span className="sr-only">Detalle</span>
|
||||||
</th>
|
</th>
|
||||||
@@ -22,7 +24,8 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
|
|||||||
<tr
|
<tr
|
||||||
key={entry.id}
|
key={entry.id}
|
||||||
tabIndex={0}
|
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)}
|
onClick={() => setSelectedWaitlistEntry(entry)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
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 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">
|
<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()}
|
{entry.fullName.charAt(0).toUpperCase()}
|
||||||
@@ -48,7 +53,7 @@ export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] })
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</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 ? (
|
{entry.phone ? (
|
||||||
<span className="block truncate tabular-nums" title={entry.phone}>
|
<span className="block truncate tabular-nums" title={entry.phone}>
|
||||||
{formatPhoneDisplay(entry.phone)}
|
{formatPhoneDisplay(entry.phone)}
|
||||||
|
|||||||
Reference in New Issue
Block a user