import "./chip.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps, type TriggerProps } from "./style_props"; export interface ChipProps extends StyleProps, TriggerProps { testID?: string; children: React.ReactNode; /** Makes the pill a button. The event is passed on, because an overlay that * opens off a chip reads it. */ onPress?: (event: React.MouseEvent) => void; /** Accessible name of the press target. The pressable pill announces as a * button either way — its name derives from the children when they are * self-describing text; pass this when they aren't (icon-led content). */ accessibilityLabel?: string; onDismiss?: () => void; dismissTooltip?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * A compact pill — an applied filter, a tag, a suggestion. `onPress` makes it a * button; `onDismiss` adds the ✕. * * **THE PILL IS THE CHIP'S ROOT**: `className`, `style`, `ref` and `render` all * reach it, not the box around it. That box exists only because the ✕ is a * SIBLING of the pill rather than a child — the pill may itself be a button and * a button may not contain one — and an overlay that renders THROUGH a chip * hands it the toggle, the `aria-expanded` linkage and a `ref` it must be able * to measure. Those have to land on one element or Base UI holds a `` as * the trigger of a control that is really the button inside it. * * That sibling ✕ is also what makes the chip's right padding a function of its * geometry rather than a number — the seat, the button and one gutter, so the * words stop where it starts. */ export declare function Chip({ testID, children, onPress, accessibilityLabel, onDismiss, dismissTooltip, render, ref, className, style, ...trigger }: ChipProps): React.JSX.Element;