import * as React from 'react'; type RatingVariant = 'filled' | 'outline'; type RatingOrientation = 'horizontal' | 'vertical'; interface RatingIconPair { /** Drawn under the fill when `variant="outline"`. */ empty: React.ReactNode; /** Drawn as the fill, and as the muted base when `variant="filled"`. */ filled: React.ReactNode; } interface RatingProps extends Omit, 'children' | 'defaultValue' | 'onChange' | 'role' | 'aria-readonly'> { /** Controlled rating. Pair with `onValueChange`. */ value?: number; /** * Uncontrolled initial rating. `0` means unrated. * @default 0 */ defaultValue?: number; /** Fires when the rating is committed by a click or a key press. */ onValueChange?: (value: number) => void; /** Fires with the `step`-snapped rating under the pointer, and with `null` when it leaves. */ onHoverChange?: (value: number | null) => void; /** * How many items to render. * @default 5 */ count?: number; /** * Smallest selectable fraction of an item. Use `0.5` for half icons. * @default 1 */ step?: number; /** * Icon pair to render. Defaults to a built-in star; pass any 24x24 `currentColor` SVGs, e.g. a matching outline and solid icon from `@appica/icons-react`. */ icon?: RatingIconPair; /** * `'filled'` draws unrated items as muted solid icons, `'outline'` draws them as line icons. * @default 'filled' */ variant?: RatingVariant; /** * Lay the items out in a row or a column. A vertical rating fills from the top down. * @default 'horizontal' */ orientation?: RatingOrientation; /** * Icon size. A number is read as pixels; a string is used verbatim, so any CSS length works (`'2rem'`, `'1em'` to follow the surrounding text). * @default 24 */ size?: number | string; /** * Track the pointer with a continuous fill before the rating is committed. Clicking still selects at `step` precision either way. * @default true */ hoverable?: boolean; /** * Selecting the current rating again resets it to `0`. * @default false */ clearable?: boolean; /** * Blocks interaction and dims the control. * @default false */ disabled?: boolean; /** * Renders a non-interactive display of `value`, exposed as a single labeled image. * @default false */ readOnly?: boolean; /** Field name submitted with a form, via a hidden input. */ name?: string; /** Accessible name for each item, describing the rating it selects. */ itemAriaLabel?: (value: number, count: number) => string; } declare function Rating({ value, defaultValue, onValueChange, onHoverChange, count, step, icon, variant, orientation, size, hoverable, clearable, disabled, readOnly, name, itemAriaLabel, className, style, 'aria-label': ariaLabel, ...props }: RatingProps): React.JSX.Element; export { Rating }; export type { RatingProps, RatingIconPair }; //# sourceMappingURL=rating.d.ts.map