import "./record_summary.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export type RecordSummaryTone = "default" | "danger" | "warning" | "success"; interface RecordSummaryMetricBase { /** Caption above the number ("Outstanding", "Total value"). */ label: string; /** Valence of the figure (and its note) — the summary's ONE permitted accent. */ tone?: RecordSummaryTone; /** One short qualifier under the number ("Overdue 25 days"). */ note?: string; } /** THE HEADLINE FIGURE — READ ONLY, because the band is the record's identity and * the place to change the number is the fact that owns it. `value` is a * formatted string, or a node for the one case the figure is not known yet and a * `Skeleton` stands in — never a control or a second figure. */ export type RecordSummaryMetric = RecordSummaryMetricBase & { value: React.ReactNode; }; /** ONE WAY TO REACH THE SUBJECT. The `kind` is the fact; the glyph and the scheme * both follow from it. A `place` and a `link` derive nothing — a map is a * VENDOR's URL — so they are reachable only when the app hands over the * destination it means. */ export interface RecordContact { kind: "email" | "phone" | "place" | "link"; /** What the reader sees, and the link's accessible name. The glyph is * decorative, so this is the whole announcement. */ text: string; /** Where it goes, verbatim; absent and underivable, the contact is STATED and * not reachable. A URL, never a route this app owns: an `` * reloads the document. An in-app destination is `onPress`. */ href?: string; /** AN IN-APP DESTINATION. Given, it wins over `href` and the row renders the * kit's `Link` rather than an anchor, so the press reaches the app's router * and the document stays put. */ onPress?: () => void; } export interface RecordSummaryProps extends StyleProps { /** The record's id/name — `xxl` semibold (the ramp's `#`), tabular so ids * align across records. */ title: string; /** Heading level of the title. Default 1 — the record page's one h1; pass 2 * when the band sits inside a surface that already owns it. */ level?: 1 | 2 | 3; /** Identity qualifiers on the title line ("HCM → Hamburg, Export, FCL"). */ subtitle?: string; /** THE WAYS TO REACH THE SUBJECT, on the line under its qualifiers. They are * identity, not data, which is why they ride the identity band. */ contacts?: readonly RecordContact[]; /** A status chip (a `Status`) or any small node right after the title. */ status?: React.ReactNode; /** ONE headline number with valence. More than one belongs in a * `MetricStrip`. */ metric?: RecordSummaryMetric; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** The identity band of a single record's detail screen or drawer: ONE row — * title, subtitle, status chip, with an optional headline metric pinned right. * The header stays neutral and `metric.tone` is the one accent; the record's * FIELDS never live here, and `metric` is the ONE headline figure. */ /** THE IDENTITY'S WEIGHT, stated once for both of its lines: a supporting line * may step down on ONE of size and weight, never both (`docs/reviewing.md` §1), * and size carries it here. A CONSTANT, so the two cannot drift apart. */ export declare const RECORD_IDENTITY_WEIGHT = "semibold"; /** THE RECORD'S HEADLINE FIGURE. Its own entry because a record has TWO doors — * the page's header and a drawer's band — and the figure has to read the same at * both. ONE figure: a second belongs in the section that owns it, and a band of * them is a `MetricStrip`. */ export declare function RecordFigure({ metric }: { metric: RecordSummaryMetric; }): React.JSX.Element; export declare function RecordSummary({ title, subtitle, contacts, status, metric, level, testID, render, ref, ...props }: RecordSummaryProps): React.ReactElement>; export {};