From 239d2f9e1749e91f2b435aa411426b3d898bc952 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 09:59:39 +0200 Subject: [PATCH] feat(search-box-component): SearchBox mit clear-button [tsc:fail] --- .phase36-state.json | 5 +-- GENERATION_LOG.md | 18 +++++++++++ apps/web/src/components/SearchBox.tsx | 45 +++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/SearchBox.tsx diff --git a/.phase36-state.json b/.phase36-state.json index f3ec3ec..a6e0059 100644 --- a/.phase36-state.json +++ b/.phase36-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "select-component", + "current_feature": "search-box-component", "started_at": "2026-05-23T09:58:25.839766", "attempted_features": [ "input-component", - "textarea-component" + "textarea-component", + "select-component" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 144d8a3..49b3e42 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3931,3 +3931,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `09:59:25` **INFO** Committed feature select-component +- `09:59:25` **INFO** Pushed: rc=0 + +## Phase-3 Feature: search-box-component (2026-05-23 09:59:25) + +- `09:59:25` **INFO** Description: SearchBox mit clear-button +- `09:59:25` **INFO** Generating apps/web/src/components/SearchBox.tsx (SearchBox-Component. Props: value, onChange, placeholder? (default 'Su…) +- `09:59:37` **INFO** wrote 1305 chars in 12.0s (attempt 1) +- `09:59:37` **INFO** Running tsc --noEmit on api… +- `09:59:39` **WARN** tsc errors: +src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, diff --git a/apps/web/src/components/SearchBox.tsx b/apps/web/src/components/SearchBox.tsx new file mode 100644 index 0000000..69732b3 --- /dev/null +++ b/apps/web/src/components/SearchBox.tsx @@ -0,0 +1,45 @@ +import React from 'react'; +import { Search, X } from 'lucide-react'; + +interface SearchBoxProps { + value: string; + onChange: (value: string) => void; + placeholder?: string; + onClear?: () => void; +} + +export default function SearchBox({ + value, + onChange, + placeholder = 'Suchen...', + onClear, +}: SearchBoxProps) { + const handleClear = () => { + onChange(''); + if (onClear) onClear(); + }; + + return ( +
+
+ +
+ onChange(e.target.value)} + placeholder={placeholder} + className="block w-full pl-10 pr-10 py-2 text-sm text-slate-900 border border-slate-200 rounded-lg bg-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder:text-slate-400" + /> + {value && ( + + )} +
+ ); +} \ No newline at end of file