@owp/core 2.5.26 → 2.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js +19 -19
- package/dist/components/OwpExportExcelButton/OwpExportExcelButton.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +334 -287
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpPicker/OwpDatePicker.js +251 -243
- package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js +13 -12
- package/dist/components/OwpPicker/internal/useOwpPickerPopperTransition.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +151 -156
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js +23 -16
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js.map +1 -1
- package/dist/components/OwpTable/internal/treeGridTableStyle.js +29 -28
- package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -1
- package/dist/components/OwpTable/utils/tableSx.js +11 -10
- package/dist/components/OwpTable/utils/tableSx.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +297 -265
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +310 -291
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +1039 -385
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +435 -186
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js +10 -10
- package/dist/components/OwpTreeGridExportExcelButton/OwpTreeGridExportExcelButton.js.map +1 -1
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js +1 -1
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js.map +1 -1
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js +1 -1
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js.map +1 -1
- package/dist/layout/components/logo/Logo.js +40 -53
- package/dist/layout/components/logo/Logo.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyle.js +27 -37
- package/dist/layout/components/navbar/style/NavbarStyle.js.map +1 -1
- package/dist/layout/components/navbar/style/NavbarStyleContent.js +67 -42
- package/dist/layout/components/navbar/style/NavbarStyleContent.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpPicker/internal/useOwpPickerPopperTransition.d.ts +1 -0
- package/dist/types/components/OwpTable/internal/OwpTableTotalCount.d.ts +11 -4
- package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +5 -0
- package/dist/types/components/OwpTable/utils/tableSx.d.ts +15 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +11 -1
- package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.d.ts +5 -2
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +14 -4
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +5 -0
- package/dist/types/utils/treeGridUtil.d.ts +4 -0
- package/dist/utils/treeGridUtil.js +154 -145
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/package.json +1 -1
- package/treegrid/TextKR.xml +1 -1
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as e, jsxs as
|
|
4
|
-
import { useOwpAppContext as
|
|
5
|
-
import { useGetLogoSrc as
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var d = (s, l) => I(s, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { jsx as e, jsxs as k } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { useOwpAppContext as z } from "../../../contexts/OwpAppProvider.js";
|
|
5
|
+
import { useGetLogoSrc as O } from "../../../hooks/useLogoSrc.js";
|
|
6
6
|
import { Skeleton as q } from "@mui/material";
|
|
7
7
|
import { styled as B } from "@mui/material/styles";
|
|
8
|
-
import { useRef as
|
|
9
|
-
const M = B("div")(({ theme:
|
|
8
|
+
import { useRef as L, useState as w, useLayoutEffect as F } from "react";
|
|
9
|
+
const M = B("div")(({ theme: s }) => ({
|
|
10
10
|
height: "100%",
|
|
11
11
|
minWidth: 0,
|
|
12
12
|
maxWidth: "100%",
|
|
13
|
-
"& > .logo-icon": {
|
|
14
|
-
transition: t.transitions.create(["width", "height"], {
|
|
15
|
-
duration: t.transitions.duration.shortest,
|
|
16
|
-
easing: t.transitions.easing.easeInOut
|
|
17
|
-
})
|
|
18
|
-
},
|
|
19
13
|
"& > .logo-slot": {
|
|
20
14
|
position: "relative",
|
|
21
15
|
display: "flex",
|
|
@@ -71,72 +65,65 @@ const M = B("div")(({ theme: t }) => ({
|
|
|
71
65
|
height: 70,
|
|
72
66
|
maxHeight: "100%",
|
|
73
67
|
transform: "translate(-50%, -50%)",
|
|
74
|
-
borderRadius:
|
|
75
|
-
},
|
|
76
|
-
"& > .badge": {
|
|
77
|
-
transition: t.transitions.create("opacity", {
|
|
78
|
-
duration: t.transitions.duration.shortest,
|
|
79
|
-
easing: t.transitions.easing.easeInOut
|
|
80
|
-
})
|
|
68
|
+
borderRadius: s.shape.borderRadius
|
|
81
69
|
}
|
|
82
70
|
}));
|
|
83
|
-
function
|
|
84
|
-
const
|
|
71
|
+
function T() {
|
|
72
|
+
const s = O(), { slots: l, slotProps: h } = z(), n = l == null ? void 0 : l.logo, r = h == null ? void 0 : h.logo, b = ["owp-logo-slot-content", r == null ? void 0 : r.className].filter(Boolean).join(" "), N = L(null), R = L(null), [j, f] = w(1), [H, g] = w({}), [a, c] = w(!n);
|
|
85
73
|
return F(() => {
|
|
86
|
-
if (!
|
|
87
|
-
|
|
74
|
+
if (!n) {
|
|
75
|
+
f(1), g({}), c(!0);
|
|
88
76
|
return;
|
|
89
77
|
}
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
78
|
+
const m = N.current, t = R.current, u = m == null ? void 0 : m.parentElement;
|
|
79
|
+
if (!m || !t || !u)
|
|
92
80
|
return;
|
|
93
81
|
let p = 0;
|
|
94
82
|
c(!1);
|
|
95
|
-
const
|
|
96
|
-
const { width:
|
|
97
|
-
if (!
|
|
98
|
-
|
|
83
|
+
const A = /* @__PURE__ */ d(() => {
|
|
84
|
+
const { width: o, height: E } = u.getBoundingClientRect(), C = t.getBoundingClientRect(), x = C.width || t.scrollWidth || t.offsetWidth, y = C.height || t.scrollHeight || t.offsetHeight;
|
|
85
|
+
if (!o || !E || !x || !y) {
|
|
86
|
+
f(1), g({}), c(!1);
|
|
99
87
|
return;
|
|
100
88
|
}
|
|
101
|
-
const S = Math.min(
|
|
102
|
-
|
|
89
|
+
const S = Math.min(o / x, E / y, 1);
|
|
90
|
+
f(S), g({
|
|
103
91
|
width: x * S,
|
|
104
92
|
height: y * S
|
|
105
93
|
}), c(!0);
|
|
106
|
-
}, "updateScale"),
|
|
107
|
-
cancelAnimationFrame(p), p = requestAnimationFrame(
|
|
94
|
+
}, "updateScale"), i = /* @__PURE__ */ d(() => {
|
|
95
|
+
cancelAnimationFrame(p), p = requestAnimationFrame(A);
|
|
108
96
|
}, "requestUpdate");
|
|
109
|
-
|
|
110
|
-
const v = new ResizeObserver(
|
|
111
|
-
v.observe(u), v.observe(
|
|
112
|
-
const W = Array.from(
|
|
113
|
-
return W.forEach((
|
|
114
|
-
|
|
97
|
+
i();
|
|
98
|
+
const v = new ResizeObserver(i);
|
|
99
|
+
v.observe(u), v.observe(t);
|
|
100
|
+
const W = Array.from(t.querySelectorAll("img"));
|
|
101
|
+
return W.forEach((o) => {
|
|
102
|
+
o.addEventListener("load", i), o.addEventListener("error", i);
|
|
115
103
|
}), () => {
|
|
116
|
-
cancelAnimationFrame(p), v.disconnect(), W.forEach((
|
|
117
|
-
|
|
104
|
+
cancelAnimationFrame(p), v.disconnect(), W.forEach((o) => {
|
|
105
|
+
o.removeEventListener("load", i), o.removeEventListener("error", i);
|
|
118
106
|
});
|
|
119
107
|
};
|
|
120
|
-
}, [
|
|
121
|
-
!
|
|
108
|
+
}, [n]), /* @__PURE__ */ e(M, { ref: N, className: "flex items-center space-x-8", children: n ? /* @__PURE__ */ k("div", { className: "logo-icon logo-slot", children: [
|
|
109
|
+
!a && /* @__PURE__ */ e(q, { animation: "wave", variant: "rounded", className: "logo-slot-skeleton" }),
|
|
122
110
|
/* @__PURE__ */ e(
|
|
123
111
|
"div",
|
|
124
112
|
{
|
|
125
113
|
className: "logo-slot-frame",
|
|
126
114
|
style: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
visibility: l ? "visible" : "hidden"
|
|
115
|
+
width: a ? H.width : 0,
|
|
116
|
+
height: a ? H.height : 0,
|
|
117
|
+
visibility: a ? "visible" : "hidden"
|
|
131
118
|
},
|
|
132
|
-
children: /* @__PURE__ */ e("div", { className: "logo-slot-transform", style: { transform: `scale(${
|
|
119
|
+
children: /* @__PURE__ */ e("div", { className: "logo-slot-transform", style: { transform: `scale(${j})` }, children: /* @__PURE__ */ e("div", { className: "logo-slot-content", children: /* @__PURE__ */ e(n, { ...r, className: b }) }) })
|
|
133
120
|
}
|
|
134
121
|
),
|
|
135
|
-
/* @__PURE__ */ e("div", { ref: R, className: "logo-slot-measure", "aria-hidden": !0, children: /* @__PURE__ */ e(
|
|
136
|
-
] }) : /* @__PURE__ */ e("img", { className: "logo-icon", src:
|
|
122
|
+
/* @__PURE__ */ e("div", { ref: R, className: "logo-slot-measure", "aria-hidden": !0, children: /* @__PURE__ */ e(n, { ...r, className: b }) })
|
|
123
|
+
] }) : /* @__PURE__ */ e("img", { className: "logo-icon", src: s, alt: "logo" }) });
|
|
137
124
|
}
|
|
138
|
-
|
|
125
|
+
d(T, "Logo");
|
|
139
126
|
export {
|
|
140
|
-
|
|
127
|
+
T as default
|
|
141
128
|
};
|
|
142
129
|
//# sourceMappingURL=Logo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sources":["../../../../src/layout/components/logo/Logo.tsx"],"sourcesContent":["import { useOwpAppContext as useAppContext } from '@/contexts/OwpAppProvider';\nimport { useGetLogoSrc } from '@/hooks/useLogoSrc';\nimport { Skeleton } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport { useLayoutEffect, useRef, useState } from 'react';\n\nconst Root = styled('div')(({ theme }) => ({\n height: '100%',\n minWidth: 0,\n maxWidth: '100%',\n '& > .logo-icon': {\n transition: theme.transitions.create(['width', 'height'], {\n duration: theme.transitions.duration.shortest,\n easing: theme.transitions.easing.easeInOut,\n }),\n },\n '& > .logo-slot': {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n width: '100%',\n height: '100%',\n minWidth: 0,\n minHeight: 0,\n maxWidth: '100%',\n maxHeight: '100%',\n flexShrink: 1,\n overflow: 'visible',\n },\n '& > .logo-slot > .logo-slot-frame': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n minWidth: 0,\n minHeight: 0,\n maxWidth: '100%',\n maxHeight: '100%',\n flexShrink: 1,\n overflow: 'hidden',\n },\n '& .logo-slot-transform': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n transformOrigin: 'left center',\n },\n '& .logo-slot-content, & .logo-slot-measure': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n width: 'fit-content',\n height: 'fit-content',\n },\n '& .logo-slot-measure': {\n position: 'absolute',\n top: 0,\n left: -99999,\n visibility: 'hidden',\n pointerEvents: 'none',\n whiteSpace: 'nowrap',\n },\n '& .logo-slot-skeleton': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n width: 'min(100%, 160px)',\n minHeight: 70,\n height: 70,\n maxHeight: '100%',\n transform: 'translate(-50%, -50%)',\n borderRadius: theme.shape.borderRadius,\n },\n '& > .badge': {\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shortest,\n easing: theme.transitions.easing.easeInOut,\n }),\n },\n}));\n\n/**\n * The logo component.\n */\nfunction Logo() {\n const logoSrc = useGetLogoSrc();\n const { slots, slotProps } = useAppContext();\n const LogoSlot = slots?.logo;\n const logoSlotProps = slotProps?.logo;\n const logoSlotClassName = ['owp-logo-slot-content', logoSlotProps?.className]\n .filter(Boolean)\n .join(' ');\n const rootRef = useRef<HTMLDivElement | null>(null);\n const slotMeasureRef = useRef<HTMLDivElement | null>(null);\n const [slotScale, setSlotScale] = useState(1);\n const [slotSize, setSlotSize] = useState<{ width?: number; height?: number }>({});\n const [isSlotReady, setIsSlotReady] = useState(!LogoSlot);\n\n useLayoutEffect(() => {\n if (!LogoSlot) {\n setSlotScale(1);\n setSlotSize({});\n setIsSlotReady(true);\n return;\n }\n\n const rootElement = rootRef.current;\n const measureElement = slotMeasureRef.current;\n const boundaryElement = rootElement?.parentElement;\n\n if (!rootElement || !measureElement || !boundaryElement) {\n return;\n }\n\n let frameId = 0;\n setIsSlotReady(false);\n\n const updateScale = () => {\n const { width: boundaryWidth, height: boundaryHeight } =\n boundaryElement.getBoundingClientRect();\n const measureRect = measureElement.getBoundingClientRect();\n const contentWidth =\n measureRect.width || measureElement.scrollWidth || measureElement.offsetWidth;\n const contentHeight =\n measureRect.height || measureElement.scrollHeight || measureElement.offsetHeight;\n\n if (!boundaryWidth || !boundaryHeight || !contentWidth || !contentHeight) {\n setSlotScale(1);\n setSlotSize({});\n setIsSlotReady(false);\n return;\n }\n\n const nextScale = Math.min(boundaryWidth / contentWidth, boundaryHeight / contentHeight, 1);\n\n setSlotScale(nextScale);\n setSlotSize({\n width: contentWidth * nextScale,\n height: contentHeight * nextScale,\n });\n setIsSlotReady(true);\n };\n\n const requestUpdate = () => {\n cancelAnimationFrame(frameId);\n frameId = requestAnimationFrame(updateScale);\n };\n\n requestUpdate();\n\n const resizeObserver = new ResizeObserver(requestUpdate);\n resizeObserver.observe(boundaryElement);\n resizeObserver.observe(measureElement);\n\n const imageElements = Array.from(measureElement.querySelectorAll('img'));\n imageElements.forEach((imageElement) => {\n imageElement.addEventListener('load', requestUpdate);\n imageElement.addEventListener('error', requestUpdate);\n });\n\n return () => {\n cancelAnimationFrame(frameId);\n resizeObserver.disconnect();\n imageElements.forEach((imageElement) => {\n imageElement.removeEventListener('load', requestUpdate);\n imageElement.removeEventListener('error', requestUpdate);\n });\n };\n }, [LogoSlot]);\n\n return (\n <Root ref={rootRef} className=\"flex items-center space-x-8\">\n {LogoSlot ? (\n <div className=\"logo-icon logo-slot\">\n {!isSlotReady && (\n <Skeleton animation=\"wave\" variant=\"rounded\" className=\"logo-slot-skeleton\" />\n )}\n <div\n className=\"logo-slot-frame\"\n style={{\n transform: 'translateX(-8px)',\n width: isSlotReady ? slotSize.width : 0,\n height: isSlotReady ? slotSize.height : 0,\n visibility: isSlotReady ? 'visible' : 'hidden',\n }}\n >\n <div className=\"logo-slot-transform\" style={{ transform: `scale(${slotScale})` }}>\n <div className=\"logo-slot-content\">\n <LogoSlot {...logoSlotProps} className={logoSlotClassName} />\n </div>\n </div>\n </div>\n <div ref={slotMeasureRef} className=\"logo-slot-measure\" aria-hidden>\n <LogoSlot {...logoSlotProps} className={logoSlotClassName} />\n </div>\n </div>\n ) : (\n <img className=\"logo-icon\" src={logoSrc} alt=\"logo\" />\n )}\n </Root>\n );\n}\n\nexport default Logo;\n"],"names":["Root","styled","theme","Logo","logoSrc","useGetLogoSrc","slots","slotProps","useAppContext","LogoSlot","logoSlotProps","logoSlotClassName","rootRef","useRef","slotMeasureRef","slotScale","setSlotScale","useState","slotSize","setSlotSize","isSlotReady","setIsSlotReady","useLayoutEffect","rootElement","measureElement","boundaryElement","frameId","updateScale","__name","boundaryWidth","boundaryHeight","measureRect","contentWidth","contentHeight","nextScale","requestUpdate","resizeObserver","imageElements","imageElement","jsx","jsxs","Skeleton"],"mappings":";;;;;;;;AAMA,MAAMA,IAAOC,EAAO,KAAK,EAAE,CAAC,EAAE,OAAAC,SAAa;AAAA,EACzC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,YAAYA,EAAM,YAAY,OAAO,CAAC,SAAS,QAAQ,GAAG;AAAA,MACxD,UAAUA,EAAM,YAAY,SAAS;AAAA,MACrC,QAAQA,EAAM,YAAY,OAAO;AAAA,IAAA,CAClC;AAAA,EAAA;AAAA,EAEH,kBAAkB;AAAA,IAChB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV,WAAW;AAA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BAAA4B,EAAC,OAAA,EAAI,KAAKzB,GAAgB,WAAU,qBAAoB,eAAW,IACjE,UAAA,gBAAAyB,EAAC9B,GAAA,EAAU,GAAGC,GAAe,WAAWC,GAAmB,EAAA,CAC7D;AAAA,EAAA,EAAA,CACF,sBAEC,OAAA,EAAI,WAAU,aAAY,KAAKP,GAAS,KAAI,OAAA,CAAO,EAAA,CAExD;AAEJ;AArHSwB,EAAAzB,GAAA;"}
|
|
1
|
+
{"version":3,"file":"Logo.js","sources":["../../../../src/layout/components/logo/Logo.tsx"],"sourcesContent":["import { useOwpAppContext as useAppContext } from '@/contexts/OwpAppProvider';\nimport { useGetLogoSrc } from '@/hooks/useLogoSrc';\nimport { Skeleton } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport { useLayoutEffect, useRef, useState } from 'react';\n\nconst Root = styled('div')(({ theme }) => ({\n height: '100%',\n minWidth: 0,\n maxWidth: '100%',\n '& > .logo-slot': {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n width: '100%',\n height: '100%',\n minWidth: 0,\n minHeight: 0,\n maxWidth: '100%',\n maxHeight: '100%',\n flexShrink: 1,\n overflow: 'visible',\n },\n '& > .logo-slot > .logo-slot-frame': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n minWidth: 0,\n minHeight: 0,\n maxWidth: '100%',\n maxHeight: '100%',\n flexShrink: 1,\n overflow: 'hidden',\n },\n '& .logo-slot-transform': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n transformOrigin: 'left center',\n },\n '& .logo-slot-content, & .logo-slot-measure': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n width: 'fit-content',\n height: 'fit-content',\n },\n '& .logo-slot-measure': {\n position: 'absolute',\n top: 0,\n left: -99999,\n visibility: 'hidden',\n pointerEvents: 'none',\n whiteSpace: 'nowrap',\n },\n '& .logo-slot-skeleton': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n width: 'min(100%, 160px)',\n minHeight: 70,\n height: 70,\n maxHeight: '100%',\n transform: 'translate(-50%, -50%)',\n borderRadius: theme.shape.borderRadius,\n },\n}));\n\n/**\n * The logo component.\n */\nfunction Logo() {\n const logoSrc = useGetLogoSrc();\n const { slots, slotProps } = useAppContext();\n const LogoSlot = slots?.logo;\n const logoSlotProps = slotProps?.logo;\n const logoSlotClassName = ['owp-logo-slot-content', logoSlotProps?.className]\n .filter(Boolean)\n .join(' ');\n const rootRef = useRef<HTMLDivElement | null>(null);\n const slotMeasureRef = useRef<HTMLDivElement | null>(null);\n const [slotScale, setSlotScale] = useState(1);\n const [slotSize, setSlotSize] = useState<{ width?: number; height?: number }>({});\n const [isSlotReady, setIsSlotReady] = useState(!LogoSlot);\n\n useLayoutEffect(() => {\n if (!LogoSlot) {\n setSlotScale(1);\n setSlotSize({});\n setIsSlotReady(true);\n return;\n }\n\n const rootElement = rootRef.current;\n const measureElement = slotMeasureRef.current;\n const boundaryElement = rootElement?.parentElement;\n\n if (!rootElement || !measureElement || !boundaryElement) {\n return;\n }\n\n let frameId = 0;\n setIsSlotReady(false);\n\n const updateScale = () => {\n const { width: boundaryWidth, height: boundaryHeight } =\n boundaryElement.getBoundingClientRect();\n const measureRect = measureElement.getBoundingClientRect();\n const contentWidth =\n measureRect.width || measureElement.scrollWidth || measureElement.offsetWidth;\n const contentHeight =\n measureRect.height || measureElement.scrollHeight || measureElement.offsetHeight;\n\n if (!boundaryWidth || !boundaryHeight || !contentWidth || !contentHeight) {\n setSlotScale(1);\n setSlotSize({});\n setIsSlotReady(false);\n return;\n }\n\n const nextScale = Math.min(boundaryWidth / contentWidth, boundaryHeight / contentHeight, 1);\n\n setSlotScale(nextScale);\n setSlotSize({\n width: contentWidth * nextScale,\n height: contentHeight * nextScale,\n });\n setIsSlotReady(true);\n };\n\n const requestUpdate = () => {\n cancelAnimationFrame(frameId);\n frameId = requestAnimationFrame(updateScale);\n };\n\n requestUpdate();\n\n const resizeObserver = new ResizeObserver(requestUpdate);\n resizeObserver.observe(boundaryElement);\n resizeObserver.observe(measureElement);\n\n const imageElements = Array.from(measureElement.querySelectorAll('img'));\n imageElements.forEach((imageElement) => {\n imageElement.addEventListener('load', requestUpdate);\n imageElement.addEventListener('error', requestUpdate);\n });\n\n return () => {\n cancelAnimationFrame(frameId);\n resizeObserver.disconnect();\n imageElements.forEach((imageElement) => {\n imageElement.removeEventListener('load', requestUpdate);\n imageElement.removeEventListener('error', requestUpdate);\n });\n };\n }, [LogoSlot]);\n\n return (\n <Root ref={rootRef} className=\"flex items-center space-x-8\">\n {LogoSlot ? (\n <div className=\"logo-icon logo-slot\">\n {!isSlotReady && (\n <Skeleton animation=\"wave\" variant=\"rounded\" className=\"logo-slot-skeleton\" />\n )}\n <div\n className=\"logo-slot-frame\"\n style={{\n width: isSlotReady ? slotSize.width : 0,\n height: isSlotReady ? slotSize.height : 0,\n visibility: isSlotReady ? 'visible' : 'hidden',\n }}\n >\n <div className=\"logo-slot-transform\" style={{ transform: `scale(${slotScale})` }}>\n <div className=\"logo-slot-content\">\n <LogoSlot {...logoSlotProps} className={logoSlotClassName} />\n </div>\n </div>\n </div>\n <div ref={slotMeasureRef} className=\"logo-slot-measure\" aria-hidden>\n <LogoSlot {...logoSlotProps} className={logoSlotClassName} />\n </div>\n </div>\n ) : (\n <img className=\"logo-icon\" src={logoSrc} alt=\"logo\" />\n )}\n </Root>\n );\n}\n\nexport default Logo;\n"],"names":["Root","styled","theme","Logo","logoSrc","useGetLogoSrc","slots","slotProps","useAppContext","LogoSlot","logoSlotProps","logoSlotClassName","rootRef","useRef","slotMeasureRef","slotScale","setSlotScale","useState","slotSize","setSlotSize","isSlotReady","setIsSlotReady","useLayoutEffect","rootElement","measureElement","boundaryElement","frameId","updateScale","__name","boundaryWidth","boundaryHeight","measureRect","contentWidth","contentHeight","nextScale","requestUpdate","resizeObserver","imageElements","imageElement","jsx","jsxs","Skeleton"],"mappings":";;;;;;;;AAMA,MAAMA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wB,EAAC9B,GAAA,EAAU,GAAGC,GAAe,WAAWC,EAAA,CAAmB,EAAA,CAC7D,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAA4B,EAAC,OAAA,EAAI,KAAKzB,GAAgB,WAAU,qBAAoB,eAAW,IACjE,UAAA,gBAAAyB,EAAC9B,GAAA,EAAU,GAAGC,GAAe,WAAWC,GAAmB,EAAA,CAC7D;AAAA,EAAA,EAAA,CACF,sBAEC,OAAA,EAAI,WAAU,aAAY,KAAKP,GAAS,KAAI,OAAA,CAAO,EAAA,CAExD;AAEJ;AApHSwB,EAAAzB,GAAA;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var w = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var e = (t, i) => w(t, "name", { value: i, configurable: !0 });
|
|
3
3
|
import { jsxs as y, jsx as n } from "../../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
-
import { useGetCurrentLayoutConfig as
|
|
5
|
-
import { useGetNavbar as
|
|
4
|
+
import { useGetCurrentLayoutConfig as v } from "../../../../hooks/useOwpSettings.js";
|
|
5
|
+
import { useGetNavbar as x, useNavbarActions as S } from "../../../../hooks/internal/useNavbar.js";
|
|
6
6
|
import { OwpHidden as f } from "../../../../components/OwpHidden/OwpHidden.js";
|
|
7
7
|
import { styled as s } from "@mui/material/styles";
|
|
8
8
|
import N from "@mui/material/SwipeableDrawer";
|
|
9
9
|
import { useEffect as W } from "react";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import m from "./NavbarStyleContent.js";
|
|
11
|
+
const o = 280, k = s("div")(({ theme: t }) => ({
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "column",
|
|
14
14
|
zIndex: 4,
|
|
15
15
|
[t.breakpoints.up("lg")]: {
|
|
16
|
-
width:
|
|
17
|
-
minWidth:
|
|
16
|
+
width: o,
|
|
17
|
+
minWidth: o
|
|
18
18
|
},
|
|
19
19
|
variants: [
|
|
20
20
|
{
|
|
21
|
-
props: /* @__PURE__ */
|
|
21
|
+
props: /* @__PURE__ */ e(({ folded: i }) => i, "props"),
|
|
22
22
|
style: {
|
|
23
23
|
[t.breakpoints.up("lg")]: {
|
|
24
24
|
width: 76,
|
|
@@ -28,9 +28,9 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
28
28
|
}
|
|
29
29
|
]
|
|
30
30
|
})), C = s("div")(({ theme: t }) => ({
|
|
31
|
-
minWidth:
|
|
32
|
-
width:
|
|
33
|
-
maxWidth:
|
|
31
|
+
minWidth: o,
|
|
32
|
+
width: o,
|
|
33
|
+
maxWidth: o,
|
|
34
34
|
maxHeight: "100%",
|
|
35
35
|
backgroundColor: t.palette.background.default,
|
|
36
36
|
boxShadow: "none",
|
|
@@ -58,7 +58,7 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
props: /* @__PURE__ */
|
|
61
|
+
props: /* @__PURE__ */ e(({ folded: i }) => i, "props"),
|
|
62
62
|
style: {
|
|
63
63
|
position: "absolute",
|
|
64
64
|
width: 76,
|
|
@@ -68,14 +68,14 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
props: /* @__PURE__ */
|
|
71
|
+
props: /* @__PURE__ */ e(({ foldedandopened: i }) => i, "props"),
|
|
72
72
|
style: {
|
|
73
|
-
width:
|
|
74
|
-
minWidth:
|
|
73
|
+
width: o,
|
|
74
|
+
minWidth: o
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
props: /* @__PURE__ */
|
|
78
|
+
props: /* @__PURE__ */ e(({ foldedandclosed: i }) => i, "props"),
|
|
79
79
|
style: {
|
|
80
80
|
"& .NavbarStyle-content": {
|
|
81
81
|
"& .NavbarStyleContent-logo": {
|
|
@@ -86,16 +86,6 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
86
86
|
"& .NavbarStyleContent-logo .MuiIconButton-root": {
|
|
87
87
|
transform: "translateX(1px)"
|
|
88
88
|
},
|
|
89
|
-
"& .logo-icon": {
|
|
90
|
-
width: 44,
|
|
91
|
-
height: 44
|
|
92
|
-
},
|
|
93
|
-
"& .logo-text": {
|
|
94
|
-
opacity: 0
|
|
95
|
-
},
|
|
96
|
-
"& .react-badge": {
|
|
97
|
-
opacity: 0
|
|
98
|
-
},
|
|
99
89
|
"& .navigation.px-12": {
|
|
100
90
|
paddingLeft: 10,
|
|
101
91
|
paddingRight: 10
|
|
@@ -194,9 +184,9 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
194
184
|
]
|
|
195
185
|
})), L = s(N)(({ theme: t }) => ({
|
|
196
186
|
"& > .MuiDrawer-paper": {
|
|
197
|
-
minWidth:
|
|
198
|
-
width:
|
|
199
|
-
maxWidth:
|
|
187
|
+
minWidth: o,
|
|
188
|
+
width: o,
|
|
189
|
+
maxWidth: o,
|
|
200
190
|
maxHeight: "100%",
|
|
201
191
|
backgroundColor: t.palette.background.default,
|
|
202
192
|
boxShadow: "none",
|
|
@@ -208,7 +198,7 @@ const e = 280, k = s("div")(({ theme: t }) => ({
|
|
|
208
198
|
}));
|
|
209
199
|
function G() {
|
|
210
200
|
var p, h, c;
|
|
211
|
-
const t =
|
|
201
|
+
const t = v(), i = x(), { closeFolded: u, closeMobile: g, openFolded: b, reset: l } = S(), a = !((p = t.navbar) != null && p.folded), d = a && !i.foldedOpen, r = a && i.foldedOpen;
|
|
212
202
|
return W(() => () => {
|
|
213
203
|
l();
|
|
214
204
|
}, [l]), /* @__PURE__ */ y(
|
|
@@ -227,9 +217,9 @@ function G() {
|
|
|
227
217
|
folded: a ? 1 : 0,
|
|
228
218
|
foldedandopened: r ? 1 : 0,
|
|
229
219
|
foldedandclosed: d ? 1 : 0,
|
|
230
|
-
onMouseEnter: /* @__PURE__ */
|
|
231
|
-
onMouseLeave: /* @__PURE__ */
|
|
232
|
-
children: /* @__PURE__ */ n(
|
|
220
|
+
onMouseEnter: /* @__PURE__ */ e(() => d && b(), "onMouseEnter"),
|
|
221
|
+
onMouseLeave: /* @__PURE__ */ e(() => r && u(), "onMouseLeave"),
|
|
222
|
+
children: /* @__PURE__ */ n(m, { className: "NavbarStyle-content" })
|
|
233
223
|
}
|
|
234
224
|
) }),
|
|
235
225
|
/* @__PURE__ */ n(f, { lgUp: !0, children: /* @__PURE__ */ n(
|
|
@@ -244,21 +234,21 @@ function G() {
|
|
|
244
234
|
anchor: (c = t == null ? void 0 : t.navbar) == null ? void 0 : c.position,
|
|
245
235
|
variant: "temporary",
|
|
246
236
|
open: i.mobileOpen,
|
|
247
|
-
onClose: /* @__PURE__ */
|
|
248
|
-
onOpen: /* @__PURE__ */
|
|
237
|
+
onClose: /* @__PURE__ */ e(() => g(), "onClose"),
|
|
238
|
+
onOpen: /* @__PURE__ */ e(() => {
|
|
249
239
|
}, "onOpen"),
|
|
250
240
|
disableSwipeToOpen: !0,
|
|
251
241
|
ModalProps: {
|
|
252
242
|
keepMounted: !0
|
|
253
243
|
},
|
|
254
|
-
children: /* @__PURE__ */ n(
|
|
244
|
+
children: /* @__PURE__ */ n(m, { className: "NavbarStyle-content" })
|
|
255
245
|
}
|
|
256
246
|
) })
|
|
257
247
|
]
|
|
258
248
|
}
|
|
259
249
|
);
|
|
260
250
|
}
|
|
261
|
-
|
|
251
|
+
e(G, "NavbarStyle");
|
|
262
252
|
export {
|
|
263
253
|
G as default
|
|
264
254
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarStyle.js","sources":["../../../../../src/layout/components/navbar/style/NavbarStyle.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\nimport { useGetNavbar, useNavbarActions } from '@/hooks/internal/useNavbar';\nimport { OwpHidden } from '@/components/OwpHidden';\nimport { styled } from '@mui/material/styles';\nimport SwipeableDrawer from '@mui/material/SwipeableDrawer';\nimport { Theme } from '@mui/system/createTheme';\nimport { useEffect } from 'react';\nimport NavbarStyleContent from './NavbarStyleContent';\n\nconst navbarWidth = 280;\n\ntype StyledNavBarPropsProps = {\n theme?: Theme;\n folded: number;\n open: boolean;\n};\n\nconst Root = styled('div')<StyledNavBarPropsProps>(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n zIndex: 4,\n [theme.breakpoints.up('lg')]: {\n width: navbarWidth,\n minWidth: navbarWidth,\n },\n variants: [\n {\n props: ({ folded }) => folded,\n style: {\n [theme.breakpoints.up('lg')]: {\n width: 76,\n minWidth: 76,\n },\n },\n },\n ],\n}));\n\ntype StyledNavBarProps = {\n theme?: Theme;\n open?: boolean;\n folded: number;\n foldedandopened: number;\n foldedandclosed: number;\n position?: string;\n anchor?: string;\n};\n\nconst StyledNavbar = styled('div')<StyledNavBarProps>(({ theme }) => ({\n minWidth: navbarWidth,\n width: navbarWidth,\n maxWidth: navbarWidth,\n maxHeight: '100%',\n backgroundColor: theme.palette.background.default,\n boxShadow: 'none',\n transition: theme.transitions.create(['width', 'min-width'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.shorter,\n }),\n variants: [\n {\n props: {\n position: 'left',\n },\n style: {\n borderRight: `1px solid ${theme.palette.divider}`,\n left: 0,\n },\n },\n {\n props: {\n position: 'right',\n },\n style: {\n borderLeft: `1px solid ${theme.palette.divider}`,\n right: 0,\n },\n },\n {\n props: ({ folded }) => folded,\n style: {\n position: 'absolute',\n width: 76,\n minWidth: 76,\n top: 0,\n bottom: 0,\n },\n },\n {\n props: ({ foldedandopened }) => foldedandopened,\n style: {\n width: navbarWidth,\n minWidth: navbarWidth,\n },\n },\n {\n props: ({ foldedandclosed }) => foldedandclosed,\n style: {\n '& .NavbarStyle-content': {\n '& .NavbarStyleContent-logo': {\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n },\n '& .NavbarStyleContent-logo .MuiIconButton-root': {\n transform: 'translateX(1px)',\n },\n '& .logo-icon': {\n width: 44,\n height: 44,\n },\n '& .logo-text': {\n opacity: 0,\n },\n '& .react-badge': {\n opacity: 0,\n },\n '& .navigation.px-12': {\n paddingLeft: 10,\n paddingRight: 10,\n },\n '& .owp-list-item': {\n width: 55,\n minWidth: 55,\n marginLeft: 'auto',\n marginRight: 'auto',\n paddingLeft: 0,\n paddingRight: 0,\n justifyContent: 'center',\n },\n '& .owp-list-item > .owp-list-item-icon': {\n width: 22,\n height: 22,\n minWidth: 22,\n minHeight: 22,\n fontSize: 22,\n marginRight: 0,\n },\n '& .owp-list-item > .owp-list-item-text': {\n width: 0,\n minWidth: 0,\n flex: '0 0 0',\n overflow: 'hidden',\n },\n '& .owp-list-item-text, & .arrow-icon, & .item-badge': {\n opacity: 0,\n },\n '& .owp-list-subheader .owp-list-subheader-text': {\n opacity: 0,\n },\n '& .owp-list-subheader:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n minWidth: 16,\n borderTop: '2px solid',\n opacity: 0.2,\n },\n '& .collapse-children': {\n display: 'none',\n },\n '& .NavbarStyleContent-userMenu': {\n display: 'flex',\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n },\n '& .user-menu': {\n minWidth: 56,\n width: 56,\n boxSizing: 'border-box',\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n '& > :not(style) ~ :not(style)': {\n marginLeft: 0,\n marginRight: 0,\n },\n '& > :not(.avatar)': {\n width: 0,\n minWidth: 0,\n flex: '0 0 0',\n padding: 0,\n margin: 0,\n overflow: 'hidden',\n },\n '& .avatar': {\n width: 36,\n height: 36,\n minWidth: 36,\n minHeight: 36,\n margin: 0,\n fontSize: '18px',\n lineHeight: '18px',\n flexShrink: 0,\n },\n '& .title': {\n opacity: 0,\n },\n '& .subtitle': {\n opacity: 0,\n },\n '& .info-icon': {\n opacity: 0,\n },\n '& .arrow': {\n opacity: 0,\n },\n },\n },\n },\n },\n ],\n}));\n\nconst StyledNavbarMobile = styled(SwipeableDrawer)<StyledNavBarProps>(({ theme }) => ({\n '& > .MuiDrawer-paper': {\n minWidth: navbarWidth,\n width: navbarWidth,\n maxWidth: navbarWidth,\n maxHeight: '100%',\n backgroundColor: theme.palette.background.default,\n boxShadow: 'none',\n transition: theme.transitions.create(['width', 'min-width'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.shorter,\n }),\n },\n}));\n\n/**\n * The navbar style.\n */\nfunction NavbarStyle() {\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navbar = useGetNavbar();\n const { closeFolded, closeMobile, openFolded, reset } = useNavbarActions();\n\n const folded = !config.navbar?.folded;\n const foldedandclosed = folded && !navbar.foldedOpen;\n const foldedandopened = folded && navbar.foldedOpen;\n\n useEffect(() => {\n return () => {\n reset();\n };\n }, [reset]);\n\n return (\n <Root\n folded={folded ? 1 : 0}\n open={navbar.open}\n id=\"owp-navbar\"\n className=\"sticky top-0 z-20 h-screen shrink-0\"\n >\n <OwpHidden lgDown>\n <StyledNavbar\n className=\"sticky top-0 z-20 h-screen flex-auto shrink-0 flex-col overflow-hidden\"\n position={config?.navbar?.position}\n folded={folded ? 1 : 0}\n foldedandopened={foldedandopened ? 1 : 0}\n foldedandclosed={foldedandclosed ? 1 : 0}\n onMouseEnter={() => foldedandclosed && openFolded()}\n onMouseLeave={() => foldedandopened && closeFolded()}\n >\n <NavbarStyleContent className=\"NavbarStyle-content\" />\n </StyledNavbar>\n </OwpHidden>\n\n <OwpHidden lgUp>\n <StyledNavbarMobile\n classes={{\n paper: 'flex-col flex-auto h-full',\n }}\n folded={folded ? 1 : 0}\n foldedandopened={foldedandopened ? 1 : 0}\n foldedandclosed={foldedandclosed ? 1 : 0}\n anchor={config?.navbar?.position as 'left' | 'top' | 'right' | 'bottom'}\n variant=\"temporary\"\n open={navbar.mobileOpen}\n onClose={() => closeMobile()}\n onOpen={() => {}}\n disableSwipeToOpen\n ModalProps={{\n keepMounted: true, \n }}\n >\n <NavbarStyleContent className=\"NavbarStyle-content\" />\n </StyledNavbarMobile>\n </OwpHidden>\n </Root>\n );\n}\n\nexport default NavbarStyle;\n"],"names":["navbarWidth","Root","styled","theme","__name","folded","StyledNavbar","foldedandopened","foldedandclosed","StyledNavbarMobile","SwipeableDrawer","NavbarStyle","config","useGetCurrentLayoutConfig","navbar","useGetNavbar","closeFolded","closeMobile","openFolded","reset","useNavbarActions","_a","useEffect","jsxs","jsx","OwpHidden","_b","NavbarStyleContent","_c"],"mappings":";;;;;;;;;;AAUA,MAAMA,IAAc,KAQdC,IAAOC,EAAO,KAAK,EAA0B,CAAC,EAAE,OAAAC,SAAa;AAAA,EACjE,SAAS;AAAA,EACT,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,CAACA,EAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAOH;AAAA,IACP,UAAUA;AAAA,EAAA;AAAA,EAEZ,UAAU;AAAA,IACR;AAAA,MACE,OAAO,gBAAAI,EAAA,CAAC,EAAE,QAAAC,EAAA,MAAaA,GAAhB;AAAA,MACP,OAAO;AAAA,QACL,CAACF,EAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,UAC5B,OAAO;AAAA,UACP,UAAU;AAAA,QAAA;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEJ,EAAE,GAYIG,IAAeJ,EAAO,KAAK,EAAqB,CAAC,EAAE,OAAAC,SAAa;AAAA,EACpE,UAAUH;AAAA,EACV,OAAOA;AAAA,EACP,UAAUA;AAAA,EACV,WAAW;AAAA,EACX,iBAAiBG,EAAM,QAAQ,WAAW;AAAA,EAC1C,WAAW;AAAA,EACX,YAAYA,EAAM,YAAY,OAAO,CAAC,SAAS,WAAW,GAAG;AAAA,IAC3D,QAAQA,EAAM,YAAY,O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../../../../../src/layout/components/navbar/style/NavbarStyle.tsx"],"sourcesContent":["import { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\nimport { useGetNavbar, useNavbarActions } from '@/hooks/internal/useNavbar';\nimport { OwpHidden } from '@/components/OwpHidden';\nimport { styled } from '@mui/material/styles';\nimport SwipeableDrawer from '@mui/material/SwipeableDrawer';\nimport { Theme } from '@mui/system/createTheme';\nimport { useEffect } from 'react';\nimport NavbarStyleContent from './NavbarStyleContent';\n\nconst navbarWidth = 280;\n\ntype StyledNavBarPropsProps = {\n theme?: Theme;\n folded: number;\n open: boolean;\n};\n\nconst Root = styled('div')<StyledNavBarPropsProps>(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n zIndex: 4,\n [theme.breakpoints.up('lg')]: {\n width: navbarWidth,\n minWidth: navbarWidth,\n },\n variants: [\n {\n props: ({ folded }) => folded,\n style: {\n [theme.breakpoints.up('lg')]: {\n width: 76,\n minWidth: 76,\n },\n },\n },\n ],\n}));\n\ntype StyledNavBarProps = {\n theme?: Theme;\n open?: boolean;\n folded: number;\n foldedandopened: number;\n foldedandclosed: number;\n position?: string;\n anchor?: string;\n};\n\nconst StyledNavbar = styled('div')<StyledNavBarProps>(({ theme }) => ({\n minWidth: navbarWidth,\n width: navbarWidth,\n maxWidth: navbarWidth,\n maxHeight: '100%',\n backgroundColor: theme.palette.background.default,\n boxShadow: 'none',\n transition: theme.transitions.create(['width', 'min-width'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.shorter,\n }),\n variants: [\n {\n props: {\n position: 'left',\n },\n style: {\n borderRight: `1px solid ${theme.palette.divider}`,\n left: 0,\n },\n },\n {\n props: {\n position: 'right',\n },\n style: {\n borderLeft: `1px solid ${theme.palette.divider}`,\n right: 0,\n },\n },\n {\n props: ({ folded }) => folded,\n style: {\n position: 'absolute',\n width: 76,\n minWidth: 76,\n top: 0,\n bottom: 0,\n },\n },\n {\n props: ({ foldedandopened }) => foldedandopened,\n style: {\n width: navbarWidth,\n minWidth: navbarWidth,\n },\n },\n {\n props: ({ foldedandclosed }) => foldedandclosed,\n style: {\n '& .NavbarStyle-content': {\n '& .NavbarStyleContent-logo': {\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n },\n '& .NavbarStyleContent-logo .MuiIconButton-root': {\n transform: 'translateX(1px)',\n },\n '& .navigation.px-12': {\n paddingLeft: 10,\n paddingRight: 10,\n },\n '& .owp-list-item': {\n width: 55,\n minWidth: 55,\n marginLeft: 'auto',\n marginRight: 'auto',\n paddingLeft: 0,\n paddingRight: 0,\n justifyContent: 'center',\n },\n '& .owp-list-item > .owp-list-item-icon': {\n width: 22,\n height: 22,\n minWidth: 22,\n minHeight: 22,\n fontSize: 22,\n marginRight: 0,\n },\n '& .owp-list-item > .owp-list-item-text': {\n width: 0,\n minWidth: 0,\n flex: '0 0 0',\n overflow: 'hidden',\n },\n '& .owp-list-item-text, & .arrow-icon, & .item-badge': {\n opacity: 0,\n },\n '& .owp-list-subheader .owp-list-subheader-text': {\n opacity: 0,\n },\n '& .owp-list-subheader:before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n minWidth: 16,\n borderTop: '2px solid',\n opacity: 0.2,\n },\n '& .collapse-children': {\n display: 'none',\n },\n '& .NavbarStyleContent-userMenu': {\n display: 'flex',\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n },\n '& .user-menu': {\n minWidth: 56,\n width: 56,\n boxSizing: 'border-box',\n justifyContent: 'center',\n paddingLeft: 0,\n paddingRight: 0,\n '& > :not(style) ~ :not(style)': {\n marginLeft: 0,\n marginRight: 0,\n },\n '& > :not(.avatar)': {\n width: 0,\n minWidth: 0,\n flex: '0 0 0',\n padding: 0,\n margin: 0,\n overflow: 'hidden',\n },\n '& .avatar': {\n width: 36,\n height: 36,\n minWidth: 36,\n minHeight: 36,\n margin: 0,\n fontSize: '18px',\n lineHeight: '18px',\n flexShrink: 0,\n },\n '& .title': {\n opacity: 0,\n },\n '& .subtitle': {\n opacity: 0,\n },\n '& .info-icon': {\n opacity: 0,\n },\n '& .arrow': {\n opacity: 0,\n },\n },\n },\n },\n },\n ],\n}));\n\nconst StyledNavbarMobile = styled(SwipeableDrawer)<StyledNavBarProps>(({ theme }) => ({\n '& > .MuiDrawer-paper': {\n minWidth: navbarWidth,\n width: navbarWidth,\n maxWidth: navbarWidth,\n maxHeight: '100%',\n backgroundColor: theme.palette.background.default,\n boxShadow: 'none',\n transition: theme.transitions.create(['width', 'min-width'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.shorter,\n }),\n },\n}));\n\n/**\n * The navbar style.\n */\nfunction NavbarStyle() {\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navbar = useGetNavbar();\n const { closeFolded, closeMobile, openFolded, reset } = useNavbarActions();\n\n const folded = !config.navbar?.folded;\n const foldedandclosed = folded && !navbar.foldedOpen;\n const foldedandopened = folded && navbar.foldedOpen;\n\n useEffect(() => {\n return () => {\n reset();\n };\n }, [reset]);\n\n return (\n <Root\n folded={folded ? 1 : 0}\n open={navbar.open}\n id=\"owp-navbar\"\n className=\"sticky top-0 z-20 h-screen shrink-0\"\n >\n <OwpHidden lgDown>\n <StyledNavbar\n className=\"sticky top-0 z-20 h-screen flex-auto shrink-0 flex-col overflow-hidden\"\n position={config?.navbar?.position}\n folded={folded ? 1 : 0}\n foldedandopened={foldedandopened ? 1 : 0}\n foldedandclosed={foldedandclosed ? 1 : 0}\n onMouseEnter={() => foldedandclosed && openFolded()}\n onMouseLeave={() => foldedandopened && closeFolded()}\n >\n <NavbarStyleContent className=\"NavbarStyle-content\" />\n </StyledNavbar>\n </OwpHidden>\n\n <OwpHidden lgUp>\n <StyledNavbarMobile\n classes={{\n paper: 'flex-col flex-auto h-full',\n }}\n folded={folded ? 1 : 0}\n foldedandopened={foldedandopened ? 1 : 0}\n foldedandclosed={foldedandclosed ? 1 : 0}\n anchor={config?.navbar?.position as 'left' | 'top' | 'right' | 'bottom'}\n variant=\"temporary\"\n open={navbar.mobileOpen}\n onClose={() => closeMobile()}\n onOpen={() => {}}\n disableSwipeToOpen\n ModalProps={{\n keepMounted: true,\n }}\n >\n <NavbarStyleContent className=\"NavbarStyle-content\" />\n </StyledNavbarMobile>\n </OwpHidden>\n </Root>\n );\n}\n\nexport default NavbarStyle;\n"],"names":["navbarWidth","Root","styled","theme","__name","folded","StyledNavbar","foldedandopened","foldedandclosed","StyledNavbarMobile","SwipeableDrawer","NavbarStyle","config","useGetCurrentLayoutConfig","navbar","useGetNavbar","closeFolded","closeMobile","openFolded","reset","useNavbarActions","_a","useEffect","jsxs","jsx","OwpHidden","_b","NavbarStyleContent","_c"],"mappings":";;;;;;;;;;AAUA,MAAMA,IAAc,KAQdC,IAAOC,EAAO,KAAK,EAA0B,CAAC,EAAE,OAAAC,SAAa;AAAA,EACjE,SAAS;AAAA,EACT,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,CAACA,EAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAOH;AAAA,IACP,UAAUA;AAAA,EAAA;AAAA,EAEZ,UAAU;AAAA,IACR;AAAA,MACE,OAAO,gBAAAI,EAAA,CAAC,EAAE,QAAAC,EAAA,MAAaA,GAAhB;AAAA,MACP,OAAO;AAAA,QACL,CAACF,EAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,UAC5B,OAAO;AAAA,UACP,UAAU;AAAA,QAAA;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEJ,EAAE,GAYIG,IAAeJ,EAAO,KAAK,EAAqB,CAAC,EAAE,OAAAC,SAAa;AAAA,EACpE,UAAUH;AAAA,EACV,OAAOA;AAAA,EACP,UAAUA;AAAA,EACV,WAAW;AAAA,EACX,iBAAiBG,EAAM,QAAQ,WAAW;AAAA,EAC1C,WAAW;AAAA,EACX,YAAYA,EAAM,YAAY,OAAO,CAAC,SAAS,WAAW,G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: !0 });
|
|
3
|
+
import { jsxs as i, jsx as t } from "../../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { OwpHidden as s } from "../../../../components/OwpHidden/OwpHidden.js";
|
|
5
5
|
import b from "../../logo/Logo.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useGetCurrentLayoutConfig as
|
|
11
|
-
import { useGetNavbar as
|
|
12
|
-
import { styled as
|
|
13
|
-
import { clsx as
|
|
14
|
-
import { memo as
|
|
15
|
-
import { OwpScrollbars as
|
|
16
|
-
const
|
|
6
|
+
import g from "../../menus/UserMenu.js";
|
|
7
|
+
import v from "../NavbarPinToggleButton.js";
|
|
8
|
+
import f from "../NavbarToggleButton.js";
|
|
9
|
+
import u from "../../navigation/Navigation.js";
|
|
10
|
+
import { useGetCurrentLayoutConfig as h } from "../../../../hooks/useOwpSettings.js";
|
|
11
|
+
import { useGetNavbar as N } from "../../../../hooks/internal/useNavbar.js";
|
|
12
|
+
import { styled as c } from "@mui/material/styles";
|
|
13
|
+
import { clsx as d } from "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
14
|
+
import { memo as y, useMemo as S } from "react";
|
|
15
|
+
import { OwpScrollbars as x } from "../../../../components/OwpScrollbars/OwpScrollbars.js";
|
|
16
|
+
const C = c("div")(({ theme: o }) => ({
|
|
17
17
|
backgroundColor: o.palette.background.default,
|
|
18
18
|
color: o.palette.text.primary,
|
|
19
19
|
"& ::-webkit-scrollbar-thumb": {
|
|
@@ -39,6 +39,40 @@ const w = m("div")(({ theme: o }) => ({
|
|
|
39
39
|
borderBottom: `1px solid ${o.palette.divider}`
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
"& .NavbarStyleContent-logo--open": {
|
|
43
|
+
justifyContent: "flex-end"
|
|
44
|
+
},
|
|
45
|
+
"& .NavbarStyleContent-logo--closed": {
|
|
46
|
+
justifyContent: "center"
|
|
47
|
+
},
|
|
48
|
+
"& .NavbarStyleContent-logoPanel": {
|
|
49
|
+
position: "absolute",
|
|
50
|
+
top: 0,
|
|
51
|
+
bottom: 0,
|
|
52
|
+
left: "2rem",
|
|
53
|
+
display: "flex",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
width: "20.4rem",
|
|
56
|
+
minWidth: 0,
|
|
57
|
+
overflow: "hidden"
|
|
58
|
+
},
|
|
59
|
+
"& .NavbarStyleContent-logoPanel > .NavbarStyleContent-logoMark": {
|
|
60
|
+
transition: o.transitions.create("transform", {
|
|
61
|
+
duration: o.transitions.duration.shorter,
|
|
62
|
+
easing: o.transitions.easing.easeInOut
|
|
63
|
+
}),
|
|
64
|
+
willChange: "transform"
|
|
65
|
+
},
|
|
66
|
+
"& .NavbarStyleContent-logo--closed .NavbarStyleContent-logoPanel": {
|
|
67
|
+
pointerEvents: "none"
|
|
68
|
+
},
|
|
69
|
+
"& .NavbarStyleContent-logo--closed .NavbarStyleContent-logoMark": {
|
|
70
|
+
transform: "translateX(-100%)"
|
|
71
|
+
},
|
|
72
|
+
"& .NavbarStyleContent-logo .MuiIconButton-root": {
|
|
73
|
+
position: "relative",
|
|
74
|
+
zIndex: 1
|
|
75
|
+
},
|
|
42
76
|
"& .NavbarStyleContent-logoMark": {
|
|
43
77
|
display: "flex",
|
|
44
78
|
alignItems: "center",
|
|
@@ -64,7 +98,7 @@ const w = m("div")(({ theme: o }) => ({
|
|
|
64
98
|
paddingTop: 8,
|
|
65
99
|
paddingBottom: 8
|
|
66
100
|
}
|
|
67
|
-
})),
|
|
101
|
+
})), w = c(x)(() => ({
|
|
68
102
|
overscrollBehavior: "contain",
|
|
69
103
|
overflowX: "hidden",
|
|
70
104
|
overflowY: "auto",
|
|
@@ -74,48 +108,39 @@ const w = m("div")(({ theme: o }) => ({
|
|
|
74
108
|
backgroundAttachment: "local, scroll"
|
|
75
109
|
}));
|
|
76
110
|
function k(o) {
|
|
77
|
-
const { className:
|
|
78
|
-
var
|
|
79
|
-
return ((
|
|
80
|
-
}, [e,
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
111
|
+
const { className: n = "" } = o, e = h(), a = N(), p = S(() => {
|
|
112
|
+
var l;
|
|
113
|
+
return ((l = e == null ? void 0 : e.navbar) == null ? void 0 : l.folded) || (a == null ? void 0 : a.foldedOpen);
|
|
114
|
+
}, [e, a]);
|
|
115
|
+
return /* @__PURE__ */ i(C, { className: d("flex h-full flex-auto flex-col overflow-hidden", n), children: [
|
|
116
|
+
/* @__PURE__ */ i(
|
|
83
117
|
"div",
|
|
84
118
|
{
|
|
85
|
-
className:
|
|
119
|
+
className: d(
|
|
86
120
|
"NavbarStyleContent-logo flex h-48 shrink-0 flex-row items-center px-12 md:h-64",
|
|
87
|
-
|
|
121
|
+
p ? "NavbarStyleContent-logo--open" : "NavbarStyleContent-logo--closed"
|
|
88
122
|
),
|
|
89
123
|
children: [
|
|
90
|
-
/* @__PURE__ */ t(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
className: l(
|
|
94
|
-
"mr-4 ml-16 flex flex-1 items-center",
|
|
95
|
-
!n && "hidden"
|
|
96
|
-
),
|
|
97
|
-
children: /* @__PURE__ */ t("div", { className: "NavbarStyleContent-logoMark", children: /* @__PURE__ */ t(b, {}) })
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ t(c, { lgDown: !0, children: /* @__PURE__ */ t(g, { surfaceTone: "light", className: "h-32 w-32 p-0" }) }),
|
|
101
|
-
/* @__PURE__ */ t(c, { lgUp: !0, children: /* @__PURE__ */ t(u, { surfaceTone: "light", className: "h-32 w-32 p-0" }) })
|
|
124
|
+
/* @__PURE__ */ t("div", { className: "NavbarStyleContent-logoPanel", children: /* @__PURE__ */ t("div", { className: "NavbarStyleContent-logoMark", children: /* @__PURE__ */ t(b, {}) }) }),
|
|
125
|
+
/* @__PURE__ */ t(s, { lgDown: !0, children: /* @__PURE__ */ t(v, { surfaceTone: "light", className: "h-32 w-32 p-0" }) }),
|
|
126
|
+
/* @__PURE__ */ t(s, { lgUp: !0, children: /* @__PURE__ */ t(f, { surfaceTone: "light", className: "h-32 w-32 p-0" }) })
|
|
102
127
|
]
|
|
103
128
|
}
|
|
104
129
|
),
|
|
105
130
|
/* @__PURE__ */ t(
|
|
106
|
-
|
|
131
|
+
w,
|
|
107
132
|
{
|
|
108
133
|
className: "flex min-h-0 flex-1 flex-col",
|
|
109
134
|
option: { suppressScrollX: !0, wheelPropagation: !1 },
|
|
110
|
-
children: /* @__PURE__ */ t(
|
|
135
|
+
children: /* @__PURE__ */ t(u, { className: "NavbarStyleContent-navigation", layout: "vertical" })
|
|
111
136
|
}
|
|
112
137
|
),
|
|
113
|
-
/* @__PURE__ */ t("div", { className: "NavbarStyleContent-userMenu w-full p-4 md:p-10", children: /* @__PURE__ */ t(
|
|
138
|
+
/* @__PURE__ */ t("div", { className: "NavbarStyleContent-userMenu w-full p-4 md:p-10", children: /* @__PURE__ */ t(g, { className: "w-full" }) })
|
|
114
139
|
] });
|
|
115
140
|
}
|
|
116
|
-
|
|
117
|
-
const
|
|
141
|
+
r(k, "NavbarStyleContent");
|
|
142
|
+
const R = y(k);
|
|
118
143
|
export {
|
|
119
|
-
|
|
144
|
+
R as default
|
|
120
145
|
};
|
|
121
146
|
//# sourceMappingURL=NavbarStyleContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarStyleContent.js","sources":["../../../../../src/layout/components/navbar/style/NavbarStyleContent.tsx"],"sourcesContent":["import { OwpHidden } from '@/components/OwpHidden';\nimport Logo from '@/layout/components/logo/Logo';\nimport UserMenu from '@/layout/components/menus/UserMenu';\nimport NavbarPinToggleButton from '@/layout/components/navbar/NavbarPinToggleButton';\nimport NavbarToggleButton from '@/layout/components/navbar/NavbarToggleButton';\nimport Navigation from '@/layout/components/navigation/Navigation';\nimport { OwpScrollbars as Scrollbars } from '@/components/OwpScrollbars';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\nimport { useGetNavbar } from '@/hooks/internal/useNavbar';\nimport { styled } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { memo, useMemo } from 'react';\nimport { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\n\nconst Root = styled('div')(({ theme }) => ({\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n '& ::-webkit-scrollbar-thumb': {\n boxShadow: `inset 0 0 0 20px ${'rgba(255, 255, 255, 0.24)'}`,\n ...theme.applyStyles('light', {\n boxShadow: `inset 0 0 0 20px ${'rgba(0, 0, 0, 0.24)'}`,\n }),\n },\n '& ::-webkit-scrollbar-thumb:active': {\n boxShadow: `inset 0 0 0 20px ${'rgba(255, 255, 255, 0.37)'}`,\n ...theme.applyStyles('light', {\n boxShadow: `inset 0 0 0 20px ${'rgba(0, 0, 0, 0.37)'}`,\n }),\n },\n '& .NavbarStyleContent-logo': {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n right: 0,\n bottom: -1,\n left: 0,\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n '& .NavbarStyleContent-logoMark': {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n maxWidth: '25.6rem',\n height: '4.4rem',\n minWidth: 0,\n [theme.breakpoints.up('md')]: {\n maxWidth: '27.2rem',\n height: '4.8rem',\n },\n },\n '& .NavbarStyleContent-logoMark .logo-icon': {\n display: 'block',\n maxWidth: '100%',\n maxHeight: '100%',\n objectFit: 'contain',\n },\n '& .NavbarStyleContent-userMenu': {\n borderTop: `1px solid ${theme.palette.divider}`,\n },\n '& .NavbarStyleContent-navigation': {\n paddingTop: 8,\n paddingBottom: 8,\n },\n}));\n\nconst StyledContent = styled(Scrollbars)(() => ({\n overscrollBehavior: 'contain',\n overflowX: 'hidden',\n overflowY: 'auto',\n WebkitOverflowScrolling: 'touch',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '100% 40px, 100% 10px',\n backgroundAttachment: 'local, scroll',\n}));\n\ntype NavbarStyleContentProps = {\n className?: string;\n};\n\n/**\n * The navbar style content.\n */\nfunction NavbarStyleContent(props: NavbarStyleContentProps) {\n const { className = '' } = props;\n\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navbar = useGetNavbar();\n\n const showLogo = useMemo(() => config?.navbar?.folded || navbar?.foldedOpen, [config, navbar]);\n\n return (\n <Root className={clsx('flex h-full flex-auto flex-col overflow-hidden', className)}>\n <div\n className={clsx(\n 'NavbarStyleContent-logo flex h-48 shrink-0 flex-row items-center px-12 md:h-64',\n
|
|
1
|
+
{"version":3,"file":"NavbarStyleContent.js","sources":["../../../../../src/layout/components/navbar/style/NavbarStyleContent.tsx"],"sourcesContent":["import { OwpHidden } from '@/components/OwpHidden';\nimport Logo from '@/layout/components/logo/Logo';\nimport UserMenu from '@/layout/components/menus/UserMenu';\nimport NavbarPinToggleButton from '@/layout/components/navbar/NavbarPinToggleButton';\nimport NavbarToggleButton from '@/layout/components/navbar/NavbarToggleButton';\nimport Navigation from '@/layout/components/navigation/Navigation';\nimport { OwpScrollbars as Scrollbars } from '@/components/OwpScrollbars';\nimport { useGetCurrentLayoutConfig } from '@/hooks/useOwpSettings';\nimport { useGetNavbar } from '@/hooks/internal/useNavbar';\nimport { styled } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { memo, useMemo } from 'react';\nimport { LayoutConfigDefaultsType } from '@/configs/layoutConfig';\n\nconst Root = styled('div')(({ theme }) => ({\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n '& ::-webkit-scrollbar-thumb': {\n boxShadow: `inset 0 0 0 20px ${'rgba(255, 255, 255, 0.24)'}`,\n ...theme.applyStyles('light', {\n boxShadow: `inset 0 0 0 20px ${'rgba(0, 0, 0, 0.24)'}`,\n }),\n },\n '& ::-webkit-scrollbar-thumb:active': {\n boxShadow: `inset 0 0 0 20px ${'rgba(255, 255, 255, 0.37)'}`,\n ...theme.applyStyles('light', {\n boxShadow: `inset 0 0 0 20px ${'rgba(0, 0, 0, 0.37)'}`,\n }),\n },\n '& .NavbarStyleContent-logo': {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n right: 0,\n bottom: -1,\n left: 0,\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n '& .NavbarStyleContent-logo--open': {\n justifyContent: 'flex-end',\n },\n '& .NavbarStyleContent-logo--closed': {\n justifyContent: 'center',\n },\n '& .NavbarStyleContent-logoPanel': {\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: '2rem',\n display: 'flex',\n alignItems: 'center',\n width: '20.4rem',\n minWidth: 0,\n overflow: 'hidden',\n },\n '& .NavbarStyleContent-logoPanel > .NavbarStyleContent-logoMark': {\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeInOut,\n }),\n willChange: 'transform',\n },\n '& .NavbarStyleContent-logo--closed .NavbarStyleContent-logoPanel': {\n pointerEvents: 'none',\n },\n '& .NavbarStyleContent-logo--closed .NavbarStyleContent-logoMark': {\n transform: 'translateX(-100%)',\n },\n '& .NavbarStyleContent-logo .MuiIconButton-root': {\n position: 'relative',\n zIndex: 1,\n },\n '& .NavbarStyleContent-logoMark': {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n maxWidth: '25.6rem',\n height: '4.4rem',\n minWidth: 0,\n [theme.breakpoints.up('md')]: {\n maxWidth: '27.2rem',\n height: '4.8rem',\n },\n },\n '& .NavbarStyleContent-logoMark .logo-icon': {\n display: 'block',\n maxWidth: '100%',\n maxHeight: '100%',\n objectFit: 'contain',\n },\n '& .NavbarStyleContent-userMenu': {\n borderTop: `1px solid ${theme.palette.divider}`,\n },\n '& .NavbarStyleContent-navigation': {\n paddingTop: 8,\n paddingBottom: 8,\n },\n}));\n\nconst StyledContent = styled(Scrollbars)(() => ({\n overscrollBehavior: 'contain',\n overflowX: 'hidden',\n overflowY: 'auto',\n WebkitOverflowScrolling: 'touch',\n backgroundRepeat: 'no-repeat',\n backgroundSize: '100% 40px, 100% 10px',\n backgroundAttachment: 'local, scroll',\n}));\n\ntype NavbarStyleContentProps = {\n className?: string;\n};\n\n/**\n * The navbar style content.\n */\nfunction NavbarStyleContent(props: NavbarStyleContentProps) {\n const { className = '' } = props;\n\n const config = useGetCurrentLayoutConfig() as LayoutConfigDefaultsType;\n const navbar = useGetNavbar();\n\n const showLogo = useMemo(() => config?.navbar?.folded || navbar?.foldedOpen, [config, navbar]);\n\n return (\n <Root className={clsx('flex h-full flex-auto flex-col overflow-hidden', className)}>\n <div\n className={clsx(\n 'NavbarStyleContent-logo flex h-48 shrink-0 flex-row items-center px-12 md:h-64',\n showLogo ? 'NavbarStyleContent-logo--open' : 'NavbarStyleContent-logo--closed',\n )}\n >\n <div className=\"NavbarStyleContent-logoPanel\">\n <div className=\"NavbarStyleContent-logoMark\">\n <Logo />\n </div>\n </div>\n <OwpHidden lgDown>\n <NavbarPinToggleButton surfaceTone=\"light\" className=\"h-32 w-32 p-0\" />\n </OwpHidden>\n <OwpHidden lgUp>\n <NavbarToggleButton surfaceTone=\"light\" className=\"h-32 w-32 p-0\" />\n </OwpHidden>\n </div>\n\n <StyledContent\n className=\"flex min-h-0 flex-1 flex-col\"\n option={{ suppressScrollX: true, wheelPropagation: false }}\n >\n <Navigation className=\"NavbarStyleContent-navigation\" layout=\"vertical\" />\n </StyledContent>\n\n <div className=\"NavbarStyleContent-userMenu w-full p-4 md:p-10\">\n <UserMenu className=\"w-full\" />\n </div>\n </Root>\n );\n}\n\nexport default memo(NavbarStyleContent);\n"],"names":["Root","styled","theme","StyledContent","Scrollbars","NavbarStyleContent","props","className","config","useGetCurrentLayoutConfig","navbar","useGetNavbar","showLogo","useMemo","_a","clsx","jsxs","jsx","Logo","OwpHidden","NavbarPinToggleButton","NavbarToggleButton","Navigation","UserMenu","__name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