import * as React from 'react'; import { useRender } from '@base-ui/react/use-render'; import { type VariantProps } from 'class-variance-authority'; declare const chipSizeVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; type ChipVariant = 'soft' | 'outline' | 'primary' | 'secondary' | 'destructive'; type ChipSize = NonNullable['size']>; type ChipState = { variant: ChipVariant; size: ChipSize; dismissible: boolean; }; interface ChipProps extends Omit, 'render'> { /** * Visual style, from the shared [`Button`](/ui/components/react/button) palette. Inherited from `ChipGroup`. * @default 'soft' */ variant?: ChipVariant; /** * Height, padding, text, and icon size. Inherited from `ChipGroup`. * @default 'md' */ size?: ChipSize; /** Replace the underlying element (e.g. an ``), or compose it with another component. */ render?: useRender.ComponentProps<'button', ChipState>['render']; /** * Render a close button; clicking the chip dismisses it with an exit animation. * @default false */ dismissible?: boolean; /** * Controlled visibility for a **dismissible** chip - pair with `onOpenChange` to own dismissal in your own state. * (For a non-dismissible chip, render it conditionally instead.) */ open?: boolean; /** * The **intent** signal - fires with `false` the moment a dismiss is requested. Use it with `open` for controlled * mode: update your state here. */ onOpenChange?: (open: boolean) => void; /** * The **completion** signal - fires once the exit animation finishes. Use it in uncontrolled mode to drop the chip * from state after it's animated out. */ onDismiss?: () => void; /** * Accessible label for the dismiss action (rendered as `sr-only` text). * @default 'Dismiss' */ closeLabel?: string; } declare function Chip({ className, variant, size, render, dismissible, open, onOpenChange, onDismiss, closeLabel, children, onClick, ...props }: ChipProps): React.JSX.Element; interface ChipGroupHandle { clearAll: () => void; } interface ChipGroupProps extends React.ComponentPropsWithoutRef<'div'> { /** Exposes `clearAll()`, which dismisses every `dismissible` child. */ ref?: React.Ref; /** Default `variant` for every child chip; a chip may override it. */ variant?: ChipVariant; /** Default `size` for every child chip; a chip may override it. */ size?: ChipSize; } declare function ChipGroup({ ref, className, variant, size, children, ...props }: ChipGroupProps): React.JSX.Element; export { Chip, ChipGroup }; export type { ChipProps, ChipGroupProps, ChipGroupHandle }; //# sourceMappingURL=chip.d.ts.map