feat: Convert Figma React UI to Svelte 5

- Add lucide-svelte for icons
- Create app.css with theme CSS variables (Dark, Light, OLED, Warm)
- Convert all React components to Svelte 5 using runes ($state, $derived, $effect, $props)
- Implement core components: Sidebar, NowPlayingBar, NavigationItem, UserCard,
  AlbumCard, HorizontalScrollRow, HeroSection, TrackRow, Toggle, Dropdown,
  Tooltip, VolumeSlider
- Implement view components: HomeView, SettingsView, AlbumDetailView
- Implement overlay components: QueuePanel, FullScreenNowPlaying, FocusMode, Toast
- Create main +page.svelte with routing, state management and keyboard shortcuts
- All components use Svelte 5 snippets for component children patterns
This commit is contained in:
vicrodh committed 2026-01-09 07:16:46 -06:00
1 parent ef92897d43
commit cdfd3263de
23 files changed
+4512 -141

No files matched your search

+62
View File
@@ -0,0 +1,62 @@
<script lang="ts">
import type { Snippet } from 'svelte';
interface Props {
icon: Snippet;
label: string;
active?: boolean;
onclick?: () => void;
}
let { icon, label, active = false, onclick }: Props = $props();
</script>
<button
{onclick}
class="nav-item"
class:active
>
<div class="icon-container">
{@render icon()}
</div>
<span class="label">{label}</span>
</button>
<style>
.nav-item {
width: 100%;
height: 36px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 12px;
border-radius: 8px;
border: none;
background: transparent;
color: var(--text-muted);
cursor: pointer;
transition: all 150ms ease;
}
.nav-item:hover {
background-color: var(--bg-hover);
}
.nav-item.active {
background-color: var(--bg-tertiary);
color: var(--text-primary);
}
.icon-container {
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
}
.label {
font-size: 14px;
font-weight: 400;
}
</style>