import * as React from 'react'; import type { RadioProps, RadioRef } from '../Radio'; import type { TooltipProps } from '../Tooltip'; import type { TooltipPopperProps } from '../TooltipPopper'; import type { BackyardBaseProps } from '../utils/typings/BackyardProps'; import type { BDSForwardRef } from '../utils/typings/BDSComponentProps'; /** * Backyard PVS component * Also known as a swatch selector. * * The PVS component allows the user to choose between various textures or colors offered for a particular item. * It provides a quick view of what options are available, and typically changes the relevant images to reflect * the changes made from the PVS selector. * * Only one option in a PVS may be selected at a time. Essentially, the swatches function as a radio button but * with images/color swatches included for a quick preview. * * The name of the swatch is visible on hover through a tooltip. * * ex. * * * * * * * */ declare const PVS: BDSForwardRef; declare type PVSRef = RadioRef; declare type PVSOverrideProps = 'wrapperProps'; interface PVSProps extends Omit { /** * Required. The color or image to be displayed in the PVS * Can either be an image source or a color hex value (#000 or #000000). */ fill: string; /** * Required. Value of the internal `input` */ value: string; /** * DOM Name of the internal `input` * Note: Required when NOT a child of `RadioGroup` */ name?: string; /** * Name of the PVS swatch color/image. * Used as the tooltip content, also used as the `alt` value for image fills. */ title?: string; /** * DOM Class Name for PVS */ className?: string; /** * Used to indicate that a PVS is not currently available to the user */ unavailable?: boolean; /** * Whether or not `RadioTile` is checked */ checked?: RadioProps['checked']; /** * Whether or not the radio is checked by default */ defaultChecked?: RadioProps['defaultChecked']; /** * Color of the selected badge */ color?: 'interactive' | 'green'; /** * `onChange` function triggered when value of `input` changes * Chained through `RadioGroup` parent if present */ onChange?: RadioProps['onChange']; /** * Used to apply props on the radio wrapper */ wrapperProps?: BackyardBaseProps; /** * Overwrite props for the tooltips */ tooltipProps?: React.PropsWithRef; /** * Overwrite props for the tooltipPoppers */ popoverProps?: Partial>; /** * Overwrite props for the tooltipPoppers * * Alais of `popoverProps` */ popperProps?: Partial>; /** * DOM Class Name for the input */ inputClassName?: string; } export { PVS }; export type { PVSProps, PVSRef }; export default PVS;