{
  "name": "pagination",
  "type": "registry:ui",
  "framework": "react",
  "title": "Pagination",
  "description": "Numbered page buttons with previous/next controls, plus a divider-style load-more row.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@newtui/button"
  ],
  "files": [
    {
      "path": "ui/pagination.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Pagination = React.forwardRef<HTMLElement, React.ComponentProps<\"nav\">>(\n  ({ className, ...props }, ref) => (\n    <nav\n      ref={ref}\n      role=\"navigation\"\n      aria-label=\"Pagination\"\n      className={cn(\"flex items-center gap-1\", className)}\n      {...props}\n    />\n  )\n)\nPagination.displayName = \"Pagination\"\n\nconst paginationButtonVariants = cva(\n  \"flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-[var(--newt-radius-sm)] border px-2 text-[13px] font-medium disabled:cursor-not-allowed disabled:opacity-40\",\n  {\n    variants: {\n      active: {\n        false:\n          \"border-newt-border bg-newt-bg-elevated text-newt-text-secondary hover:bg-newt-bg-hover hover:text-newt-text-primary\",\n        true: \"border-newt-brand bg-newt-brand text-newt-on-accent\",\n      },\n    },\n    defaultVariants: {\n      active: false,\n    },\n  }\n)\n\nexport interface PaginationButtonProps\n  extends\n    React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof paginationButtonVariants> {}\n\nconst PaginationButton = React.forwardRef<\n  HTMLButtonElement,\n  PaginationButtonProps\n>(({ className, active, ...props }, ref) => (\n  <button\n    ref={ref}\n    type=\"button\"\n    aria-current={active ? \"page\" : undefined}\n    data-active={active ? \"\" : undefined}\n    className={cn(paginationButtonVariants({ active }), className)}\n    {...props}\n  />\n))\nPaginationButton.displayName = \"PaginationButton\"\n\nconst PaginationEllipsis = React.forwardRef<\n  HTMLSpanElement,\n  React.ComponentProps<\"span\">\n>(({ className, children, ...props }, ref) => (\n  <span\n    ref={ref}\n    aria-hidden=\"true\"\n    className={cn(\"px-1 text-[13px] text-newt-text-muted\", className)}\n    {...props}\n  >\n    {children ?? \"…\"}\n  </span>\n))\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\n/** A \"load more\" row: centred content flanked by hairline rules. */\nconst LoadMore = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n  ({ className, ...props }, ref) => (\n    <div\n      ref={ref}\n      className={cn(\n        \"flex items-center justify-center gap-2.5 p-3 text-[13px] text-newt-text-muted before:h-px before:flex-1 before:bg-newt-border before:content-[''] after:h-px after:flex-1 after:bg-newt-border after:content-['']\",\n        className\n      )}\n      {...props}\n    />\n  )\n)\nLoadMore.displayName = \"LoadMore\"\n\nexport {\n  Pagination,\n  PaginationButton,\n  PaginationEllipsis,\n  LoadMore,\n  paginationButtonVariants,\n}\n",
      "type": "registry:ui"
    }
  ]
}