feat(ui): overhaul frontend with IMPHNEN visual identity

- Update CSS foundation: HSL→oklch color tokens, Poppins font, new utilities
- Replace Three.js sakura particles with CSS glow orbs
- Rebrand Header with IMPHNEN logo and gradient text
- Update all UI components (Button, Card, Badge, Input, Select, Tabs, Toast)
- Apply IMPHNEN design patterns (glass, gradient, grid) to layout
- Remove all hardcoded #7EC8E3/#FFB7C5/#FCA5A5 references
- Standardize rounded-xl across all components
- Replace emoji toasts with Lucide icons

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-12 23:00:52 +07:00
co-authored by Claude
parent 7f3eb7b9ac
commit 5c00c9f60b
34 changed files with 341 additions and 394 deletions
@@ -15,7 +15,7 @@ interface MobileTabBarProps {
export function MobileTabBar({ activeTab, onTabChange }: MobileTabBarProps) {
return (
<nav className="fixed bottom-0 left-0 right-0 z-50 flex border-t border-primary/20 bg-white rounded-t-xl md:hidden">
<nav className="fixed bottom-0 left-0 right-0 z-50 flex border-t border-border bg-card shadow-lg md:hidden">
{tabs.map(({ id, label, Icon }) => (
<button
key={id}
@@ -28,6 +28,9 @@ export function MobileTabBar({ activeTab, onTabChange }: MobileTabBarProps) {
>
<Icon className="h-5 w-5" />
<span className="text-[10px]">{label}</span>
{activeTab === id && (
<span className="h-0.5 w-6 rounded-full bg-primary mx-auto mt-0.5" />
)}
</button>
))}
</nav>
+3 -3
View File
@@ -12,10 +12,10 @@ type BadgeVariant =
const variants: Record<BadgeVariant, string> = {
default: "border-transparent bg-primary text-primary-foreground",
secondary: "border-transparent bg-muted text-muted-foreground",
destructive: "border-transparent bg-[#FCA5A5] text-red-800",
destructive: "border-transparent bg-destructive/15 text-destructive",
outline: "border-border text-foreground",
success: "border-transparent bg-[#BBF7D0] text-green-800",
warning: "border-transparent bg-[#FDE68A] text-amber-800",
success: "border-transparent bg-emerald-100 text-emerald-700",
warning: "border-transparent bg-amber-100 text-amber-700",
};
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
+10 -8
View File
@@ -11,17 +11,19 @@ type ButtonVariant =
type ButtonSize = "default" | "sm" | "lg" | "icon";
const variants: Record<ButtonVariant, string> = {
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
secondary: "bg-[#FFB7C5] text-[#1a1a2e] hover:bg-[#FFB7C5]/80",
destructive: "bg-[#FCA5A5] text-[#1a1a2e] hover:bg-[#FCA5A5]/80",
outline: "border border-border bg-white hover:bg-primary-soft",
ghost: "hover:bg-primary-soft",
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
ghost: "hover:bg-accent hover:text-accent-foreground",
};
const sizes: Record<ButtonSize, string> = {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-xl px-3",
lg: "h-11 rounded-xl px-8",
sm: "h-9 rounded-lg px-3",
lg: "h-11 rounded-lg px-8",
icon: "h-10 w-10",
};
@@ -43,7 +45,7 @@ export function Button({
return (
<Comp
className={cn(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50",
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50",
variants[variant],
sizes[size],
className,
+1 -1
View File
@@ -8,7 +8,7 @@ export function Card({
return (
<div
className={cn(
"rounded-2xl border border-border bg-white text-card-foreground shadow-md hover:shadow-lg transition-shadow",
"rounded-xl border border-border bg-card text-card-foreground shadow-sm hover:shadow-md transition-shadow",
className,
)}
{...props}
+1 -1
View File
@@ -9,7 +9,7 @@ export function Input({ className, type, ...props }: InputProps) {
<input
type={type}
className={cn(
"flex h-10 w-full rounded-xl border border-border bg-white px-3 py-2 text-sm text-foreground ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
@@ -41,7 +41,7 @@ function ScrollBar({
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-primary/30" />
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-primary/20" />
</ScrollAreaPrimitive.ScrollAreaScrollbar>
);
}
+1 -1
View File
@@ -21,7 +21,7 @@ export function Select({
return (
<select
className={cn(
"flex h-10 w-full rounded-xl border border-border bg-white px-3 py-2 text-sm text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className,
)}
{...props}
+1 -1
View File
@@ -7,7 +7,7 @@ export function Skeleton({
}: HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn("rounded-md bg-muted animate-shimmer", className)}
className={cn("rounded-lg bg-muted animate-shimmer", className)}
{...props}
/>
);
+1 -1
View File
@@ -26,7 +26,7 @@ export function TabsTrigger({
return (
<TabsPrimitive.Trigger
className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary-soft data-[state=active]:text-foreground data-[state=active]:shadow-sm",
"inline-flex items-center justify-center whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
className,
)}
{...props}
+20 -14
View File
@@ -1,4 +1,11 @@
// ─── Toast notification system ──────────────────────────────────────────────
import {
AlertCircle,
AlertTriangle,
CheckCircle2,
Info,
X,
} from "lucide-react";
import {
createContext,
type ReactNode,
@@ -58,17 +65,17 @@ export function useToast() {
}
const typeStyles: Record<Toast["type"], string> = {
info: "border-l-primary bg-white text-foreground",
success: "border-l-green-500 bg-white text-foreground",
error: "border-l-red-500 bg-white text-foreground",
warning: "border-l-amber-500 bg-white text-foreground",
info: "border-l-primary bg-card text-card-foreground",
success: "border-l-emerald-500 bg-card text-card-foreground",
error: "border-l-destructive bg-card text-card-foreground",
warning: "border-l-amber-500 bg-card text-card-foreground",
};
const typeIcons: Record<Toast["type"], string> = {
info: "💠",
success: "🌸",
error: "😿",
warning: "⚠️",
const typeIcons: Record<Toast["type"], React.ReactNode> = {
info: <Info className="h-4 w-4 text-primary" />,
success: <CheckCircle2 className="h-4 w-4 text-emerald-500" />,
error: <AlertCircle className="h-4 w-4 text-destructive" />,
warning: <AlertTriangle className="h-4 w-4 text-amber-500" />,
};
function ToastContainer() {
@@ -82,15 +89,14 @@ function ToastContainer() {
<div
key={toast.id}
className={cn(
"flex items-center gap-2 rounded-xl border border-border px-4 py-3 text-sm shadow-md cursor-pointer transition-all hover:scale-[1.02] border-l-4",
"group flex items-center gap-2.5 rounded-lg border border-border px-4 py-3 text-sm shadow-md cursor-pointer transition-all hover:scale-[1.02] border-l-4",
typeStyles[toast.type],
)}
onClick={() => removeToast(toast.id)}
>
<span className="text-base leading-none">
{typeIcons[toast.type]}
</span>
<span>{toast.message}</span>
<span className="flex-shrink-0">{typeIcons[toast.type]}</span>
<span className="flex-1">{toast.message}</span>
<X className="h-3.5 w-3.5 flex-shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" />
</div>
))}
</div>