{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "retro-tabs",
  "title": "RetroTabs",
  "description": "Mac OS 9 styled tabs with large/small sizes and raised bevel active state, built on UI SDK Tabs.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.1",
    "@ui-sdk/react@0.1.0-beta.1",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/retro-tabs.tsx",
      "content": "\"use client\"\n\n/*\n * RetroTabs on UI SDK Tabs.\n *\n * Crafted moment: none, on purpose. OS 9 tabs are folder tabs: the chosen\n * one changes face and joins the panel below it, at once. A sliding\n * indicator would read as a modern underline, not a Platinum tab, so the\n * swap stays instant in both flairs. Arrow keys, Home/End and roving focus\n * come from UI SDK.\n */\n\nimport * as React from \"react\"\nimport {\n  Tabs as TabsPrimitive,\n  TabsList as TabsListPrimitive,\n  TabsPanel as TabsPanelPrimitive,\n  TabsTab as TabsTabPrimitive,\n} from \"@ui-sdk/react/tabs\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* ------------------------------------------------------------------ */\n/*  Context – shares the \"size\" prop across subcomponents              */\n/* ------------------------------------------------------------------ */\n\ntype RetroTabsSize = \"lg\" | \"sm\"\n\nconst SizeContext = React.createContext<RetroTabsSize>(\"lg\")\n\ntype Common = { className?: string; children?: React.ReactNode }\n\n/* ------------------------------------------------------------------ */\n/*  RetroTabs (root)                                                   */\n/* ------------------------------------------------------------------ */\n\nfunction RetroTabs({\n  className,\n  size = \"lg\",\n  ...props\n}: Omit<React.ComponentProps<typeof TabsPrimitive>, \"className\" | \"children\"> &\n  Common & {\n    size?: RetroTabsSize\n  }) {\n  return (\n    <SizeContext.Provider value={size}>\n      <TabsPrimitive className={cn(\"flex flex-col\", className)} {...props} />\n    </SizeContext.Provider>\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroTabsList                                                      */\n/* ------------------------------------------------------------------ */\n\nfunction RetroTabsList({\n  className,\n  ...props\n}: Omit<React.ComponentProps<typeof TabsListPrimitive>, \"className\" | \"children\"> & Common) {\n  return (\n    <TabsListPrimitive\n      className={cn(\n        \"relative flex items-end pl-[4px]\",\n        /* The 1px bottom border across the full tab bar */\n        \"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-os9-black\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroTabsTrigger                                                   */\n/* ------------------------------------------------------------------ */\n\nconst retroTabsTriggerVariants = cva(\n  [\n    \"relative z-[1] cursor-pointer select-none whitespace-nowrap\",\n    \"transition-none\",\n    \"focus-visible:os9-focus-ring focus-visible:z-[2]\",\n    \"data-disabled:opacity-50 data-disabled:cursor-default data-disabled:pointer-events-none\",\n  ],\n  {\n    variants: {\n      size: {\n        lg: [\n          \"h-[22px] px-[12px]\",\n          \"font-[family-name:var(--os9-font-heading)] text-[12px] tracking-[0.42px] leading-[0.98]\",\n        ],\n        sm: [\n          \"h-[16px] px-[10px]\",\n          \"font-[family-name:var(--os9-font-sans)] text-[10px] tracking-[0.8px] leading-normal\",\n        ],\n      },\n    },\n    defaultVariants: {\n      size: \"lg\",\n    },\n  }\n)\n\nfunction RetroTabsTrigger({\n  className,\n  children,\n  ...props\n}: Omit<React.ComponentProps<typeof TabsTabPrimitive>, \"className\" | \"children\"> & Common) {\n  const size = React.useContext(SizeContext)\n\n  return (\n    <TabsTabPrimitive\n      className={cn(\n        retroTabsTriggerVariants({ size }),\n        /* ----- Inactive state (default) ----- */\n        \"border-t border-x border-os9-black border-b-0\",\n        \"bg-os9-gray-400 text-os9-black\",\n        /* Inactive top bevel: dark line at top, subtle inner highlight */\n        \"shadow-[inset_1px_1px_0_var(--os9-gray-500),inset_-1px_0_0_var(--os9-gray-500)]\",\n        /* Top border sits at baseline, inactive tabs have a bottom line */\n        \"mb-px\",\n\n        /* ----- Selected state ----- */\n        \"data-selected:bg-os9-gray-200 data-selected:text-os9-black\",\n        \"data-selected:border-t data-selected:border-x data-selected:border-os9-black\",\n        \"data-selected:border-b-0\",\n        /* Selected bevel: white inner highlight top-left, gray shadow bottom-right */\n        \"data-selected:shadow-[inset_1px_1px_0_var(--os9-white),inset_-1px_0_0_var(--os9-gray-700)]\",\n        /* Selected tab grows 1px taller so bottom edge covers the bar line */\n        \"data-selected:mb-0 data-selected:pb-px\",\n        /* Selected tab sits above the bottom border */\n        \"data-selected:z-[2]\",\n\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </TabsTabPrimitive>\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  RetroTabsContent                                                   */\n/* ------------------------------------------------------------------ */\n\nfunction RetroTabsContent({\n  className,\n  ...props\n}: Omit<React.ComponentProps<typeof TabsPanelPrimitive>, \"className\" | \"children\"> & Common) {\n  return (\n    <TabsPanelPrimitive\n      className={cn(\n        \"border border-os9-black border-t-0\",\n        \"bg-os9-gray-200\",\n        \"p-3\",\n        /* Raised inner bevel matching the OS9 panel look */\n        \"shadow-[inset_1px_0_0_var(--os9-white),inset_-1px_-1px_0_var(--os9-gray-700),inset_0_1px_0_var(--os9-gray-200)]\",\n        \"focus-visible:os9-focus-ring\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  Exports                                                            */\n/* ------------------------------------------------------------------ */\n\nexport { RetroTabs, RetroTabsList, RetroTabsTrigger, RetroTabsContent }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}