import "./finding.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export type FindingSeverity = "critical" | "warning" | "info" | "positive"; /** The localized strings — the `finding` LoticsLocale slice. */ export type FindingLabels = Record & { /** The delta's label, read to assistive tech beside the figure. */ difference: string; }; /** One reading: what a source says, and which source said it. */ export interface FindingReading { /** Where it came from — a document, a table, a rate card. */ source: string; /** What that source says the value is. */ value: string; } export interface FindingProps extends StyleProps { /** Ranked severity — sets the dot's colour and its localized word. */ severity: FindingSeverity; /** What was found, in one line, in the reader's own nouns. */ title: string; /** * The readings that disagree, in source order. Rendered ONE PER LINE beneath * the title, each as `source value` — never joined by a separator. * * NEITHER is marked as the wrong one. A finding reports that two sources * disagree; which one is right is the reader's call, and a struck-through or * red-inked side would make that call for them. */ readings?: FindingReading[]; /** * The computed difference — "+170 USD", "−40 pcs", "3 days late". * * The most actionable thing on a finding, which is why it sits right-aligned * on the title's own line rather than below the readings: it is the figure * the reader acts on, and `1,450 → 1,280` makes them do the subtraction * themselves. Omit where the fields are not commensurable — two spellings of * a name have no delta. */ delta?: string; /** * The CONSEQUENCE, when the title does not already carry it — what happens if * this ships. Optional on purpose: a second sentence that restates the title * in longer words costs a line and adds nothing. */ detail?: string; /** Makes each source name pressable — the host navigates to it. */ onOpenSource?: (source: string) => void; /** Anything richer than readings — a table, a chart, a confidence bar. */ children?: ReactNode; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * ONE RANKED DISCREPANCY from a cross-check — a contradiction between two * readings, an audit observation, a briefing item. * * WHOEVER performed the check. Nothing here is AI-specific — the labels are * four severity words and "difference" — but this opened "from an AI check", * and a rules-derived contradiction (two papers disagreeing, a carrier moving * an ETA) reads as out of scope on that wording. It is not: the next author who * believes it hand-rolls a Callout and loses the ranking, the delta and the * readings line. * * The readings sit at `sm`, the same size as the title. They were `xs` — a * miniature that said "secondary" by being hard to read, which is the wrong * trade for the values the whole finding rests on. Hierarchy comes from WEIGHT * and colour here, never from shrinking the evidence. * * Laid out HORIZONTALLY, in the order a reader needs it: the dot says whether * to care, the title says what is wrong, the delta on that same line says how * far off, and one dim line underneath says who said what. Two lines carry all * four, so a reader scanning a stack reads severity down the left edge and * magnitude down the right. * * **Display-only**: a finding informs the action the human takes; it decides * nothing itself. Stack several most-severe first. */ export declare function Finding(props: FindingProps): React.ReactElement>;