import * as React from 'react'; import { clsx } from 'clsx'; import { ChevronDown } from 'lucide-react'; export interface SelectProps extends React.SelectHTMLAttributes { label?: string; error?: string; options: Array<{ value: string; label: string; disabled?: boolean }>; placeholder?: string; controlSize?: 'sm' | 'md' | 'lg'; variant?: 'surface' | 'muted' | 'ghost'; } export const Select = React.forwardRef( ( { label, error, options, placeholder, controlSize = 'md', variant = 'surface', className, id, ...props }, ref ) => { const generatedId = React.useId(); const selectId = id ?? (label || error ? `select-${generatedId}` : undefined); const sizes: Record, string> = { sm: 'h-8 px-2.5 pr-8 text-xs', md: 'h-10 px-3 pr-8 text-sm', lg: 'h-11 px-4 pr-9 text-sm', }; const variants: Record, string> = { surface: 'bg-[var(--bl-input,var(--bl-surface-card,#1a1a2e))]', muted: 'bg-[var(--bl-surface-muted,#252540)]', ghost: 'bg-transparent', }; return (
{label && ( )}
{error && ( )}
); } ); Select.displayName = 'Select';