feat: add accessible Tooltip component with hover, focus, and tap support
This commit is contained in:
@@ -45,7 +45,7 @@ export function PendingView() {
|
||||
espera aparecerán aquí para que las revises.
|
||||
</p>
|
||||
<div className="mt-4 flex justify-center">
|
||||
<Button variant="primary" onClick={openInviteModal} className="w-full sm:w-auto">
|
||||
<Button variant="primary" onClick={openInviteModal} className="h-11 w-full sm:w-auto">
|
||||
<Share2 className="size-4" />
|
||||
Compartir Enlace
|
||||
</Button>
|
||||
@@ -88,14 +88,18 @@ export function PendingView() {
|
||||
{sections.map((section) => {
|
||||
const Icon = section.icon
|
||||
const hasRows = section.count > 0
|
||||
const titleId = `pending-${section.title.replace(/\s+/g, '-').toLowerCase()}`
|
||||
// Con búsqueda activa, las secciones sin coincidencias se ocultan.
|
||||
if (!hasRows && query) return null
|
||||
|
||||
return (
|
||||
<section key={section.key}>
|
||||
<div className="flex items-center gap-2 border-b border-border/70 px-3 pb-2 pt-3">
|
||||
<Icon className="size-4 shrink-0 text-accent" />
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wide text-foreground/70">
|
||||
<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">
|
||||
<Icon className="size-4 shrink-0 text-accent" aria-hidden="true" />
|
||||
<h3
|
||||
id={titleId}
|
||||
className="text-xs font-semibold uppercase tracking-wide text-foreground/70"
|
||||
>
|
||||
{section.title}
|
||||
</h3>
|
||||
{hasRows ? (
|
||||
@@ -104,7 +108,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/60',
|
||||
: 'bg-primary-soft text-foreground/70',
|
||||
)}
|
||||
>
|
||||
{section.count}
|
||||
@@ -113,9 +117,9 @@ export function PendingView() {
|
||||
</div>
|
||||
|
||||
{hasRows ? (
|
||||
<div className="pt-1">{section.table}</div>
|
||||
<div className="pt-0.5">{section.table}</div>
|
||||
) : (
|
||||
<p className="px-3 py-3 text-xs text-foreground/70">{section.emptyNote}</p>
|
||||
<p className="px-3 py-2 text-xs text-foreground/70">{section.emptyNote}</p>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user