From 43c141d3cd9c64f205c829cbb6cfa668ef6fbbbc Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Tue, 30 Sep 2025 21:23:30 +0200 Subject: [PATCH] feat: add additional UI components to UIShowcaseClient - Integrated new components including TagDisplay, TagInput, DateTimeInput, FormField, LoadingSpinner, PrioritySelector, StatusBadge, KeyboardShortcutsModal, and Modal for enhanced user interaction. - Organized components into sections for better structure and usability, improving overall UI showcase experience. --- .../ui-showcase/UIShowcaseClient.tsx | 213 ++++++++++++++++++ 1 file changed, 213 insertions(+) diff --git a/src/components/ui-showcase/UIShowcaseClient.tsx b/src/components/ui-showcase/UIShowcaseClient.tsx index 8c32d0d..71cd30d 100644 --- a/src/components/ui-showcase/UIShowcaseClient.tsx +++ b/src/components/ui-showcase/UIShowcaseClient.tsx @@ -18,11 +18,23 @@ import { Header } from '@/components/ui/Header'; import { TabItem } from '@/components/ui/Tabs'; import { AchievementData } from '@/components/ui/AchievementCard'; import { ChallengeData } from '@/components/ui/ChallengeCard'; +import { TagDisplay } from '@/components/ui/TagDisplay'; +import { TagInput } from '@/components/ui/TagInput'; +import { DateTimeInput } from '@/components/ui/DateTimeInput'; +import { FormField } from '@/components/ui/FormField'; +import { LoadingSpinner } from '@/components/ui/LoadingSpinner'; +import { PrioritySelector } from '@/components/ui/PrioritySelector'; +import { StatusBadge } from '@/components/ui/StatusBadge'; +import { KeyboardShortcutsModal } from '@/components/ui/KeyboardShortcutsModal'; +import { Modal } from '@/components/ui/Modal'; +import { FontSizeToggle } from '@/components/ui/FontSizeToggle'; export function UIShowcaseClient() { const [inputValue, setInputValue] = useState(''); const [selectedDate, setSelectedDate] = useState(new Date()); const [selectedPeriod, setSelectedPeriod] = useState('7d'); + const [showModal, setShowModal] = useState(false); + const [showKeyboardModal, setShowKeyboardModal] = useState(false); 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' }, @@ -1418,6 +1430,174 @@ export function UIShowcaseClient() { + {/* Additional UI Components Section */} +
+

+ Additional UI Components +

+ +
+ {/* TagDisplay & TagInput */} +
+

Tag Components

+
+
+
+ TagDisplay - Affichage de tags +
+
+ +
+
+ +
+
+ TagInput - Input avec suggestions de tags +
+ console.log('Tags changed:', tags)} + placeholder="Ajouter des tags..." + maxTags={5} + /> +
+
+
+ + {/* Form Components */} +
+

Form Components

+
+
+
+ DateTimeInput - Input de date et heure +
+ date && setSelectedDate(date)} + placeholder="Sélectionner une date" + /> +
+ +
+
+ FormField - Champ de formulaire avec label +
+
+ + +

Ce champ est requis

+
+
+
+
+ + {/* Status & Priority Components */} +
+

Status & Priority

+
+
+
+ StatusBadge - Badge de statut +
+
+ + + + + + + +
+
+ +
+
+ PrioritySelector - Sélecteur de priorité +
+ console.log('Priority changed:', priority)} + title="Sélectionner une priorité" + /> +
+
+
+ + {/* Loading & Modal Components */} +
+

Loading & Modal

+
+
+
+ LoadingSpinner - Indicateur de chargement +
+
+ + + + + +
+
+ +
+
+ Modal - Fenêtre modale +
+
+ + +
+
+
+
+ + {/* Utility Components */} +
+

Utility Components

+
+
+
+ FontSizeToggle - Toggle de taille de police +
+
+ + + Utilisez ce toggle pour ajuster la taille de police + +
+
+
+
+
+
+ {/* Footer */}

@@ -1425,6 +1605,39 @@ export function UIShowcaseClient() {

+ + {/* Modals */} + setShowModal(false)} + title="Exemple de Modal" + size="md" + > +
+

+ Ceci est un exemple de modal avec du contenu personnalisé. +

+
+ + +
+
+
+ + setShowKeyboardModal(false)} + shortcuts={[ + { keys: ['Ctrl', 'K'], description: 'Ouvrir la recherche', category: 'Navigation' }, + { keys: ['Ctrl', 'N'], description: 'Nouvelle tâche', category: 'Actions' }, + { keys: ['Ctrl', 'S'], description: 'Sauvegarder', category: 'Actions' }, + { keys: ['Esc'], description: 'Fermer les modales', category: 'Navigation' } + ]} + /> ); }