@moontra/moonui-pro 2.34.7 → 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/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 (enableNProgress) {
78315
- NProgress.start();
78316
- setTimeout(() => NProgress.done(), 500);
78317
- }
78318
- if (onNavigate) {
78319
- onNavigate(item.href);
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
- window.location.href = item.href;
78322
- }
78323
- if (isMobile) {
78324
- setIsOpen(false);
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
  },
@@ -78907,8 +78920,20 @@ function NavbarInternal({
78907
78920
  onClick: () => {
78908
78921
  if (cta.action) {
78909
78922
  cta.action();
78910
- } else if (cta.href && onNavigate) {
78911
- onNavigate(cta.href);
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
+ }
78912
78937
  }
78913
78938
  },
78914
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.7",
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",