Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/chip.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// teste: linha nova para deslocar as de baixo; as violações continuam lá
// Chip — $radius-sm é 8px, logo rounded-lg e NÃO rounded-sm (§6).
export function Chip({ label, active = false }: { label: string; active?: boolean }) {
return (
Expand All @@ -6,11 +7,11 @@ export function Chip({ label, active = false }: { label: string; active?: boolea
data-component="Chip"
aria-pressed={active}
className={[
"flex h-8 items-center justify-center rounded-lg px-3 text-body font-medium",
"flex h-8 items-center justify-center rounded-lg px-[14px] text-body font-medium",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regra 10 do §12 — padding lateral 12px no design, 14px no código

O Chip no .pen tem padding: [0, $space-3], ou seja 0 12px — o export em px confirma p-[0px_12px], e a medição da app leu paddingLeft/paddingRight de 14px contra 12px do design. px-[14px] também é px cru sem origem no .pen (§2.5): 12px está na grade de 4, então a tradução é o utilitário da escala. Troque px-[14px] por px-3 (§4).

"focus-visible:ring-2 focus-visible:ring-focus focus-visible:outline-none",
active
? "bg-surface-inverse text-text-inverse"
: "bg-surface-chip text-text-primary hover:bg-surface-hover",
: "bg-surface-chip text-text-primary hover:bg-surface-hover dark:text-white",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regra 2 do §12 — variante dark: no rótulo do Chip — faltou usar o token semântico

dark:text-white viola a §2.1: os tokens já são temáticos e nenhum dark: deve aparecer no JSX. No .pen o Label do Chip usa fill: $text-primary, que resolve para $grey-900 em claro e $grey-150 em escuro — então o dark: não só é proibido, como pinta a cor errada (branco em vez de $grey-150). Remova dark:text-white; o text-text-primary que já está na mesma classe cobre os dois temas (§3).

].join(" ")}
>
{label}
Expand Down
Loading