{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tailwind-menu",
  "type": "registry:ui",
  "title": "Menu",
  "dependencies": [
    "lucide-react",
    "react",
    "react-aria-components",
    "tailwindcss-react-aria-components",
    "tw-animate-css"
  ],
  "registryDependencies": [
    "https://react-aria.adobe.com/registry/tailwind-listbox.json",
    "https://react-aria.adobe.com/registry/tailwind-popover.json"
  ],
  "files": [
    {
      "path": "components/ui/Menu.tsx",
      "type": "registry:ui",
      "content": "'use client';\nimport {Check, ChevronRight} from 'lucide-react';\nimport React from 'react';\nimport {\n  Menu as AriaMenu,\n  MenuItem as AriaMenuItem,\n  type MenuProps,\n  type MenuItemProps,\n  MenuSection as AriaMenuSection,\n  type MenuSectionProps as AriaMenuSectionProps,\n  MenuTrigger as AriaMenuTrigger,\n  SubmenuTrigger as AriaSubmenuTrigger,\n  Separator,\n  type SeparatorProps,\n  Header,\n  Collection,\n  type SubmenuTriggerProps,\n  type MenuTriggerProps as AriaMenuTriggerProps\n} from 'react-aria-components/Menu';\nimport {composeRenderProps} from 'react-aria-components/composeRenderProps';\nimport {dropdownItemStyles} from '@/registry/react-aria/ui/ListBox';\nimport {Popover, type PopoverProps} from '@/registry/react-aria/ui/Popover';\n\nexport function Menu<T>(props: MenuProps<T>) {\n  return (\n    <AriaMenu\n      {...props}\n      className=\"font-sans p-1 outline outline-0 max-h-[inherit] overflow-auto [clip-path:inset(0_0_0_0_round_.75rem)] empty:text-center empty:pb-2\"\n    />\n  );\n}\n\nexport function MenuItem(props: MenuItemProps) {\n  let textValue =\n    props.textValue || (typeof props.children === 'string' ? props.children : undefined);\n  return (\n    <AriaMenuItem textValue={textValue} {...props} className={dropdownItemStyles}>\n      {composeRenderProps(props.children, (children, {selectionMode, isSelected, hasSubmenu}) => (\n        <>\n          {selectionMode !== 'none' && (\n            <span className=\"flex items-center w-4\">\n              {isSelected && <Check aria-hidden className=\"w-4 h-4\" />}\n            </span>\n          )}\n          <span className=\"flex items-center flex-1 gap-2 font-normal truncate group-selected:font-semibold\">\n            {children}\n          </span>\n          {hasSubmenu && <ChevronRight aria-hidden className=\"absolute w-4 h-4 right-2\" />}\n        </>\n      ))}\n    </AriaMenuItem>\n  );\n}\n\nexport function MenuSeparator(props: SeparatorProps) {\n  return (\n    <Separator\n      {...props}\n      className=\"mx-3 my-1 border-b border-neutral-300 dark:border-neutral-700\"\n    />\n  );\n}\n\nexport interface MenuSectionProps<T> extends AriaMenuSectionProps<T> {\n  title?: string;\n  items?: any;\n}\n\nexport function MenuSection<T>(props: MenuSectionProps<T>) {\n  return (\n    <AriaMenuSection\n      {...props}\n      className=\"first:-mt-[5px] after:content-[''] after:block after:h-[5px]\">\n      {props.title && (\n        <Header className=\"text-sm font-semibold text-neutral-500 dark:text-neutral-300 px-4 py-1 truncate sticky -top-[5px] -mt-px -mx-1 z-10 bg-neutral-100/60 dark:bg-neutral-700/60 backdrop-blur-md supports-[-moz-appearance:none]:bg-neutral-100 border-y border-y-neutral-200 dark:border-y-neutral-700 [&+*]:mt-1\">\n          {props.title}\n        </Header>\n      )}\n      <Collection items={props.items}>{props.children}</Collection>\n    </AriaMenuSection>\n  );\n}\n\ninterface MenuTriggerProps extends AriaMenuTriggerProps {\n  placement?: PopoverProps['placement'];\n}\n\nexport function MenuTrigger(props: MenuTriggerProps) {\n  let [trigger, menu] = React.Children.toArray(props.children) as [\n    React.ReactElement,\n    React.ReactElement\n  ];\n  return (\n    <AriaMenuTrigger {...props}>\n      {trigger}\n      <Popover placement={props.placement} className=\"min-w-[150px]\">\n        {menu}\n      </Popover>\n    </AriaMenuTrigger>\n  );\n}\n\nexport function SubmenuTrigger(props: SubmenuTriggerProps) {\n  let [trigger, menu] = React.Children.toArray(props.children) as [\n    React.ReactElement,\n    React.ReactElement\n  ];\n  return (\n    <AriaSubmenuTrigger {...props}>\n      {trigger}\n      <Popover offset={-2} crossOffset={-4}>\n        {menu}\n      </Popover>\n    </AriaSubmenuTrigger>\n  );\n}\n"
    }
  ],
  "css": {
    "@plugin \"tailwindcss-react-aria-components\"": {},
    "@import \"tw-animate-css\"": {}
  }
}
