A dashboard's portalled select menu restates its look, so a Glass menu blurs what is under it (the colour wheel no longer shows through) and a Material menu gets its tonal fill back
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -154,9 +154,10 @@ export function Select({
|
|||||||
onChange,
|
onChange,
|
||||||
}: SelectProps) {
|
}: SelectProps) {
|
||||||
// The menu is portalled to `body`, which is outside the canvas — so it
|
// The menu is portalled to `body`, which is outside the canvas — so it
|
||||||
// re-states the dashboard's own theme and colours rather than borrowing the
|
// re-states the dashboard's own theme, colours and look rather than
|
||||||
// app's.
|
// borrowing the app's. The look carries the variables its menu is painted
|
||||||
const { style, theme } = useLook()
|
// with: without it a glass menu has no blur, and the tile under it shows.
|
||||||
|
const { style, theme, look } = useLook()
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Root
|
<SelectPrimitive.Root
|
||||||
value={value}
|
value={value}
|
||||||
@@ -179,6 +180,7 @@ export function Select({
|
|||||||
position="popper"
|
position="popper"
|
||||||
sideOffset={4}
|
sideOffset={4}
|
||||||
style={style}
|
style={style}
|
||||||
|
data-look={look}
|
||||||
className={cn(
|
className={cn(
|
||||||
theme,
|
theme,
|
||||||
"fx-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0",
|
"fx-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0",
|
||||||
|
|||||||
@@ -172,9 +172,10 @@ export function Select({
|
|||||||
onChange,
|
onChange,
|
||||||
}: SelectProps) {
|
}: SelectProps) {
|
||||||
// The menu is portalled to `body`, which is outside the canvas — so it
|
// The menu is portalled to `body`, which is outside the canvas — so it
|
||||||
// re-states the dashboard's own theme and colours rather than borrowing the
|
// re-states the dashboard's own theme, colours and look rather than
|
||||||
// app's.
|
// borrowing the app's. The look carries the variables its menu is painted
|
||||||
const { style, theme } = useLook()
|
// with: without it a glass menu has no blur, and the tile under it shows.
|
||||||
|
const { style, theme, look } = useLook()
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Root
|
<SelectPrimitive.Root
|
||||||
value={value}
|
value={value}
|
||||||
@@ -201,6 +202,7 @@ export function Select({
|
|||||||
position="popper"
|
position="popper"
|
||||||
sideOffset={4}
|
sideOffset={4}
|
||||||
style={style}
|
style={style}
|
||||||
|
data-look={look}
|
||||||
className={cn(
|
className={cn(
|
||||||
theme,
|
theme,
|
||||||
"gl-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
"gl-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
||||||
|
|||||||
@@ -199,9 +199,10 @@ export function Select({
|
|||||||
onChange,
|
onChange,
|
||||||
}: SelectProps) {
|
}: SelectProps) {
|
||||||
// The menu is portalled to `body`, which is outside the canvas — so it
|
// The menu is portalled to `body`, which is outside the canvas — so it
|
||||||
// re-states the dashboard's own theme and colours rather than borrowing the
|
// re-states the dashboard's own theme, colours and look rather than
|
||||||
// app's.
|
// borrowing the app's. The look carries the variables its menu is painted
|
||||||
const { style, theme } = useLook()
|
// with: without it a glass menu has no blur, and the tile under it shows.
|
||||||
|
const { style, theme, look } = useLook()
|
||||||
return (
|
return (
|
||||||
<SelectPrimitive.Root
|
<SelectPrimitive.Root
|
||||||
value={value}
|
value={value}
|
||||||
@@ -227,6 +228,7 @@ export function Select({
|
|||||||
position="popper"
|
position="popper"
|
||||||
sideOffset={4}
|
sideOffset={4}
|
||||||
style={style}
|
style={style}
|
||||||
|
data-look={look}
|
||||||
className={cn(
|
className={cn(
|
||||||
theme,
|
theme,
|
||||||
"m3-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0",
|
"m3-menu z-50 max-h-64 min-w-[var(--radix-select-trigger-width)] overflow-y-auto p-1 data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:fade-in-0",
|
||||||
|
|||||||
Reference in New Issue
Block a user