diff --git a/src/components/features/appearance-settings.tsx b/src/components/features/appearance-settings.tsx new file mode 100644 index 0000000..ce857e9 --- /dev/null +++ b/src/components/features/appearance-settings.tsx @@ -0,0 +1,235 @@ +"use client"; + +import { Check, Monitor, Moon, RotateCcw, Sparkles, Sun } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Progress } from "@/components/ui/progress"; +import { cn } from "@/lib/utils"; +import { + useUiStore, + type AccentId, + type GlassLevel, + type RadiusScale, +} from "@/stores/ui-store"; + +const accents: Array<{ id: AccentId; label: string; swatch: string }> = [ + { id: "azure", label: "Azure", swatch: "hsl(224 88% 55%)" }, + { id: "violet", label: "Violet", swatch: "hsl(261 80% 60%)" }, + { id: "emerald", label: "Emerald", swatch: "hsl(158 72% 40%)" }, + { id: "sunset", label: "Sunset", swatch: "hsl(25 95% 53%)" }, + { id: "rose", label: "Rose", swatch: "hsl(346 85% 56%)" }, + { id: "cyan", label: "Cyan", swatch: "hsl(195 93% 45%)" }, +]; + +const glassLevels: Array<{ id: GlassLevel; label: string }> = [ + { id: "off", label: "Off" }, + { id: "subtle", label: "Subtle" }, + { id: "standard", label: "Standard" }, + { id: "heavy", label: "Heavy" }, +]; + +const radiusScales: Array<{ id: RadiusScale; label: string }> = [ + { id: "sharp", label: "Sharp" }, + { id: "rounded", label: "Rounded" }, + { id: "soft", label: "Soft" }, +]; + +function Segmented({ + options, + value, + onChange, + ariaLabel, +}: { + options: Array<{ id: T; label: string; icon?: React.ReactNode }>; + value: T; + onChange: (value: T) => void; + ariaLabel: string; +}) { + return ( +
+ {options.map((option) => ( + + ))} +
+ ); +} + +export function AppearanceSettings() { + const theme = useUiStore((state) => state.theme); + const setTheme = useUiStore((state) => state.setTheme); + const accent = useUiStore((state) => state.accent); + const setAccent = useUiStore((state) => state.setAccent); + const glass = useUiStore((state) => state.glass); + const setGlass = useUiStore((state) => state.setGlass); + const radius = useUiStore((state) => state.radius); + const setRadius = useUiStore((state) => state.setRadius); + const ambiance = useUiStore((state) => state.ambiance); + const setAmbiance = useUiStore((state) => state.setAmbiance); + const density = useUiStore((state) => state.density); + const setDensity = useUiStore((state) => state.setDensity); + const resetAppearance = useUiStore((state) => state.resetAppearance); + + return ( + + +
+ + + Appearance + + + Liquid-glass customization. Every choice applies instantly and is saved on this + device. + +
+ +
+ +
+
+
Theme
+ }, + { id: "dark", label: "Dark", icon: }, + { id: "system", label: "System", icon: }, + ]} + /> +
+
+
Accent color
+
+ {accents.map((option) => ( + + ))} +
+
+
+
Glass intensity
+ +

+ Controls surface translucency and backdrop blur across the panel. +

+
+
+
Corner radius
+ +
+
+
Density
+ +
+ +
+
+
Live preview
+
+
+ Preview surface + healthy +
+ +

+ Glass, accent, and radius react in real time. +

+ + +
+
+
+
+ ); +}