From 99a475736b5f93c176a762f5a63e3e03d06bbac6 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Fri, 12 Dec 2025 16:44:57 +0100 Subject: [PATCH] Enhance UI components and animations: Introduce a shimmer animation effect in globals.css, refactor FeedbackPageClient, LoginPage, RegisterPage, and AdminPanel components to utilize new UI components for improved consistency and maintainability. Update event and feedback handling in EventsPageSection and FeedbackModal, ensuring a cohesive user experience across the application. --- app/admin/style-guide/page.tsx | 495 +++++++++++++++++ app/feedback/[eventId]/FeedbackPageClient.tsx | 113 ++-- app/globals.css | 13 + app/login/page.tsx | 106 ++-- app/register/page.tsx | 275 ++++------ components/AdminPanel.tsx | 91 ++-- components/BackgroundPreferences.tsx | 27 +- components/EventManagement.tsx | 319 ++++++----- components/EventsPageSection.tsx | 502 +++++++++--------- components/FeedbackModal.tsx | 218 ++++---- components/HeroSection.tsx | 34 +- components/ImageSelector.tsx | 42 +- components/Leaderboard.tsx | 2 +- components/LeaderboardSection.tsx | 441 +++++++-------- components/Navigation.tsx | 40 +- components/PlayerStats.tsx | 2 +- components/ProfileForm.tsx | 261 ++++----- components/UserManagement.tsx | 71 ++- components/ui/Alert.tsx | 32 ++ components/{ => ui}/Avatar.tsx | 0 components/ui/BackgroundSection.tsx | 43 ++ components/ui/Badge.tsx | 40 ++ components/ui/Button.tsx | 47 ++ components/ui/Card.tsx | 30 ++ components/ui/CloseButton.tsx | 29 + components/ui/Input.tsx | 38 ++ components/ui/Modal.tsx | 54 ++ components/ui/ProgressBar.tsx | 73 +++ components/ui/SectionTitle.tsx | 64 +++ components/ui/StarRating.tsx | 66 +++ components/ui/Textarea.tsx | 49 ++ components/ui/index.ts | 14 + 32 files changed, 2242 insertions(+), 1389 deletions(-) create mode 100644 app/admin/style-guide/page.tsx create mode 100644 components/ui/Alert.tsx rename components/{ => ui}/Avatar.tsx (100%) create mode 100644 components/ui/BackgroundSection.tsx create mode 100644 components/ui/Badge.tsx create mode 100644 components/ui/Button.tsx create mode 100644 components/ui/Card.tsx create mode 100644 components/ui/CloseButton.tsx create mode 100644 components/ui/Input.tsx create mode 100644 components/ui/Modal.tsx create mode 100644 components/ui/ProgressBar.tsx create mode 100644 components/ui/SectionTitle.tsx create mode 100644 components/ui/StarRating.tsx create mode 100644 components/ui/Textarea.tsx create mode 100644 components/ui/index.ts diff --git a/app/admin/style-guide/page.tsx b/app/admin/style-guide/page.tsx new file mode 100644 index 0000000..bc2ba2e --- /dev/null +++ b/app/admin/style-guide/page.tsx @@ -0,0 +1,495 @@ +"use client"; + +import { useState } from "react"; +import Navigation from "@/components/Navigation"; +import { + Button, + Input, + Textarea, + Card, + Badge, + Alert, + Modal, + ProgressBar, + StarRating, + Avatar, + SectionTitle, + BackgroundSection, + CloseButton, +} from "@/components/ui"; + +export default function StyleGuidePage() { + const [modalOpen, setModalOpen] = useState(false); + const [inputValue, setInputValue] = useState(""); + const [textareaValue, setTextareaValue] = useState(""); + const [rating, setRating] = useState(0); + + return ( +
+ + +
+ + STYLE GUIDE + +

+ Guide de style complet avec tous les composants UI disponibles et + leurs variantes +

+ + {/* Buttons */} + +

+ Buttons +

+
+
+

Variantes

+
+ + + + + +
+
+
+

Tailles

+
+ + + +
+
+
+

États

+
+ + +
+
+
+
+ + {/* Inputs */} + +

Inputs

+
+
+

Types

+
+ setInputValue(e.target.value)} + /> + + + + +
+
+
+

Avec erreur

+
+ setInputValue(e.target.value)} + /> +
+
+
+
+ + {/* Textarea */} + +

+ Textarea +

+
+
+

Basique

+
+