dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
114 lines (113 loc) • 2.57 kB
JavaScript
import { jsx as n, jsxs as m } from "react/jsx-runtime";
import * as r from "react";
import { useTranslation as e } from "react-i18next";
import { c as t } from "./utils-CnvKSirc.es.js";
import { b as c } from "./button-DTRIYqDb.es.js";
import { E as p } from "./ellipsis-9FjKj8zv.es.js";
import { C as g } from "./chevron-right-BNG-Ugyb.es.js";
import { C as f } from "./chevron-left-CfOUdNQ0.es.js";
const N = ({ className: i, ...a }) => /* @__PURE__ */ n(
"nav",
{
role: "navigation",
"aria-label": "pagination",
className: t("flex w-full justify-center", i),
...a
}
);
N.displayName = "Pagination";
const d = r.forwardRef(({ className: i, ...a }, s) => /* @__PURE__ */ n(
"ul",
{
ref: s,
className: t("flex flex-row items-center gap-1", i),
...a
}
));
d.displayName = "PaginationContent";
const u = r.forwardRef(({ className: i, ...a }, s) => /* @__PURE__ */ n("li", { ref: s, className: t("", i), ...a }));
u.displayName = "PaginationItem";
const o = ({
className: i,
isActive: a,
size: s = "icon",
...l
}) => /* @__PURE__ */ n(
"a",
{
"aria-current": a ? "page" : void 0,
className: t(
c({
variant: a ? "tertiary" : "ghost",
size: s
}),
"cursor-pointer",
i
),
...l
}
);
o.displayName = "PaginationLink";
const P = ({
className: i,
...a
}) => {
const { t: s } = e();
return /* @__PURE__ */ n(
o,
{
"aria-label": s("Go to previous page"),
size: "default",
className: t("gap-1 px-2.5", i),
...a,
children: /* @__PURE__ */ n(f, { className: "h-4 w-4" })
}
);
};
P.displayName = "PaginationPrevious";
const h = ({
className: i,
...a
}) => {
const { t: s } = e();
return /* @__PURE__ */ n(
o,
{
"aria-label": s("Go to next page"),
size: "default",
className: t("gap-1 px-2.5", i),
...a,
children: /* @__PURE__ */ n(g, { className: "h-4 w-4" })
}
);
};
h.displayName = "PaginationNext";
const x = ({
className: i,
...a
}) => {
const { t: s } = e();
return /* @__PURE__ */ m(
"span",
{
"aria-hidden": !0,
className: t("flex h-9 w-9 items-center justify-center", i),
...a,
children: [
/* @__PURE__ */ n(p, { className: "h-4 w-4" }),
/* @__PURE__ */ n("span", { className: "sr-only", children: s("More pages") })
]
}
);
};
x.displayName = "PaginationEllipsis";
export {
N as P,
d as a,
x as b,
u as c,
o as d,
h as e,
P as f
};
//# sourceMappingURL=pagination-DFYeehFF.es.js.map