fix(ui): theme popover/input tokens and open select below trigger

Select dropdowns (voice tab, guild selector) rendered with a transparent
background because --color-popover/--color-input were undefined, and the
popup overlapped the trigger due to alignItemWithTrigger. Define the missing
theme tokens (popover, popover-foreground, input, secondary) and default the
select popup to open below the trigger.
This commit is contained in:
asepharyana
2026-08-07 18:18:14 +07:00
parent 4f9d4a5c7d
commit abbd78f42b
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -56,6 +56,13 @@
/* Ring / focus outline for shadcn outline-ring utility */ /* Ring / focus outline for shadcn outline-ring utility */
--color-ring: var(--color-primary); --color-ring: var(--color-primary);
/* Base-ui / shadcn primitives */
--color-popover: oklch(0.99 0.005 250 / 0.95);
--color-popover-foreground: var(--color-text-primary);
--color-input: oklch(0.55 0.02 250 / 0.35);
--color-secondary: oklch(0.92 0.01 250 / 0.6);
--color-secondary-foreground: var(--color-text-primary);
/* Sidebar (shadcn) */ /* Sidebar (shadcn) */
--color-sidebar: oklch(1 0 0 / 0.6); --color-sidebar: oklch(1 0 0 / 0.6);
--color-sidebar-foreground: var(--color-text-primary); --color-sidebar-foreground: var(--color-text-primary);
@@ -113,6 +120,13 @@
--color-accent-foreground: var(--color-primary-foreground); --color-accent-foreground: var(--color-primary-foreground);
--color-ring: var(--color-primary); --color-ring: var(--color-primary);
/* Base-ui / shadcn primitives */
--color-popover: oklch(0.13 0.02 245 / 0.96);
--color-popover-foreground: var(--color-text-primary);
--color-input: oklch(1 0 0 / 0.18);
--color-secondary: oklch(0.2 0.02 245 / 0.7);
--color-secondary-foreground: var(--color-text-primary);
/* Sidebar (shadcn) */ /* Sidebar (shadcn) */
--color-sidebar: oklch(0.11 0.02 245 / 0.55); --color-sidebar: oklch(0.11 0.02 245 / 0.55);
--color-sidebar-foreground: var(--color-text-primary); --color-sidebar-foreground: var(--color-text-primary);
@@ -63,7 +63,7 @@ function SelectContent({
sideOffset = 4, sideOffset = 4,
align = "center", align = "center",
alignOffset = 0, alignOffset = 0,
alignItemWithTrigger = true, alignItemWithTrigger = false,
...props ...props
}: SelectPrimitive.Popup.Props & }: SelectPrimitive.Popup.Props &
Pick< Pick<