import React from 'react'; import { withVariants } from '@udecode/cn'; import { type VariantProps, cva } from 'class-variance-authority'; export const inputVariants = cva( 'flex w-full rounded-md bg-transparent text-base file:border-0 file:bg-background file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', { defaultVariants: { h: 'md', variant: 'default', }, variants: { h: { md: 'h-10 px-3 py-2', sm: 'h-[28px] px-1.5 py-1', }, variant: { default: 'border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', ghost: 'border-none focus-visible:ring-transparent', }, }, }, ); export type InputProps = React.ComponentPropsWithoutRef<'input'> & VariantProps; export const Input = withVariants('input', inputVariants, ['variant', 'h']); export type FloatingInputProps = InputProps & { label: string; }; export function FloatingInput({ id, className, label, ...props }: FloatingInputProps) { return ( <> ); }