@opensite/ui 0.4.4 → 0.4.6
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/navbar-animated-preview.cjs +97 -58
- package/dist/navbar-animated-preview.d.cts +9 -64
- package/dist/navbar-animated-preview.d.ts +9 -64
- package/dist/navbar-animated-preview.js +97 -58
- package/dist/navbar-centered-menu.cjs +46 -7
- package/dist/navbar-centered-menu.d.cts +7 -11
- package/dist/navbar-centered-menu.d.ts +7 -11
- package/dist/navbar-centered-menu.js +46 -7
- package/dist/navbar-dark-icons.cjs +50 -10
- package/dist/navbar-dark-icons.d.cts +6 -11
- package/dist/navbar-dark-icons.d.ts +6 -11
- package/dist/navbar-dark-icons.js +50 -10
- package/dist/navbar-dropdown-menu.cjs +47 -8
- package/dist/navbar-dropdown-menu.d.cts +8 -12
- package/dist/navbar-dropdown-menu.d.ts +8 -12
- package/dist/navbar-dropdown-menu.js +47 -8
- package/dist/navbar-education-platform.cjs +48 -10
- package/dist/navbar-education-platform.d.cts +6 -11
- package/dist/navbar-education-platform.d.ts +6 -11
- package/dist/navbar-education-platform.js +48 -10
- package/dist/navbar-enterprise-mega.cjs +50 -10
- package/dist/navbar-enterprise-mega.d.cts +7 -37
- package/dist/navbar-enterprise-mega.d.ts +7 -37
- package/dist/navbar-enterprise-mega.js +50 -10
- package/dist/navbar-feature-grid.cjs +47 -8
- package/dist/navbar-feature-grid.d.cts +6 -11
- package/dist/navbar-feature-grid.d.ts +6 -11
- package/dist/navbar-feature-grid.js +47 -8
- package/dist/navbar-floating-pill.cjs +50 -11
- package/dist/navbar-floating-pill.d.cts +6 -11
- package/dist/navbar-floating-pill.d.ts +6 -11
- package/dist/navbar-floating-pill.js +50 -11
- package/dist/navbar-fullscreen-menu.cjs +44 -5
- package/dist/navbar-fullscreen-menu.d.cts +6 -11
- package/dist/navbar-fullscreen-menu.d.ts +6 -11
- package/dist/navbar-fullscreen-menu.js +44 -5
- package/dist/navbar-icon-links.cjs +46 -8
- package/dist/navbar-icon-links.d.cts +9 -11
- package/dist/navbar-icon-links.d.ts +9 -11
- package/dist/navbar-icon-links.js +46 -8
- package/dist/navbar-image-preview.cjs +56 -12
- package/dist/navbar-image-preview.d.cts +11 -17
- package/dist/navbar-image-preview.d.ts +11 -17
- package/dist/navbar-image-preview.js +56 -12
- package/dist/navbar-mega-menu.cjs +69 -20
- package/dist/navbar-mega-menu.d.cts +8 -74
- package/dist/navbar-mega-menu.d.ts +8 -74
- package/dist/navbar-mega-menu.js +69 -20
- package/dist/navbar-multi-column-groups.cjs +47 -11
- package/dist/navbar-multi-column-groups.d.cts +6 -11
- package/dist/navbar-multi-column-groups.d.ts +6 -11
- package/dist/navbar-multi-column-groups.js +47 -11
- package/dist/navbar-platform-resources.cjs +199 -164
- package/dist/navbar-platform-resources.d.cts +7 -37
- package/dist/navbar-platform-resources.d.ts +7 -37
- package/dist/navbar-platform-resources.js +199 -164
- package/dist/navbar-search-focused.cjs +45 -7
- package/dist/navbar-search-focused.d.cts +6 -11
- package/dist/navbar-search-focused.d.ts +6 -11
- package/dist/navbar-search-focused.js +45 -7
- package/dist/navbar-sidebar-mobile.cjs +47 -8
- package/dist/navbar-sidebar-mobile.d.cts +6 -11
- package/dist/navbar-sidebar-mobile.d.ts +6 -11
- package/dist/navbar-sidebar-mobile.js +47 -8
- package/dist/navbar-simple-links.cjs +45 -7
- package/dist/navbar-simple-links.d.cts +6 -11
- package/dist/navbar-simple-links.d.ts +6 -11
- package/dist/navbar-simple-links.js +45 -7
- package/dist/navbar-split-cta.cjs +47 -8
- package/dist/navbar-split-cta.d.cts +6 -11
- package/dist/navbar-split-cta.d.ts +6 -11
- package/dist/navbar-split-cta.js +47 -8
- package/dist/navbar-sticky-compact.cjs +49 -10
- package/dist/navbar-sticky-compact.d.cts +6 -11
- package/dist/navbar-sticky-compact.d.ts +6 -11
- package/dist/navbar-sticky-compact.js +49 -10
- package/dist/navbar-tabbed-sections.cjs +47 -8
- package/dist/navbar-tabbed-sections.d.cts +6 -11
- package/dist/navbar-tabbed-sections.d.ts +6 -11
- package/dist/navbar-tabbed-sections.js +47 -8
- package/dist/navbar-transparent-overlay.cjs +47 -9
- package/dist/navbar-transparent-overlay.d.cts +6 -11
- package/dist/navbar-transparent-overlay.d.ts +6 -11
- package/dist/navbar-transparent-overlay.js +47 -9
- package/dist/registry.cjs +522 -328
- package/dist/registry.js +522 -328
- package/dist/types-COVDidbn.d.cts +119 -0
- package/dist/types-COVDidbn.d.ts +119 -0
- package/package.json +2 -2
|
@@ -931,7 +931,7 @@ function NavigationMenuList({
|
|
|
931
931
|
{
|
|
932
932
|
"data-slot": "navigation-menu-list",
|
|
933
933
|
className: cn(
|
|
934
|
-
"group flex flex-1 list-none items-center justify-center gap-6",
|
|
934
|
+
"group flex flex-1 list-none items-center justify-center gap-2 lg:gap-4 xl:gap-6",
|
|
935
935
|
className
|
|
936
936
|
),
|
|
937
937
|
...props
|
|
@@ -971,8 +971,9 @@ function NavigationMenuTrigger({
|
|
|
971
971
|
/* @__PURE__ */ jsx(
|
|
972
972
|
DynamicIcon,
|
|
973
973
|
{
|
|
974
|
+
size: 18,
|
|
974
975
|
name: "lucide/chevron-down",
|
|
975
|
-
className: "relative top-
|
|
976
|
+
className: "relative top-px opacity-50 transition duration-300 group-data-[state=open]:rotate-180",
|
|
976
977
|
"aria-hidden": "true"
|
|
977
978
|
}
|
|
978
979
|
)
|
|
@@ -1012,7 +1013,7 @@ function NavigationMenuViewport({
|
|
|
1012
1013
|
{
|
|
1013
1014
|
"data-slot": "navigation-menu-viewport",
|
|
1014
1015
|
className: cn(
|
|
1015
|
-
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-
|
|
1016
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border border-border/50 shadow-sm md:w-(--radix-navigation-menu-viewport-width)",
|
|
1016
1017
|
className
|
|
1017
1018
|
),
|
|
1018
1019
|
...props
|
|
@@ -1030,7 +1031,7 @@ function NavigationMenuLink({
|
|
|
1030
1031
|
{
|
|
1031
1032
|
"data-slot": "navigation-menu-link",
|
|
1032
1033
|
className: cn(
|
|
1033
|
-
"
|
|
1034
|
+
"group inline-flex w-max items-center justify-center rounded-md text-sm disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-muted data-[state=open]:focus:bg-muted focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 group h-auto bg-transparent px-3 py-2 font-normal text-foreground/80 hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground data-[state=open]:bg-muted/50 data-[state=open]:text-foreground",
|
|
1034
1035
|
className
|
|
1035
1036
|
),
|
|
1036
1037
|
...props
|
|
@@ -1232,6 +1233,41 @@ var imagePlaceholders = [
|
|
|
1232
1233
|
"https://toastability-production.s3.amazonaws.com/e13qu3083lkhdg7th64vb628172a",
|
|
1233
1234
|
"https://toastability-production.s3.amazonaws.com/w87w0fyjdol9yzwo7yywkgxidvzo"
|
|
1234
1235
|
];
|
|
1236
|
+
|
|
1237
|
+
// components/blocks/navbars/types.ts
|
|
1238
|
+
function getLinkUrl(item) {
|
|
1239
|
+
return item.href || item.url || "#";
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
// components/blocks/navbars/layout-variant-utils.ts
|
|
1243
|
+
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
1244
|
+
const isFloatingBar = layoutVariant === "floatingBar";
|
|
1245
|
+
const isFullWidthLinks = layoutVariant === "fullScreenFullWidthLinks";
|
|
1246
|
+
return {
|
|
1247
|
+
// Section wrapper classes
|
|
1248
|
+
sectionClasses: cn(
|
|
1249
|
+
"inset-x-0 z-20",
|
|
1250
|
+
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1251
|
+
customClasses?.className
|
|
1252
|
+
),
|
|
1253
|
+
// Outer container wrapper (only for floating bar)
|
|
1254
|
+
containerWrapperClasses: cn(
|
|
1255
|
+
isFloatingBar && "mx-auto w-full px-2 sm:px-4 lg:px-8 max-w-7xl relative z-10"
|
|
1256
|
+
),
|
|
1257
|
+
// Inner container classes
|
|
1258
|
+
innerContainerClasses: cn(
|
|
1259
|
+
!isFloatingBar && !isFullWidthLinks && "container",
|
|
1260
|
+
isFullWidthLinks && "mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
1261
|
+
customClasses?.containerClassName
|
|
1262
|
+
),
|
|
1263
|
+
// Navigation wrapper classes (for border and shadow)
|
|
1264
|
+
navWrapperClasses: cn(
|
|
1265
|
+
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm"
|
|
1266
|
+
),
|
|
1267
|
+
// Spacing adjustment for Section component
|
|
1268
|
+
spacingOverride: isFloatingBar ? "none" : void 0
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1235
1271
|
var MOBILE_BREAKPOINT = 1024;
|
|
1236
1272
|
var NavbarImagePreview = ({
|
|
1237
1273
|
className,
|
|
@@ -1253,6 +1289,7 @@ var NavbarImagePreview = ({
|
|
|
1253
1289
|
authActionsSlot,
|
|
1254
1290
|
socialLinks,
|
|
1255
1291
|
socialLinksSlot,
|
|
1292
|
+
layoutVariant = "fullScreenContainerizedLinks",
|
|
1256
1293
|
background = "white",
|
|
1257
1294
|
spacing = "none",
|
|
1258
1295
|
pattern,
|
|
@@ -1361,12 +1398,19 @@ var NavbarImagePreview = ({
|
|
|
1361
1398
|
);
|
|
1362
1399
|
});
|
|
1363
1400
|
};
|
|
1401
|
+
const {
|
|
1402
|
+
sectionClasses,
|
|
1403
|
+
containerWrapperClasses,
|
|
1404
|
+
innerContainerClasses,
|
|
1405
|
+
navWrapperClasses,
|
|
1406
|
+
spacingOverride
|
|
1407
|
+
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1364
1408
|
return /* @__PURE__ */ jsxs(
|
|
1365
1409
|
Section,
|
|
1366
1410
|
{
|
|
1367
1411
|
background,
|
|
1368
|
-
spacing,
|
|
1369
|
-
className:
|
|
1412
|
+
spacing: spacingOverride ?? spacing,
|
|
1413
|
+
className: sectionClasses,
|
|
1370
1414
|
pattern,
|
|
1371
1415
|
patternOpacity,
|
|
1372
1416
|
children: [
|
|
@@ -1375,10 +1419,10 @@ var NavbarImagePreview = ({
|
|
|
1375
1419
|
{
|
|
1376
1420
|
className: cn(
|
|
1377
1421
|
"fixed top-0 z-500 w-full bg-transparent transition-colors duration-500",
|
|
1378
|
-
|
|
1422
|
+
containerWrapperClasses
|
|
1379
1423
|
),
|
|
1380
1424
|
ref: navRef,
|
|
1381
|
-
children: /* @__PURE__ */ jsx("div", { className:
|
|
1425
|
+
children: /* @__PURE__ */ jsx("div", { className: cn(innerContainerClasses, navWrapperClasses), children: /* @__PURE__ */ jsxs(
|
|
1382
1426
|
"div",
|
|
1383
1427
|
{
|
|
1384
1428
|
className: cn(
|
|
@@ -1480,14 +1524,14 @@ var DesktopMenuItem = ({
|
|
|
1480
1524
|
/* @__PURE__ */ jsx("ul", { children: item.links.map((link, linkIndex) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
1481
1525
|
Pressable,
|
|
1482
1526
|
{
|
|
1483
|
-
href: link
|
|
1527
|
+
href: getLinkUrl(link),
|
|
1484
1528
|
className: "flex items-center gap-4 rounded-lg px-4 py-3 hover:bg-muted",
|
|
1485
1529
|
"data-index": linkIndex,
|
|
1486
1530
|
onMouseEnter: handleMouseEnter,
|
|
1487
1531
|
onMouseLeave: handleMouseLeave,
|
|
1488
1532
|
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
1489
|
-
/* @__PURE__ */ jsx("h3", { className: "leading-normal font-medium", children: link.label }),
|
|
1490
|
-
/* @__PURE__ */ jsx("p", { className: "leading-normal text-muted-foreground", children: link.description })
|
|
1533
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm leading-normal font-medium", children: link.label }),
|
|
1534
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs leading-normal text-muted-foreground", children: link.description })
|
|
1491
1535
|
] })
|
|
1492
1536
|
}
|
|
1493
1537
|
) }, `desktop-nav-sublink-${linkIndex}`)) })
|
|
@@ -1530,7 +1574,7 @@ var MobileNavigationMenu = ({
|
|
|
1530
1574
|
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-3", children: item.links?.map((link, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
1531
1575
|
Pressable,
|
|
1532
1576
|
{
|
|
1533
|
-
href: link
|
|
1577
|
+
href: getLinkUrl(link),
|
|
1534
1578
|
className: cn(
|
|
1535
1579
|
"text-primary-foreground leading-normal font-medium",
|
|
1536
1580
|
index === 0 ? "text-2xl" : "text-base"
|
|
@@ -952,7 +952,7 @@ function NavigationMenuList({
|
|
|
952
952
|
{
|
|
953
953
|
"data-slot": "navigation-menu-list",
|
|
954
954
|
className: cn(
|
|
955
|
-
"group flex flex-1 list-none items-center justify-center gap-6",
|
|
955
|
+
"group flex flex-1 list-none items-center justify-center gap-2 lg:gap-4 xl:gap-6",
|
|
956
956
|
className
|
|
957
957
|
),
|
|
958
958
|
...props
|
|
@@ -992,8 +992,9 @@ function NavigationMenuTrigger({
|
|
|
992
992
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
993
993
|
DynamicIcon,
|
|
994
994
|
{
|
|
995
|
+
size: 18,
|
|
995
996
|
name: "lucide/chevron-down",
|
|
996
|
-
className: "relative top-
|
|
997
|
+
className: "relative top-px opacity-50 transition duration-300 group-data-[state=open]:rotate-180",
|
|
997
998
|
"aria-hidden": "true"
|
|
998
999
|
}
|
|
999
1000
|
)
|
|
@@ -1033,7 +1034,7 @@ function NavigationMenuViewport({
|
|
|
1033
1034
|
{
|
|
1034
1035
|
"data-slot": "navigation-menu-viewport",
|
|
1035
1036
|
className: cn(
|
|
1036
|
-
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-
|
|
1037
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border border-border/50 shadow-sm md:w-(--radix-navigation-menu-viewport-width)",
|
|
1037
1038
|
className
|
|
1038
1039
|
),
|
|
1039
1040
|
...props
|
|
@@ -1051,13 +1052,48 @@ function NavigationMenuLink({
|
|
|
1051
1052
|
{
|
|
1052
1053
|
"data-slot": "navigation-menu-link",
|
|
1053
1054
|
className: cn(
|
|
1054
|
-
"
|
|
1055
|
+
"group inline-flex w-max items-center justify-center rounded-md text-sm disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-muted data-[state=open]:focus:bg-muted focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 group h-auto bg-transparent px-3 py-2 font-normal text-foreground/80 hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground data-[state=open]:bg-muted/50 data-[state=open]:text-foreground",
|
|
1055
1056
|
className
|
|
1056
1057
|
),
|
|
1057
1058
|
...props
|
|
1058
1059
|
}
|
|
1059
1060
|
);
|
|
1060
1061
|
}
|
|
1062
|
+
|
|
1063
|
+
// components/blocks/navbars/types.ts
|
|
1064
|
+
function getLinkUrl(item) {
|
|
1065
|
+
return item.href || item.url || "#";
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
// components/blocks/navbars/layout-variant-utils.ts
|
|
1069
|
+
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
1070
|
+
const isFloatingBar = layoutVariant === "floatingBar";
|
|
1071
|
+
const isFullWidthLinks = layoutVariant === "fullScreenFullWidthLinks";
|
|
1072
|
+
return {
|
|
1073
|
+
// Section wrapper classes
|
|
1074
|
+
sectionClasses: cn(
|
|
1075
|
+
"inset-x-0 z-20",
|
|
1076
|
+
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1077
|
+
customClasses?.className
|
|
1078
|
+
),
|
|
1079
|
+
// Outer container wrapper (only for floating bar)
|
|
1080
|
+
containerWrapperClasses: cn(
|
|
1081
|
+
isFloatingBar && "mx-auto w-full px-2 sm:px-4 lg:px-8 max-w-7xl relative z-10"
|
|
1082
|
+
),
|
|
1083
|
+
// Inner container classes
|
|
1084
|
+
innerContainerClasses: cn(
|
|
1085
|
+
!isFloatingBar && !isFullWidthLinks && "container",
|
|
1086
|
+
isFullWidthLinks && "mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
1087
|
+
customClasses?.containerClassName
|
|
1088
|
+
),
|
|
1089
|
+
// Navigation wrapper classes (for border and shadow)
|
|
1090
|
+
navWrapperClasses: cn(
|
|
1091
|
+
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm"
|
|
1092
|
+
),
|
|
1093
|
+
// Spacing adjustment for Section component
|
|
1094
|
+
spacingOverride: isFloatingBar ? "none" : void 0
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1061
1097
|
var DesktopMenuItem = ({
|
|
1062
1098
|
link,
|
|
1063
1099
|
index,
|
|
@@ -1086,8 +1122,8 @@ var DesktopMenuItem = ({
|
|
|
1086
1122
|
if (layout === "animated-image-preview" && link.links) {
|
|
1087
1123
|
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { children: [
|
|
1088
1124
|
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { className: "h-auto bg-transparent px-3 py-2 font-normal text-foreground/80 hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground data-[state=open]:bg-muted/50 data-[state=open]:text-foreground", children: link.label }),
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "
|
|
1090
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-square w-full overflow-hidden rounded-xl", children: link.links.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1125
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "rounded-2xl! p-0!", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid min-h-75 w-181 grid-cols-[22.5rem_1fr] gap-4 p-3", children: [
|
|
1126
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-square w-full overflow-hidden rounded-xl shadow-xl", children: link.links.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1091
1127
|
img.Img,
|
|
1092
1128
|
{
|
|
1093
1129
|
ref: (el) => {
|
|
@@ -1110,14 +1146,14 @@ var DesktopMenuItem = ({
|
|
|
1110
1146
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { children: link.links.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1111
1147
|
NavigationMenuLink,
|
|
1112
1148
|
{
|
|
1113
|
-
href: item
|
|
1149
|
+
href: getLinkUrl(item),
|
|
1114
1150
|
className: "flex items-center gap-4 rounded-lg px-4 py-3 hover:bg-muted",
|
|
1115
1151
|
"data-index": idx,
|
|
1116
1152
|
onMouseEnter: handleMouseEnter,
|
|
1117
1153
|
onMouseLeave: handleMouseLeave,
|
|
1118
1154
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1119
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
1120
|
-
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "leading-normal text-muted-foreground", children: item.description })
|
|
1155
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium", children: item.label }),
|
|
1156
|
+
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs leading-normal text-muted-foreground", children: item.description })
|
|
1121
1157
|
] })
|
|
1122
1158
|
}
|
|
1123
1159
|
) }, `desktop-nav-sublink-${idx}`)) })
|
|
@@ -1128,13 +1164,13 @@ var DesktopMenuItem = ({
|
|
|
1128
1164
|
if (layout === "simple-grid" && link.links) {
|
|
1129
1165
|
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { children: [
|
|
1130
1166
|
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { className: "h-auto bg-transparent px-3 py-2 font-normal text-foreground/80 hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground data-[state=open]:bg-muted/50 data-[state=open]:text-foreground", children: link.label }),
|
|
1131
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "min-w-[
|
|
1167
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "min-w-[700px] p-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: link.links.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1132
1168
|
NavigationMenuLink,
|
|
1133
1169
|
{
|
|
1134
|
-
href: item
|
|
1170
|
+
href: getLinkUrl(item),
|
|
1135
1171
|
className: "flex flex-row items-start gap-4 rounded-lg border border-input bg-background p-4 hover:bg-muted hover:text-foreground",
|
|
1136
1172
|
children: [
|
|
1137
|
-
item.image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-
|
|
1173
|
+
item.image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 w-20 shrink-0 overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1138
1174
|
img.Img,
|
|
1139
1175
|
{
|
|
1140
1176
|
src: item.image,
|
|
@@ -1143,7 +1179,7 @@ var DesktopMenuItem = ({
|
|
|
1143
1179
|
optixFlowConfig
|
|
1144
1180
|
}
|
|
1145
1181
|
) }),
|
|
1146
|
-
!item.image && (item.icon || item.iconName) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-
|
|
1182
|
+
!item.image && (item.icon || item.iconName) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-border bg-muted/40 text-muted-foreground", children: item.icon ? item.icon : item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 20 }) : null }),
|
|
1147
1183
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1148
1184
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium", children: item.label }),
|
|
1149
1185
|
item.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-normal text-muted-foreground", children: item.description })
|
|
@@ -1160,7 +1196,7 @@ var DesktopMenuItem = ({
|
|
|
1160
1196
|
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "min-w-[400px] p-4", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: link.links.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1161
1197
|
NavigationMenuLink,
|
|
1162
1198
|
{
|
|
1163
|
-
href: item
|
|
1199
|
+
href: getLinkUrl(item),
|
|
1164
1200
|
className: "flex items-start gap-3 rounded-lg p-3 hover:bg-muted",
|
|
1165
1201
|
children: [
|
|
1166
1202
|
(item.icon || item.iconName) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-muted/40 text-muted-foreground", children: item.icon ? item.icon : item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 16 }) : null }),
|
|
@@ -1204,7 +1240,7 @@ var MobileSubmenu = ({
|
|
|
1204
1240
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1205
1241
|
Pressable,
|
|
1206
1242
|
{
|
|
1207
|
-
href: item
|
|
1243
|
+
href: getLinkUrl(item),
|
|
1208
1244
|
className: "flex items-start gap-4 border-b border-border px-8 py-5",
|
|
1209
1245
|
children: [
|
|
1210
1246
|
item.image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 w-10 overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1244,6 +1280,7 @@ var NavbarMegaMenu = ({
|
|
|
1244
1280
|
logoSlot,
|
|
1245
1281
|
menuLinks,
|
|
1246
1282
|
actions,
|
|
1283
|
+
layoutVariant = "fullScreenContainerizedLinks",
|
|
1247
1284
|
background = "white",
|
|
1248
1285
|
spacing = "none",
|
|
1249
1286
|
pattern,
|
|
@@ -1303,15 +1340,27 @@ var NavbarMegaMenu = ({
|
|
|
1303
1340
|
] }) }, index);
|
|
1304
1341
|
});
|
|
1305
1342
|
};
|
|
1343
|
+
const {
|
|
1344
|
+
sectionClasses,
|
|
1345
|
+
containerWrapperClasses,
|
|
1346
|
+
innerContainerClasses,
|
|
1347
|
+
navWrapperClasses: baseNavWrapperClasses,
|
|
1348
|
+
spacingOverride
|
|
1349
|
+
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1350
|
+
const navWrapperClasses = cn(
|
|
1351
|
+
"flex w-full items-center justify-between gap-12 py-4",
|
|
1352
|
+
baseNavWrapperClasses,
|
|
1353
|
+
layoutVariant === "floatingBar" && "pr-4 pl-8"
|
|
1354
|
+
);
|
|
1306
1355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1307
1356
|
Section,
|
|
1308
1357
|
{
|
|
1309
1358
|
background,
|
|
1310
|
-
spacing,
|
|
1311
|
-
className:
|
|
1359
|
+
spacing: spacingOverride ?? spacing,
|
|
1360
|
+
className: sectionClasses,
|
|
1312
1361
|
pattern,
|
|
1313
1362
|
patternOpacity,
|
|
1314
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1363
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1315
1364
|
NavigationMenu,
|
|
1316
1365
|
{
|
|
1317
1366
|
className: cn(
|
|
@@ -1319,7 +1368,7 @@ var NavbarMegaMenu = ({
|
|
|
1319
1368
|
navClassName
|
|
1320
1369
|
),
|
|
1321
1370
|
children: [
|
|
1322
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1371
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: navWrapperClasses, children: [
|
|
1323
1372
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1324
1373
|
(!open || submenuIndex === null) && renderLogo(),
|
|
1325
1374
|
open && submenuIndex !== null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1464,7 +1513,7 @@ var NavbarMegaMenu = ({
|
|
|
1464
1513
|
)
|
|
1465
1514
|
]
|
|
1466
1515
|
}
|
|
1467
|
-
) })
|
|
1516
|
+
) }) })
|
|
1468
1517
|
}
|
|
1469
1518
|
);
|
|
1470
1519
|
};
|
|
@@ -2,83 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { P as PatternName } from './pattern-background-a7gKHzHy.cjs';
|
|
4
4
|
import { SectionBackground, SectionSpacing } from './types.cjs';
|
|
5
|
+
import { L as LogoConfig, I as IMenuLink, N as NavbarLayoutVariant } from './types-COVDidbn.cjs';
|
|
6
|
+
export { b as ILinkItem, a as IMenuLinkGroup, M as MegaMenuLayout } from './types-COVDidbn.cjs';
|
|
5
7
|
import { A as ActionConfig, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
6
8
|
import 'class-variance-authority';
|
|
7
9
|
import './button-variants-lRElsmTc.cjs';
|
|
8
10
|
import 'class-variance-authority/types';
|
|
9
11
|
|
|
10
|
-
/**
|
|
11
|
-
* SHARED TYPE INTERFACES FOR ALL NAVBAR COMPONENTS
|
|
12
|
-
* These types provide a consistent interface across all navbar blocks
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Base link item - used across all navbar components
|
|
16
|
-
*/
|
|
17
|
-
interface ILinkItem {
|
|
18
|
-
label: React.ReactNode;
|
|
19
|
-
description?: React.ReactNode;
|
|
20
|
-
url: string;
|
|
21
|
-
icon?: React.ReactNode;
|
|
22
|
-
iconName?: string;
|
|
23
|
-
image?: string;
|
|
24
|
-
background?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Group of links with optional metadata
|
|
28
|
-
*/
|
|
29
|
-
interface IMenuLinkGroup {
|
|
30
|
-
label: React.ReactNode;
|
|
31
|
-
description?: string;
|
|
32
|
-
image?: string;
|
|
33
|
-
links: ILinkItem[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Layout types for mega menu dropdowns
|
|
37
|
-
*
|
|
38
|
-
* LAYOUT OPTIONS FOR AI PAGE BUILDER:
|
|
39
|
-
*
|
|
40
|
-
* 1. "animated-image-preview"
|
|
41
|
-
* - Visual: Grid layout with large image preview on left (360px wide), links list on right
|
|
42
|
-
* - Behavior: Image changes on hover based on which link is being hovered over
|
|
43
|
-
* - Best for: Product showcases, visual content navigation, feature highlights
|
|
44
|
-
* - Required data: links[] with label, description, url, image
|
|
45
|
-
* - Example use case: Product categories where each product has a hero image that displays on hover
|
|
46
|
-
*
|
|
47
|
-
* 2. "simple-grid"
|
|
48
|
-
* - Visual: 2-column responsive grid of cards with icons or images
|
|
49
|
-
* - Behavior: Static grid with hover effects on cards
|
|
50
|
-
* - Best for: Feature lists, service offerings, general navigation with icons
|
|
51
|
-
* - Required data: links[] with label, description, url, icon/iconName OR image
|
|
52
|
-
* - Example use case: Features menu showing analytics, reports, dashboards with icons
|
|
53
|
-
*
|
|
54
|
-
* 3. "list-with-icons"
|
|
55
|
-
* - Visual: Single column list of items with small icons on the left
|
|
56
|
-
* - Behavior: Compact list with hover effects
|
|
57
|
-
* - Best for: Simple navigation, documentation links, resource lists
|
|
58
|
-
* - Required data: links[] with label, description (optional), url, icon/iconName
|
|
59
|
-
* - Example use case: Resources menu with documentation, API reference, guides
|
|
60
|
-
*/
|
|
61
|
-
type MegaMenuLayout = "animated-image-preview" | "simple-grid" | "list-with-icons";
|
|
62
|
-
/**
|
|
63
|
-
* Menu link configuration with layout-based dropdown options
|
|
64
|
-
*/
|
|
65
|
-
interface IMenuLink {
|
|
66
|
-
label: React.ReactNode;
|
|
67
|
-
href?: string;
|
|
68
|
-
layout?: MegaMenuLayout;
|
|
69
|
-
links?: ILinkItem[];
|
|
70
|
-
dropdownGroups?: IMenuLinkGroup[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Logo configuration interface
|
|
74
|
-
*/
|
|
75
|
-
interface LogoConfig {
|
|
76
|
-
url?: string;
|
|
77
|
-
desktopSrc?: string;
|
|
78
|
-
mobileSrc?: string;
|
|
79
|
-
alt?: string;
|
|
80
|
-
className?: string;
|
|
81
|
-
}
|
|
82
12
|
/**
|
|
83
13
|
* Props for the NavbarMegaMenu component
|
|
84
14
|
*/
|
|
@@ -127,6 +57,10 @@ interface NavbarMegaMenuProps {
|
|
|
127
57
|
* Actions rendered on the right side (desktop) and bottom (mobile)
|
|
128
58
|
*/
|
|
129
59
|
actions?: ActionConfig[];
|
|
60
|
+
/**
|
|
61
|
+
* Layout variant for the navbar
|
|
62
|
+
*/
|
|
63
|
+
layoutVariant?: NavbarLayoutVariant;
|
|
130
64
|
/**
|
|
131
65
|
* Background style for the section
|
|
132
66
|
*/
|
|
@@ -156,6 +90,6 @@ interface NavbarMegaMenuProps {
|
|
|
156
90
|
* Includes a full-screen mobile menu with slide-in submenus for each category.
|
|
157
91
|
* Ideal for enterprise applications and complex product offerings.
|
|
158
92
|
*/
|
|
159
|
-
declare const NavbarMegaMenu: ({ className, containerClassName, navClassName, navigationMenuListClassName, actionsClassName, logoClassName, mobileMenuClassName, logo, logoSlot, menuLinks, actions, background, spacing, pattern, patternOpacity, optixFlowConfig, }: NavbarMegaMenuProps) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
declare const NavbarMegaMenu: ({ className, containerClassName, navClassName, navigationMenuListClassName, actionsClassName, logoClassName, mobileMenuClassName, logo, logoSlot, menuLinks, actions, layoutVariant, background, spacing, pattern, patternOpacity, optixFlowConfig, }: NavbarMegaMenuProps) => react_jsx_runtime.JSX.Element;
|
|
160
94
|
|
|
161
|
-
export {
|
|
95
|
+
export { IMenuLink, LogoConfig, NavbarMegaMenu, type NavbarMegaMenuProps };
|
|
@@ -2,83 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { P as PatternName } from './pattern-background-a7gKHzHy.js';
|
|
4
4
|
import { SectionBackground, SectionSpacing } from './types.js';
|
|
5
|
+
import { L as LogoConfig, I as IMenuLink, N as NavbarLayoutVariant } from './types-COVDidbn.js';
|
|
6
|
+
export { b as ILinkItem, a as IMenuLinkGroup, M as MegaMenuLayout } from './types-COVDidbn.js';
|
|
5
7
|
import { A as ActionConfig, O as OptixFlowConfig } from './blocks-k17uluAz.js';
|
|
6
8
|
import 'class-variance-authority';
|
|
7
9
|
import './button-variants-lRElsmTc.js';
|
|
8
10
|
import 'class-variance-authority/types';
|
|
9
11
|
|
|
10
|
-
/**
|
|
11
|
-
* SHARED TYPE INTERFACES FOR ALL NAVBAR COMPONENTS
|
|
12
|
-
* These types provide a consistent interface across all navbar blocks
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Base link item - used across all navbar components
|
|
16
|
-
*/
|
|
17
|
-
interface ILinkItem {
|
|
18
|
-
label: React.ReactNode;
|
|
19
|
-
description?: React.ReactNode;
|
|
20
|
-
url: string;
|
|
21
|
-
icon?: React.ReactNode;
|
|
22
|
-
iconName?: string;
|
|
23
|
-
image?: string;
|
|
24
|
-
background?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Group of links with optional metadata
|
|
28
|
-
*/
|
|
29
|
-
interface IMenuLinkGroup {
|
|
30
|
-
label: React.ReactNode;
|
|
31
|
-
description?: string;
|
|
32
|
-
image?: string;
|
|
33
|
-
links: ILinkItem[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Layout types for mega menu dropdowns
|
|
37
|
-
*
|
|
38
|
-
* LAYOUT OPTIONS FOR AI PAGE BUILDER:
|
|
39
|
-
*
|
|
40
|
-
* 1. "animated-image-preview"
|
|
41
|
-
* - Visual: Grid layout with large image preview on left (360px wide), links list on right
|
|
42
|
-
* - Behavior: Image changes on hover based on which link is being hovered over
|
|
43
|
-
* - Best for: Product showcases, visual content navigation, feature highlights
|
|
44
|
-
* - Required data: links[] with label, description, url, image
|
|
45
|
-
* - Example use case: Product categories where each product has a hero image that displays on hover
|
|
46
|
-
*
|
|
47
|
-
* 2. "simple-grid"
|
|
48
|
-
* - Visual: 2-column responsive grid of cards with icons or images
|
|
49
|
-
* - Behavior: Static grid with hover effects on cards
|
|
50
|
-
* - Best for: Feature lists, service offerings, general navigation with icons
|
|
51
|
-
* - Required data: links[] with label, description, url, icon/iconName OR image
|
|
52
|
-
* - Example use case: Features menu showing analytics, reports, dashboards with icons
|
|
53
|
-
*
|
|
54
|
-
* 3. "list-with-icons"
|
|
55
|
-
* - Visual: Single column list of items with small icons on the left
|
|
56
|
-
* - Behavior: Compact list with hover effects
|
|
57
|
-
* - Best for: Simple navigation, documentation links, resource lists
|
|
58
|
-
* - Required data: links[] with label, description (optional), url, icon/iconName
|
|
59
|
-
* - Example use case: Resources menu with documentation, API reference, guides
|
|
60
|
-
*/
|
|
61
|
-
type MegaMenuLayout = "animated-image-preview" | "simple-grid" | "list-with-icons";
|
|
62
|
-
/**
|
|
63
|
-
* Menu link configuration with layout-based dropdown options
|
|
64
|
-
*/
|
|
65
|
-
interface IMenuLink {
|
|
66
|
-
label: React.ReactNode;
|
|
67
|
-
href?: string;
|
|
68
|
-
layout?: MegaMenuLayout;
|
|
69
|
-
links?: ILinkItem[];
|
|
70
|
-
dropdownGroups?: IMenuLinkGroup[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Logo configuration interface
|
|
74
|
-
*/
|
|
75
|
-
interface LogoConfig {
|
|
76
|
-
url?: string;
|
|
77
|
-
desktopSrc?: string;
|
|
78
|
-
mobileSrc?: string;
|
|
79
|
-
alt?: string;
|
|
80
|
-
className?: string;
|
|
81
|
-
}
|
|
82
12
|
/**
|
|
83
13
|
* Props for the NavbarMegaMenu component
|
|
84
14
|
*/
|
|
@@ -127,6 +57,10 @@ interface NavbarMegaMenuProps {
|
|
|
127
57
|
* Actions rendered on the right side (desktop) and bottom (mobile)
|
|
128
58
|
*/
|
|
129
59
|
actions?: ActionConfig[];
|
|
60
|
+
/**
|
|
61
|
+
* Layout variant for the navbar
|
|
62
|
+
*/
|
|
63
|
+
layoutVariant?: NavbarLayoutVariant;
|
|
130
64
|
/**
|
|
131
65
|
* Background style for the section
|
|
132
66
|
*/
|
|
@@ -156,6 +90,6 @@ interface NavbarMegaMenuProps {
|
|
|
156
90
|
* Includes a full-screen mobile menu with slide-in submenus for each category.
|
|
157
91
|
* Ideal for enterprise applications and complex product offerings.
|
|
158
92
|
*/
|
|
159
|
-
declare const NavbarMegaMenu: ({ className, containerClassName, navClassName, navigationMenuListClassName, actionsClassName, logoClassName, mobileMenuClassName, logo, logoSlot, menuLinks, actions, background, spacing, pattern, patternOpacity, optixFlowConfig, }: NavbarMegaMenuProps) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
declare const NavbarMegaMenu: ({ className, containerClassName, navClassName, navigationMenuListClassName, actionsClassName, logoClassName, mobileMenuClassName, logo, logoSlot, menuLinks, actions, layoutVariant, background, spacing, pattern, patternOpacity, optixFlowConfig, }: NavbarMegaMenuProps) => react_jsx_runtime.JSX.Element;
|
|
160
94
|
|
|
161
|
-
export {
|
|
95
|
+
export { IMenuLink, LogoConfig, NavbarMegaMenu, type NavbarMegaMenuProps };
|