From 420321c9a91a96a17fab1d6fdf263e21f458df8a Mon Sep 17 00:00:00 2001 From: jason Date: Sun, 29 Mar 2026 21:57:23 -0500 Subject: [PATCH] cleanup --- apps/client/src/components/ui/Select.tsx | 40 +++ apps/client/src/components/ui/Textarea.tsx | 39 +++ .../src/features/calendar/CalendarGrid.tsx | 109 +++++++ .../src/features/calendar/DayEventsModal.tsx | 87 ++++++ .../src/features/calendar/EventModal.tsx | 241 +++++++++++++++ apps/client/src/features/chores/ChoreCard.tsx | 125 ++++++++ .../client/src/features/chores/ChoreModal.tsx | 146 +++++++++ .../src/features/shopping/ShoppingItemRow.tsx | 152 +++++++++ apps/client/src/hooks/useMembers.ts | 16 + apps/client/src/pages/Calendar.tsx | 223 +++++++++++++- apps/client/src/pages/Chores.tsx | 154 ++++++++- apps/client/src/pages/Shopping.tsx | 291 +++++++++++++++++- 12 files changed, 1620 insertions(+), 3 deletions(-) create mode 100644 apps/client/src/components/ui/Select.tsx create mode 100644 apps/client/src/components/ui/Textarea.tsx create mode 100644 apps/client/src/features/calendar/CalendarGrid.tsx create mode 100644 apps/client/src/features/calendar/DayEventsModal.tsx create mode 100644 apps/client/src/features/calendar/EventModal.tsx create mode 100644 apps/client/src/features/chores/ChoreCard.tsx create mode 100644 apps/client/src/features/chores/ChoreModal.tsx create mode 100644 apps/client/src/features/shopping/ShoppingItemRow.tsx create mode 100644 apps/client/src/hooks/useMembers.ts diff --git a/apps/client/src/components/ui/Select.tsx b/apps/client/src/components/ui/Select.tsx new file mode 100644 index 0000000..61afd13 --- /dev/null +++ b/apps/client/src/components/ui/Select.tsx @@ -0,0 +1,40 @@ +import { forwardRef, SelectHTMLAttributes } from 'react'; +import { clsx } from 'clsx'; + +interface SelectProps extends SelectHTMLAttributes { + label?: string; + error?: string; + hint?: string; +} + +export const Select = forwardRef( + ({ label, error, hint, className, id, children, ...props }, ref) => { + const inputId = id ?? label?.toLowerCase().replace(/\s+/g, '-'); + return ( +
+ {label && ( + + )} + + {hint && !error &&

{hint}

} + {error &&

{error}

} +
+ ); + } +); +Select.displayName = 'Select'; diff --git a/apps/client/src/components/ui/Textarea.tsx b/apps/client/src/components/ui/Textarea.tsx new file mode 100644 index 0000000..565166b --- /dev/null +++ b/apps/client/src/components/ui/Textarea.tsx @@ -0,0 +1,39 @@ +import { forwardRef, TextareaHTMLAttributes } from 'react'; +import { clsx } from 'clsx'; + +interface TextareaProps extends TextareaHTMLAttributes { + label?: string; + error?: string; + hint?: string; +} + +export const Textarea = forwardRef( + ({ label, error, hint, className, id, ...props }, ref) => { + const inputId = id ?? label?.toLowerCase().replace(/\s+/g, '-'); + return ( +
+ {label && ( + + )} +