mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 23:24:03 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { cn } from 'ui'
|
|
|
|
import { forwardRef, InputHTMLAttributes, ReactNode } from 'react'
|
|
|
|
export interface InputWithAddonsProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
leading?: ReactNode
|
|
trailing?: ReactNode
|
|
containerClassName?: string
|
|
}
|
|
|
|
export const InputWithAddons = forwardRef<HTMLInputElement, InputWithAddonsProps>(
|
|
({ leading, trailing, containerClassName, className, ...props }, ref) => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'group border-input ring-offset-background flex h-10 w-full rounded border bg-transparent text-sm overflow-hidden',
|
|
'focus-within:ring-ring focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2',
|
|
containerClassName
|
|
)}
|
|
>
|
|
{leading ? (
|
|
<div className="border-input px-2 flex items-center justify-center">{leading}</div>
|
|
) : null}
|
|
<input
|
|
className={cn(
|
|
'bg-transparent w-full px-0 py-2 focus:outline-none border-0 placeholder:text-foreground-lighter ',
|
|
'disabled:cursor-not-allowed disabled:opacity-50 text-[0.75rem]',
|
|
className
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
{trailing ? (
|
|
<div className="border-input bg-muted/50 border-l px-3 py-2 flex items-center justify-center">
|
|
{trailing}
|
|
</div>
|
|
) : null}
|
|
</div>
|
|
)
|
|
}
|
|
)
|
|
InputWithAddons.displayName = 'InputWithAddons'
|