feat(webui): OLED/accent/palette theming fixes + light-dark reveal

- OLED: toggle switch off-track is now a neutral foreground tint with a white
  knob (was invisible bg-muted + bg-background on pure black); the OLED sidebar
  override is scoped to sidebar-style=follow so panel/accent work in OLED too.
- Accent: the chosen accent now also tints the selected-state surfaces
  (--accent / --sidebar-accent) so the sidebar active item and settings nav
  rail follow it — default palette only, respecting accent scope.
- Palettes: add 6 more soft schemes (Rosé Pine / Moon / Dawn, Nord, Everforest
  dark + light) via a pal() builder; schema unions + normalizer + bootstrap
  light/dark classification updated to match.
- Light/dark switch now animates: a circular View Transitions reveal from the
  click (mode/palette/intensity changes only; gated off under reduced/disabled
  motion; instant fallback where the API is absent).
This commit is contained in:
DrSmoothl committed 2026-06-14 16:20:05 +08:00
1 parent 84021a19dc
commit 44a29c6ee4
6 files changed
+187 -85

No files matched your search

@@ -20,13 +20,15 @@ export function ToggleSwitch({ value, onChange, ariaLabel, disabled }: ToggleSwi
disabled={disabled}
onClick={() => onChange(!value)}
className={cn(
'relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors',
'relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors',
disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
value ? 'border-primary bg-primary' : 'border-input bg-muted',
// Off-track is a neutral foreground tint so it stays visible on any
// surface — including OLED pure-black (where bg-muted vanished).
value ? 'bg-primary' : 'bg-foreground/20',
)}
>
<motion.span
className="inline-block size-4 rounded-full bg-background shadow-sm"
className="inline-block size-4 rounded-full bg-white shadow-sm ring-1 ring-black/10"
animate={{ x: value ? 22 : 4 }}
transition={{ type: 'spring', stiffness: 500, damping: 30 }}
/>