import React from "react"; import { PlusRating as PlusRatingElement } from "../dist/components/rating/index.js"; export type { PlusRatingElement }; export interface PlusRatingProps extends Pick< React.AllHTMLAttributes, | "children" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "title" | "translate" | "onClick" | "onFocus" | "onBlur" > { /** undefined */ readonly?: boolean; /** undefined */ disabled?: boolean; /** undefined */ required?: boolean; /** undefined */ value?: PlusRatingElement["value"]; /** undefined */ max?: PlusRatingElement["max"]; /** undefined */ precision?: PlusRatingElement["precision"]; /** undefined */ size?: PlusRatingElement["size"]; /** undefined */ name?: PlusRatingElement["name"]; /** The name of the icon to use for empty rating items. */ emptyIconName?: PlusRatingElement["emptyIconName"]; /** The name of the icon to use for filled rating items. */ filledIconName?: PlusRatingElement["filledIconName"]; /** The label for the rating component. */ label?: PlusRatingElement["label"]; /** The caption text displayed below the rating. */ caption?: PlusRatingElement["caption"]; /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */ className?: string; /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */ exportparts?: string; /** Used for labels to link them with their inputs (using input id). */ htmlFor?: string; /** Used to help React identify which items have changed, are added, or are removed within a list. */ key?: number | string; /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */ part?: string; /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */ ref?: any; /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */ tabIndex?: number; /** Emitted when the rating value changes via user interaction. */ onPlusChange?: (event: CustomEvent) => void; /** Emitted when the user hovers over a star, includes the potential value. */ onPlusHover?: (event: CustomEvent) => void; } /** * A rating component to display and optionally set a rating value. * --- * * * ### **Events:** * - **plus-change** - Emitted when the rating value changes via user interaction. * - **plus-hover** - Emitted when the user hovers over a star, includes the potential value. * * ### **Methods:** * - **reportValidity(): _boolean_** - Checks validity and sets the error state. Returns true if valid, false otherwise. * * ### **CSS Properties:** * - **--star-color-active** - Color of active/selected stars. _(default: --color-warning-500)_ * - **--star-color-inactive** - Color of inactive stars. _(default: --color-neutral-300)_ * - **--star-color-hover** - Color of stars on hover. _(default: --plus-color-text-primary)_ * * ### **CSS Parts:** * - **host** - The main container element. * - **star-container** - The container for each star. * - **star-icon** - Each individual star icon. * - **star-partial** - The element used to display partial stars. */ export const PlusRating: React.ForwardRefExoticComponent;