{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "mention-input",
  "type": "registry:ui",
  "title": "Mention Input",
  "dependencies": [
    "@base-ui-next/react"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json"
  ],
  "files": [
    {
      "path": "react/mention-input.tsx",
      "content": "'use client'\n\nimport { MentionInput as MentionInputPrimitive } from '@base-ui-next/react/mention-input' // base-ui-next/ui mention-input@0.1.1\nimport type {\n  MentionInputArrowProps,\n  MentionInputCollectionProps,\n  MentionInputEmptyProps,\n  MentionInputGroupLabelProps,\n  MentionInputGroupProps,\n  MentionInputItemProps,\n  MentionInputListProps,\n  MentionInputPopupProps,\n  MentionInputPortalProps,\n  MentionInputRowProps,\n  MentionInputSeparatorProps,\n} from '@base-ui-next/react/mention-input'\nimport { cn } from '@/lib/utils'\n\nconst mentionInputInputClassName =\n  'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40'\n\nconst mentionInputPositionerClassName = 'isolate z-50'\n\nconst mentionInputPopupClassName =\n  'group/mention-input-popup relative max-h-(--available-height) w-64 max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95'\n\nconst mentionInputArrowClassName =\n  'size-2.5 rotate-45 bg-popover data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1 data-[side=top]:-bottom-1'\n\nconst mentionInputListClassName =\n  'max-h-[min(--spacing(72),var(--available-height))] scroll-py-1 overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] data-empty:p-0 [&::-webkit-scrollbar]:hidden'\n\nconst mentionInputItemClassName =\n  \"relative flex w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n\nconst mentionInputEmptyClassName =\n  'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/mention-input-popup:flex'\n\nconst mentionInputGroupLabelClassName = 'px-2 py-1.5 text-xs text-muted-foreground'\n\nconst mentionInputRowClassName = 'flex w-full items-center gap-1'\n\nconst mentionInputSeparatorClassName = '-mx-1 my-1 h-px bg-border'\n\n// No shadcn item: one name per Base UI part. The app writes the popup as `Portal` > `Positioner` >\n// `Popup`, as the headless anatomy has it; the Root renders no element.\nconst MentionInput = MentionInputPrimitive.Root\n\nfunction MentionInputInput({ className, ...props }: MentionInputPrimitive.Input.Props) {\n  return (\n    <MentionInputPrimitive.Input\n      data-slot=\"mention-input-input\"\n      className={cn(mentionInputInputClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputPortal({ ...props }: MentionInputPortalProps) {\n  return <MentionInputPrimitive.Portal data-slot=\"mention-input-portal\" {...props} />\n}\n\nfunction MentionInputPositioner({\n  className,\n  sideOffset = 4,\n  ...props\n}: MentionInputPrimitive.Positioner.Props) {\n  return (\n    <MentionInputPrimitive.Positioner\n      data-slot=\"mention-input-positioner\"\n      sideOffset={sideOffset}\n      className={cn(mentionInputPositionerClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputPopup({ className, ...props }: MentionInputPopupProps) {\n  return (\n    <MentionInputPrimitive.Popup\n      data-slot=\"mention-input-popup\"\n      className={cn(mentionInputPopupClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputArrow({ className, ...props }: MentionInputArrowProps) {\n  return (\n    <MentionInputPrimitive.Arrow\n      data-slot=\"mention-input-arrow\"\n      className={cn(mentionInputArrowClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputList({ className, ...props }: MentionInputListProps) {\n  return (\n    <MentionInputPrimitive.List\n      data-slot=\"mention-input-list\"\n      className={cn(mentionInputListClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputItem({ className, ...props }: MentionInputItemProps) {\n  return (\n    <MentionInputPrimitive.Item\n      data-slot=\"mention-input-item\"\n      className={cn(mentionInputItemClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputEmpty({ className, ...props }: MentionInputEmptyProps) {\n  return (\n    <MentionInputPrimitive.Empty\n      data-slot=\"mention-input-empty\"\n      className={cn(mentionInputEmptyClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputGroup({ className, ...props }: MentionInputGroupProps) {\n  return (\n    <MentionInputPrimitive.Group\n      data-slot=\"mention-input-group\"\n      className={cn(className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputGroupLabel({ className, ...props }: MentionInputGroupLabelProps) {\n  return (\n    <MentionInputPrimitive.GroupLabel\n      data-slot=\"mention-input-group-label\"\n      className={cn(mentionInputGroupLabelClassName, className)}\n      {...props}\n    />\n  )\n}\n\n// `MentionInput.Collection` renders no element, so it has no `data-slot`.\nfunction MentionInputCollection({ ...props }: MentionInputCollectionProps) {\n  return <MentionInputPrimitive.Collection {...props} />\n}\n\nfunction MentionInputRow({ className, ...props }: MentionInputRowProps) {\n  return (\n    <MentionInputPrimitive.Row\n      data-slot=\"mention-input-row\"\n      className={cn(mentionInputRowClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction MentionInputSeparator({ className, ...props }: MentionInputSeparatorProps) {\n  return (\n    <MentionInputPrimitive.Separator\n      data-slot=\"mention-input-separator\"\n      className={cn(mentionInputSeparatorClassName, className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  MentionInput,\n  MentionInputArrow,\n  MentionInputCollection,\n  MentionInputEmpty,\n  MentionInputGroup,\n  MentionInputGroupLabel,\n  MentionInputInput,\n  MentionInputItem,\n  MentionInputList,\n  MentionInputPopup,\n  MentionInputPortal,\n  MentionInputPositioner,\n  MentionInputRow,\n  MentionInputSeparator,\n}\n",
      "type": "registry:ui",
      "target": "@ui/mention-input.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.1",
      "hash": "28045647e37bf2c63143651469d66daa9ca2de8a823d07720bd2220db6c3622c",
      "files": {
        "@ui/mention-input.tsx": "3b062247a1298354b0b4bf927afbfb909abe3eac756ef93317952a9ae61e13df"
      }
    }
  }
}
