ivt
Version:
Ivt Components Library
1 lines • 5.45 kB
Source Map (JSON)
{"version":3,"file":"pagination-DRsm0449.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/ellipsis.js","../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }]\n];\nconst Ellipsis = createLucideIcon(\"Ellipsis\", __iconNode);\n\nexport { __iconNode, Ellipsis as default };\n//# sourceMappingURL=ellipsis.js.map\n","import { type Button, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\";\nimport React from \"react\";\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n\treturn (\n\t\t<nav\n\t\t\taria-label=\"pagination\"\n\t\t\tdata-slot=\"pagination\"\n\t\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-slot=\"pagination-content\"\n\t\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n\treturn <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\nfunction PaginationLink({ className, isActive, size = \"icon\", ...props }: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? \"page\" : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({\n\t\t\t\t\tvariant: isActive ? \"outline\" : \"ghost\",\n\t\t\t\t\tsize,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to previous page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon />\n\t\t\t<span className=\"hidden sm:block\">Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to next page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"hidden sm:block\">Next</span>\n\t\t\t<ChevronRightIcon />\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\tclassName={cn(\"flex size-9 items-center justify-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon className=\"size-4\" />\n\t\t\t<span className=\"sr-only\">More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationLink,\n\tPaginationItem,\n\tPaginationPrevious,\n\tPaginationNext,\n\tPaginationEllipsis,\n};\n"],"names":["Ellipsis","createLucideIcon","cx","cy","r","key","Pagination","className","props","React","nav","aria-label","data-slot","cn","PaginationContent","ul","PaginationItem","li","PaginationLink","isActive","size","a","aria-current","undefined","data-active","buttonVariants","variant","PaginationPrevious","createElement","ChevronLeftIcon","span","PaginationNext","ChevronRightIcon","PaginationEllipsis","aria-hidden","MoreHorizontalIcon"],"mappings":"6PAGO,MAiBDA,EAAWC,EAAiB,WAjBE,CAClC,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKC,IAAK,WAC9C,CAAC,SAAU,CAAEH,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKC,IAAK,WAC9C,CAAC,SAAU,CAAEH,GAAI,IAAKC,GAAI,KAAMC,EAAG,IAAKC,IAAK,aCD/C,SAASC,GAAWC,UAAEA,KAAcC,IACnC,OACCC,EAACC,cAAAA,MAAAA,CACAC,aAAW,aACXC,YAAU,aACVL,UAAWM,EAAG,qCAAsCN,MAChDC,GAGP,CAEA,SAASM,GAAkBP,UAAEA,KAAcC,IAC1C,OACCC,EAACM,cAAAA,KAAAA,CACAH,YAAU,qBACVL,UAAWM,EAAG,mCAAoCN,MAC9CC,GAGP,CAEA,SAASQ,MAAoBR,IAC5B,OAAOC,EAACQ,cAAAA,KAAAA,CAAGL,YAAU,qBAAsBJ,GAC5C,CAOA,SAASU,GAAeX,UAAEA,EAASY,SAAEA,EAAQC,KAAEA,EAAO,UAAWZ,IAChE,OACCC,EAACY,cAAAA,IAAAA,CACAC,eAAcH,EAAW,YAASI,EAClCX,YAAU,kBACVY,cAAaL,EACbZ,UAAWM,EACVY,EAAe,CACdC,QAASP,EAAW,UAAY,QAChCC,SAEDb,MAEGC,GAGP,CAEA,SAASmB,GAAmBpB,UAAEA,KAAcC,IAC3C,OACCC,EAACS,cAAAA,EAAAA,CACAP,aAAW,sBACXS,KAAK,UACLb,UAAWM,EAAG,yBAA0BN,MACpCC,GAEJC,EAAAm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