{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pagination",
  "type": "registry:ui",
  "title": "Pagination",
  "description": "Fluent 2-styled pagination with shadcn APIs. Seven composable parts (Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis), page links styled via buttonVariants (outline when active, ghost otherwise).",
  "author": "graundtech <https://github.com/graundtech/fluent2-react-kit>",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://fluent2-react-kit.graund.io/r/utils.json",
    "https://fluent2-react-kit.graund.io/r/button.json"
  ],
  "files": [
    {
      "path": "components/ui/pagination.tsx",
      "type": "registry:ui",
      "target": "components/ui/pagination.tsx",
      "content": "import type { VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"./button\";\n\n/**\n * Pagination — Fluent 2-styled, shadcn-API pagination family.\n *\n * Structure matches shadcn/ui's Pagination: `Pagination` (nav landmark),\n * `PaginationContent` (list), `PaginationItem` (list item), `PaginationLink`\n * (page control, styled via `buttonVariants`), `PaginationPrevious` /\n * `PaginationNext` (labeled link + chevron), and `PaginationEllipsis`\n * (decorative truncation marker). Every part is a plain function component —\n * there is no open/close or selection state to manage, so this stays pure\n * markup, same as `Card`.\n *\n * `PaginationLink` reuses `Button`'s `buttonVariants` (outline when\n * `isActive`, ghost otherwise) so page controls read as part of the same\n * button system instead of a bespoke look.\n *\n * Divergence from shadcn: shadcn's chevrons and the ellipsis dots come from\n * `lucide-react`. This kit uses `@fluentui/react-icons` for iconography\n * elsewhere, but importing it forces `\"use client\"` onto every file that\n * touches it (see `docs/component-conventions.md` §9 — the icon package's\n * sizing module calls `@griffel/react`'s `__styles()` at module scope without\n * its own `\"use client\"`, which breaks `next build`'s RSC graph). Pagination\n * has no state of its own and should stay a server component, so the\n * chevrons/dots are inline `<svg>` instead — a deliberate, documented\n * divergence from both shadcn (lucide) and the rest of this kit (Fluent\n * icons).\n *\n * Server-safe: no `\"use client\"`, no hooks — the React import is type-only.\n */\n\nfunction Pagination({ className, ...props }: ComponentProps<\"nav\">) {\n  return (\n    <nav\n      role=\"navigation\"\n      aria-label=\"pagination\"\n      data-slot=\"pagination\"\n      className={cn(\"mx-auto flex w-full justify-center\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction PaginationContent({ className, ...props }: ComponentProps<\"ul\">) {\n  return (\n    <ul\n      data-slot=\"pagination-content\"\n      className={cn(\"flex flex-row items-center gap-1\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction PaginationItem({ ...props }: ComponentProps<\"li\">) {\n  return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n  isActive?: boolean;\n} & Pick<VariantProps<typeof buttonVariants>, \"size\"> &\n  ComponentProps<\"a\">;\n\nfunction PaginationLink({\n  className,\n  isActive = false,\n  size = \"icon\",\n  ...props\n}: PaginationLinkProps) {\n  return (\n    <a\n      aria-current={isActive ? \"page\" : undefined}\n      data-slot=\"pagination-link\"\n      data-active={isActive}\n      className={cn(\n        buttonVariants({\n          variant: isActive ? \"outline\" : \"ghost\",\n          size,\n        }),\n        className\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction PaginationPrevious({\n  className,\n  ...props\n}: ComponentProps<typeof PaginationLink>) {\n  return (\n    <PaginationLink\n      aria-label=\"Go to previous page\"\n      size=\"default\"\n      className={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n      {...props}\n    >\n      <svg\n        viewBox=\"0 0 20 20\"\n        fill=\"none\"\n        aria-hidden=\"true\"\n        className=\"size-4\"\n      >\n        <path\n          d=\"M12.5 5L7.5 10L12.5 15\"\n          stroke=\"currentColor\"\n          strokeWidth=\"1.5\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n      <span className=\"hidden sm:block\">Previous</span>\n    </PaginationLink>\n  );\n}\n\nfunction PaginationNext({\n  className,\n  ...props\n}: ComponentProps<typeof PaginationLink>) {\n  return (\n    <PaginationLink\n      aria-label=\"Go to next page\"\n      size=\"default\"\n      className={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n      {...props}\n    >\n      <span className=\"hidden sm:block\">Next</span>\n      <svg\n        viewBox=\"0 0 20 20\"\n        fill=\"none\"\n        aria-hidden=\"true\"\n        className=\"size-4\"\n      >\n        <path\n          d=\"M7.5 5L12.5 10L7.5 15\"\n          stroke=\"currentColor\"\n          strokeWidth=\"1.5\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n    </PaginationLink>\n  );\n}\n\nfunction PaginationEllipsis({\n  className,\n  ...props\n}: ComponentProps<\"span\">) {\n  return (\n    <span\n      aria-hidden=\"true\"\n      data-slot=\"pagination-ellipsis\"\n      className={cn(\"flex size-8 items-center justify-center\", className)}\n      {...props}\n    >\n      <svg\n        viewBox=\"0 0 20 20\"\n        fill=\"none\"\n        aria-hidden=\"true\"\n        className=\"size-4\"\n      >\n        <circle cx=\"4\" cy=\"10\" r=\"1.25\" fill=\"currentColor\" />\n        <circle cx=\"10\" cy=\"10\" r=\"1.25\" fill=\"currentColor\" />\n        <circle cx=\"16\" cy=\"10\" r=\"1.25\" fill=\"currentColor\" />\n      </svg>\n      <span className=\"sr-only\">More pages</span>\n    </span>\n  );\n}\n\nexport {\n  Pagination,\n  PaginationContent,\n  PaginationItem,\n  PaginationLink,\n  PaginationPrevious,\n  PaginationNext,\n  PaginationEllipsis,\n};\n"
    }
  ]
}
