@moontra/moonui-pro 3.4.22 → 3.4.24
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 +143 -143
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +84 -63
- 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,
|
|
@@ -79321,70 +79323,73 @@ function NavbarInternal({
|
|
|
79321
79323
|
}) });
|
|
79322
79324
|
const MobileMenu = () => /* @__PURE__ */ jsxs(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
79323
79325
|
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "icon", className: "lg:hidden", children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" }) }) }),
|
|
79324
|
-
/* @__PURE__ */
|
|
79325
|
-
/* @__PURE__ */ jsx(
|
|
79326
|
-
|
|
79327
|
-
branding
|
|
79328
|
-
|
|
79329
|
-
|
|
79330
|
-
|
|
79331
|
-
|
|
79332
|
-
|
|
79333
|
-
|
|
79334
|
-
|
|
79335
|
-
|
|
79336
|
-
|
|
79337
|
-
|
|
79338
|
-
|
|
79339
|
-
|
|
79340
|
-
|
|
79341
|
-
|
|
79342
|
-
|
|
79343
|
-
|
|
79344
|
-
|
|
79345
|
-
|
|
79346
|
-
|
|
79347
|
-
|
|
79348
|
-
|
|
79349
|
-
|
|
79350
|
-
|
|
79351
|
-
|
|
79352
|
-
|
|
79353
|
-
|
|
79326
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: mobileMenuPosition, className: "w-80 p-0", children: [
|
|
79327
|
+
/* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Navigation Menu" }),
|
|
79328
|
+
/* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", children: [
|
|
79329
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center p-4 border-b", children: branding && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
79330
|
+
getActiveLogo(),
|
|
79331
|
+
branding.title && /* @__PURE__ */ jsx("span", { className: "font-semibold text-lg", children: branding.title })
|
|
79332
|
+
] }) }),
|
|
79333
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-4", children: !hideNavItems && sections.map((section) => /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
79334
|
+
section.items.map((item) => /* @__PURE__ */ jsx("div", { children: item.items && item.items.length > 0 ? /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
79335
|
+
/* @__PURE__ */ jsx(
|
|
79336
|
+
MoonUIDropdownMenuTriggerPro,
|
|
79337
|
+
{
|
|
79338
|
+
asChild: true,
|
|
79339
|
+
children: /* @__PURE__ */ jsxs(
|
|
79340
|
+
MoonUIButtonPro,
|
|
79341
|
+
{
|
|
79342
|
+
variant: "ghost",
|
|
79343
|
+
className: "w-full justify-between",
|
|
79344
|
+
disabled: item.disabled,
|
|
79345
|
+
children: [
|
|
79346
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
79347
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
79348
|
+
item.title
|
|
79349
|
+
] }),
|
|
79350
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
79351
|
+
]
|
|
79352
|
+
}
|
|
79353
|
+
)
|
|
79354
|
+
}
|
|
79355
|
+
),
|
|
79356
|
+
/* @__PURE__ */ jsx(
|
|
79357
|
+
MoonUIDropdownMenuContentPro,
|
|
79358
|
+
{
|
|
79359
|
+
align: "start",
|
|
79360
|
+
className: "w-56",
|
|
79361
|
+
children: item.items && renderDropdownMenu(
|
|
79362
|
+
item.items
|
|
79363
|
+
)
|
|
79364
|
+
}
|
|
79365
|
+
)
|
|
79366
|
+
] }) : /* @__PURE__ */ jsxs(
|
|
79367
|
+
MoonUIButtonPro,
|
|
79354
79368
|
{
|
|
79355
|
-
|
|
79356
|
-
className: "w-
|
|
79357
|
-
|
|
79358
|
-
|
|
79359
|
-
|
|
79369
|
+
variant: "ghost",
|
|
79370
|
+
className: "w-full justify-start",
|
|
79371
|
+
disabled: item.disabled,
|
|
79372
|
+
onClick: () => handleItemClick(item),
|
|
79373
|
+
children: [
|
|
79374
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
79375
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
79376
|
+
item.title
|
|
79377
|
+
] }),
|
|
79378
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
79379
|
+
MoonUIBadgePro,
|
|
79380
|
+
{
|
|
79381
|
+
variant: item.badgeVariant || "secondary",
|
|
79382
|
+
className: "ml-auto",
|
|
79383
|
+
children: item.badge
|
|
79384
|
+
}
|
|
79385
|
+
)
|
|
79386
|
+
]
|
|
79360
79387
|
}
|
|
79361
|
-
)
|
|
79362
|
-
|
|
79363
|
-
|
|
79364
|
-
|
|
79365
|
-
|
|
79366
|
-
className: "w-full justify-start",
|
|
79367
|
-
disabled: item.disabled,
|
|
79368
|
-
onClick: () => handleItemClick(item),
|
|
79369
|
-
children: [
|
|
79370
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
79371
|
-
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
79372
|
-
item.title
|
|
79373
|
-
] }),
|
|
79374
|
-
item.badge && /* @__PURE__ */ jsx(
|
|
79375
|
-
MoonUIBadgePro,
|
|
79376
|
-
{
|
|
79377
|
-
variant: item.badgeVariant || "secondary",
|
|
79378
|
-
className: "ml-auto",
|
|
79379
|
-
children: item.badge
|
|
79380
|
-
}
|
|
79381
|
-
)
|
|
79382
|
-
]
|
|
79383
|
-
}
|
|
79384
|
-
) }, item.id)),
|
|
79385
|
-
/* @__PURE__ */ jsx(MoonUISeparatorPro, { className: "my-2" })
|
|
79386
|
-
] }, section.id)) })
|
|
79387
|
-
] }) })
|
|
79388
|
+
) }, item.id)),
|
|
79389
|
+
/* @__PURE__ */ jsx(MoonUISeparatorPro, { className: "my-2" })
|
|
79390
|
+
] }, section.id)) })
|
|
79391
|
+
] })
|
|
79392
|
+
] })
|
|
79388
79393
|
] });
|
|
79389
79394
|
const getHeight = (scrolled2 = false) => {
|
|
79390
79395
|
switch (size4) {
|
|
@@ -79400,6 +79405,21 @@ function NavbarInternal({
|
|
|
79400
79405
|
return scrolled2 ? "h-14" : "h-16";
|
|
79401
79406
|
}
|
|
79402
79407
|
};
|
|
79408
|
+
const getNavbarHeight = () => {
|
|
79409
|
+
const heightMap = {
|
|
79410
|
+
sm: "h-14",
|
|
79411
|
+
// 56px
|
|
79412
|
+
md: "h-16",
|
|
79413
|
+
// 64px
|
|
79414
|
+
lg: "h-20",
|
|
79415
|
+
// 80px
|
|
79416
|
+
xl: "h-24",
|
|
79417
|
+
// 96px
|
|
79418
|
+
"2xl": "h-28"
|
|
79419
|
+
// 112px
|
|
79420
|
+
};
|
|
79421
|
+
return heightMap[size4] || heightMap.md;
|
|
79422
|
+
};
|
|
79403
79423
|
const getSizeClasses = () => {
|
|
79404
79424
|
switch (size4) {
|
|
79405
79425
|
case "sm":
|
|
@@ -80911,7 +80931,8 @@ function NavbarInternal({
|
|
|
80911
80931
|
] })
|
|
80912
80932
|
]
|
|
80913
80933
|
}
|
|
80914
|
-
)
|
|
80934
|
+
),
|
|
80935
|
+
shouldPushContent && !overlayMode && /* @__PURE__ */ jsx("div", { className: cn(getNavbarHeight()), "aria-hidden": "true" })
|
|
80915
80936
|
] });
|
|
80916
80937
|
}
|
|
80917
80938
|
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.24",
|
|
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",
|