UNPKG

@premieroctet/next-admin

Version:

Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje

115 lines (114 loc) 6.06 kB
"use strict"; var __webpack_require__ = {}; (()=>{ __webpack_require__.n = (module)=>{ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module; __webpack_require__.d(getter, { a: getter }); return getter; }; })(); (()=>{ __webpack_require__.d = (exports1, definition)=>{ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, { enumerable: true, get: definition[key] }); }; })(); (()=>{ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop); })(); (()=>{ __webpack_require__.r = (exports1)=>{ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, { value: 'Module' }); Object.defineProperty(exports1, '__esModule', { value: true }); }; })(); var __webpack_exports__ = {}; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { default: ()=>Breadcrumb }); const jsx_runtime_namespaceObject = require("react/jsx-runtime"); const outline_namespaceObject = require("@heroicons/react/24/outline"); const Link_js_namespaceObject = require("./common/Link.js"); var Link_js_default = /*#__PURE__*/ __webpack_require__.n(Link_js_namespaceObject); const ConfigContext_js_namespaceObject = require("../context/ConfigContext.js"); const ResourceIcon_js_namespaceObject = require("./common/ResourceIcon.js"); var ResourceIcon_js_default = /*#__PURE__*/ __webpack_require__.n(ResourceIcon_js_namespaceObject); function Breadcrumb({ breadcrumbItems }) { const { basePath } = (0, ConfigContext_js_namespaceObject.useConfig)(); return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", { className: "flex h-[40px]", "aria-label": "Breadcrumb", children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("ol", { role: "list", className: "flex flex-wrap items-center gap-2", children: [ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", { children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", { children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("a", { href: basePath, className: "text-nextadmin-menu-default dark:text-dark-nextadmin-menu-color hover:text-nextadmin-content-emphasis dark:hover:text-dark-nextadmin-content-emphasis", children: [ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(outline_namespaceObject.HomeIcon, { className: "h-5 w-5 flex-shrink-0", "aria-hidden": "true" }), /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", { className: "sr-only", children: "Home" }) ] }) }) }), breadcrumbItems.map((page)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", { children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", { className: "flex items-center", title: page.label, children: [ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg", { className: "text-next-admin-menu-default dark:text-dark-nextadmin-menu-color h-5 w-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", { d: "M5.555 17.776l8-16 .894.448-8 16-.894-.448z" }) }), /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Link_js_default(), { href: page.href, className: `hover:text-nextadmin-brand-emphasis dark:hover:text-dark-nextadmin-brand-emphasis ml-2 flex gap-2 text-sm font-medium ${page.current ? "text-nextadmin-brand-subtle dark:text-dark-nextadmin-brand-subtle" : "text-nextadmin-menu-default dark:text-dark-nextadmin-menu-color"} `, "aria-current": page.current ? "page" : void 0, children: [ !!page.icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ResourceIcon_js_default(), { icon: page.icon, className: "h-5 w-5" }), /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", { className: "flex-basis-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: page.label }) ] }) ] }) }, page.label)) ] }) }); } exports["default"] = __webpack_exports__["default"]; for(var __webpack_i__ in __webpack_exports__)if (-1 === [ "default" ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__]; Object.defineProperty(exports, '__esModule', { value: true });