Remove sidebar theme tokens to align with upstream cleanup
This commit is contained in:
@@ -161,17 +161,10 @@ export function deriveTokensFromCore(
|
||||
? formatHsl(fgParsed.h, Math.max(fgParsed.s - 20, 0), Math.max(fgParsed.l - 30, 40))
|
||||
: formatHsl(fgParsed.h, Math.max(fgParsed.s - 30, 0), Math.min(fgParsed.l + 35, 55));
|
||||
|
||||
// Sidebar: slightly different shade of background
|
||||
const sidebarBg = dark ? darken(background, 2) : darken(background, 2);
|
||||
const sidebarAccentBg = dark ? lighten(background, 4) : darken(background, 6);
|
||||
const sidebarBorder = border;
|
||||
|
||||
// Foreground variants
|
||||
const cardFg = foreground;
|
||||
const popoverFg = foreground;
|
||||
const secondaryFg = foreground;
|
||||
const sidebarFg = foreground;
|
||||
const sidebarAccentFg = foreground;
|
||||
|
||||
// Primary/accent foregrounds: auto-contrast
|
||||
const primaryFg = contrastForeground(primary);
|
||||
@@ -201,13 +194,5 @@ export function deriveTokensFromCore(
|
||||
border,
|
||||
input,
|
||||
ring: primary,
|
||||
sidebarBackground: sidebarBg,
|
||||
sidebarForeground: sidebarFg,
|
||||
sidebarPrimary: primary,
|
||||
sidebarPrimaryForeground: primaryFg,
|
||||
sidebarAccent: sidebarAccentBg,
|
||||
sidebarAccentForeground: sidebarAccentFg,
|
||||
sidebarBorder,
|
||||
sidebarRing: primary,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,11 +43,6 @@ const SURFACE_KEYS = [
|
||||
const UI_KEYS = ['border', 'input', 'ring', 'destructive', 'destructiveForeground'] as const;
|
||||
|
||||
/** Sidebar keys */
|
||||
const SIDEBAR_KEYS = [
|
||||
'sidebarBackground', 'sidebarForeground', 'sidebarPrimary', 'sidebarPrimaryForeground',
|
||||
'sidebarAccent', 'sidebarAccentForeground', 'sidebarBorder', 'sidebarRing',
|
||||
] as const;
|
||||
|
||||
/** Human-readable labels for token keys */
|
||||
const TOKEN_LABELS: Record<string, string> = {
|
||||
background: 'Background',
|
||||
@@ -67,14 +62,6 @@ const TOKEN_LABELS: Record<string, string> = {
|
||||
ring: 'Focus Ring',
|
||||
destructive: 'Destructive',
|
||||
destructiveForeground: 'Destructive Text',
|
||||
sidebarBackground: 'Background',
|
||||
sidebarForeground: 'Text',
|
||||
sidebarPrimary: 'Primary',
|
||||
sidebarPrimaryForeground: 'Primary Text',
|
||||
sidebarAccent: 'Accent',
|
||||
sidebarAccentForeground: 'Accent Text',
|
||||
sidebarBorder: 'Border',
|
||||
sidebarRing: 'Focus Ring',
|
||||
};
|
||||
|
||||
/** Pairs to check contrast on */
|
||||
@@ -373,27 +360,6 @@ export function ThemeBuilderPage() {
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
||||
{/* Sidebar colors (collapsible) */}
|
||||
<Collapsible>
|
||||
<CollapsibleTrigger className="flex items-center justify-between w-full py-2 text-sm font-semibold text-muted-foreground uppercase tracking-wider group">
|
||||
<span>Sidebar Colors</span>
|
||||
<ChevronDown className="size-4 transition-transform group-data-[state=open]:rotate-180" />
|
||||
</CollapsibleTrigger>
|
||||
<CollapsibleContent className="pt-3">
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
{SIDEBAR_KEYS.map((key) => (
|
||||
<ColorPicker
|
||||
key={key}
|
||||
label={TOKEN_LABELS[key]}
|
||||
value={hexTokens[key] || '#000000'}
|
||||
onChange={(hex) => updateToken(key, hex)}
|
||||
disabled={autoDerive}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Contrast warnings */}
|
||||
|
||||
Reference in New Issue
Block a user