import "./diff_value.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 interface DiffValueProps extends StyleProps { /** * The value being replaced. Omit for an ADDITION — nothing was there. * * Usually a string or a number. It may also be a NODE — a `FileBadge` for a * scan being superseded, a chip for a link being repointed — and that case is * struck by a drawn rule rather than by text decoration, because * `line-through` on a run does not cross an element beside it: the old value * would render at full strength with nothing saying it is the one going away. */ before?: ReactNode; /** The proposed value. Omit for a REMOVAL — the struck `before` is the change. */ after?: ReactNode; /** * `stacked` (default) puts `before` above `after` — the shape for a column of * figures, where the eye compares down the column and the row height is free. * `inline` puts them on one line with an arrow, for prose and dense rows where * vertical space is the scarce thing. */ layout?: "stacked" | "inline"; size?: "xs" | "sm" | "md"; /** Right for figures, left for text. Inherited container alignment is not * enough: the two lines must agree with EACH OTHER. */ align?: "left" | "right"; /** Tabular figures — always on for money and counts, so the digits line up * between the struck value and its replacement. */ /** The tone of the AFTER value. Default `success` (a proposal, not yet a * fact); `danger` when the change itself is the bad news. */ tone?: "success" | "danger" | "default"; /** * Shown in place of a missing `after` on a removal, and a missing `before` on * an addition, when the absence needs a word rather than a blank. * * YOUR string, and yours to translate. This component renders no word of its * own — the only fallbacks are `—` and empty — so nothing here reaches the * locale packs. `DiffMark` beside it does ship localized words, and the two * are different sentences even where English collides them: the mark says * what happened to the ROW ("Removed"), this says what is in the FIELD now, * which in Vietnamese is "đã xóa" or "bỏ trống" rather than the bare verb. * The same prop also carries "Pick a candidate below". */ placeholder?: string; /** * HOW FAR the value moved, pre-formatted by the host — "+250 pcs", * "−118.519 ₫ VAT", "3 days later". * * `1.600.000 → 1.481.481` makes the reader do subtraction to find out whether * a correction is trivial or alarming; the delta is the thing they were going * to work out anyway. A string, not a number, because only the host knows the * unit, the sign convention and the rounding — the same contract * `Finding.delta` already uses. */ delta?: string; accessibilityLabel?: string; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export declare function DiffValue(props: DiffValueProps): React.ReactElement>;