@moontra/moonui-pro 2.34.6 → 2.34.8
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 +42 -42
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +40 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -78311,17 +78311,30 @@ function NavbarInternal({
|
|
|
78311
78311
|
if (item.action) {
|
|
78312
78312
|
item.action();
|
|
78313
78313
|
} else if (item.href) {
|
|
78314
|
-
if (
|
|
78315
|
-
|
|
78316
|
-
|
|
78317
|
-
|
|
78318
|
-
|
|
78319
|
-
|
|
78314
|
+
if (item.href.startsWith("#")) {
|
|
78315
|
+
const targetElement = document.querySelector(item.href);
|
|
78316
|
+
if (targetElement) {
|
|
78317
|
+
targetElement.scrollIntoView({
|
|
78318
|
+
behavior: "smooth",
|
|
78319
|
+
block: "start"
|
|
78320
|
+
});
|
|
78321
|
+
}
|
|
78322
|
+
if (isMobile) {
|
|
78323
|
+
setIsOpen(false);
|
|
78324
|
+
}
|
|
78320
78325
|
} else {
|
|
78321
|
-
|
|
78322
|
-
|
|
78323
|
-
|
|
78324
|
-
|
|
78326
|
+
if (enableNProgress) {
|
|
78327
|
+
NProgress.start();
|
|
78328
|
+
setTimeout(() => NProgress.done(), 500);
|
|
78329
|
+
}
|
|
78330
|
+
if (onNavigate) {
|
|
78331
|
+
onNavigate(item.href);
|
|
78332
|
+
} else {
|
|
78333
|
+
window.location.href = item.href;
|
|
78334
|
+
}
|
|
78335
|
+
if (isMobile) {
|
|
78336
|
+
setIsOpen(false);
|
|
78337
|
+
}
|
|
78325
78338
|
}
|
|
78326
78339
|
}
|
|
78327
78340
|
},
|
|
@@ -78579,8 +78592,9 @@ function NavbarInternal({
|
|
|
78579
78592
|
navItemsPosition === "center" && "flex-1 justify-center mx-4",
|
|
78580
78593
|
navItemsPosition === "right" && "ml-auto",
|
|
78581
78594
|
navItemsPosition === "left" && "ml-4",
|
|
78582
|
-
|
|
78583
|
-
|
|
78595
|
+
// Keep position consistent in minimal mode unless centerOnScroll is enabled
|
|
78596
|
+
isMinimal && minimalConfig?.centerOnScroll && navItemsPosition !== "center" && "flex-1 justify-center",
|
|
78597
|
+
navItemsPosition === "center" && "absolute left-1/2 transform -translate-x-1/2"
|
|
78584
78598
|
),
|
|
78585
78599
|
children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React68__default.Fragment, { children: section.items.map((item) => {
|
|
78586
78600
|
const hasChildren = item.items && item.items.length > 0;
|
|
@@ -78906,8 +78920,20 @@ function NavbarInternal({
|
|
|
78906
78920
|
onClick: () => {
|
|
78907
78921
|
if (cta.action) {
|
|
78908
78922
|
cta.action();
|
|
78909
|
-
} else if (cta.href
|
|
78910
|
-
|
|
78923
|
+
} else if (cta.href) {
|
|
78924
|
+
if (cta.href.startsWith("#")) {
|
|
78925
|
+
const targetElement = document.querySelector(cta.href);
|
|
78926
|
+
if (targetElement) {
|
|
78927
|
+
targetElement.scrollIntoView({
|
|
78928
|
+
behavior: "smooth",
|
|
78929
|
+
block: "start"
|
|
78930
|
+
});
|
|
78931
|
+
}
|
|
78932
|
+
} else if (onNavigate) {
|
|
78933
|
+
onNavigate(cta.href);
|
|
78934
|
+
} else {
|
|
78935
|
+
window.location.href = cta.href;
|
|
78936
|
+
}
|
|
78911
78937
|
}
|
|
78912
78938
|
},
|
|
78913
78939
|
className: !isMobile ? "ml-2" : "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.34.
|
|
3
|
+
"version": "2.34.8",
|
|
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",
|