{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "header-nav-glass", "type": "registry:block", "title": "Header Nav Glass", "description": "Header Nav Glass component with glass effects", "dependencies": [ "lucide-react", "react" ], "registryDependencies": [ "cn", "theme-provider" ], "files": [ { "path": "components/glass/sections/header-nav-glass.tsx", "type": "registry:component", "content": "// ========================================\n// HEADER NAV GLASS COMPONENT\n// Navigation header with search and theme toggle\n// ========================================\n\nimport { forwardRef, type CSSProperties } from \"react\";\nimport { Github, Sun, Moon, Palette } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport { useTheme, type ThemeName } from \"@/lib/theme-context\";\nimport { ButtonGlass } from \"../ui/button-glass\";\nimport { SearchBoxGlass } from \"../atomic/search-box-glass\";\nimport \"@/glass-theme.css\";\n\nconst themes: ThemeName[] = [\"light\", \"aurora\", \"glass\"];\n\nconst themeConfig: Record = {\n light: { label: \"Light\", icon: Sun },\n aurora: { label: \"Aurora\", icon: Moon },\n glass: { label: \"Glass\", icon: Palette },\n};\n\nexport interface HeaderNavGlassProps extends React.HTMLAttributes {\n readonly username?: string;\n readonly onSearch?: (value: string) => void;\n readonly onThemeToggle?: () => void;\n}\n\nexport const HeaderNavGlass = forwardRef(\n ({ username = \"Yhooi2\", onSearch, onThemeToggle, className, ...props }, ref) => {\n const { theme, cycleTheme } = useTheme();\n\n const nextTheme = themes[(themes.indexOf(theme) + 1) % themes.length];\n const NextIcon = themeConfig[nextTheme].icon;\n\n const headerStyles: CSSProperties = {\n background: \"var(--header-bg)\",\n borderColor: \"var(--header-border)\",\n backdropFilter: \"blur(var(--blur-md))\",\n WebkitBackdropFilter: \"blur(var(--blur-md))\",\n };\n\n const iconBtnStyles: CSSProperties = {\n background: \"linear-gradient(135deg, var(--icon-btn-from), var(--icon-btn-to))\",\n boxShadow: \"var(--icon-btn-shadow)\",\n };\n\n const themeBtnStyles: CSSProperties = {\n background: \"var(--card-subtle-bg)\",\n border: \"1px solid var(--card-subtle-border)\",\n };\n\n return (\n \n
\n
\n \n \n \n \n User Analytics\n \n \n
\n
\n \n \n \n \n Sign in with GitHub\n \n
\n
\n \n );\n }\n);\n\nHeaderNavGlass.displayName = \"HeaderNavGlass\";\n" } ], "categories": [ "sections" ] }