TypeScript 97.5%
SQL 1.4%
Python 0.8%
1import * as React from "react";2import { cn } from "@/lib/utils";34export const inputClass =5 "flex h-9 w-full rounded-md border border-border bg-bg px-3 py-1 text-sm text-fg shadow-xs transition-colors placeholder:text-fg-subtle hover:border-border-strong focus-visible:border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/25 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/20";67export const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(({ className, type, ...props }, ref) => (8 <input type={type} className={cn(inputClass, type === "file" && "pt-1.5", className)} ref={ref} {...props} />9));10Input.displayName = "Input";1112export const Textarea = React.forwardRef<HTMLTextAreaElement, React.TextareaHTMLAttributes<HTMLTextAreaElement>>(({ className, ...props }, ref) => (13 <textarea className={cn(inputClass, "h-auto min-h-[88px] py-2 leading-relaxed", className)} ref={ref} {...props} />14));15Textarea.displayName = "Textarea";1617export function NativeSelect({ className, children, ...props }: React.SelectHTMLAttributes<HTMLSelectElement>) {18 return (19 <select className={cn(inputClass, "appearance-none bg-[url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%238a93a3%22 stroke-width=%222%22><path d=%22m6 9 6 6 6-6%22/></svg>')] bg-[length:12px] bg-[right_10px_center] bg-no-repeat pr-8", className)} {...props}>20 {children}21 </select>22 );23}24