diff --git a/dist/layout.js b/dist/layout.js index e2b90b1..8e30a56 100644 --- a/dist/layout.js +++ b/dist/layout.js @@ -1,11 +1,11 @@ import { jsx as A, jsxs as l, Fragment as $ } from "react/jsx-runtime"; -import { Box as I, HStack as u, VStack as C, Image as B, Text as d, useDisclosure as _, Stack as ee, Tooltip as P, IconButton as G, Icon as s, Drawer as Ae, DrawerOverlay as oe, DrawerContent as ne, DrawerCloseButton as re, DrawerHeader as te, DrawerBody as le, SimpleGrid as ge, Link as ae } from "@chakra-ui/react"; -import { forwardRef as x, useRef as ie, Children as ce, isValidElement as Ie } from "react"; -import { usePermission as de, logoutKeycloakFromRuntime as se } from "./core-runtime.js"; +import { Box as s, HStack as u, VStack as C, Image as B, Text as I, useDisclosure as _, Stack as ee, Tooltip as P, IconButton as G, Icon as d, Drawer as Ae, DrawerOverlay as oe, DrawerContent as ne, DrawerCloseButton as te, DrawerHeader as re, DrawerBody as le, SimpleGrid as ge, Link as ae } from "@chakra-ui/react"; +import { forwardRef as x, useRef as ie, Children as ce, isValidElement as se } from "react"; +import { usePermission as Ie, logoutKeycloakFromRuntime as de } from "./core-runtime.js"; const Ce = "data:image/webp;base64,UklGRpwQAABXRUJQVlA4WAoAAAAcAAAAKQAAOwAAQUxQSFQEAAABoHbb2rG3HtB6FdS2bQ03qW3btm3btm3btm3bbnCyP9xP3jd9T0RMABHsSorXZsvtPb3Se41jZVyvSXXa32uqP/Xxmq7fo3jNACXzmn4q7jUdNdRryuuG3bAbztgR4R9evC9hBQ2Gzk0EgVE9i5U1PLZpndFDup+IkgU9K5LDjSr6kwGqSVIu8rXwbEAaN3wfajUkGPxHo6DAYI+c2xO4QVuFBAC1xgGVZ3mU8HYcd/we6DAwbFs26LnIoxxfkrhDM6kcfaRPmdky1qOCyuWW7y3tKiVJAT6fWnqUXy3dor7CKtT5oOE0VGGPMmu9e77XtIjCw3FeDUrkUZyfH2K4RW29iwE00GE8tl1Qs3Di1BrQIZ7rhvJAjEfq5obdiv46Z7do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WVhYzUxYTJkNGJhNjwveG1wTU06T3JpZ2luYWxEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6NWI3ZmJlNDgtMDc0ZS01NzRhLWFlNTctN2RmYjA4NmI1N2Q3PC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjA2YzZjODg2LWQ2NjMtYzM0My05MGU1LTY0OGViZWE5MWM4MTwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPnNSR0IgSUVDNjE5NjYtMi4xPC9waG90b3Nob3A6SUNDUHJvZmlsZT4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpEb2N1bWVudEFuY2VzdG9ycz4KICAgICAgICAgICAgPHJkZjpCYWc+CiAgICAgICAgICAgICAgIDxyZGY6bGk+YWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmEwYjgxNWMzLTkzYjMtODU0MC04NmY0LTA0OTEyZTY5Y2Y4NTwvcmRmOmxpPgogICAgICAgICAgICA8L3JkZjpCYWc+CiAgICAgICAgIDwvcGhvdG9zaG9wOkRvY3VtZW50QW5jZXN0b3JzPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4K"; function pe({ children: o, ...e }) { return /* @__PURE__ */ A( - I, + s, { as: "header", w: "100%", @@ -36,6 +36,7 @@ function be({ children: o, ...e }) { u, { alignItems: "center", + justifyContent: "flex-start", h: "100%", minW: 0, flex: "1", @@ -65,11 +66,12 @@ function ue({ children: o, ...e }) { return /* @__PURE__ */ A( C, { - alignItems: "start", + alignItems: "flex-start", justifyContent: "center", h: "100%", minW: 0, - flex: "1", + maxW: "100%", + flex: "0 1 auto", spacing: { base: 0, lg: 1 }, ...e, children: o @@ -78,12 +80,13 @@ function ue({ children: o, ...e }) { } function xe({ children: o, ...e }) { return /* @__PURE__ */ A( - d, + I, { - w: "100%", + maxW: "100%", fontWeight: "bold", fontSize: { base: "15px", lg: "20px" }, lineHeight: "short", + textAlign: "start", noOfLines: 1, ...e, children: o @@ -92,11 +95,12 @@ function xe({ children: o, ...e }) { } function me({ children: o, ...e }) { return /* @__PURE__ */ A( - d, + I, { - w: "100%", + maxW: "100%", fontSize: { base: "10px", sm: "11px", lg: "16px" }, lineHeight: { base: "shorter", lg: "normal" }, + textAlign: "start", noOfLines: 1, ...e, children: o @@ -127,7 +131,7 @@ function we({ logoSrc: o = Ce, ...e }) { } ), /* @__PURE__ */ A( - d, + I, { display: { base: "none", lg: "block" }, fontSize: "xs", @@ -149,13 +153,13 @@ const We = Object.assign(pe, { Description: me, Bi: we }), v = x( - ({ title: o, children: e, width: r = "1em", height: t = "1em", ...g }, a) => /* @__PURE__ */ l( + ({ title: o, children: e, width: t = "1em", height: r = "1em", ...g }, a) => /* @__PURE__ */ l( "svg", { ref: a, xmlns: "http://www.w3.org/2000/svg", - width: r, - height: t, + width: t, + height: r, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", @@ -189,42 +193,42 @@ const T = (o = "") => { const e = String(o).split(/[?#]/)[0] || ""; return !e || e === "/" ? e || "/" : e.replace(/\/+$/, ""); }, L = (o, e) => { - const r = T(o); + const t = T(o); return [e == null ? void 0 : e.path, ...(e == null ? void 0 : e.aliases) || []].filter(Boolean).map(T).some( - (g) => r === g || r.startsWith(`${g}/`) + (g) => t === g || t.startsWith(`${g}/`) ); -}, Se = (o = [], e) => o.find((r) => L(e, r)), W = x( - ({ linkComponent: o, href: e, children: r, ...t }, g) => /* @__PURE__ */ A(ae, { ref: g, href: e, ...o ? { as: o } : {}, ...t, children: r }) +}, Se = (o = [], e) => o.find((t) => L(e, t)), W = x( + ({ linkComponent: o, href: e, children: t, ...r }, g) => /* @__PURE__ */ A(ae, { ref: g, href: e, ...o ? { as: o } : {}, ...r, children: t }) ); W.displayName = "SidebarLink"; -const Re = ({ +const fe = ({ item: o, isActive: e, - isDisabled: r, - linkComponent: t, + isDisabled: t, + linkComponent: r, onNavigate: g }) => { const a = { variant: e ? "solid" : "ghost", colorScheme: e ? "blue" : void 0, - icon: /* @__PURE__ */ A(s, { as: o.icon }), + icon: /* @__PURE__ */ A(d, { as: o.icon }), fontSize: "xl", size: { base: "sm", lg: "lg" }, "aria-label": o.title, "aria-current": e ? "page" : void 0 }; let p; - if (r || e) + if (t || e) p = /* @__PURE__ */ A( G, { ...a, - isDisabled: r, - cursor: e && !r ? "default" : void 0 + isDisabled: t, + cursor: e && !t ? "default" : void 0 } ); else { - const m = t ? { as: t, href: o.path } : { as: "a", href: o.path }; + const m = r ? { as: r, href: o.path } : { as: "a", href: o.path }; p = /* @__PURE__ */ A( G, { @@ -237,7 +241,7 @@ const Re = ({ return /* @__PURE__ */ A( P, { - label: r ? "عدم دسترسی" : o.title, + label: t ? "عدم دسترسی" : o.title, placement: "left-start", hasArrow: !0, rounded: "md", @@ -245,14 +249,14 @@ const Re = ({ px: 4, fontWeight: "bold", closeDelay: 150, - children: /* @__PURE__ */ A(I, { as: "span", children: p }) + children: /* @__PURE__ */ A(s, { as: "span", children: p }) } ); }, ye = ({ item: o, isActive: e, - isDisabled: r, - linkComponent: t, + isDisabled: t, + linkComponent: r, onNavigate: g }) => { const a = /* @__PURE__ */ l( @@ -267,12 +271,12 @@ const Re = ({ borderRadius: "xl", color: e ? "blue.600" : "gray.600", bg: e ? "blue.50" : "transparent", - opacity: r ? 0.4 : 1, + opacity: t ? 0.4 : 1, transition: "background-color 150ms ease, color 150ms ease", children: [ - /* @__PURE__ */ A(s, { as: o.icon, boxSize: 5 }), + /* @__PURE__ */ A(d, { as: o.icon, boxSize: 5 }), /* @__PURE__ */ A( - d, + I, { as: "span", w: "full", @@ -287,21 +291,21 @@ const Re = ({ ] } ); - return r || e ? /* @__PURE__ */ A( - I, + return t || e ? /* @__PURE__ */ A( + s, { flex: "1", minW: 0, display: "flex", alignItems: "center", - "aria-disabled": r ? "true" : void 0, + "aria-disabled": t ? "true" : void 0, "aria-current": e ? "page" : void 0, children: a } ) : /* @__PURE__ */ A( W, { - linkComponent: t, + linkComponent: r, href: o.path, flex: "1", minW: 0, @@ -313,11 +317,11 @@ const Re = ({ children: a } ); -}, V = () => null, fe = ({ +}, V = () => null, Re = ({ items: o = [], currentPath: e, - linkComponent: r, - onNavigate: t, + linkComponent: t, + onNavigate: r, children: g, primaryMobileCount: a = 4, moreTitle: p = "بیشتر", @@ -326,12 +330,12 @@ const Re = ({ mobileProps: U }) => { var N, E; - const { isOpen: X, onOpen: F, onClose: w } = _(), S = ie(), { cannot: J } = de(), c = ce.toArray(g).find( - (n) => Ie(n) && n.type === V - ), R = !!c, y = ((N = c == null ? void 0 : c.props) == null ? void 0 : N.title) || "خروج", M = ((E = c == null ? void 0 : c.props) == null ? void 0 : E.icon) || O, K = e ?? (typeof window < "u" ? `${window.location.pathname}${window.location.search}` : ""), q = o.slice(0, a), f = o.slice(a), D = (n) => (Array.isArray(n == null ? void 0 : n.perm) ? n.perm : [n == null ? void 0 : n.perm]).filter(Boolean).some((i) => J(i)), b = (n) => L(K, n), Z = f.some(b), k = f.length > 0 || R, z = (n) => { - t == null || t(n), w(); + const { isOpen: X, onOpen: F, onClose: w } = _(), S = ie(), { cannot: J } = Ie(), c = ce.toArray(g).find( + (n) => se(n) && n.type === V + ), f = !!c, y = ((N = c == null ? void 0 : c.props) == null ? void 0 : N.title) || "خروج", M = ((E = c == null ? void 0 : c.props) == null ? void 0 : E.icon) || O, K = e ?? (typeof window < "u" ? `${window.location.pathname}${window.location.search}` : ""), q = o.slice(0, a), R = o.slice(a), D = (n) => (Array.isArray(n == null ? void 0 : n.perm) ? n.perm : [n == null ? void 0 : n.perm]).filter(Boolean).some((i) => J(i)), b = (n) => L(K, n), Z = R.some(b), k = R.length > 0 || f, z = (n) => { + r == null || r(n), w(); }, Y = () => { - w(), se(); + w(), de(); }; return /* @__PURE__ */ l($, { children: [ /* @__PURE__ */ A( @@ -354,17 +358,17 @@ const Re = ({ ...H, children: /* @__PURE__ */ l(C, { spacing: 2, children: [ o.map((n) => /* @__PURE__ */ A( - Re, + fe, { item: n, isDisabled: D(n), isActive: b(n), - linkComponent: r, - onNavigate: () => t == null ? void 0 : t(n) + linkComponent: t, + onNavigate: () => r == null ? void 0 : r(n) }, n.path )), - R && /* @__PURE__ */ A( + f && /* @__PURE__ */ A( P, { label: y, @@ -379,7 +383,7 @@ const Re = ({ G, { variant: "ghost", - icon: /* @__PURE__ */ A(s, { as: M }), + icon: /* @__PURE__ */ A(d, { as: M }), fontSize: "xl", size: { base: "sm", lg: "lg" }, "aria-label": y, @@ -392,7 +396,7 @@ const Re = ({ } ), /* @__PURE__ */ A( - I, + s, { as: "nav", "aria-label": "ناوبری اصلی موبایل", @@ -414,13 +418,13 @@ const Re = ({ item: n, isDisabled: D(n), isActive: b(n), - linkComponent: r, + linkComponent: t, onNavigate: () => z(n) }, n.path )), k && /* @__PURE__ */ A( - I, + s, { as: "button", ref: S, @@ -449,9 +453,9 @@ const Re = ({ color: Z ? "blue.600" : "gray.600", bg: Z ? "blue.50" : "transparent", children: [ - /* @__PURE__ */ A(s, { as: Q, boxSize: 5 }), + /* @__PURE__ */ A(d, { as: Q, boxSize: 5 }), /* @__PURE__ */ A( - d, + I, { fontSize: "10px", fontWeight: Z ? "bold" : "medium", @@ -483,10 +487,10 @@ const Re = ({ maxH: "min(78dvh, 620px)", pb: "env(safe-area-inset-bottom)", children: [ - /* @__PURE__ */ A(re, { insetInlineEnd: 3, insetInlineStart: "auto" }), - /* @__PURE__ */ A(te, { borderBottomWidth: "1px", fontSize: "md", children: m }), + /* @__PURE__ */ A(te, { insetInlineEnd: 3, insetInlineStart: "auto" }), + /* @__PURE__ */ A(re, { borderBottomWidth: "1px", fontSize: "md", children: m }), /* @__PURE__ */ l(le, { py: 4, overflowY: "auto", children: [ - /* @__PURE__ */ A(ge, { columns: 4, spacing: 2, children: f.map((n) => { + /* @__PURE__ */ A(ge, { columns: 4, spacing: 2, children: R.map((n) => { const h = D(n), i = b(n), j = /* @__PURE__ */ l( C, { @@ -502,9 +506,9 @@ const Re = ({ color: i ? "blue.700" : "gray.700", opacity: h ? 0.4 : 1, children: [ - /* @__PURE__ */ A(s, { as: n.icon, boxSize: 5, flexShrink: 0 }), + /* @__PURE__ */ A(d, { as: n.icon, boxSize: 5, flexShrink: 0 }), /* @__PURE__ */ A( - d, + I, { w: "full", fontSize: "10px", @@ -519,7 +523,7 @@ const Re = ({ } ); return h || i ? /* @__PURE__ */ A( - I, + s, { "aria-disabled": h ? "true" : void 0, "aria-current": i ? "page" : void 0, @@ -529,7 +533,7 @@ const Re = ({ ) : /* @__PURE__ */ A( W, { - linkComponent: r, + linkComponent: t, href: n.path, _hover: { textDecoration: "none" }, onClick: () => z(n), @@ -539,7 +543,7 @@ const Re = ({ n.path ); }) }), - R && /* @__PURE__ */ A(I, { mt: 4, pt: 4, borderTopWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ l( + f && /* @__PURE__ */ A(s, { mt: 4, pt: 4, borderTopWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ l( u, { as: "button", @@ -554,8 +558,8 @@ const Re = ({ cursor: "pointer", onClick: Y, children: [ - /* @__PURE__ */ A(s, { as: M, boxSize: 5 }), - /* @__PURE__ */ A(d, { fontWeight: "bold", children: y }) + /* @__PURE__ */ A(d, { as: M, boxSize: 5 }), + /* @__PURE__ */ A(I, { fontWeight: "bold", children: y }) ] } ) }) @@ -567,7 +571,7 @@ const Re = ({ } ) ] }); -}, Me = Object.assign(fe, { +}, Me = Object.assign(Re, { Exit: V }); export { diff --git a/src/dev/HeaderPreview.jsx b/src/dev/HeaderPreview.jsx index 4de4a8b..f607907 100644 --- a/src/dev/HeaderPreview.jsx +++ b/src/dev/HeaderPreview.jsx @@ -18,10 +18,7 @@ function ActualHeader() { - سامانه نمونه هوش تجاری - {/* - پیش‌نمایش مستقیم کامپوننت Header از سورس UI Kit - */} + سامانه مدیریت کاربران diff --git a/src/layout/Header.jsx b/src/layout/Header.jsx index bf9c333..57d8104 100644 --- a/src/layout/Header.jsx +++ b/src/layout/Header.jsx @@ -34,6 +34,7 @@ function BrandSection({ children, ...props }) { return ( @@ -80,10 +82,11 @@ function Brand({ children, ...props }) { function Title({ children, ...props }) { return ( @@ -95,9 +98,10 @@ function Title({ children, ...props }) { function Description({ children, ...props }) { return (