@opensite/ui 1.0.1 → 1.0.2
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-enterprise-mega.cjs +336 -336
- package/dist/navbar-enterprise-mega.js +336 -336
- package/dist/navbar-icon-links.cjs +131 -100
- package/dist/navbar-icon-links.js +131 -100
- package/dist/registry.cjs +459 -438
- package/dist/registry.js +459 -438
- package/package.json +6 -1
|
@@ -6,10 +6,10 @@ var clsx = require('clsx');
|
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var img = require('@page-speed/img');
|
|
10
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
11
10
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
12
11
|
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
|
+
var img = require('@page-speed/img');
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -1303,255 +1303,12 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1303
1303
|
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
var MOBILE_BREAKPOINT = 1024;
|
|
1307
|
-
var NavbarEnterpriseMega = ({
|
|
1308
|
-
className,
|
|
1309
|
-
containerClassName,
|
|
1310
|
-
navClassName,
|
|
1311
|
-
navigationMenuClassName,
|
|
1312
|
-
actionsClassName,
|
|
1313
|
-
logoClassName,
|
|
1314
|
-
logo = {
|
|
1315
|
-
url: "/",
|
|
1316
|
-
src: logoPlaceholders.logoMark
|
|
1317
|
-
},
|
|
1318
|
-
logoSlot,
|
|
1319
|
-
menuLinks,
|
|
1320
|
-
actions,
|
|
1321
|
-
actionsSlot,
|
|
1322
|
-
layoutVariant = "fullScreenContainerizedLinks",
|
|
1323
|
-
background,
|
|
1324
|
-
spacing,
|
|
1325
|
-
pattern,
|
|
1326
|
-
patternOpacity,
|
|
1327
|
-
optixFlowConfig
|
|
1328
|
-
}) => {
|
|
1329
|
-
const [open, setOpen] = React.useState(false);
|
|
1330
|
-
React.useEffect(() => {
|
|
1331
|
-
const handleResize = () => {
|
|
1332
|
-
if (window.innerWidth > MOBILE_BREAKPOINT) {
|
|
1333
|
-
setOpen(false);
|
|
1334
|
-
}
|
|
1335
|
-
};
|
|
1336
|
-
handleResize();
|
|
1337
|
-
window.addEventListener("resize", handleResize);
|
|
1338
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
1339
|
-
}, []);
|
|
1340
|
-
React.useEffect(() => {
|
|
1341
|
-
document.body.style.overflow = open ? "hidden" : "auto";
|
|
1342
|
-
}, [open]);
|
|
1343
|
-
const handleMobileMenu = () => {
|
|
1344
|
-
setOpen(!open);
|
|
1345
|
-
};
|
|
1346
|
-
const renderActions = React.useMemo(() => {
|
|
1347
|
-
if (actionsSlot) return actionsSlot;
|
|
1348
|
-
if (!actions || actions.length === 0) return null;
|
|
1349
|
-
return actions.map((action, index) => {
|
|
1350
|
-
const {
|
|
1351
|
-
label,
|
|
1352
|
-
icon,
|
|
1353
|
-
iconAfter,
|
|
1354
|
-
children,
|
|
1355
|
-
className: actionClassName,
|
|
1356
|
-
...pressableProps
|
|
1357
|
-
} = action;
|
|
1358
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Pressable, { className: actionClassName, ...pressableProps, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1359
|
-
icon,
|
|
1360
|
-
label,
|
|
1361
|
-
iconAfter
|
|
1362
|
-
] }) }, index);
|
|
1363
|
-
});
|
|
1364
|
-
}, [actionsSlot, actions]);
|
|
1365
|
-
const {
|
|
1366
|
-
sectionClasses,
|
|
1367
|
-
containerWrapperClasses,
|
|
1368
|
-
innerContainerClasses,
|
|
1369
|
-
navWrapperClasses,
|
|
1370
|
-
sectionContainerClassName,
|
|
1371
|
-
sectionContainerMaxWidth,
|
|
1372
|
-
spacingOverride
|
|
1373
|
-
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1374
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
1375
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1376
|
-
Section,
|
|
1377
|
-
{
|
|
1378
|
-
background,
|
|
1379
|
-
spacing: spacingOverride ?? spacing,
|
|
1380
|
-
className: cn(
|
|
1381
|
-
"pointer-events-auto fixed top-0 z-999 flex w-full items-center justify-center",
|
|
1382
|
-
sectionClasses
|
|
1383
|
-
),
|
|
1384
|
-
pattern,
|
|
1385
|
-
patternOpacity,
|
|
1386
|
-
containerClassName: sectionContainerClassName,
|
|
1387
|
-
containerMaxWidth: sectionContainerMaxWidth,
|
|
1388
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1389
|
-
"nav",
|
|
1390
|
-
{
|
|
1391
|
-
className: cn(
|
|
1392
|
-
"flex h-16 items-center justify-between gap-8",
|
|
1393
|
-
navClassName
|
|
1394
|
-
),
|
|
1395
|
-
children: [
|
|
1396
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
-
NavbarLogo,
|
|
1398
|
-
{
|
|
1399
|
-
logo,
|
|
1400
|
-
logoSlot,
|
|
1401
|
-
logoClassName,
|
|
1402
|
-
optixFlowConfig
|
|
1403
|
-
}
|
|
1404
|
-
),
|
|
1405
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1406
|
-
NavigationMenu,
|
|
1407
|
-
{
|
|
1408
|
-
className: cn(
|
|
1409
|
-
"hidden lg:flex [&>div:last-child]:left-1/2 [&>div:last-child]:-translate-x-1/2",
|
|
1410
|
-
navigationMenuClassName
|
|
1411
|
-
),
|
|
1412
|
-
viewport: true,
|
|
1413
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuList, { children: menuLinks?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1414
|
-
DesktopMenuItem,
|
|
1415
|
-
{
|
|
1416
|
-
item,
|
|
1417
|
-
index,
|
|
1418
|
-
optixFlowConfig
|
|
1419
|
-
},
|
|
1420
|
-
`desktop-link-${index}`
|
|
1421
|
-
)) })
|
|
1422
|
-
}
|
|
1423
|
-
),
|
|
1424
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", actionsClassName), children: [
|
|
1425
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:flex lg:items-center lg:gap-3", children: renderActions }),
|
|
1426
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1427
|
-
Pressable,
|
|
1428
|
-
{
|
|
1429
|
-
className: "size-11",
|
|
1430
|
-
variant: "ghost",
|
|
1431
|
-
size: "icon",
|
|
1432
|
-
asButton: true,
|
|
1433
|
-
onClick: handleMobileMenu,
|
|
1434
|
-
children: open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1435
|
-
DynamicIcon,
|
|
1436
|
-
{
|
|
1437
|
-
name: "lucide/x",
|
|
1438
|
-
size: 22,
|
|
1439
|
-
className: "stroke-foreground"
|
|
1440
|
-
}
|
|
1441
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1442
|
-
DynamicIcon,
|
|
1443
|
-
{
|
|
1444
|
-
name: "lucide/menu",
|
|
1445
|
-
size: 22,
|
|
1446
|
-
className: "stroke-foreground"
|
|
1447
|
-
}
|
|
1448
|
-
)
|
|
1449
|
-
}
|
|
1450
|
-
) })
|
|
1451
|
-
] })
|
|
1452
|
-
]
|
|
1453
|
-
}
|
|
1454
|
-
) }) }) })
|
|
1455
|
-
}
|
|
1456
|
-
),
|
|
1457
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1458
|
-
MobileNavigationMenu,
|
|
1459
|
-
{
|
|
1460
|
-
open,
|
|
1461
|
-
setOpen,
|
|
1462
|
-
menuLinks: menuLinks ?? [],
|
|
1463
|
-
actionsClassName,
|
|
1464
|
-
actions,
|
|
1465
|
-
actionsSlot,
|
|
1466
|
-
optixFlowConfig
|
|
1467
|
-
}
|
|
1468
|
-
)
|
|
1469
|
-
] });
|
|
1470
|
-
};
|
|
1471
|
-
var DesktopMenuItem = ({
|
|
1472
|
-
item,
|
|
1473
|
-
index,
|
|
1474
|
-
optixFlowConfig
|
|
1475
|
-
}) => {
|
|
1476
|
-
const hasDropdown = Boolean(item.layout);
|
|
1477
|
-
const effectiveLayout = item.layout || "solutions-with-platform";
|
|
1478
|
-
if (hasDropdown) {
|
|
1479
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { value: `${index}`, children: [
|
|
1480
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { className: "h-auto bg-transparent px-3 py-2 font-normal hover:bg-muted focus:bg-muted data-[state=open]:bg-muted/50", children: item.label }),
|
|
1481
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "!rounded-xl !border-0 !p-6", children: renderDropdownContent(
|
|
1482
|
-
{ ...item, layout: effectiveLayout },
|
|
1483
|
-
optixFlowConfig
|
|
1484
|
-
) })
|
|
1485
|
-
] }, `desktop-menu-item-${index}`);
|
|
1486
|
-
}
|
|
1487
|
-
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1488
|
-
NavigationMenuLink,
|
|
1489
|
-
{
|
|
1490
|
-
href: item.href,
|
|
1491
|
-
className: "h-auto bg-transparent px-3 py-2 font-normal hover:bg-muted focus:bg-muted",
|
|
1492
|
-
children: item.label
|
|
1493
|
-
}
|
|
1494
|
-
) }, `desktop-menu-item-${index}`);
|
|
1495
|
-
};
|
|
1496
|
-
var renderDropdownContent = (item, optixFlowConfig) => {
|
|
1497
|
-
switch (item.layout) {
|
|
1498
|
-
case "solutions-with-platform":
|
|
1499
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1500
|
-
SolutionsMenu,
|
|
1501
|
-
{
|
|
1502
|
-
solutionCards: item.solutionCards ?? [],
|
|
1503
|
-
platformItems: item.platformItems ?? [],
|
|
1504
|
-
featuredHeroCard: item.featuredHeroCard,
|
|
1505
|
-
optixFlowConfig
|
|
1506
|
-
}
|
|
1507
|
-
);
|
|
1508
|
-
case "products-categorized":
|
|
1509
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1510
|
-
ProductsMenu,
|
|
1511
|
-
{
|
|
1512
|
-
productCategories: item.productCategories ?? [],
|
|
1513
|
-
featuredHeroCard: item.featuredHeroCard,
|
|
1514
|
-
optixFlowConfig
|
|
1515
|
-
}
|
|
1516
|
-
);
|
|
1517
|
-
case "features-with-locations":
|
|
1518
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1519
|
-
GlobalMenu,
|
|
1520
|
-
{
|
|
1521
|
-
featureCategories: item.featureCategories ?? [],
|
|
1522
|
-
regions: item.regions ?? [],
|
|
1523
|
-
featuredHeroCard: item.featuredHeroCard,
|
|
1524
|
-
optixFlowConfig
|
|
1525
|
-
}
|
|
1526
|
-
);
|
|
1527
|
-
case "partners-promotional":
|
|
1528
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1529
|
-
PartnersMenu,
|
|
1530
|
-
{
|
|
1531
|
-
partnerCards: item.partnerCards ?? [],
|
|
1532
|
-
featuredHeroCard: item.featuredHeroCard,
|
|
1533
|
-
optixFlowConfig
|
|
1534
|
-
}
|
|
1535
|
-
);
|
|
1536
|
-
case "resources-with-topics":
|
|
1537
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1538
|
-
ResourcesMenu,
|
|
1539
|
-
{
|
|
1540
|
-
resourceItems: item.resourceItems ?? [],
|
|
1541
|
-
topicGroups: item.topicGroups ?? [],
|
|
1542
|
-
featuredHeroCard: item.featuredHeroCard
|
|
1543
|
-
}
|
|
1544
|
-
);
|
|
1545
|
-
default:
|
|
1546
|
-
return null;
|
|
1547
|
-
}
|
|
1548
|
-
};
|
|
1549
1306
|
var SolutionsMenu = ({
|
|
1550
1307
|
solutionCards,
|
|
1551
1308
|
platformItems,
|
|
1552
1309
|
featuredHeroCard,
|
|
1553
1310
|
optixFlowConfig
|
|
1554
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid
|
|
1311
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-[1200px] grid-cols-2 gap-4", children: [
|
|
1555
1312
|
featuredHeroCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1556
1313
|
Pressable,
|
|
1557
1314
|
{
|
|
@@ -1652,7 +1409,7 @@ var ProductsMenu = ({
|
|
|
1652
1409
|
productCategories,
|
|
1653
1410
|
featuredHeroCard,
|
|
1654
1411
|
optixFlowConfig
|
|
1655
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid
|
|
1412
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-[1100px] grid-cols-[320px_1fr] gap-6", children: [
|
|
1656
1413
|
featuredHeroCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1657
1414
|
Pressable,
|
|
1658
1415
|
{
|
|
@@ -1715,18 +1472,98 @@ var ProductsMenu = ({
|
|
|
1715
1472
|
)) })
|
|
1716
1473
|
] }, category.title)) })
|
|
1717
1474
|
] });
|
|
1718
|
-
var
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
featuredHeroCard
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1475
|
+
var ResourcesMenu = ({
|
|
1476
|
+
resourceItems,
|
|
1477
|
+
topicGroups,
|
|
1478
|
+
featuredHeroCard
|
|
1479
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-[1100px] grid-cols-[280px_1fr_220px] gap-6", children: [
|
|
1480
|
+
featuredHeroCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1481
|
+
Pressable,
|
|
1482
|
+
{
|
|
1483
|
+
href: featuredHeroCard.href,
|
|
1484
|
+
className: cn(
|
|
1485
|
+
"group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
|
|
1486
|
+
featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
|
|
1487
|
+
),
|
|
1488
|
+
children: [
|
|
1489
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-[4/3] w-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1490
|
+
img.Img,
|
|
1491
|
+
{
|
|
1492
|
+
src: featuredHeroCard.image,
|
|
1493
|
+
alt: featuredHeroCard.title,
|
|
1494
|
+
className: "h-full w-full object-cover invert"
|
|
1495
|
+
}
|
|
1496
|
+
) }),
|
|
1497
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col p-5", children: [
|
|
1498
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
|
|
1499
|
+
featuredHeroCard.title,
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1501
|
+
DynamicIcon,
|
|
1502
|
+
{
|
|
1503
|
+
name: "lucide/arrow-right",
|
|
1504
|
+
size: 16,
|
|
1505
|
+
className: "transition-transform group-hover:translate-x-1"
|
|
1506
|
+
}
|
|
1507
|
+
)
|
|
1508
|
+
] }),
|
|
1509
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
|
|
1510
|
+
] })
|
|
1511
|
+
]
|
|
1512
|
+
}
|
|
1513
|
+
) }),
|
|
1514
|
+
resourceItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-1", children: [
|
|
1515
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: "Resources" }) }),
|
|
1516
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3", children: resourceItems.map((resource) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1517
|
+
NavigationMenuLink,
|
|
1518
|
+
{
|
|
1519
|
+
href: resource.href,
|
|
1520
|
+
className: "group col-span-1 !flex !w-full items-start gap-3 rounded-lg border border-border p-3 hover:bg-muted",
|
|
1521
|
+
children: [
|
|
1522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1523
|
+
DynamicIcon,
|
|
1524
|
+
{
|
|
1525
|
+
name: resource.icon,
|
|
1526
|
+
size: 18,
|
|
1527
|
+
className: "mt-0.5 shrink-0"
|
|
1528
|
+
}
|
|
1529
|
+
),
|
|
1530
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium", children: resource.title }),
|
|
1532
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: resource.description })
|
|
1533
|
+
] })
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
resource.id
|
|
1537
|
+
)) })
|
|
1538
|
+
] }),
|
|
1539
|
+
topicGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: topicGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5 last:mb-0", children: [
|
|
1540
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }) }),
|
|
1541
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1542
|
+
NavigationMenuLink,
|
|
1543
|
+
{
|
|
1544
|
+
href: topic.href,
|
|
1545
|
+
className: "group !flex !w-full items-center gap-2 rounded-lg p-2 hover:bg-muted",
|
|
1546
|
+
children: [
|
|
1547
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: topic.icon, size: 14, className: "shrink-0" }),
|
|
1548
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 text-sm font-medium", children: topic.title })
|
|
1549
|
+
]
|
|
1550
|
+
},
|
|
1551
|
+
topic.id
|
|
1552
|
+
)) })
|
|
1553
|
+
] }, group.title)) })
|
|
1554
|
+
] });
|
|
1555
|
+
var GlobalMenu = ({
|
|
1556
|
+
featureCategories,
|
|
1557
|
+
regions,
|
|
1558
|
+
featuredHeroCard,
|
|
1559
|
+
optixFlowConfig
|
|
1560
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[1100px]", children: [
|
|
1561
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[280px_1fr] gap-6", children: [
|
|
1562
|
+
featuredHeroCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1563
|
+
Pressable,
|
|
1564
|
+
{
|
|
1565
|
+
href: featuredHeroCard.href,
|
|
1566
|
+
className: cn(
|
|
1730
1567
|
"group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
|
|
1731
1568
|
featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
|
|
1732
1569
|
),
|
|
@@ -1806,7 +1643,7 @@ var PartnersMenu = ({
|
|
|
1806
1643
|
partnerCards,
|
|
1807
1644
|
featuredHeroCard,
|
|
1808
1645
|
optixFlowConfig
|
|
1809
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid
|
|
1646
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid w-[1000px] grid-cols-[2fr_1fr] gap-6", children: [
|
|
1810
1647
|
featuredHeroCard && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1811
1648
|
Pressable,
|
|
1812
1649
|
{
|
|
@@ -1861,86 +1698,249 @@ var PartnersMenu = ({
|
|
|
1861
1698
|
card.title
|
|
1862
1699
|
)) })
|
|
1863
1700
|
] });
|
|
1864
|
-
var
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1701
|
+
var MOBILE_BREAKPOINT = 1024;
|
|
1702
|
+
var NavbarEnterpriseMega = ({
|
|
1703
|
+
className,
|
|
1704
|
+
containerClassName,
|
|
1705
|
+
navClassName,
|
|
1706
|
+
navigationMenuClassName,
|
|
1707
|
+
actionsClassName,
|
|
1708
|
+
logoClassName,
|
|
1709
|
+
logo = {
|
|
1710
|
+
url: "/",
|
|
1711
|
+
src: logoPlaceholders.logoMark
|
|
1712
|
+
},
|
|
1713
|
+
logoSlot,
|
|
1714
|
+
menuLinks,
|
|
1715
|
+
actions,
|
|
1716
|
+
actionsSlot,
|
|
1717
|
+
layoutVariant = "fullScreenContainerizedLinks",
|
|
1718
|
+
background,
|
|
1719
|
+
spacing,
|
|
1720
|
+
pattern,
|
|
1721
|
+
patternOpacity,
|
|
1722
|
+
optixFlowConfig
|
|
1723
|
+
}) => {
|
|
1724
|
+
const [open, setOpen] = React.useState(false);
|
|
1725
|
+
React.useEffect(() => {
|
|
1726
|
+
const handleResize = () => {
|
|
1727
|
+
if (window.innerWidth > MOBILE_BREAKPOINT) {
|
|
1728
|
+
setOpen(false);
|
|
1729
|
+
}
|
|
1730
|
+
};
|
|
1731
|
+
handleResize();
|
|
1732
|
+
window.addEventListener("resize", handleResize);
|
|
1733
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
1734
|
+
}, []);
|
|
1735
|
+
React.useEffect(() => {
|
|
1736
|
+
document.body.style.overflow = open ? "hidden" : "auto";
|
|
1737
|
+
}, [open]);
|
|
1738
|
+
const handleMobileMenu = () => {
|
|
1739
|
+
setOpen(!open);
|
|
1740
|
+
};
|
|
1741
|
+
const renderActions = React.useMemo(() => {
|
|
1742
|
+
if (actionsSlot) return actionsSlot;
|
|
1743
|
+
if (!actions || actions.length === 0) return null;
|
|
1744
|
+
return actions.map((action, index) => {
|
|
1745
|
+
const {
|
|
1746
|
+
label,
|
|
1747
|
+
icon,
|
|
1748
|
+
iconAfter,
|
|
1749
|
+
children,
|
|
1750
|
+
className: actionClassName,
|
|
1751
|
+
...pressableProps
|
|
1752
|
+
} = action;
|
|
1753
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Pressable, { className: actionClassName, ...pressableProps, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1754
|
+
icon,
|
|
1755
|
+
label,
|
|
1756
|
+
iconAfter
|
|
1757
|
+
] }) }, index);
|
|
1758
|
+
});
|
|
1759
|
+
}, [actionsSlot, actions]);
|
|
1760
|
+
const {
|
|
1761
|
+
sectionClasses,
|
|
1762
|
+
containerWrapperClasses,
|
|
1763
|
+
innerContainerClasses,
|
|
1764
|
+
navWrapperClasses,
|
|
1765
|
+
sectionContainerClassName,
|
|
1766
|
+
sectionContainerMaxWidth,
|
|
1767
|
+
spacingOverride
|
|
1768
|
+
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1769
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
1770
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
|
+
Section,
|
|
1772
|
+
{
|
|
1773
|
+
background,
|
|
1774
|
+
spacing: spacingOverride ?? spacing,
|
|
1775
|
+
className: cn(
|
|
1776
|
+
"pointer-events-auto fixed top-0 z-999 flex w-full items-center justify-center",
|
|
1777
|
+
sectionClasses
|
|
1778
|
+
),
|
|
1779
|
+
pattern,
|
|
1780
|
+
patternOpacity,
|
|
1781
|
+
containerClassName: sectionContainerClassName,
|
|
1782
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1783
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1784
|
+
"nav",
|
|
1880
1785
|
{
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1786
|
+
className: cn(
|
|
1787
|
+
"flex h-16 items-center justify-between gap-8",
|
|
1788
|
+
navClassName
|
|
1789
|
+
),
|
|
1790
|
+
children: [
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1792
|
+
NavbarLogo,
|
|
1793
|
+
{
|
|
1794
|
+
logo,
|
|
1795
|
+
logoSlot,
|
|
1796
|
+
logoClassName,
|
|
1797
|
+
optixFlowConfig
|
|
1798
|
+
}
|
|
1799
|
+
),
|
|
1800
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1801
|
+
NavigationMenu,
|
|
1802
|
+
{
|
|
1803
|
+
className: cn(
|
|
1804
|
+
"hidden lg:flex [&>div:last-child]:left-1/2 [&>div:last-child]:-translate-x-1/2",
|
|
1805
|
+
navigationMenuClassName
|
|
1806
|
+
),
|
|
1807
|
+
viewport: true,
|
|
1808
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuList, { children: menuLinks?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1809
|
+
DesktopMenuItem,
|
|
1810
|
+
{
|
|
1811
|
+
item,
|
|
1812
|
+
index,
|
|
1813
|
+
optixFlowConfig
|
|
1814
|
+
},
|
|
1815
|
+
`desktop-link-${index}`
|
|
1816
|
+
)) })
|
|
1817
|
+
}
|
|
1818
|
+
),
|
|
1819
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", actionsClassName), children: [
|
|
1820
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:flex lg:items-center lg:gap-3", children: renderActions }),
|
|
1821
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
|
+
Pressable,
|
|
1823
|
+
{
|
|
1824
|
+
className: "size-11",
|
|
1825
|
+
variant: "ghost",
|
|
1826
|
+
size: "icon",
|
|
1827
|
+
asButton: true,
|
|
1828
|
+
onClick: handleMobileMenu,
|
|
1829
|
+
children: open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1830
|
+
DynamicIcon,
|
|
1831
|
+
{
|
|
1832
|
+
name: "lucide/x",
|
|
1833
|
+
size: 22,
|
|
1834
|
+
className: "stroke-foreground"
|
|
1835
|
+
}
|
|
1836
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1837
|
+
DynamicIcon,
|
|
1838
|
+
{
|
|
1839
|
+
name: "lucide/menu",
|
|
1840
|
+
size: 22,
|
|
1841
|
+
className: "stroke-foreground"
|
|
1842
|
+
}
|
|
1843
|
+
)
|
|
1844
|
+
}
|
|
1845
|
+
) })
|
|
1846
|
+
] })
|
|
1847
|
+
]
|
|
1884
1848
|
}
|
|
1885
|
-
) })
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
DynamicIcon,
|
|
1891
|
-
{
|
|
1892
|
-
name: "lucide/arrow-right",
|
|
1893
|
-
size: 16,
|
|
1894
|
-
className: "transition-transform group-hover:translate-x-1"
|
|
1895
|
-
}
|
|
1896
|
-
)
|
|
1897
|
-
] }),
|
|
1898
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
|
|
1899
|
-
] })
|
|
1900
|
-
]
|
|
1901
|
-
}
|
|
1902
|
-
) }),
|
|
1903
|
-
resourceItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-1", children: [
|
|
1904
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: "Resources" }) }),
|
|
1905
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3", children: resourceItems.map((resource) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1906
|
-
NavigationMenuLink,
|
|
1907
|
-
{
|
|
1908
|
-
href: resource.href,
|
|
1909
|
-
className: "group col-span-1 !flex !w-full items-start gap-3 rounded-lg border border-border p-3 hover:bg-muted",
|
|
1910
|
-
children: [
|
|
1911
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1912
|
-
DynamicIcon,
|
|
1913
|
-
{
|
|
1914
|
-
name: resource.icon,
|
|
1915
|
-
size: 18,
|
|
1916
|
-
className: "mt-0.5 shrink-0"
|
|
1917
|
-
}
|
|
1918
|
-
),
|
|
1919
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1920
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium", children: resource.title }),
|
|
1921
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: resource.description })
|
|
1922
|
-
] })
|
|
1923
|
-
]
|
|
1924
|
-
},
|
|
1925
|
-
resource.id
|
|
1926
|
-
)) })
|
|
1927
|
-
] }),
|
|
1928
|
-
topicGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: topicGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5 last:mb-0", children: [
|
|
1929
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }) }),
|
|
1930
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1931
|
-
NavigationMenuLink,
|
|
1849
|
+
) }) }) })
|
|
1850
|
+
}
|
|
1851
|
+
),
|
|
1852
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1853
|
+
MobileNavigationMenu,
|
|
1932
1854
|
{
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
)
|
|
1942
|
-
] }
|
|
1943
|
-
|
|
1855
|
+
open,
|
|
1856
|
+
setOpen,
|
|
1857
|
+
menuLinks: menuLinks ?? [],
|
|
1858
|
+
actionsClassName,
|
|
1859
|
+
actions,
|
|
1860
|
+
actionsSlot,
|
|
1861
|
+
optixFlowConfig
|
|
1862
|
+
}
|
|
1863
|
+
)
|
|
1864
|
+
] });
|
|
1865
|
+
};
|
|
1866
|
+
var DesktopMenuItem = ({
|
|
1867
|
+
item,
|
|
1868
|
+
index,
|
|
1869
|
+
optixFlowConfig
|
|
1870
|
+
}) => {
|
|
1871
|
+
const hasDropdown = Boolean(item.layout);
|
|
1872
|
+
const effectiveLayout = item.layout || "solutions-with-platform";
|
|
1873
|
+
if (hasDropdown) {
|
|
1874
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { value: `${index}`, children: [
|
|
1875
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { className: "h-auto bg-transparent px-3 py-2 font-normal hover:bg-muted focus:bg-muted data-[state=open]:bg-muted/50", children: item.label }),
|
|
1876
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "!rounded-xl !border-0 !p-6", children: renderDropdownContent(
|
|
1877
|
+
{ ...item, layout: effectiveLayout },
|
|
1878
|
+
optixFlowConfig
|
|
1879
|
+
) })
|
|
1880
|
+
] }, `desktop-menu-item-${index}`);
|
|
1881
|
+
}
|
|
1882
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1883
|
+
NavigationMenuLink,
|
|
1884
|
+
{
|
|
1885
|
+
href: item.href,
|
|
1886
|
+
className: "h-auto bg-transparent px-3 py-2 font-normal hover:bg-muted focus:bg-muted",
|
|
1887
|
+
children: item.label
|
|
1888
|
+
}
|
|
1889
|
+
) }, `desktop-menu-item-${index}`);
|
|
1890
|
+
};
|
|
1891
|
+
var renderDropdownContent = (item, optixFlowConfig) => {
|
|
1892
|
+
switch (item.layout) {
|
|
1893
|
+
case "solutions-with-platform":
|
|
1894
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1895
|
+
SolutionsMenu,
|
|
1896
|
+
{
|
|
1897
|
+
solutionCards: item.solutionCards ?? [],
|
|
1898
|
+
platformItems: item.platformItems ?? [],
|
|
1899
|
+
featuredHeroCard: item.featuredHeroCard,
|
|
1900
|
+
optixFlowConfig
|
|
1901
|
+
}
|
|
1902
|
+
);
|
|
1903
|
+
case "products-categorized":
|
|
1904
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1905
|
+
ProductsMenu,
|
|
1906
|
+
{
|
|
1907
|
+
productCategories: item.productCategories ?? [],
|
|
1908
|
+
featuredHeroCard: item.featuredHeroCard,
|
|
1909
|
+
optixFlowConfig
|
|
1910
|
+
}
|
|
1911
|
+
);
|
|
1912
|
+
case "features-with-locations":
|
|
1913
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1914
|
+
GlobalMenu,
|
|
1915
|
+
{
|
|
1916
|
+
featureCategories: item.featureCategories ?? [],
|
|
1917
|
+
regions: item.regions ?? [],
|
|
1918
|
+
featuredHeroCard: item.featuredHeroCard,
|
|
1919
|
+
optixFlowConfig
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
case "partners-promotional":
|
|
1923
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1924
|
+
PartnersMenu,
|
|
1925
|
+
{
|
|
1926
|
+
partnerCards: item.partnerCards ?? [],
|
|
1927
|
+
featuredHeroCard: item.featuredHeroCard,
|
|
1928
|
+
optixFlowConfig
|
|
1929
|
+
}
|
|
1930
|
+
);
|
|
1931
|
+
case "resources-with-topics":
|
|
1932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
|
+
ResourcesMenu,
|
|
1934
|
+
{
|
|
1935
|
+
resourceItems: item.resourceItems ?? [],
|
|
1936
|
+
topicGroups: item.topicGroups ?? [],
|
|
1937
|
+
featuredHeroCard: item.featuredHeroCard
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
1940
|
+
default:
|
|
1941
|
+
return null;
|
|
1942
|
+
}
|
|
1943
|
+
};
|
|
1944
1944
|
var renderMobileDropdownContent = (item) => {
|
|
1945
1945
|
switch (item.layout) {
|
|
1946
1946
|
case "solutions-with-platform":
|