diff --git a/src/app/globals.css b/src/app/globals.css index 13e0171b..8caea27a 100755 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -13,6 +13,19 @@ --breakpoint-sm: 40rem; --breakpoint-lg: 64rem; --breakpoint-wide: 68.75rem; + + /* Z-index scale tokens: + z-1 - Navigation menu indicator (z-1) + z-toast - Toast notifications viewport (z-100) + z-shortcuts - Keyboard shortcut indicator pill (z-700) + z-overlay - Modal dialogs, command palette & backdrop overlays (z-800) + z-skiplink - Skip to main content focus link (z-1000) + */ + --z-index-1: 1; + --z-index-toast: 100; + --z-index-shortcuts: 700; + --z-index-overlay: 800; + --z-index-skiplink: 1000; } /* ========================================================= diff --git a/src/components/studio/app-shell.tsx b/src/components/studio/app-shell.tsx index 5b24c090..d37a517e 100644 --- a/src/components/studio/app-shell.tsx +++ b/src/components/studio/app-shell.tsx @@ -260,7 +260,7 @@ export const AppShell = () => { > Skip to main content diff --git a/src/components/studio/command-palette.tsx b/src/components/studio/command-palette.tsx index 4e793f08..d0c39b23 100644 --- a/src/components/studio/command-palette.tsx +++ b/src/components/studio/command-palette.tsx @@ -20,6 +20,13 @@ import { Overlay } from '@/components/studio/ui/shared-primitives' import type { ViewId } from '@/lib/studio/types' import { getEntityTypeMeta } from '@/lib/studio/entity-types' import { translate } from '@/lib/i18n/messages/palette' +import { cn } from '@/lib/utils' + +/** Standard top margin class for the command palette overlay dialog. */ +export const COMMAND_PALETTE_TOP_MARGIN_CLASS = 'mt-[12vh]' + +/** Standard width class for the command palette overlay dialog. */ +export const COMMAND_PALETTE_WIDTH_CLASS = 'w-[640px]' interface CmdItem { id: string @@ -130,7 +137,17 @@ export const CommandPalette = ({ onEntitySelect }: CommandPaletteProps) => { if (!commandOpen) return null return ( - + { exit={{ opacity: 0, y: 8 }} transition={reducedMotion ? { duration: 0 } : { duration: 0.15 }} className={cn( - 'fixed bottom-4 left-4 z-[700] flex items-center gap-2 rounded-full border border-saffron/40 bg-popover px-3 py-1.5 shadow-lifted', + 'fixed bottom-4 left-4 z-shortcuts flex items-center gap-2 rounded-full border border-saffron/40 bg-popover px-3 py-1.5 shadow-lifted', )} aria-live="polite" > diff --git a/src/components/studio/sidebar.tsx b/src/components/studio/sidebar.tsx index ad26b121..aebf0e33 100644 --- a/src/components/studio/sidebar.tsx +++ b/src/components/studio/sidebar.tsx @@ -176,6 +176,9 @@ const SidebarNav = () => { ) } +/** Sidebar width geometry constant. */ +export const SIDEBAR_WIDTH_CLASS = 'w-[248px]' + /** Sidebar with brand, search trigger, navigation, and footer controls. */ export const Sidebar = () => { const isMacPlatform = useIsMacPlatform() @@ -185,7 +188,12 @@ export const Sidebar = () => { const { theme, setTheme } = useTheme() return ( -