import type { HTMLAttributes, ReactNode } from "react";
/** One label/value pair rendered as a dt/dd. */
export interface DescriptionListItem {
/** dt content — 13px, textMuted. */
label: ReactNode;
/** dd content — 14px, text[800]; falls back to `emptyValue` when null, undefined or "". */
value: ReactNode;
/** How many grid columns this item spans; defaults to 1. */
span?: number;
/** Adds a copy-to-clipboard icon beside the value; only applies when `value` is a non-empty string. */
copyable?: boolean;
}
/** Column count per breakpoint, same keys as Chakra's responsive props. */
export type DescriptionListColumns = Partial>;
/** Label/value grid for read views; other HTML attributes land on the `` (or the loading grid). */
export interface DescriptionListProps extends Omit, "color" | "children" | "dangerouslySetInnerHTML"> {
/** The label/value pairs to render, in order. */
items: DescriptionListItem[];
/** Columns per breakpoint; defaults to `{ base: 1, md: 2 }`. */
columns?: DescriptionListColumns;
/** "stacked" (label above value) or "inline" (label left, value right); defaults to "stacked". */
layout?: "stacked" | "inline";
/** Shown in place of a missing value; defaults to "—". */
emptyValue?: ReactNode;
/** Renders `loadingRows` skeleton pairs instead of `items`. */
isLoading?: boolean;
/** Skeleton pair count while `isLoading`; defaults to 6. */
loadingRows?: number;
}