{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "divider-text",
  "title": "Divider Text",
  "description": "Two hairlines with a label, badge or button between them.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/divider-text.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Content divider — two hairlines with a label, badge or button between them.\n   Alignment is a matter of which rule grows: `center` splits the remainder\n   evenly, `start`/`end` pin the content behind a short lead-in.\n\n   The rules are styled from the root so the two spans stay dumb markup, and no\n   two variants ever set the same property on the same selector — a `flex-1` and\n   a `flex-none` racing on one element would resolve by stylesheet order, not by\n   class order, and silently pick a winner. */\nconst dividerTextVariants = cva(\n  \"flex w-full items-center gap-3 text-caption text-muted-foreground [&>[data-slot=divider-text-rule]]:border-t [&>[data-slot=divider-text-rule]]:border-border\",\n  {\n    variants: {\n      align: {\n        center: \"[&>[data-slot=divider-text-rule]]:flex-1\",\n        start:\n          \"[&>[data-side=leading]]:w-6 [&>[data-side=leading]]:flex-none [&>[data-side=trailing]]:flex-1\",\n        end: \"[&>[data-side=leading]]:flex-1 [&>[data-side=trailing]]:w-6 [&>[data-side=trailing]]:flex-none\",\n      },\n    },\n    defaultVariants: {\n      align: \"center\",\n    },\n  }\n)\n\n/* Deliberately not role=\"separator\": the content slot is meant to hold a Badge\n   or a button, and a separator must not own focusable descendants. The rules\n   are decorative and hidden; the label announces as ordinary text. */\nfunction DividerText({\n  className,\n  align = \"center\",\n  children,\n  ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof dividerTextVariants>) {\n  return (\n    <div\n      data-slot=\"divider-text\"\n      data-align={align}\n      className={cn(dividerTextVariants({ align }), className)}\n      {...props}\n    >\n      <span\n        data-slot=\"divider-text-rule\"\n        data-side=\"leading\"\n        aria-hidden=\"true\"\n      />\n      {children ? (\n        <span\n          data-slot=\"divider-text-label\"\n          className=\"flex shrink-0 items-center gap-2\"\n        >\n          {children}\n        </span>\n      ) : null}\n      <span\n        data-slot=\"divider-text-rule\"\n        data-side=\"trailing\"\n        aria-hidden=\"true\"\n      />\n    </div>\n  )\n}\n\nexport { DividerText, dividerTextVariants }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}