SearchInput: bordered like Input, matching Select in FilterBar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cc0448bfde
commit
b7c038c9d7
|
|
@ -3,7 +3,7 @@ import { SearchIcon, XIcon } from "lucide-react"
|
|||
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
/** Поле поиска на мягкой подложке: иконка, крестик очистки. */
|
||||
/** Поле поиска: иконка, крестик очистки. */
|
||||
export const SearchInput = React.forwardRef<
|
||||
HTMLInputElement,
|
||||
Omit<React.ComponentProps<"input">, "value" | "onChange" | "size"> & {
|
||||
|
|
@ -38,8 +38,9 @@ export const SearchInput = React.forwardRef<
|
|||
onKeyDown?.(e)
|
||||
}}
|
||||
className={cn(
|
||||
"w-full rounded-lg border border-transparent bg-muted/70 transition outline-none placeholder:text-muted-foreground/80 [&::-webkit-search-cancel-button]:hidden",
|
||||
"focus:border-primary/40 focus:bg-card focus:ring-4 focus:ring-primary/10",
|
||||
// как Input: рамка на белом, та же подсветка фокуса — в строке фильтров стоит рядом с Select
|
||||
"w-full min-w-0 rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground dark:bg-input/30 [&::-webkit-search-cancel-button]:hidden",
|
||||
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
||||
size === "sm" && "h-8 pr-8 pl-9 text-sm",
|
||||
size === "md" && "h-9 pr-8 pl-9 text-sm",
|
||||
size === "lg" && "h-12 rounded-xl pr-12 pl-12 text-base",
|
||||
|
|
|
|||
Loading…
Reference in New Issue