{
  "name": "divider",
  "type": "registry:ui",
  "framework": "react",
  "title": "Divider",
  "description": "A horizontal rule with an optional centered label, spacing steps and a line-less mode.",
  "dependencies": [
    "class-variance-authority",
    "radix-ui"
  ],
  "files": [
    {
      "path": "ui/divider.tsx",
      "content": "\"use client\"\n\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Separator as SeparatorPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst dividerVariants = cva(\n  \"flex items-center gap-3 text-xs font-semibold text-newt-text-muted data-[orientation=vertical]:flex-col data-[orientation=vertical]:self-stretch\",\n  {\n    variants: {\n      /*\n       * Spacing steps, for stacking dividers inside dense containers.\n       * `small` and `large` are the two steps of a Components V2 separator.\n       */\n      spacing: {\n        small:\n          \"my-1 data-[orientation=vertical]:mx-1 data-[orientation=vertical]:my-0\",\n        large:\n          \"my-2 data-[orientation=vertical]:mx-2 data-[orientation=vertical]:my-0\",\n        sm: \"my-1 data-[orientation=vertical]:mx-1 data-[orientation=vertical]:my-0\",\n        md: \"my-4 data-[orientation=vertical]:mx-4 data-[orientation=vertical]:my-0\",\n        lg: \"my-6 data-[orientation=vertical]:mx-6 data-[orientation=vertical]:my-0\",\n      },\n      /* Pure spacing: keeps the gap, drops the rules around the label. */\n      line: {\n        true: \"before:h-px before:flex-1 before:bg-newt-border before:content-[''] after:h-px after:flex-1 after:bg-newt-border after:content-[''] data-[orientation=vertical]:before:h-auto data-[orientation=vertical]:before:w-px data-[orientation=vertical]:after:h-auto data-[orientation=vertical]:after:w-px\",\n        false: \"\",\n      },\n    },\n    defaultVariants: {\n      spacing: \"md\",\n      line: true,\n    },\n  }\n)\n\nexport interface DividerProps\n  extends\n    React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>,\n    VariantProps<typeof dividerVariants> {}\n\n/*\n * Radix owns the semantics: `role=\"separator\"`, `aria-orientation` when it is\n * vertical, and no role at all when it is `decorative`. Only the look is\n * newt/ui's.\n */\nconst Divider = React.forwardRef<\n  React.ComponentRef<typeof SeparatorPrimitive.Root>,\n  DividerProps\n>(({ className, spacing, line, ...props }, ref) => (\n  <SeparatorPrimitive.Root\n    ref={ref}\n    className={cn(dividerVariants({ spacing, line }), className)}\n    {...props}\n  />\n))\nDivider.displayName = \"Divider\"\n\nexport { Divider, dividerVariants }\n",
      "type": "registry:ui"
    }
  ]
}