{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "menubar",
  "title": "Menubar",
  "description": "A bar of menus, as in a desktop app: open one and move across the others with the pointer or the arrow keys. One highlight glides along the bar, and each menu grows out from under its trigger with one that glides between its items.",
  "dependencies": [
    "@ui-sdk/react"
  ],
  "registryDependencies": [
    "https://kinoui.com/r/menu.json",
    "https://kinoui.com/r/highlight.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/menubar.tsx",
      "content": "'use client'\n\nimport { followPointer, highlightClassName, itemMatching } from '@/registry/lib/highlight'\nimport { Menubar as MenubarPrimitive } from '@ui-sdk/react/menubar'\nimport { type ComponentProps, type ReactNode, useCallback } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * A bar of menus, as an app's File, Edit and View: each one is a Menu, with\n * its MenuTrigger right inside the bar.\n */\n\n/**\n * The bar. One highlight glides between its menus' triggers: it goes to the\n * trigger under the pointer or with visible focus, else to the one whose\n * menu is open.\n */\nfunction Menubar({\n  className,\n  children,\n  ...props\n}: Omit<ComponentProps<typeof MenubarPrimitive>, 'className' | 'children'> & {\n  className?: string\n  children?: ReactNode\n}) {\n  const track = useCallback((layer: HTMLSpanElement | null) => {\n    const bar = layer?.parentElement\n    if (!layer || !bar) return\n    return followPointer(bar, layer, {\n      itemOf: itemMatching(bar, '[data-slot=menu-trigger]'),\n      current: '[data-slot=menu-trigger][data-open]',\n      focus: true,\n    })\n  }, [])\n  return (\n    <MenubarPrimitive\n      className={cn(\n        // The 2px inside the bar keeps the triggers' highlight off its border and\n        // leaves them at least 24px tall at every density. The bar's highlight\n        // shows a trigger's hover and its open menu.\n        'bg-background relative isolate flex h-(--control-height) items-center gap-0.5 rounded-(--list-radius) border p-0.5 shadow-xs',\n        '*:data-[slot=menu-trigger]:focus-visible:ring-ring/50 *:data-[slot=menu-trigger]:flex *:data-[slot=menu-trigger]:h-full *:data-[slot=menu-trigger]:items-center *:data-[slot=menu-trigger]:rounded-(--item-radius) *:data-[slot=menu-trigger]:px-(--control-padding) *:data-[slot=menu-trigger]:text-sm *:data-[slot=menu-trigger]:font-medium *:data-[slot=menu-trigger]:select-none *:data-[slot=menu-trigger]:focus-visible:ring-3 *:data-[slot=menu-trigger]:focus-visible:outline-hidden *:data-[slot=menu-trigger]:forced-colors:data-glided:text-[HighlightText] *:data-[slot=menu-trigger]:forced-colors:data-glided:forced-color-adjust-none',\n        className,\n      )}\n      {...props}\n    >\n      <span\n        ref={track}\n        aria-hidden\n        data-menubar-highlight=''\n        className={cn(\n          highlightClassName,\n          'bg-muted -z-10 forced-colors:bg-[Highlight] forced-colors:forced-color-adjust-none',\n        )}\n      />\n      {children}\n    </MenubarPrimitive>\n  )\n}\n\nexport { Menubar }\n",
      "type": "registry:component",
      "target": "@components/kino/menubar.tsx"
    }
  ],
  "type": "registry:component"
}