{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "author": "Lopifi (https://lopifi.com)",
  "categories": [
    "primitives",
    "finance",
    "accounting"
  ],
  "dependencies": [],
  "description": "Single / double / section accounting rule lines.",
  "files": [
    {
      "content": "import * as React from \"react\";\nimport { cn } from \"@/lib/ledger/cn\";\n\nexport interface RuleProps extends React.ComponentPropsWithoutRef<\"div\"> {\n  variant?: \"subtotal\" | \"total\" | \"section\";\n}\n\n/**\n * Four centuries of accounting typography, two CSS declarations.\n *\n * A rule spans the numeric column only, never the label column — that is the\n * actual convention, and it is what makes a statement read as accounting\n * rather than as a styled table. Never combined with a background fill on\n * the same row.\n */\nexport const Rule = React.forwardRef<HTMLDivElement, RuleProps>(\n  ({ className, variant = \"subtotal\", ...props }, ref) => (\n    <div\n      aria-hidden=\"true\"\n      className={cn(\n        variant === \"subtotal\" && \"border-t border-border\",\n        variant === \"total\" && \"border-b-[3px] border-double border-border-strong\",\n        variant === \"section\" && \"border-t border-border-subtle\",\n        className,\n      )}\n      data-rule={variant}\n      ref={ref}\n      {...props}\n    />\n  ),\n);\nRule.displayName = \"Rule\";\n\n/** The in-table form: a rule laid inside a cell, spanning the figures only. */\nexport function RuleCell({\n  variant = \"subtotal\",\n  className,\n}: {\n  variant?: RuleProps[\"variant\"];\n  className?: string;\n}) {\n  return (\n    <td className={cn(\"px-3 py-0\", className)}>\n      <Rule className=\"h-0 w-full\" variant={variant} />\n    </td>\n  );\n}\n",
      "path": "components/ledger/rule.tsx",
      "target": "components/ledger/rule.tsx",
      "type": "registry:ui"
    }
  ],
  "name": "rule",
  "registryDependencies": [
    "@lopifi/theme",
    "@lopifi/cn"
  ],
  "title": "Rule",
  "type": "registry:ui"
}
