import "./text_disclosure.css"; import type * as React from "react"; import { Button as Base } from "@base-ui/react/button"; import { type StyleProps } from "./style_props"; import type { TextSize } from "./text"; /** No `TriggerProps`: a disclosure reveals content already on the page, never an overlay, and `onToggle` * would collide with the DOM's `
` event name. */ export interface TextDisclosureProps extends StyleProps { /** Controlled, since the revealed content is the caller's. */ expanded: boolean; onToggle: (expanded: boolean) => void; /** The noun behind it ("transcript", "3 earlier replies"); the verb is supplied, so one control keeps * one vocabulary. */ label: string; /** Default "sm". */ size?: TextSize; /** When `label` is ambiguous among several on a page. */ accessibilityLabel?: string; testID?: string; ref?: React.Ref; render?: Base.Props["render"]; } /** * An in-prose disclosure: muted underlined text revealing adjacent content in place (a transcript, a long * value). The counterpart of {@link TextLink} โ€” ink says which: * * blue + `role="link"` (`Link`) โ†’ leaves this surface * muted underline (this) โ†’ reveals more of it, right here * * Anything that mutates carries a control surface instead (`Button`, `InlineButton`; composition.md * ยง"Commit & feedback surfaces"). A component because the contract is easy to break: a `