import * as React from 'react'; import { cn } from '../../shared/utils'; import { ISOTYPE_COLORS } from './patterns'; export interface IsotypeDiagonalProps extends React.HTMLAttributes { /** Accessible label. Omit for purely decorative use. */ 'aria-label'?: string; } const CELL = 25; const SIZE = 100; /** * A single fixed diagonal-cut variation of the "core" grid isotype — the * third mark in the Xertica "isotipos" series. Three color-pair boundaries * (blue/green, magenta/red, and yellow's hypotenuse) all lie on the same * outer-corner-to-outer-corner diagonal of the square. * * @ai-rules * 1. Colors are fixed brand hex values (see `patterns.ts`), not theme tokens — never make them theme-reactive. * 2. All 8 shapes' coordinates are interdependent — never move one vertex/rect without re-checking every seam it backs or is backed by. * 3. This is one fixed composition, not a data-driven pattern — there is no variant/pattern prop and none should be added speculatively. * 4. The blank polygon's `fill="none"` is required, not cosmetic — an SVG shape with no `fill` renders solid black, unlike a CSS `background-color` left unset. * 5. `blue` and `red` are full-width backing rectangles, wider than the triangular shape they end up visually showing — `purple`/`green` paint over `blue`, and `magenta`/`brown` paint over `red`. A browser only renders a visible anti-aliasing seam where a shape's edge borders empty space; painting the diagonal-tip shapes directly over a same-side opaque rectangle means any imperfect edge coverage reveals more of that matching color instead of the page background, with no stroke or scale involved. Never shrink `blue`/`red` back down to their visible triangle, and never move `purple`/`green`/`magenta`/`brown` earlier than `blue`/`red` in paint order — the overlap and the order are what hide the seam. */ export function IsotypeDiagonal({ className, 'aria-label': ariaLabel, ...props }: IsotypeDiagonalProps) { return (
); }