UNPKG

@undp/design-system-react

Version:

React based design system for UNDP

65 lines (64 loc) 2.4 kB
import { t as e } from "./utils-ca9as9Ye.js"; import { t } from "./ellipsis-Ctrzu3yc.js"; import n from "react"; import { jsx as r, jsxs as i } from "react/jsx-runtime"; //#region src/components/ui/breadcrumb.tsx var a = n.forwardRef(({ ...e }, t) => /* @__PURE__ */ r("nav", { ref: t, "aria-label": "breadcrumb", ...e })); a.displayName = "Breadcrumb"; var o = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("ol", { ...n, ref: i, className: e("flex list-none flex-wrap items-center gap-1.5 break-words font-semibold text-xs uppercase sm:gap-2.5", t) })); o.displayName = "BreadcrumbList"; var s = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("li", { ...n, ref: i, className: e("inline-flex items-center gap-1.5", t) })); s.displayName = "BreadcrumbItem"; var c = n.forwardRef(({ className: t, variant: n = "default", ...i }, a) => /* @__PURE__ */ r("a", { ref: a, className: e("transition-all", n === "reverse" ? "text-content-reverse hover:opacity-80" : "text-primary hover:text-primary-hover", t), ...i })); c.displayName = "BreadcrumbLink"; var l = n.forwardRef(({ className: t, variant: n = "default", ...i }, a) => /* @__PURE__ */ r("span", { ...i, ref: a, "aria-disabled": "true", "aria-current": "page", className: e("text-xs", n === "reverse" ? "text-content-reverse" : "text-content-primary", t) })); l.displayName = "BreadcrumbPage"; function u({ variant: t = "default" }) { return /* @__PURE__ */ r("li", { role: "presentation", "aria-hidden": "true", children: /* @__PURE__ */ r("div", { className: e(t === "reverse" ? "text-content-reverse text-xs" : "text-primary text-xs"), children: "/" }) }); } u.displayName = "BreadcrumbSeparator"; function d({ className: n, variant: a = "default", ...o }) { return /* @__PURE__ */ i("span", { ...o, role: "presentation", "aria-hidden": "true", className: e("flex h-9 w-9 items-center justify-center", a === "reverse" ? "text-content-reverse" : "text-content-primary", n), children: [/* @__PURE__ */ r(t, { className: "h-4 w-4" }), /* @__PURE__ */ r("span", { className: "sr-only", children: "More" })] }); } d.displayName = "BreadcrumbElipssis"; //#endregion export { a as Breadcrumb, d as BreadcrumbEllipsis, s as BreadcrumbItem, c as BreadcrumbLink, o as BreadcrumbList, l as BreadcrumbPage, u as BreadcrumbSeparator }; //# sourceMappingURL=Breadcrumb.js.map