import { forwardRef } from 'react'; import PropTypes from 'prop-types'; /** * Select — accessible dropdown select with label and error support. * @param {Object} props * @param {string} [props.label] - Label text displayed above the select * @param {string} [props.id] - HTML id attribute (also used for label association) * @param {string} [props.error] - Error message to display below the select * @param {{ value: string, label: string }[]} [props.options=[]] - Array of option objects * @param {string} [props.placeholder] - Placeholder option text (disabled) * @param {string} [props.className=''] - Additional CSS classes * @param {boolean} [props.required=false] - Whether the field is required * @param {React.Ref} ref - Forwarded ref * @returns {JSX.Element} */ const Select = forwardRef(function Select( { label, id, error, options = [], placeholder, className = '', required = false, ...props }, ref ) { return (
{error}
)}