{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "retro-navigation-menu",
  "title": "RetroNavigationMenu",
  "description": "A Mac OS 9 styled navigation menu with horizontal strip, azul active triggers, dropdown content with classic drop shadow, and lavender hover links, built on UI SDK Navigation Menu.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.1",
    "@ui-sdk/react@0.1.0-beta.1"
  ],
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json",
    "https://nostalgia-ui.com/r/retro-motion.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/retro-navigation-menu.tsx",
      "content": "\"use client\"\n\n/*\n * RetroNavigationMenu: a Mac OS 9 navigation bar with drop-down link panels,\n * on UI SDK's navigation menu (the disclosure navigation pattern: buttons\n * that show groups of ordinary links).\n *\n * Crafted moment: the panel morph. One white panel hangs under the open\n * title; moving to the next title keeps the panel and morphs its size and\n * position to the new links (220ms, house ease-out) while the links\n * cross-fade. Opening pops the panel down from the title (fade + 95% scale,\n * 120ms). Classic flair and reduced motion swap panels at once.\n */\n\nimport * as React from \"react\"\nimport {\n  NavigationMenu as NavigationMenuPrimitive,\n  NavigationMenuContent as NavigationMenuContentPrimitive,\n  NavigationMenuItem as NavigationMenuItemPrimitive,\n  NavigationMenuLink as NavigationMenuLinkPrimitive,\n  NavigationMenuList as NavigationMenuListPrimitive,\n  NavigationMenuTrigger as NavigationMenuTriggerPrimitive,\n  NavigationMenuViewport as NavigationMenuViewportPrimitive,\n} from \"@ui-sdk/react/navigation-menu\"\n\nimport { cn } from \"@/lib/utils\"\nimport { popupClass } from \"@/registry/new-york/lib/retro-motion\"\n\ntype WithClassName<P> = Omit<P, \"className\" | \"children\"> & {\n  className?: string\n  children?: React.ReactNode\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuViewport                                        */\n/* ------------------------------------------------------------------ */\n\n/* The panel chrome (border, white bg, 2px drop shadow) lives on the viewport:\n * it clips the contents as they cross-fade, which would cut off a shadow on\n * the content. It takes the open content's size from UI SDK's\n * --viewport-width / --viewport-height. Box properties carry `!` against\n * UI SDK's popup reset. */\nfunction RetroNavigationMenuViewport({\n  className,\n  side = \"bottom\",\n  align = \"start\",\n  sideOffset = 0,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuViewportPrimitive>>) {\n  return (\n    <NavigationMenuViewportPrimitive\n      side={side}\n      align={align}\n      sideOffset={sideOffset}\n      className={popupClass(\n        cn(\n          \"relative z-50 m-0! p-0! overflow-hidden!\",\n          \"w-(--viewport-width)! h-(--viewport-height)!\",\n          \"bg-os9-white! border! border-os9-black! text-os9-black!\",\n          /* Classic OS 9 drop shadow: 2px offset, no blur */\n          \"shadow-[2px_2px_0_var(--os9-black)]\",\n          \"origin-top\",\n          \"[transition:opacity_120ms_ease-out,scale_120ms_ease-out,width_220ms_cubic-bezier(0.23,1,0.32,1),height_220ms_cubic-bezier(0.23,1,0.32,1),left_220ms_cubic-bezier(0.23,1,0.32,1),top_220ms_cubic-bezier(0.23,1,0.32,1)]\",\n          \"data-starting-style:opacity-0 data-starting-style:scale-y-95\",\n          \"data-ending-style:opacity-0 data-ending-style:scale-y-95 data-ending-style:[transition-duration:75ms]\",\n          \"in-data-[flair=classic]:transition-none motion-reduce:transition-none\"\n        ),\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenu (root)                                         */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenu({\n  className,\n  children,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuPrimitive>>) {\n  return (\n    <NavigationMenuPrimitive\n      className={cn(\n        \"relative z-10\",\n        \"flex items-center\",\n        \"bg-os9-gray-300\",\n        \"border-b border-os9-black\",\n        /* Inner bevel: white highlight top, dark shadow bottom */\n        \"shadow-[inset_0_1px_0_var(--os9-white),inset_0_-1px_0_var(--os9-gray-700)]\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n      <RetroNavigationMenuViewport />\n    </NavigationMenuPrimitive>\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuList                                            */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenuList({\n  className,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuListPrimitive>>) {\n  return (\n    <NavigationMenuListPrimitive\n      className={cn(\"m-0 flex items-center gap-[2px] list-none px-[8px]\", className)}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuItem                                            */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenuItem(\n  props: WithClassName<React.ComponentProps<typeof NavigationMenuItemPrimitive>>\n) {\n  return <NavigationMenuItemPrimitive {...props} />\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuTrigger                                         */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenuTrigger({\n  className,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuTriggerPrimitive>>) {\n  return (\n    <NavigationMenuTriggerPrimitive\n      className={cn(\n        \"flex items-center cursor-pointer select-none whitespace-nowrap\",\n        \"px-[8px] py-[4px]\",\n        \"font-[family-name:var(--os9-font-heading)] text-[12px] tracking-[0.42px] leading-[0.98]\",\n        \"text-os9-black\",\n        \"outline-none focus-visible:os9-focus-ring\",\n        /* Open: azul title with white ink, flipped in one step */\n        \"data-open:bg-os9-azul data-open:text-os9-white\",\n        \"data-disabled:text-os9-gray-600 data-disabled:cursor-default\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuContent                                         */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenuContent({\n  className,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuContentPrimitive>>) {\n  return (\n    <NavigationMenuContentPrimitive\n      className={popupClass(\n        cn(\n          /* pinned to the panel's corner, at its own width */\n          \"absolute! top-0! left-0! w-max p-[8px]! m-0!\",\n          /* links cross-fade as the panel switches */\n          \"transition-opacity duration-100 ease-linear\",\n          \"data-starting-style:opacity-0 data-ending-style:opacity-0\",\n          \"in-data-[flair=classic]:transition-none motion-reduce:transition-none\"\n        ),\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroNavigationMenuLink                                            */\n/* ------------------------------------------------------------------ */\n\nfunction RetroNavigationMenuLink({\n  className,\n  ...props\n}: WithClassName<React.ComponentProps<typeof NavigationMenuLinkPrimitive>>) {\n  return (\n    <NavigationMenuLinkPrimitive\n      className={cn(\n        \"block cursor-default select-none\",\n        \"px-[8px] py-[2px]\",\n        \"font-[family-name:var(--os9-font-sans)] text-[10px] tracking-[0.42px] leading-[1.4]\",\n        \"text-os9-black no-underline\",\n        \"outline-none\",\n        /* Hover / keyboard highlight */\n        \"hover:bg-os9-lavender focus-visible:bg-os9-lavender\",\n        \"data-current:font-bold\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  Exports                                                            */\n/* ------------------------------------------------------------------ */\n\nexport {\n  RetroNavigationMenu,\n  RetroNavigationMenuList,\n  RetroNavigationMenuItem,\n  RetroNavigationMenuTrigger,\n  RetroNavigationMenuContent,\n  RetroNavigationMenuLink,\n  RetroNavigationMenuViewport,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}