mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-14 17:43:04 +00:00
- campoVotes (sem leitor) e classification.fieldHeadroom (duplicava o fator field) removidos - formatTerritorialClassWhy passa a ser mesmo a fonte unica do slice(0,2) e do fallback "sem serie", eliminando o sentinela de string vazia nas duas superficies de detalhe - classe territorial vira um so componente com layout table|card, como os vizinhos - parseExhaustiveEnumParam em campaignListUrl cobre trend e class (o includes era morto: allParamValues ja deduplica) - bloco central caminha o computeVoteRankByYear memoizado do A11 em vez de reordenar os 435 slugs por conta propria - comentarios corrigidos onde afirmavam o contrario do codigo (CampaignCellTooltip e a regra do sem_base por superficie)
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
'use client'
|
||
|
||
import type { ReactNode } from 'react'
|
||
|
||
import { CampaignHoverTooltip } from '@/components/campaign/shared/CampaignHoverTooltip'
|
||
|
||
/**
|
||
* Cell-level tooltip for the campaign list system — the render half of
|
||
* `CampaignTableColumn.cellTooltip`. Columns declare the extra reading; the
|
||
* table wraps the cell in this.
|
||
*
|
||
* The trigger `<span>` is created HERE rather than by the column, so a column
|
||
* declares only the data (`cellTooltip`) and the table owns the affordance —
|
||
* every cell tooltip in the system then behaves and is sized identically.
|
||
*
|
||
* It deliberately takes no `tabIndex` — 435 rows × N columns of dead tab stops
|
||
* would be a worse trade than the redundancy contract documented on
|
||
* `cellTooltip`, which requires the tooltip's information to already exist as
|
||
* text in the cell (visible or `sr-only`).
|
||
*/
|
||
export const CampaignCellTooltip = ({
|
||
content,
|
||
children,
|
||
}: {
|
||
content: ReactNode
|
||
children: ReactNode
|
||
}) => (
|
||
<CampaignHoverTooltip content={content} side="bottom" align="start">
|
||
<span className="inline-flex max-w-full">{children}</span>
|
||
</CampaignHoverTooltip>
|
||
)
|