@moontra/moonui-pro 3.4.26 → 3.4.27
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 +108 -108
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +17 -11
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -79142,9 +79142,13 @@ function NavbarInternal({
|
|
|
79142
79142
|
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
79143
79143
|
const [isCommandOpen, setIsCommandOpen] = useState(false);
|
|
79144
79144
|
const [searchValue, setSearchValue] = useState("");
|
|
79145
|
+
const [mounted, setMounted] = useState(false);
|
|
79145
79146
|
const { theme: currentTheme, setTheme } = useTheme();
|
|
79146
|
-
const isDarkMode = currentTheme === "dark";
|
|
79147
|
+
const isDarkMode = mounted && currentTheme === "dark";
|
|
79147
79148
|
const navRef = useRef(null);
|
|
79149
|
+
useEffect(() => {
|
|
79150
|
+
setMounted(true);
|
|
79151
|
+
}, []);
|
|
79148
79152
|
const shouldPushContent = pushContent ?? (sticky && !overlayMode);
|
|
79149
79153
|
const { scrolled, hidden, scrollProgress, isMinimal } = useNavbarScroll({
|
|
79150
79154
|
sticky,
|
|
@@ -79198,9 +79202,9 @@ function NavbarInternal({
|
|
|
79198
79202
|
return null;
|
|
79199
79203
|
const isScrolled = framerScroll.isScrolled || scrolled;
|
|
79200
79204
|
const scrollLogo = isScrolled && branding.logoSmall ? branding.logoSmall : null;
|
|
79201
|
-
const themeLogo = isDarkMode ? branding.logoDark || null : branding.logoLight || null;
|
|
79205
|
+
const themeLogo = mounted ? isDarkMode ? branding.logoDark || null : branding.logoLight || null : null;
|
|
79202
79206
|
return scrollLogo || themeLogo || branding.logo;
|
|
79203
|
-
}, [branding, framerScroll.isScrolled, scrolled, isDarkMode]);
|
|
79207
|
+
}, [branding, framerScroll.isScrolled, scrolled, isDarkMode, mounted]);
|
|
79204
79208
|
const handleItemClick = useCallback(
|
|
79205
79209
|
(item) => {
|
|
79206
79210
|
if (item.action) {
|
|
@@ -79801,7 +79805,7 @@ function NavbarInternal({
|
|
|
79801
79805
|
onThemeChange?.(newTheme);
|
|
79802
79806
|
},
|
|
79803
79807
|
className: "relative overflow-hidden",
|
|
79804
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
79808
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: mounted && currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
79805
79809
|
motion.div,
|
|
79806
79810
|
{
|
|
79807
79811
|
initial: {
|
|
@@ -79867,9 +79871,10 @@ function NavbarInternal({
|
|
|
79867
79871
|
variant: "ghost",
|
|
79868
79872
|
size: "icon",
|
|
79869
79873
|
children: [
|
|
79870
|
-
|
|
79871
|
-
currentTheme === "
|
|
79872
|
-
currentTheme === "
|
|
79874
|
+
!mounted && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
79875
|
+
mounted && currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
79876
|
+
mounted && currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
79877
|
+
mounted && currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
79873
79878
|
]
|
|
79874
79879
|
}
|
|
79875
79880
|
) }),
|
|
@@ -80361,7 +80366,7 @@ function NavbarInternal({
|
|
|
80361
80366
|
onThemeChange?.(newTheme);
|
|
80362
80367
|
},
|
|
80363
80368
|
className: "relative overflow-hidden",
|
|
80364
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
80369
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: mounted && currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
80365
80370
|
motion.div,
|
|
80366
80371
|
{
|
|
80367
80372
|
initial: {
|
|
@@ -80422,9 +80427,10 @@ function NavbarInternal({
|
|
|
80422
80427
|
}
|
|
80423
80428
|
) : /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
80424
80429
|
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", children: [
|
|
80425
|
-
|
|
80426
|
-
currentTheme === "
|
|
80427
|
-
currentTheme === "
|
|
80430
|
+
!mounted && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
80431
|
+
mounted && currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
80432
|
+
mounted && currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
80433
|
+
mounted && currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
80428
80434
|
] }) }),
|
|
80429
80435
|
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
80430
80436
|
/* @__PURE__ */ jsxs(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.27",
|
|
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",
|