UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

78 lines (77 loc) • 3.41 kB
import { jsx, jsxs } from "react/jsx-runtime"; import { ChevronRight, MoreHorizontal } from "lucide-react"; import { cn } from "../../lib/utilities.js"; import breadcrumb_module from "./breadcrumb.module.js"; import * as __rspack_external_react from "react"; const Breadcrumb = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, separator: _separator, ...props }, ref)=>/*#__PURE__*/ jsx("nav", { ref: ref, "aria-label": "breadcrumb", className: cn(breadcrumb_module.root, className), ...props })); const BreadcrumbList = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("ol", { ref: ref, className: cn(breadcrumb_module.list, className), ...props })); const BreadcrumbItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("li", { ref: ref, className: cn(breadcrumb_module.item, className), ...props })); const BreadcrumbLink = /*#__PURE__*/ __rspack_external_react.forwardRef(({ asChild = false, className, children, ...props }, ref)=>{ const mergedClassName = cn(breadcrumb_module.link, className); if (asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children)) { const child = children; return /*#__PURE__*/ __rspack_external_react.cloneElement(child, { ...props, ref, className: cn(mergedClassName, child.props.className) }); } return /*#__PURE__*/ jsx("a", { ref: ref, className: mergedClassName, ...props, children: children }); }); const BreadcrumbPage = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", { ref: ref, role: "link", "aria-current": "page", "aria-disabled": "true", className: cn(breadcrumb_module.page, className), ...props })); const BreadcrumbSeparator = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("li", { ref: ref, role: "presentation", "aria-hidden": "true", className: cn(breadcrumb_module.separator, className), ...props, children: children ?? /*#__PURE__*/ jsx(ChevronRight, {}) })); const BreadcrumbEllipsis = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs("span", { ref: ref, role: "presentation", "aria-hidden": "true", className: cn(breadcrumb_module.ellipsis, className), ...props, children: [ /*#__PURE__*/ jsx(MoreHorizontal, {}), /*#__PURE__*/ jsx("span", { className: breadcrumb_module.srOnly, children: "More" }) ] })); Breadcrumb.displayName = "Breadcrumb"; BreadcrumbList.displayName = "BreadcrumbList"; BreadcrumbItem.displayName = "BreadcrumbItem"; BreadcrumbLink.displayName = "BreadcrumbLink"; BreadcrumbPage.displayName = "BreadcrumbPage"; BreadcrumbSeparator.displayName = "BreadcrumbSeparator"; BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis"; export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator }; //# sourceMappingURL=breadcrumb.js.map