'use client';
import clsx from 'clsx';
import { SearchIcon } from "lucide-react";
import { tokens } from "@/app/styles/design-tokens";
export type TimeFilter = 'all' | 'today' | 'week' | 'month';
interface SearchInputProps {
value: string;
onChange: (value: string) => void;
onTimeFilterChange: (filter: TimeFilter) => void;
timeFilter: TimeFilter;
placeholder?: string;
}
export function SearchInput({
value,
onChange,
onTimeFilterChange,
timeFilter,
placeholder = "Search projects..."
}: SearchInputProps) {
return (
onChange(e.target.value)}
placeholder={placeholder}
className={clsx(
"w-full pl-9 pr-4 py-2",
tokens.typography.sizes.sm,
tokens.radius.md,
tokens.transitions.default,
"bg-gray-50 dark:bg-gray-800",
tokens.colors.light.text.primary,
tokens.colors.dark.text.primary,
"placeholder:text-gray-400 dark:placeholder:text-gray-500",
"border border-gray-200 dark:border-gray-700",
"focus:ring-2 focus:ring-indigo-500/50",
"focus:border-transparent"
)}
/>
{(['all', 'today', 'week', 'month'] as const).map(filter => (
))}
);
}