From ad737de1c3e9433ddc58cc54227595447f1d1b39 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:09:26 +0200 Subject: [PATCH] feat(chip-component): Chip mit dismiss-Button [tsc:fail] --- .phase38-state.json | 5 +- GENERATION_LOG.md | 18 +++++++ apps/web/src/components/Chip.tsx | 80 ++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/Chip.tsx diff --git a/.phase38-state.json b/.phase38-state.json index 8792af9..93b2488 100644 --- a/.phase38-state.json +++ b/.phase38-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "rating-component", + "current_feature": "chip-component", "started_at": "2026-05-23T10:08:26.899213", "attempted_features": [ "spinner-component", - "slider-component" + "slider-component", + "rating-component" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 4cb5e86..2ea2550 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -4089,3 +4089,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, +- `10:08:59` **INFO** Committed feature rating-component +- `10:09:00` **INFO** Pushed: rc=0 + +## Phase-3 Feature: chip-component (2026-05-23 10:09:00) + +- `10:09:00` **INFO** Description: Chip mit dismiss-Button +- `10:09:00` **INFO** Generating apps/web/src/components/Chip.tsx (Chip-Component. Props: label, onDismiss?, icon?, variant?: 'default'|'…) +- `10:09:24` **INFO** wrote 2323 chars in 24.5s (attempt 1) +- `10:09:24` **INFO** Running tsc --noEmit on api… +- `10:09:26` **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/Chip.tsx b/apps/web/src/components/Chip.tsx new file mode 100644 index 0000000..3259eb8 --- /dev/null +++ b/apps/web/src/components/Chip.tsx @@ -0,0 +1,80 @@ +import React from 'react'; +import { LucideIcon } from 'lucide-react'; + +interface ChipProps { + label: string; + onDismiss?: () => void; + icon?: LucideIcon; + variant?: 'default' | 'outlined' | 'solid'; + color?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning'; +} + +const colorMap = { + primary: { + default: 'bg-blue-100 text-blue-700 border-blue-200', + outlined: 'bg-transparent text-blue-600 border-blue-600', + solid: 'bg-blue-600 text-white border-blue-600', + }, + secondary: { + default: 'bg-slate-100 text-slate-700 border-slate-200', + outlined: 'bg-transparent text-slate-600 border-slate-600', + solid: 'bg-slate-600 text-white border-slate-600', + }, + danger: { + default: 'bg-red-100 text-red-700 border-red-200', + outlined: 'bg-transparent text-red-600 border-red-600', + solid: 'bg-red-600 text-white border-red-600', + }, + success: { + default: 'bg-green-100 text-green-700 border-green-200', + outlined: 'bg-transparent text-green-600 border-green-600', + solid: 'bg-green-600 text-white border-green-600', + }, + warning: { + default: 'bg-yellow-100 text-yellow-700 border-yellow-200', + outlined: 'bg-transparent text-yellow-600 border-yellow-600', + solid: 'bg-yellow-600 text-white border-yellow-600', + }, +}; + +export default function Chip({ + label, + onDismiss, + icon: Icon, + variant = 'default', + color = 'primary', +}: ChipProps) { + const colorClasses = colorMap[color][variant]; + + return ( +
+ {Icon && } + {label} + {onDismiss && ( + + )} +
+ ); +} \ No newline at end of file