From 1439380126f0eb1d160d2589427b90cf640df503 Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Sun, 2 Nov 2025 06:58:27 +0100 Subject: [PATCH] Add Component Showcase and development preview page - Introduce `ComponentShowcase` to display all design system components (buttons, cards, alerts, etc.) for development and testing purposes. - Create a dedicated `/dev/components` route for accessing the showcase. - Ensure reuse of existing `shadcn/ui` components with appropriate styling. - Update `PasswordResetConfirmForm` to use `bg-muted` for the password strength indicator background. --- frontend/src/app/dev/components/page.tsx | 17 + .../auth/PasswordResetConfirmForm.tsx | 2 +- .../src/components/dev/ComponentShowcase.tsx | 554 ++++++++++++++++++ 3 files changed, 572 insertions(+), 1 deletion(-) create mode 100644 frontend/src/app/dev/components/page.tsx create mode 100644 frontend/src/components/dev/ComponentShowcase.tsx diff --git a/frontend/src/app/dev/components/page.tsx b/frontend/src/app/dev/components/page.tsx new file mode 100644 index 0000000..83a53e3 --- /dev/null +++ b/frontend/src/app/dev/components/page.tsx @@ -0,0 +1,17 @@ +/** + * Component Showcase Page + * Development-only page to preview all shadcn/ui components + * Access: /dev/components + */ + +import type { Metadata } from 'next'; +import { ComponentShowcase } from '@/components/dev/ComponentShowcase'; + +export const metadata: Metadata = { + title: 'Component Showcase | Dev', + description: 'Preview all design system components', +}; + +export default function ComponentShowcasePage() { + return ; +} diff --git a/frontend/src/components/auth/PasswordResetConfirmForm.tsx b/frontend/src/components/auth/PasswordResetConfirmForm.tsx index 96213ca..2a385d9 100644 --- a/frontend/src/components/auth/PasswordResetConfirmForm.tsx +++ b/frontend/src/components/auth/PasswordResetConfirmForm.tsx @@ -223,7 +223,7 @@ export function PasswordResetConfirmForm({ {/* Password Strength Indicator */} {watchPassword && (
-
+
+

{title}

+
+ {children} +
+
+ ); +} + +/** + * Component showcase + */ +export function ComponentShowcase() { + const [isDark, setIsDark] = useState(false); + const [checked, setChecked] = useState(false); + + const toggleTheme = () => { + setIsDark(!isDark); + document.documentElement.classList.toggle('dark'); + }; + + return ( +
+ {/* Header */} +
+
+
+

Component Showcase

+

Development Preview

+
+ +
+
+ + {/* Content */} +
+
+ {/* Colors */} +
+
+
+
+

Background

+
+
+
+

Foreground

+
+
+
+

Card

+
+
+
+

Primary

+
+
+
+

Secondary

+
+
+
+

Muted

+
+
+
+

Accent

+
+
+
+

Destructive

+
+
+
+

Border

+
+
+
+ + {/* Typography */} +
+
+
+

Heading 1

+

text-4xl font-bold

+
+
+

Heading 2

+

text-3xl font-semibold

+
+
+

Heading 3

+

text-2xl font-semibold

+
+
+

Heading 4

+

text-xl font-medium

+
+
+

Body text - The quick brown fox jumps over the lazy dog

+

text-base

+
+
+

+ Small text - The quick brown fox jumps over the lazy dog +

+

text-sm text-muted-foreground

+
+
+ + const example = true; + +

Code / Mono

+
+
+
+ + {/* Buttons */} +
+
+ {/* Variants */} +
+

Variants

+
+ + + + + + +
+
+ + {/* Sizes */} +
+

Sizes

+
+ + + + +
+
+ + {/* With Icons */} +
+

With Icons

+
+ + + +
+
+ + {/* States */} +
+

States

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