2026-01-11 01:37:48 +00:00
|
|
|
import { Palette } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
interface ThemeSwitcherProps {
|
2026-01-13 18:47:57 +00:00
|
|
|
currentTheme: string;
|
|
|
|
|
onThemeChange: (theme: string) => void;
|
2026-01-11 01:37:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const themes = [
|
2026-01-13 18:47:57 +00:00
|
|
|
{
|
|
|
|
|
id: 'cyber',
|
|
|
|
|
name: 'Cyber',
|
|
|
|
|
colors: ['#66FCF1', '#FF00FF'],
|
|
|
|
|
description: 'Neon Cyan & Magenta',
|
|
|
|
|
gradient: 'linear-gradient(135deg, #66FCF1 0%, #FF00FF 100%)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'ocean',
|
|
|
|
|
name: 'Ocean',
|
|
|
|
|
colors: ['#0EA5E9', '#06B6D4'],
|
|
|
|
|
description: 'Sky Blue & Teal',
|
|
|
|
|
gradient: 'linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'forest',
|
|
|
|
|
name: 'Forest',
|
|
|
|
|
colors: ['#22C55E', '#84CC16'],
|
|
|
|
|
description: 'Green & Lime',
|
|
|
|
|
gradient: 'linear-gradient(135deg, #22C55E 0%, #84CC16 100%)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'sunset',
|
|
|
|
|
name: 'Sunset',
|
|
|
|
|
colors: ['#F97316', '#A855F7'],
|
|
|
|
|
description: 'Orange & Purple',
|
|
|
|
|
gradient: 'linear-gradient(135deg, #F97316 0%, #A855F7 100%)',
|
|
|
|
|
},
|
2026-01-11 01:37:48 +00:00
|
|
|
];
|
|
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
export function ThemeSwitcher({
|
|
|
|
|
currentTheme,
|
|
|
|
|
onThemeChange,
|
|
|
|
|
}: ThemeSwitcherProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-6">
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<div className="flex items-center gap-4">
|
2026-01-16 11:07:15 +00:00
|
|
|
<div className="w-10 h-10 rounded-xl bg-kodo-cyan flex items-center justify-center">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Palette className="w-5 h-5 text-white" />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<h3 className="text-xl font-bold text-white">Color Theme</h3>
|
|
|
|
|
<p className="text-sm text-kodo-secondary">
|
|
|
|
|
Choose your visual style
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-11 01:37:48 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
{themes.map((theme) => (
|
|
|
|
|
<button
|
|
|
|
|
key={theme.id}
|
|
|
|
|
onClick={() => onThemeChange(theme.id)}
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
className={`group relative p-8 rounded-2xl border-2 transition-all duration-[var(--duration-normal)] text-left overflow-hidden ${
|
2026-01-13 18:47:57 +00:00
|
|
|
currentTheme === theme.id
|
|
|
|
|
? 'border-kodo-cyan bg-kodo-cyan/10 shadow-lg shadow-kodo-cyan/20'
|
|
|
|
|
: 'border-white/10 bg-kodo-graphite/50 hover:border-white/30 hover:bg-kodo-graphite'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
{/* Gradient Background */}
|
|
|
|
|
<div
|
|
|
|
|
className="absolute inset-0 opacity-10 group-hover:opacity-20 transition-opacity"
|
|
|
|
|
style={{ background: theme.gradient }}
|
|
|
|
|
/>
|
2026-01-11 01:37:48 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Content */}
|
|
|
|
|
<div className="relative z-10">
|
|
|
|
|
<div className="flex items-center gap-4 mb-3">
|
|
|
|
|
<div className="flex gap-2">
|
|
|
|
|
{theme.colors.map((color, i) => (
|
|
|
|
|
<div
|
|
|
|
|
key={i}
|
2026-01-16 11:06:00 +00:00
|
|
|
className="w-10 h-10 rounded-lg shadow-lg transition-opacity group-hover:opacity-80"
|
2026-01-13 18:47:57 +00:00
|
|
|
style={{ backgroundColor: color }}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-11 01:37:48 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="mb-2">
|
|
|
|
|
<div className="font-bold text-lg text-white mb-1">
|
|
|
|
|
{theme.name}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="text-sm text-kodo-secondary">
|
|
|
|
|
{theme.description}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-11 01:37:48 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{currentTheme === theme.id && (
|
2026-01-16 10:40:13 +00:00
|
|
|
<div className="flex items-center gap-2 text-kodo-steel font-mono text-sm animate-slide-in-left">
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="w-2 h-2 rounded-full bg-kodo-cyan animate-glow-pulse" />
|
|
|
|
|
Active Theme
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-11 01:37:48 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2026-01-11 01:37:48 +00:00
|
|
|
}
|