@opensite/ui 1.0.7 → 1.0.9
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 +16 -16
- package/dist/navbar-animated-preview.js +16 -16
- package/dist/navbar-centered-menu.cjs +1 -1
- package/dist/navbar-centered-menu.js +1 -1
- package/dist/navbar-dark-icons.cjs +1 -1
- package/dist/navbar-dark-icons.js +1 -1
- package/dist/navbar-dropdown-menu.cjs +1 -1
- package/dist/navbar-dropdown-menu.js +1 -1
- package/dist/navbar-education-platform.cjs +278 -236
- package/dist/navbar-education-platform.d.cts +61 -36
- package/dist/navbar-education-platform.d.ts +61 -36
- package/dist/navbar-education-platform.js +279 -237
- package/dist/navbar-enterprise-mega.cjs +6 -6
- package/dist/navbar-enterprise-mega.js +6 -6
- package/dist/navbar-feature-grid.cjs +1 -1
- package/dist/navbar-feature-grid.js +1 -1
- package/dist/navbar-icon-links.cjs +2 -1
- package/dist/navbar-icon-links.js +2 -1
- package/dist/navbar-image-preview.cjs +129 -50
- package/dist/navbar-image-preview.js +128 -50
- package/dist/navbar-mega-menu.cjs +1 -1
- package/dist/navbar-mega-menu.js +1 -1
- package/dist/navbar-multi-column-groups.cjs +53 -49
- package/dist/navbar-multi-column-groups.js +53 -49
- package/dist/navbar-platform-resources.cjs +5 -4
- package/dist/navbar-platform-resources.js +5 -4
- package/dist/navbar-search-focused.cjs +1 -1
- package/dist/navbar-search-focused.js +1 -1
- package/dist/navbar-sidebar-mobile.cjs +235 -166
- package/dist/navbar-sidebar-mobile.js +236 -167
- package/dist/navbar-simple-links.cjs +228 -184
- package/dist/navbar-simple-links.d.cts +15 -3
- package/dist/navbar-simple-links.d.ts +15 -3
- package/dist/navbar-simple-links.js +228 -183
- package/dist/navbar-split-cta.cjs +3 -3
- package/dist/navbar-split-cta.js +3 -3
- package/dist/navbar-sticky-compact.cjs +1 -1
- package/dist/navbar-sticky-compact.js +1 -1
- package/dist/navbar-tabbed-sections.cjs +1 -1
- package/dist/navbar-tabbed-sections.js +1 -1
- package/dist/navbar-transparent-overlay.cjs +244 -123
- package/dist/navbar-transparent-overlay.d.cts +30 -1
- package/dist/navbar-transparent-overlay.d.ts +30 -1
- package/dist/navbar-transparent-overlay.js +244 -123
- package/dist/registry.cjs +1008 -894
- package/dist/registry.js +1008 -894
- package/package.json +1 -1
|
@@ -1214,6 +1214,62 @@ var NavbarLogo = ({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
);
|
|
1216
1216
|
};
|
|
1217
|
+
var NavbarMobileMenu = ({
|
|
1218
|
+
open,
|
|
1219
|
+
onClose,
|
|
1220
|
+
children,
|
|
1221
|
+
className,
|
|
1222
|
+
contentClassName,
|
|
1223
|
+
title = "Mobile Navigation"
|
|
1224
|
+
}) => {
|
|
1225
|
+
React__namespace.useEffect(() => {
|
|
1226
|
+
if (open) {
|
|
1227
|
+
const originalOverflow = document.body.style.overflow;
|
|
1228
|
+
document.body.style.overflow = "hidden";
|
|
1229
|
+
return () => {
|
|
1230
|
+
document.body.style.overflow = originalOverflow;
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
}, [open]);
|
|
1234
|
+
if (!open) return null;
|
|
1235
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1236
|
+
"div",
|
|
1237
|
+
{
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"fixed inset-0 z-998 flex flex-col bg-background",
|
|
1240
|
+
"animate-in slide-in-from-top duration-300",
|
|
1241
|
+
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=closed]:duration-300",
|
|
1242
|
+
className
|
|
1243
|
+
),
|
|
1244
|
+
"data-state": open ? "open" : "closed",
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }) }),
|
|
1247
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1248
|
+
"button",
|
|
1249
|
+
{
|
|
1250
|
+
onClick: onClose,
|
|
1251
|
+
className: "flex size-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
|
|
1252
|
+
"aria-label": "Close mobile menu",
|
|
1253
|
+
children: [
|
|
1254
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1255
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1256
|
+
]
|
|
1257
|
+
}
|
|
1258
|
+
) }),
|
|
1259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1260
|
+
"div",
|
|
1261
|
+
{
|
|
1262
|
+
className: cn(
|
|
1263
|
+
"h-full overflow-y-auto pt-20 pb-8 px-4 sm:px-6",
|
|
1264
|
+
contentClassName
|
|
1265
|
+
),
|
|
1266
|
+
children
|
|
1267
|
+
}
|
|
1268
|
+
)
|
|
1269
|
+
]
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
};
|
|
1217
1273
|
|
|
1218
1274
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1219
1275
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1250,6 +1306,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1250
1306
|
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1251
1307
|
};
|
|
1252
1308
|
}
|
|
1309
|
+
var MOBILE_BREAKPOINT = 1024;
|
|
1253
1310
|
var NavbarEducationPlatform = ({
|
|
1254
1311
|
className,
|
|
1255
1312
|
containerClassName,
|
|
@@ -1260,12 +1317,12 @@ var NavbarEducationPlatform = ({
|
|
|
1260
1317
|
mobileMenuClassName,
|
|
1261
1318
|
logo,
|
|
1262
1319
|
logoSlot,
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
company,
|
|
1266
|
-
featuredImage,
|
|
1320
|
+
menu,
|
|
1321
|
+
menuSlot,
|
|
1267
1322
|
authActions,
|
|
1268
1323
|
authActionsSlot,
|
|
1324
|
+
mobileAuthActions,
|
|
1325
|
+
mobileAuthActionsSlot,
|
|
1269
1326
|
layoutVariant = "fullScreenContainerizedLinks",
|
|
1270
1327
|
background,
|
|
1271
1328
|
spacing,
|
|
@@ -1274,6 +1331,33 @@ var NavbarEducationPlatform = ({
|
|
|
1274
1331
|
optixFlowConfig
|
|
1275
1332
|
}) => {
|
|
1276
1333
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
1334
|
+
React.useEffect(() => {
|
|
1335
|
+
if (typeof window === "undefined") return;
|
|
1336
|
+
const handleResize = () => {
|
|
1337
|
+
if (window.innerWidth > MOBILE_BREAKPOINT) {
|
|
1338
|
+
setIsOpen(false);
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
|
+
handleResize();
|
|
1342
|
+
window.addEventListener("resize", handleResize);
|
|
1343
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
1344
|
+
}, []);
|
|
1345
|
+
const handleMobileMenuClose = () => {
|
|
1346
|
+
setIsOpen(false);
|
|
1347
|
+
};
|
|
1348
|
+
const renderNavigation = React.useMemo(() => {
|
|
1349
|
+
if (menuSlot) return menuSlot;
|
|
1350
|
+
if (!menu || menu.length === 0) return null;
|
|
1351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuList, { children: menu.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1352
|
+
DesktopMenuItem,
|
|
1353
|
+
{
|
|
1354
|
+
item,
|
|
1355
|
+
index,
|
|
1356
|
+
optixFlowConfig
|
|
1357
|
+
},
|
|
1358
|
+
`desktop-link-${index}`
|
|
1359
|
+
)) });
|
|
1360
|
+
}, [menuSlot, menu, optixFlowConfig]);
|
|
1277
1361
|
const renderAuthActions = React.useMemo(() => {
|
|
1278
1362
|
if (authActionsSlot) return authActionsSlot;
|
|
1279
1363
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1302,18 +1386,18 @@ var NavbarEducationPlatform = ({
|
|
|
1302
1386
|
sectionContainerMaxWidth,
|
|
1303
1387
|
spacingOverride
|
|
1304
1388
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1305
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
/* @__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
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1390
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
+
Section,
|
|
1392
|
+
{
|
|
1393
|
+
background,
|
|
1394
|
+
spacing: spacingOverride ?? spacing,
|
|
1395
|
+
className: sectionClasses,
|
|
1396
|
+
pattern,
|
|
1397
|
+
patternOpacity,
|
|
1398
|
+
containerClassName: sectionContainerClassName,
|
|
1399
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1400
|
+
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(
|
|
1317
1401
|
"nav",
|
|
1318
1402
|
{
|
|
1319
1403
|
className: cn(
|
|
@@ -1338,130 +1422,7 @@ var NavbarEducationPlatform = ({
|
|
|
1338
1422
|
"hidden items-center gap-1.5 lg:flex",
|
|
1339
1423
|
navigationMenuClassName
|
|
1340
1424
|
),
|
|
1341
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu, { delayDuration: 0,
|
|
1342
|
-
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { children: [
|
|
1343
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { children: "Products" }),
|
|
1344
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
|
|
1345
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
1346
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "TOOLS" }),
|
|
1347
|
-
features?.map((feature) => /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1348
|
-
Pressable,
|
|
1349
|
-
{
|
|
1350
|
-
href: feature.link,
|
|
1351
|
-
className: "group flex cursor-pointer flex-row gap-3",
|
|
1352
|
-
children: [
|
|
1353
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1354
|
-
DynamicIcon,
|
|
1355
|
-
{
|
|
1356
|
-
name: feature.icon,
|
|
1357
|
-
size: 20
|
|
1358
|
-
}
|
|
1359
|
-
) }),
|
|
1360
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
1361
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1362
|
-
feature.title,
|
|
1363
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1364
|
-
DynamicIcon,
|
|
1365
|
-
{
|
|
1366
|
-
name: "lucide/chevron-right",
|
|
1367
|
-
size: 16,
|
|
1368
|
-
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1369
|
-
}
|
|
1370
|
-
)
|
|
1371
|
-
] }),
|
|
1372
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: feature.description })
|
|
1373
|
-
] })
|
|
1374
|
-
]
|
|
1375
|
-
}
|
|
1376
|
-
) }, feature.title))
|
|
1377
|
-
] }),
|
|
1378
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1379
|
-
Separator,
|
|
1380
|
-
{
|
|
1381
|
-
orientation: "vertical",
|
|
1382
|
-
className: "data-[orientation=vertical]:h-auto"
|
|
1383
|
-
}
|
|
1384
|
-
),
|
|
1385
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
1386
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "QUICK START" }),
|
|
1387
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
1388
|
-
featuredImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1389
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-5 mb-3 text-[10px] text-muted-foreground uppercase", children: "LATEST UPDATES" }),
|
|
1390
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: featuredImage.href || "#", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-primary p-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
-
img.Img,
|
|
1392
|
-
{
|
|
1393
|
-
src: featuredImage.src,
|
|
1394
|
-
alt: featuredImage.alt || "Featured update",
|
|
1395
|
-
className: "aspect-video min-w-52 rounded-md object-cover",
|
|
1396
|
-
optixFlowConfig
|
|
1397
|
-
}
|
|
1398
|
-
) }) }) })
|
|
1399
|
-
] })
|
|
1400
|
-
] })
|
|
1401
|
-
] }) })
|
|
1402
|
-
] }),
|
|
1403
|
-
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { children: [
|
|
1404
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { children: "Support" }),
|
|
1405
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
|
|
1406
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
1407
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "GUIDES" }),
|
|
1408
|
-
docs?.map((doc) => /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1409
|
-
Pressable,
|
|
1410
|
-
{
|
|
1411
|
-
href: doc.link,
|
|
1412
|
-
className: "group flex flex-row gap-3",
|
|
1413
|
-
children: [
|
|
1414
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: doc.icon, size: 20 }) }),
|
|
1415
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
1416
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1417
|
-
doc.title,
|
|
1418
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1419
|
-
DynamicIcon,
|
|
1420
|
-
{
|
|
1421
|
-
name: "lucide/chevron-right",
|
|
1422
|
-
size: 16,
|
|
1423
|
-
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1424
|
-
}
|
|
1425
|
-
)
|
|
1426
|
-
] }),
|
|
1427
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: doc.description })
|
|
1428
|
-
] })
|
|
1429
|
-
]
|
|
1430
|
-
}
|
|
1431
|
-
) }, doc.title))
|
|
1432
|
-
] }),
|
|
1433
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1434
|
-
Separator,
|
|
1435
|
-
{
|
|
1436
|
-
orientation: "vertical",
|
|
1437
|
-
className: "data-[orientation=vertical]:h-auto"
|
|
1438
|
-
}
|
|
1439
|
-
),
|
|
1440
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
1441
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "ABOUT US" }),
|
|
1442
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: company?.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1443
|
-
Pressable,
|
|
1444
|
-
{
|
|
1445
|
-
href: item.link,
|
|
1446
|
-
className: "flex flex-row items-center gap-3",
|
|
1447
|
-
children: [
|
|
1448
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.icon, size: 16 }),
|
|
1449
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: item.title })
|
|
1450
|
-
]
|
|
1451
|
-
}
|
|
1452
|
-
) }, item.title)) })
|
|
1453
|
-
] })
|
|
1454
|
-
] }) })
|
|
1455
|
-
] }),
|
|
1456
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1457
|
-
NavigationMenuLink,
|
|
1458
|
-
{
|
|
1459
|
-
asChild: true,
|
|
1460
|
-
className: navigationMenuTriggerStyle(),
|
|
1461
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: "#", children: "About" })
|
|
1462
|
-
}
|
|
1463
|
-
) })
|
|
1464
|
-
] }) })
|
|
1425
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu, { delayDuration: 0, viewport: false, children: renderNavigation })
|
|
1465
1426
|
}
|
|
1466
1427
|
)
|
|
1467
1428
|
] }),
|
|
@@ -1475,113 +1436,194 @@ var NavbarEducationPlatform = ({
|
|
|
1475
1436
|
children: renderAuthActions
|
|
1476
1437
|
}
|
|
1477
1438
|
),
|
|
1478
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1439
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1479
1440
|
Pressable,
|
|
1480
1441
|
{
|
|
1481
|
-
|
|
1442
|
+
className: "size-11",
|
|
1443
|
+
variant: "ghost",
|
|
1482
1444
|
size: "icon",
|
|
1483
1445
|
asButton: true,
|
|
1484
|
-
className: "lg:hidden",
|
|
1485
1446
|
onClick: () => setIsOpen(!isOpen),
|
|
1486
|
-
children:
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1447
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1448
|
+
DynamicIcon,
|
|
1449
|
+
{
|
|
1450
|
+
name: "lucide/menu",
|
|
1451
|
+
size: 22,
|
|
1452
|
+
className: "stroke-foreground"
|
|
1453
|
+
}
|
|
1454
|
+
)
|
|
1490
1455
|
}
|
|
1491
|
-
)
|
|
1456
|
+
) })
|
|
1492
1457
|
]
|
|
1493
1458
|
}
|
|
1494
|
-
) }) }) })
|
|
1495
|
-
|
|
1496
|
-
|
|
1459
|
+
) }) }) })
|
|
1460
|
+
}
|
|
1461
|
+
),
|
|
1462
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1463
|
+
MobileNavigationMenu,
|
|
1464
|
+
{
|
|
1465
|
+
open: isOpen,
|
|
1466
|
+
onClose: handleMobileMenuClose,
|
|
1467
|
+
menu: menu ?? [],
|
|
1468
|
+
mobileAuthActions,
|
|
1469
|
+
mobileAuthActionsSlot,
|
|
1470
|
+
mobileMenuClassName
|
|
1471
|
+
}
|
|
1472
|
+
)
|
|
1473
|
+
] });
|
|
1474
|
+
};
|
|
1475
|
+
var DesktopMenuItem = ({
|
|
1476
|
+
item,
|
|
1477
|
+
index,
|
|
1478
|
+
optixFlowConfig
|
|
1479
|
+
}) => {
|
|
1480
|
+
if (item.groups && item.groups.length > 0) {
|
|
1481
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { value: `${index}`, children: [
|
|
1482
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { children: item.label }),
|
|
1483
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
1484
|
+
groupIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1485
|
+
Separator,
|
|
1497
1486
|
{
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
)) })
|
|
1525
|
-
] }),
|
|
1526
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
1527
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "QUICK START" }) })
|
|
1528
|
-
] }) })
|
|
1529
|
-
] }),
|
|
1530
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: "support", className: "last:border-b", children: [
|
|
1531
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "pr-2.5 text-base font-medium hover:no-underline", children: "Support" }),
|
|
1532
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1533
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1534
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "GUIDES" }),
|
|
1535
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: docs?.map((doc) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1536
|
-
Pressable,
|
|
1537
|
-
{
|
|
1538
|
-
href: doc.link,
|
|
1539
|
-
className: "group flex cursor-pointer flex-row gap-3 rounded-md transition-colors",
|
|
1540
|
-
onClick: () => setIsOpen(false),
|
|
1541
|
-
children: [
|
|
1542
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: doc.icon, size: 16 }) }),
|
|
1543
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
1544
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-tight font-medium", children: doc.title }),
|
|
1545
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs leading-tight text-muted-foreground", children: doc.description })
|
|
1546
|
-
] })
|
|
1547
|
-
]
|
|
1548
|
-
},
|
|
1549
|
-
doc.title
|
|
1550
|
-
)) })
|
|
1551
|
-
] }),
|
|
1552
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
1553
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1554
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "ABOUT US" }),
|
|
1555
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: company?.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1556
|
-
Pressable,
|
|
1557
|
-
{
|
|
1558
|
-
href: item.link,
|
|
1559
|
-
className: "flex cursor-pointer flex-row items-center gap-3 rounded-md transition-colors",
|
|
1560
|
-
onClick: () => setIsOpen(false),
|
|
1561
|
-
children: [
|
|
1562
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.icon, size: 16 }),
|
|
1563
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: item.title })
|
|
1564
|
-
]
|
|
1565
|
-
},
|
|
1566
|
-
item.title
|
|
1567
|
-
)) })
|
|
1568
|
-
] })
|
|
1569
|
-
] }) })
|
|
1487
|
+
orientation: "vertical",
|
|
1488
|
+
className: "data-[orientation=vertical]:h-auto"
|
|
1489
|
+
}
|
|
1490
|
+
),
|
|
1491
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
1492
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: group.label }),
|
|
1493
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1494
|
+
Pressable,
|
|
1495
|
+
{
|
|
1496
|
+
href: link.href,
|
|
1497
|
+
className: "group flex cursor-pointer flex-row gap-3",
|
|
1498
|
+
children: [
|
|
1499
|
+
link.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: link.icon, size: 20 }) }),
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
1501
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1502
|
+
link.title,
|
|
1503
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1504
|
+
DynamicIcon,
|
|
1505
|
+
{
|
|
1506
|
+
name: "lucide/chevron-right",
|
|
1507
|
+
size: 16,
|
|
1508
|
+
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1509
|
+
}
|
|
1510
|
+
)
|
|
1511
|
+
] }),
|
|
1512
|
+
link.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: link.description })
|
|
1570
1513
|
] })
|
|
1571
|
-
]
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1514
|
+
]
|
|
1515
|
+
}
|
|
1516
|
+
) }, link.title)) }),
|
|
1517
|
+
group.featuredImage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: group.featuredImage.href || "#", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted p-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1518
|
+
img.Img,
|
|
1519
|
+
{
|
|
1520
|
+
src: group.featuredImage.src,
|
|
1521
|
+
alt: group.featuredImage.alt || "Featured image",
|
|
1522
|
+
className: "aspect-video w-full max-w-[240px] rounded-md object-cover object-center",
|
|
1523
|
+
optixFlowConfig
|
|
1524
|
+
}
|
|
1525
|
+
) }) }) }) })
|
|
1526
|
+
] })
|
|
1527
|
+
] }, `group-${groupIndex}`)) }) })
|
|
1528
|
+
] }, `desktop-menu-item-${index}`);
|
|
1529
|
+
}
|
|
1530
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, className: navigationMenuTriggerStyle(), children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: item.href, children: item.label }) }) }, `desktop-menu-item-${index}`);
|
|
1531
|
+
};
|
|
1532
|
+
var MobileNavigationMenu = ({
|
|
1533
|
+
open,
|
|
1534
|
+
onClose,
|
|
1535
|
+
menu,
|
|
1536
|
+
mobileAuthActions,
|
|
1537
|
+
mobileAuthActionsSlot,
|
|
1538
|
+
mobileMenuClassName
|
|
1539
|
+
}) => {
|
|
1540
|
+
const renderMobileAuthActions = React.useMemo(() => {
|
|
1541
|
+
if (mobileAuthActionsSlot) return mobileAuthActionsSlot;
|
|
1542
|
+
if (!mobileAuthActions || mobileAuthActions.length === 0) return null;
|
|
1543
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4", children: mobileAuthActions.map((action, index) => {
|
|
1544
|
+
const {
|
|
1545
|
+
label,
|
|
1546
|
+
icon,
|
|
1547
|
+
iconAfter,
|
|
1548
|
+
children,
|
|
1549
|
+
className: actionClassName,
|
|
1550
|
+
...pressableProps
|
|
1551
|
+
} = action;
|
|
1552
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1553
|
+
Pressable,
|
|
1554
|
+
{
|
|
1555
|
+
asButton: true,
|
|
1556
|
+
className: cn("w-full", actionClassName),
|
|
1557
|
+
onClick: onClose,
|
|
1558
|
+
...pressableProps,
|
|
1559
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1560
|
+
icon,
|
|
1561
|
+
label,
|
|
1562
|
+
iconAfter
|
|
1563
|
+
] })
|
|
1564
|
+
},
|
|
1565
|
+
index
|
|
1566
|
+
);
|
|
1567
|
+
}) });
|
|
1568
|
+
}, [mobileAuthActionsSlot, mobileAuthActions, onClose]);
|
|
1569
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1570
|
+
NavbarMobileMenu,
|
|
1571
|
+
{
|
|
1572
|
+
open,
|
|
1573
|
+
onClose,
|
|
1574
|
+
title: "Mobile Navigation",
|
|
1575
|
+
className: mobileMenuClassName,
|
|
1576
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1577
|
+
/* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "multiple", className: "w-full", children: menu.map((item, index) => {
|
|
1578
|
+
if (item.groups && item.groups.length > 0) {
|
|
1579
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1580
|
+
AccordionItem,
|
|
1581
|
+
{
|
|
1582
|
+
value: `nav-${index}`,
|
|
1583
|
+
className: "border-b-0",
|
|
1584
|
+
children: [
|
|
1585
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "h-15 items-center p-0 px-4! text-base leading-[3.75] font-normal text-muted-foreground hover:bg-muted hover:no-underline", children: item.label }),
|
|
1586
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
1587
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 px-4 text-[10px] text-muted-foreground uppercase", children: group.label }),
|
|
1588
|
+
group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1589
|
+
Pressable,
|
|
1590
|
+
{
|
|
1591
|
+
href: link.href,
|
|
1592
|
+
className: "flex min-h-12 items-center gap-2 rounded-lg px-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
|
|
1593
|
+
onClick: onClose,
|
|
1594
|
+
children: [
|
|
1595
|
+
link.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
|
+
DynamicIcon,
|
|
1597
|
+
{
|
|
1598
|
+
name: link.icon,
|
|
1599
|
+
size: 16,
|
|
1600
|
+
className: "stroke-muted-foreground"
|
|
1601
|
+
}
|
|
1602
|
+
),
|
|
1603
|
+
link.title
|
|
1604
|
+
]
|
|
1605
|
+
},
|
|
1606
|
+
link.title
|
|
1607
|
+
))
|
|
1608
|
+
] }, `mobile-group-${groupIndex}`)) })
|
|
1609
|
+
]
|
|
1610
|
+
},
|
|
1611
|
+
`nav-item-${index}`
|
|
1612
|
+
);
|
|
1582
1613
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1614
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1615
|
+
Pressable,
|
|
1616
|
+
{
|
|
1617
|
+
href: item.href,
|
|
1618
|
+
className: "flex h-15 items-center rounded-md p-0 px-4 text-left text-base leading-[3.75] font-normal text-muted-foreground ring-ring/10 outline-ring/50 transition-all hover:bg-muted focus-visible:ring-4 focus-visible:outline-1",
|
|
1619
|
+
onClick: onClose,
|
|
1620
|
+
children: item.label
|
|
1621
|
+
},
|
|
1622
|
+
`nav-link-${index}`
|
|
1623
|
+
);
|
|
1624
|
+
}) }),
|
|
1625
|
+
renderMobileAuthActions
|
|
1626
|
+
] }) })
|
|
1585
1627
|
}
|
|
1586
1628
|
);
|
|
1587
1629
|
};
|