'use client'; import { useState } from 'react'; import { CheckSquare2, Calendar, Circle } from 'lucide-react'; import { Input } from '@/components/ui/Input'; import { SearchInput } from '@/components/ui/SearchInput'; import { TagInput } from '@/components/ui/TagInput'; import { DateTimeInput } from '@/components/ui/DateTimeInput'; import { FormField } from '@/components/ui/FormField'; import { PrioritySelector } from '@/components/ui/PrioritySelector'; import { DailyAddForm } from '@/components/ui/DailyAddForm'; import { CheckboxItem, CheckboxItemData } from '@/components/ui/CheckboxItem'; export function FormsSection() { const [inputValue, setInputValue] = useState(''); const [selectedDate, setSelectedDate] = useState(new Date()); const [checkboxItems, setCheckboxItems] = useState([ { id: '1', text: 'Tâche complétée', isChecked: true, type: 'task' }, { id: '2', text: 'Réunion importante', isChecked: false, type: 'meeting' }, { id: '3', text: 'Tâche en cours', isChecked: false, type: 'task' } ]); const handleToggleCheckbox = (id: string) => { setCheckboxItems(prev => prev.map(item => item.id === id ? { ...item, isChecked: !item.isChecked } : item ) ); }; const handleUpdateCheckbox = (id: string, text: string) => { setCheckboxItems(prev => prev.map(item => item.id === id ? { ...item, text } : item ) ); }; return (

Forms & Inputs

{/* Basic Inputs */}

Basic Inputs

setInputValue(e.target.value)} />
{/* Form Fields */}

Form Fields

setInputValue(e)} /> {}} />
console.log('Priority:', priority)} />
date && setSelectedDate(date)} />
{/* Tag Input */}

Tag Input

{}} />
{/* Checkbox Items */}

Checkbox Items

{checkboxItems.map((item) => ( handleToggleCheckbox(item.id)} onUpdate={async (text) => handleUpdateCheckbox(item.id, text)} onDelete={async () => { setCheckboxItems(prev => prev.filter(i => i.id !== item.id)); }} /> ))}
{/* Daily Add Form */}

Daily Add Form

console.log('Add item:', text, option)} options={[ { value: 'task', label: 'Task', icon: , color: 'green' }, { value: 'meeting', label: 'Meeting', icon: , color: 'blue' }, { value: 'event', label: 'Event', icon: , color: 'gray' } ]} />
); }