@moontra/moonui-pro 3.4.23 → 3.4.25
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/cdn/index.global.js +131 -131
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +22 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4045,6 +4045,8 @@ interface NavbarConfig {
|
|
|
4045
4045
|
enableNProgress?: boolean;
|
|
4046
4046
|
/** Position progress bar inside border-radius (default: true for professional look) */
|
|
4047
4047
|
progressBarInset?: boolean;
|
|
4048
|
+
/** Automatically push content down when navbar is sticky (default: true when sticky && !overlayMode) */
|
|
4049
|
+
pushContent?: boolean;
|
|
4048
4050
|
}
|
|
4049
4051
|
interface NavbarProps extends NavbarConfig {
|
|
4050
4052
|
className?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -79131,6 +79131,7 @@ function NavbarInternal({
|
|
|
79131
79131
|
containerMaxWidth = "5xl",
|
|
79132
79132
|
enableNProgress = true,
|
|
79133
79133
|
progressBarInset = true,
|
|
79134
|
+
pushContent,
|
|
79134
79135
|
className,
|
|
79135
79136
|
activePath,
|
|
79136
79137
|
onNavigate
|
|
@@ -79143,6 +79144,7 @@ function NavbarInternal({
|
|
|
79143
79144
|
const [currentTheme, setCurrentTheme] = useState(theme);
|
|
79144
79145
|
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
79145
79146
|
const navRef = useRef(null);
|
|
79147
|
+
const shouldPushContent = pushContent ?? (sticky && !overlayMode);
|
|
79146
79148
|
const { scrolled, hidden, scrollProgress, isMinimal } = useNavbarScroll({
|
|
79147
79149
|
sticky,
|
|
79148
79150
|
hideOnScroll,
|
|
@@ -79403,6 +79405,24 @@ function NavbarInternal({
|
|
|
79403
79405
|
return scrolled2 ? "h-14" : "h-16";
|
|
79404
79406
|
}
|
|
79405
79407
|
};
|
|
79408
|
+
const getNavbarHeight = () => {
|
|
79409
|
+
if (scrollBehavior === "minimal" && minimalConfig?.heightOnScroll) {
|
|
79410
|
+
return minimalConfig.heightOnScroll;
|
|
79411
|
+
}
|
|
79412
|
+
const heightMap = {
|
|
79413
|
+
sm: "h-14",
|
|
79414
|
+
// 56px
|
|
79415
|
+
md: "h-16",
|
|
79416
|
+
// 64px
|
|
79417
|
+
lg: "h-20",
|
|
79418
|
+
// 80px
|
|
79419
|
+
xl: "h-24",
|
|
79420
|
+
// 96px
|
|
79421
|
+
"2xl": "h-28"
|
|
79422
|
+
// 112px
|
|
79423
|
+
};
|
|
79424
|
+
return heightMap[size4] || heightMap.md;
|
|
79425
|
+
};
|
|
79406
79426
|
const getSizeClasses = () => {
|
|
79407
79427
|
switch (size4) {
|
|
79408
79428
|
case "sm":
|
|
@@ -80914,7 +80934,8 @@ function NavbarInternal({
|
|
|
80914
80934
|
] })
|
|
80915
80935
|
]
|
|
80916
80936
|
}
|
|
80917
|
-
)
|
|
80937
|
+
),
|
|
80938
|
+
shouldPushContent && !overlayMode && /* @__PURE__ */ jsx("div", { className: cn(getNavbarHeight()), "aria-hidden": "true" })
|
|
80918
80939
|
] });
|
|
80919
80940
|
}
|
|
80920
80941
|
function Navbar(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.25",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|