task/improve-ui #8
@@ -31,7 +31,7 @@ export function AbsenceLinkSection() {
|
||||
{/* El panel queda en el DOM pero oculto: `aria-controls` siempre resuelve y
|
||||
el texto de "Link copiado" no se pierde al plegar y desplegar. */}
|
||||
<div id={panelId} hidden={!isOpen}>
|
||||
<p className="text-sm text-foreground">
|
||||
<p className="px-3 text-sm text-foreground">
|
||||
Mandales este link para que avisen cuando no puedan venir.
|
||||
</p>
|
||||
{/* Apiladas y a ancho completo: al 50% los rótulos ("Enviar por WhatsApp")
|
||||
@@ -62,7 +62,7 @@ export function AbsenceLinkSection() {
|
||||
</div>
|
||||
<p
|
||||
aria-live="polite"
|
||||
className="flex min-h-5 items-center gap-1.5 pt-2 text-xs font-medium text-success"
|
||||
className="flex min-h-5 items-center gap-1.5 px-3 pt-2 text-xs font-medium text-success"
|
||||
>
|
||||
{copied ? (
|
||||
<>
|
||||
|
||||
@@ -75,7 +75,10 @@ export function AttendeeAttendanceSection() {
|
||||
{visible.map((session) => {
|
||||
const Icon = iconFor(session.status)
|
||||
return (
|
||||
<li key={session.classSessionId} className="flex items-center justify-between gap-3 py-2">
|
||||
<li
|
||||
key={session.classSessionId}
|
||||
className="flex items-center justify-between gap-3 px-3 py-2"
|
||||
>
|
||||
<span className="truncate text-sm text-primary">
|
||||
{formatSessionShortDate(session.startsAt)}
|
||||
</span>
|
||||
@@ -96,11 +99,11 @@ export function AttendeeAttendanceSection() {
|
||||
{/* Las clases sin registro no son ausencias: se avisa aparte y en voz baja
|
||||
para que el "1 de 1" de arriba no se lea como un fallo. */}
|
||||
{summary.unmarkedLabel ? (
|
||||
<p className="pt-2 text-right text-xs text-foreground">{summary.unmarkedLabel}</p>
|
||||
<p className="px-3 pt-2 text-right text-xs text-foreground">{summary.unmarkedLabel}</p>
|
||||
) : null}
|
||||
|
||||
{showAll && isCapped ? (
|
||||
<p className="pt-2 text-xs text-foreground">
|
||||
<p className="px-3 pt-2 text-xs text-foreground">
|
||||
El historial guarda las últimas {HISTORY_LIMIT} clases.
|
||||
</p>
|
||||
) : null}
|
||||
@@ -111,7 +114,7 @@ export function AttendeeAttendanceSection() {
|
||||
variant="ghost"
|
||||
onClick={() => setShowAll((value) => !value)}
|
||||
aria-expanded={showAll}
|
||||
className="h-11 gap-1 px-2 text-sm text-accent-fg hover:text-primary"
|
||||
className="h-11 gap-1 px-3 text-sm text-accent-fg hover:text-primary"
|
||||
>
|
||||
{showAll ? 'Ver menos' : `Ver todas (${sessions.length})`}
|
||||
<ChevronDown className={cn('size-4 transition-transform', showAll && 'rotate-180')} />
|
||||
|
||||
@@ -2,8 +2,11 @@ import { Mail } from 'lucide-react'
|
||||
import { useAttendeeDetail } from './AttendeeDetailProvider'
|
||||
import { Section } from './Section'
|
||||
|
||||
/* `px-3` interno: la banda de hover sigue a sangre hasta el borde de la sección
|
||||
(la separa del texto, no al revés) y las notas de abajo suman el mismo para
|
||||
que el email y ellas caigan en la misma columna. */
|
||||
const ROW_CLASS =
|
||||
'flex w-full min-h-11 items-center justify-between gap-3 rounded-lg py-2.5 transition-colors hover:bg-primary-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent'
|
||||
'flex w-full min-h-11 items-center justify-between gap-3 rounded-lg px-3 py-2.5 transition-colors hover:bg-primary-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent'
|
||||
|
||||
/** Email y notas del miembro. El teléfono no va acá: ya está en el subtítulo y
|
||||
* detrás de los botones de WhatsApp y Llamar, y repetirlo llenaba la pantalla
|
||||
@@ -31,7 +34,7 @@ export function AttendeeContactSection() {
|
||||
) : null}
|
||||
|
||||
{notes ? (
|
||||
<p className="whitespace-pre-line py-2 text-sm leading-relaxed text-primary">{notes}</p>
|
||||
<p className="whitespace-pre-line px-3 py-2 text-sm leading-relaxed text-primary">{notes}</p>
|
||||
) : null}
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
@@ -10,10 +10,14 @@ export const SECTION_TITLE_CLASS = 'text-[11px] font-semibold uppercase tracking
|
||||
/* La fila que despliega la sección es un botón, no un título: por eso lleva
|
||||
superficie de hover y presión, se pinta en `primary` para que se lea
|
||||
distinta de los títulos fijos, y el chevron cae al borde derecho de la fila
|
||||
en vez de pegado al texto. */
|
||||
en vez de pegado al texto.
|
||||
|
||||
El `px-3` es interno: la banda de hover sigue a sangre hasta el borde de la
|
||||
sección y lo que se separa del borde es el contenido (el `px-3` del `h2` y
|
||||
del `trailing` de abajo alinea rótulo y resumen con esta fila). */
|
||||
const TOGGLE_ROW_CLASS = cn(
|
||||
SECTION_TITLE_CLASS,
|
||||
'flex min-h-11 w-full items-center justify-between gap-2 rounded-lg text-left text-primary',
|
||||
'flex min-h-11 w-full items-center justify-between gap-2 rounded-lg px-3 text-left text-primary',
|
||||
'transition-colors hover:bg-primary-soft active:scale-[0.98] motion-reduce:active:scale-100',
|
||||
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent',
|
||||
)
|
||||
@@ -66,12 +70,12 @@ export function Section({ title, trailing, toggle, children }: SectionProps) {
|
||||
</button>
|
||||
</h2>
|
||||
) : (
|
||||
<h2 id={headingId} className={SECTION_TITLE_CLASS}>
|
||||
<h2 id={headingId} className={cn(SECTION_TITLE_CLASS, 'px-3')}>
|
||||
{title}
|
||||
</h2>
|
||||
)}
|
||||
{trailing ? (
|
||||
<div className="shrink-0 text-xs font-semibold tabular-nums text-foreground">
|
||||
<div className="shrink-0 px-3 text-xs font-semibold tabular-nums text-foreground">
|
||||
{trailing}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user