import "./list_item.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; import type { TextColor } from "./text_ink"; /** * `settings` (default): a 64px row whose `right` holds a control, so the press target sits beside * it. `option`: a row you pick (menu item, listbox option), content-sized, the whole row the * button, since its trailing slot never holds a control. */ export type ListItemVariant = "settings" | "option"; export interface ListItemProps extends StyleProps { left?: React.ReactNode; /** Names what the subject is (a linked record's table); read with the title as one label. */ overline?: React.ReactNode; /** A string takes the title type; a node renders as-is (pass `accessibilityLabel` then). */ title?: React.ReactNode; /** Default, except for an action row tinted to its glyph. */ titleColor?: TextColor; description?: React.ReactNode; right?: React.ReactNode; onPress?: () => void; /** For a list previewing beside itself. */ onHoverIn?: () => void; /** The current value, the open app. */ selected?: boolean; /** * The roving highlight via `aria-activedescendant`: where the keyboard is, not what is chosen. */ focused?: boolean; /** For a combobox's `aria-activedescendant`. */ id?: string; /** Only for a listbox option or menu item; a pressing row is already a `