import { type ComponentPropsWithoutRef, type ReactNode } from 'react'; /** `plain` sets rows apart by space alone; `divided` rules a line between them; `card` * also frames them in a panel. */ export type DescriptionListVariant = 'plain' | 'divided' | 'card'; export interface DescriptionListProps extends Omit, 'className' | 'title'> { variant?: DescriptionListVariant | undefined; /** A heading over the list, which names it, such as "Actor" among a record's * details. */ title?: ReactNode; /** The title's level in the page's outline. */ headingLevel?: 2 | 3 | 4 | undefined; /** Puts each label over its value at any width. Without it they stack only when the * list is too narrow for both side by side. In a DescriptionListGroup, the group's * `stacked` decides. */ stacked?: boolean | undefined; /** `xs` sets smaller type, for a dense panel of details such as a job's; * in a DescriptionListGroup, the group's `size` decides. */ size?: DescriptionListSize | undefined; /** Styles the box around the list, such as its margins or width. */ className?: string | undefined; } export type DescriptionListSize = 'sm' | 'xs'; /** Names and their values, such as the details of a record in a drawer or a card. The * label column is as wide as its longest label, up to two fifths of the list, so a * long label wraps rather than squeezing the values; each label sits over its value * when the list is narrow. Lists side by side in one panel share their label column * inside a `DescriptionListGroup`. */ export default function DescriptionList({ variant, title, headingLevel, stacked, size: sizeProp, className, children, ...props }: DescriptionListProps): import("react").JSX.Element; /** Description lists in one panel, such as a record's Overview, Actor and Target, that * share one label column: it fits the longest label across all of them, so their * values start at one edge down the panel. Each list keeps its own title and variant; * all of them stack together when the panel is narrow. A list may sit in a `Section` * in the group, such as a record's own details followed by its type's settings under * a heading: the section passes the columns through. Put the lists, and sections of * them, directly in the group; another wrapper between them breaks the shared column. */ export declare function DescriptionListGroup({ stacked, size, className, children, }: { /** Puts each label over its value at any width. */ stacked?: boolean | undefined; /** Every list's type size, so the lists in one panel match. */ size?: DescriptionListSize | undefined; /** Styles the box around the group, such as its margins or width. */ className?: string | undefined; /** `DescriptionList`s, and `Section`s that hold them. */ children: ReactNode; }): import("react").JSX.Element; export interface DescriptionListItemProps { label: ReactNode; /** The value. Nothing, an empty string or `false` shows the library's empty mark. * A path or URL in it, or in a link that is it, wraps after its slashes. */ children?: ReactNode; /** Help behind an info button beside the label. */ tooltip?: string | undefined; /** Sets the value in a monospace face, for an ID, a path or a hash. */ mono?: boolean | undefined; /** Adds a button that copies the value: `true` copies its text as shown; a string * copies that instead, such as a full ID behind a shortened one. */ copy?: boolean | string | undefined; /** Keeps the value to one line, cut off with an ellipsis, and shows it whole * on hover, for a long ID or a list of nodes in a dense panel. `copy` still * copies all of it. */ truncate?: boolean | undefined; className?: string | undefined; } /** A label and its value in a DescriptionList. */ export declare function DescriptionListItem({ label, children, tooltip, mono, copy, truncate, className, }: DescriptionListItemProps): import("react").JSX.Element;