From 73d8c27e461d7de3e8ed551fe40f3bb44bb308d1 Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Tue, 7 Jul 2026 13:21:27 +0700 Subject: [PATCH] fix(ui): show the destructive border on invalid Input/Textarea/Select MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These primitives set aria-invalid (via FormControl) but never styled it, so an invalid plain field showed a red label and message yet kept a neutral border — while InputGroup/InputPassword and textarea-autosize already went red. Add the same aria-invalid:border-destructive + ring the group primitives use, so every field type reads the same when invalid (Input also fixes Autocomplete, which wraps it). Co-Authored-By: Claude Opus 4.8 --- frontend/src/components/ui/input.tsx | 2 +- frontend/src/components/ui/select.tsx | 2 +- frontend/src/components/ui/textarea.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx index 5e672f75..af5ac6d6 100644 --- a/frontend/src/components/ui/input.tsx +++ b/frontend/src/components/ui/input.tsx @@ -8,7 +8,7 @@ function Input({ className, type, ...props }: InputProps) { return ( span]:line-clamp-1', + 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive border-input ring-offset-background focus:ring-ring data-placeholder:text-muted-foreground flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs focus:ring-1 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className, )} {...props} diff --git a/frontend/src/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsx index 06f5b72f..8f43aa02 100644 --- a/frontend/src/components/ui/textarea.tsx +++ b/frontend/src/components/ui/textarea.tsx @@ -60,7 +60,7 @@ function Textarea({ return (