@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { useState, useMemo } from 'react';
|
|
3
|
+
import React__default, { useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
@@ -1190,6 +1190,62 @@ var NavbarLogo = ({
|
|
|
1190
1190
|
}
|
|
1191
1191
|
);
|
|
1192
1192
|
};
|
|
1193
|
+
var NavbarMobileMenu = ({
|
|
1194
|
+
open,
|
|
1195
|
+
onClose,
|
|
1196
|
+
children,
|
|
1197
|
+
className,
|
|
1198
|
+
contentClassName,
|
|
1199
|
+
title = "Mobile Navigation"
|
|
1200
|
+
}) => {
|
|
1201
|
+
React.useEffect(() => {
|
|
1202
|
+
if (open) {
|
|
1203
|
+
const originalOverflow = document.body.style.overflow;
|
|
1204
|
+
document.body.style.overflow = "hidden";
|
|
1205
|
+
return () => {
|
|
1206
|
+
document.body.style.overflow = originalOverflow;
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
}, [open]);
|
|
1210
|
+
if (!open) return null;
|
|
1211
|
+
return /* @__PURE__ */ jsxs(
|
|
1212
|
+
"div",
|
|
1213
|
+
{
|
|
1214
|
+
className: cn(
|
|
1215
|
+
"fixed inset-0 z-998 flex flex-col bg-background",
|
|
1216
|
+
"animate-in slide-in-from-top duration-300",
|
|
1217
|
+
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=closed]:duration-300",
|
|
1218
|
+
className
|
|
1219
|
+
),
|
|
1220
|
+
"data-state": open ? "open" : "closed",
|
|
1221
|
+
children: [
|
|
1222
|
+
/* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("h2", { children: title }) }),
|
|
1223
|
+
/* @__PURE__ */ 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__ */ jsxs(
|
|
1224
|
+
"button",
|
|
1225
|
+
{
|
|
1226
|
+
onClick: onClose,
|
|
1227
|
+
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",
|
|
1228
|
+
"aria-label": "Close mobile menu",
|
|
1229
|
+
children: [
|
|
1230
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1231
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1232
|
+
]
|
|
1233
|
+
}
|
|
1234
|
+
) }),
|
|
1235
|
+
/* @__PURE__ */ jsx(
|
|
1236
|
+
"div",
|
|
1237
|
+
{
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"h-full overflow-y-auto pt-20 pb-8 px-4 sm:px-6",
|
|
1240
|
+
contentClassName
|
|
1241
|
+
),
|
|
1242
|
+
children
|
|
1243
|
+
}
|
|
1244
|
+
)
|
|
1245
|
+
]
|
|
1246
|
+
}
|
|
1247
|
+
);
|
|
1248
|
+
};
|
|
1193
1249
|
|
|
1194
1250
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1195
1251
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1226,6 +1282,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1226
1282
|
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1227
1283
|
};
|
|
1228
1284
|
}
|
|
1285
|
+
var MOBILE_BREAKPOINT = 1024;
|
|
1229
1286
|
var NavbarEducationPlatform = ({
|
|
1230
1287
|
className,
|
|
1231
1288
|
containerClassName,
|
|
@@ -1236,12 +1293,12 @@ var NavbarEducationPlatform = ({
|
|
|
1236
1293
|
mobileMenuClassName,
|
|
1237
1294
|
logo,
|
|
1238
1295
|
logoSlot,
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
company,
|
|
1242
|
-
featuredImage,
|
|
1296
|
+
menu,
|
|
1297
|
+
menuSlot,
|
|
1243
1298
|
authActions,
|
|
1244
1299
|
authActionsSlot,
|
|
1300
|
+
mobileAuthActions,
|
|
1301
|
+
mobileAuthActionsSlot,
|
|
1245
1302
|
layoutVariant = "fullScreenContainerizedLinks",
|
|
1246
1303
|
background,
|
|
1247
1304
|
spacing,
|
|
@@ -1250,6 +1307,33 @@ var NavbarEducationPlatform = ({
|
|
|
1250
1307
|
optixFlowConfig
|
|
1251
1308
|
}) => {
|
|
1252
1309
|
const [isOpen, setIsOpen] = useState(false);
|
|
1310
|
+
useEffect(() => {
|
|
1311
|
+
if (typeof window === "undefined") return;
|
|
1312
|
+
const handleResize = () => {
|
|
1313
|
+
if (window.innerWidth > MOBILE_BREAKPOINT) {
|
|
1314
|
+
setIsOpen(false);
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
handleResize();
|
|
1318
|
+
window.addEventListener("resize", handleResize);
|
|
1319
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
1320
|
+
}, []);
|
|
1321
|
+
const handleMobileMenuClose = () => {
|
|
1322
|
+
setIsOpen(false);
|
|
1323
|
+
};
|
|
1324
|
+
const renderNavigation = useMemo(() => {
|
|
1325
|
+
if (menuSlot) return menuSlot;
|
|
1326
|
+
if (!menu || menu.length === 0) return null;
|
|
1327
|
+
return /* @__PURE__ */ jsx(NavigationMenuList, { children: menu.map((item, index) => /* @__PURE__ */ jsx(
|
|
1328
|
+
DesktopMenuItem,
|
|
1329
|
+
{
|
|
1330
|
+
item,
|
|
1331
|
+
index,
|
|
1332
|
+
optixFlowConfig
|
|
1333
|
+
},
|
|
1334
|
+
`desktop-link-${index}`
|
|
1335
|
+
)) });
|
|
1336
|
+
}, [menuSlot, menu, optixFlowConfig]);
|
|
1253
1337
|
const renderAuthActions = useMemo(() => {
|
|
1254
1338
|
if (authActionsSlot) return authActionsSlot;
|
|
1255
1339
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1278,18 +1362,18 @@ var NavbarEducationPlatform = ({
|
|
|
1278
1362
|
sectionContainerMaxWidth,
|
|
1279
1363
|
spacingOverride
|
|
1280
1364
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1281
|
-
return /* @__PURE__ */ jsxs(
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
/* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
|
|
1365
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1366
|
+
/* @__PURE__ */ jsx(
|
|
1367
|
+
Section,
|
|
1368
|
+
{
|
|
1369
|
+
background,
|
|
1370
|
+
spacing: spacingOverride ?? spacing,
|
|
1371
|
+
className: sectionClasses,
|
|
1372
|
+
pattern,
|
|
1373
|
+
patternOpacity,
|
|
1374
|
+
containerClassName: sectionContainerClassName,
|
|
1375
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1376
|
+
children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
|
|
1293
1377
|
"nav",
|
|
1294
1378
|
{
|
|
1295
1379
|
className: cn(
|
|
@@ -1314,130 +1398,7 @@ var NavbarEducationPlatform = ({
|
|
|
1314
1398
|
"hidden items-center gap-1.5 lg:flex",
|
|
1315
1399
|
navigationMenuClassName
|
|
1316
1400
|
),
|
|
1317
|
-
children: /* @__PURE__ */ jsx(NavigationMenu, { delayDuration: 0,
|
|
1318
|
-
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
1319
|
-
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Products" }),
|
|
1320
|
-
/* @__PURE__ */ jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
1321
|
-
/* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
1322
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "TOOLS" }),
|
|
1323
|
-
features?.map((feature) => /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1324
|
-
Pressable,
|
|
1325
|
-
{
|
|
1326
|
-
href: feature.link,
|
|
1327
|
-
className: "group flex cursor-pointer flex-row gap-3",
|
|
1328
|
-
children: [
|
|
1329
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(
|
|
1330
|
-
DynamicIcon,
|
|
1331
|
-
{
|
|
1332
|
-
name: feature.icon,
|
|
1333
|
-
size: 20
|
|
1334
|
-
}
|
|
1335
|
-
) }),
|
|
1336
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
1337
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1338
|
-
feature.title,
|
|
1339
|
-
/* @__PURE__ */ jsx(
|
|
1340
|
-
DynamicIcon,
|
|
1341
|
-
{
|
|
1342
|
-
name: "lucide/chevron-right",
|
|
1343
|
-
size: 16,
|
|
1344
|
-
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1345
|
-
}
|
|
1346
|
-
)
|
|
1347
|
-
] }),
|
|
1348
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: feature.description })
|
|
1349
|
-
] })
|
|
1350
|
-
]
|
|
1351
|
-
}
|
|
1352
|
-
) }, feature.title))
|
|
1353
|
-
] }),
|
|
1354
|
-
/* @__PURE__ */ jsx(
|
|
1355
|
-
Separator,
|
|
1356
|
-
{
|
|
1357
|
-
orientation: "vertical",
|
|
1358
|
-
className: "data-[orientation=vertical]:h-auto"
|
|
1359
|
-
}
|
|
1360
|
-
),
|
|
1361
|
-
/* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
1362
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "QUICK START" }),
|
|
1363
|
-
/* @__PURE__ */ jsx("div", {}),
|
|
1364
|
-
featuredImage && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1365
|
-
/* @__PURE__ */ jsx("p", { className: "mt-5 mb-3 text-[10px] text-muted-foreground uppercase", children: "LATEST UPDATES" }),
|
|
1366
|
-
/* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: featuredImage.href || "#", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-primary p-3", children: /* @__PURE__ */ jsx(
|
|
1367
|
-
Img,
|
|
1368
|
-
{
|
|
1369
|
-
src: featuredImage.src,
|
|
1370
|
-
alt: featuredImage.alt || "Featured update",
|
|
1371
|
-
className: "aspect-video min-w-52 rounded-md object-cover",
|
|
1372
|
-
optixFlowConfig
|
|
1373
|
-
}
|
|
1374
|
-
) }) }) })
|
|
1375
|
-
] })
|
|
1376
|
-
] })
|
|
1377
|
-
] }) })
|
|
1378
|
-
] }),
|
|
1379
|
-
/* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
1380
|
-
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: "Support" }),
|
|
1381
|
-
/* @__PURE__ */ jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
1382
|
-
/* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
1383
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "GUIDES" }),
|
|
1384
|
-
docs?.map((doc) => /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1385
|
-
Pressable,
|
|
1386
|
-
{
|
|
1387
|
-
href: doc.link,
|
|
1388
|
-
className: "group flex flex-row gap-3",
|
|
1389
|
-
children: [
|
|
1390
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: doc.icon, size: 20 }) }),
|
|
1391
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
1392
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1393
|
-
doc.title,
|
|
1394
|
-
/* @__PURE__ */ jsx(
|
|
1395
|
-
DynamicIcon,
|
|
1396
|
-
{
|
|
1397
|
-
name: "lucide/chevron-right",
|
|
1398
|
-
size: 16,
|
|
1399
|
-
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1400
|
-
}
|
|
1401
|
-
)
|
|
1402
|
-
] }),
|
|
1403
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: doc.description })
|
|
1404
|
-
] })
|
|
1405
|
-
]
|
|
1406
|
-
}
|
|
1407
|
-
) }, doc.title))
|
|
1408
|
-
] }),
|
|
1409
|
-
/* @__PURE__ */ jsx(
|
|
1410
|
-
Separator,
|
|
1411
|
-
{
|
|
1412
|
-
orientation: "vertical",
|
|
1413
|
-
className: "data-[orientation=vertical]:h-auto"
|
|
1414
|
-
}
|
|
1415
|
-
),
|
|
1416
|
-
/* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
1417
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "ABOUT US" }),
|
|
1418
|
-
/* @__PURE__ */ jsx("div", { children: company?.map((item) => /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1419
|
-
Pressable,
|
|
1420
|
-
{
|
|
1421
|
-
href: item.link,
|
|
1422
|
-
className: "flex flex-row items-center gap-3",
|
|
1423
|
-
children: [
|
|
1424
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: item.icon, size: 16 }),
|
|
1425
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: item.title })
|
|
1426
|
-
]
|
|
1427
|
-
}
|
|
1428
|
-
) }, item.title)) })
|
|
1429
|
-
] })
|
|
1430
|
-
] }) })
|
|
1431
|
-
] }),
|
|
1432
|
-
/* @__PURE__ */ jsx(NavigationMenuItem, { children: /* @__PURE__ */ jsx(
|
|
1433
|
-
NavigationMenuLink,
|
|
1434
|
-
{
|
|
1435
|
-
asChild: true,
|
|
1436
|
-
className: navigationMenuTriggerStyle(),
|
|
1437
|
-
children: /* @__PURE__ */ jsx(Pressable, { href: "#", children: "About" })
|
|
1438
|
-
}
|
|
1439
|
-
) })
|
|
1440
|
-
] }) })
|
|
1401
|
+
children: /* @__PURE__ */ jsx(NavigationMenu, { delayDuration: 0, viewport: false, children: renderNavigation })
|
|
1441
1402
|
}
|
|
1442
1403
|
)
|
|
1443
1404
|
] }),
|
|
@@ -1451,113 +1412,194 @@ var NavbarEducationPlatform = ({
|
|
|
1451
1412
|
children: renderAuthActions
|
|
1452
1413
|
}
|
|
1453
1414
|
),
|
|
1454
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsx(
|
|
1455
1416
|
Pressable,
|
|
1456
1417
|
{
|
|
1457
|
-
|
|
1418
|
+
className: "size-11",
|
|
1419
|
+
variant: "ghost",
|
|
1458
1420
|
size: "icon",
|
|
1459
1421
|
asButton: true,
|
|
1460
|
-
className: "lg:hidden",
|
|
1461
1422
|
onClick: () => setIsOpen(!isOpen),
|
|
1462
|
-
children:
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1423
|
+
children: /* @__PURE__ */ jsx(
|
|
1424
|
+
DynamicIcon,
|
|
1425
|
+
{
|
|
1426
|
+
name: "lucide/menu",
|
|
1427
|
+
size: 22,
|
|
1428
|
+
className: "stroke-foreground"
|
|
1429
|
+
}
|
|
1430
|
+
)
|
|
1466
1431
|
}
|
|
1467
|
-
)
|
|
1432
|
+
) })
|
|
1468
1433
|
]
|
|
1469
1434
|
}
|
|
1470
|
-
) }) }) })
|
|
1471
|
-
|
|
1472
|
-
|
|
1435
|
+
) }) }) })
|
|
1436
|
+
}
|
|
1437
|
+
),
|
|
1438
|
+
/* @__PURE__ */ jsx(
|
|
1439
|
+
MobileNavigationMenu,
|
|
1440
|
+
{
|
|
1441
|
+
open: isOpen,
|
|
1442
|
+
onClose: handleMobileMenuClose,
|
|
1443
|
+
menu: menu ?? [],
|
|
1444
|
+
mobileAuthActions,
|
|
1445
|
+
mobileAuthActionsSlot,
|
|
1446
|
+
mobileMenuClassName
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
] });
|
|
1450
|
+
};
|
|
1451
|
+
var DesktopMenuItem = ({
|
|
1452
|
+
item,
|
|
1453
|
+
index,
|
|
1454
|
+
optixFlowConfig
|
|
1455
|
+
}) => {
|
|
1456
|
+
if (item.groups && item.groups.length > 0) {
|
|
1457
|
+
return /* @__PURE__ */ jsxs(NavigationMenuItem, { value: `${index}`, children: [
|
|
1458
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: item.label }),
|
|
1459
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { className: "p-0", children: /* @__PURE__ */ jsx("div", { className: "flex", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
1460
|
+
groupIndex > 0 && /* @__PURE__ */ jsx(
|
|
1461
|
+
Separator,
|
|
1473
1462
|
{
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
)) })
|
|
1501
|
-
] }),
|
|
1502
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
1503
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "QUICK START" }) })
|
|
1504
|
-
] }) })
|
|
1505
|
-
] }),
|
|
1506
|
-
/* @__PURE__ */ jsxs(AccordionItem, { value: "support", className: "last:border-b", children: [
|
|
1507
|
-
/* @__PURE__ */ jsx(AccordionTrigger, { className: "pr-2.5 text-base font-medium hover:no-underline", children: "Support" }),
|
|
1508
|
-
/* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1509
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1510
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "GUIDES" }),
|
|
1511
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-5", children: docs?.map((doc) => /* @__PURE__ */ jsxs(
|
|
1512
|
-
Pressable,
|
|
1513
|
-
{
|
|
1514
|
-
href: doc.link,
|
|
1515
|
-
className: "group flex cursor-pointer flex-row gap-3 rounded-md transition-colors",
|
|
1516
|
-
onClick: () => setIsOpen(false),
|
|
1517
|
-
children: [
|
|
1518
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: doc.icon, size: 16 }) }),
|
|
1519
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
1520
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm leading-tight font-medium", children: doc.title }),
|
|
1521
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs leading-tight text-muted-foreground", children: doc.description })
|
|
1522
|
-
] })
|
|
1523
|
-
]
|
|
1524
|
-
},
|
|
1525
|
-
doc.title
|
|
1526
|
-
)) })
|
|
1527
|
-
] }),
|
|
1528
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
1529
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1530
|
-
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: "ABOUT US" }),
|
|
1531
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-5", children: company?.map((item) => /* @__PURE__ */ jsxs(
|
|
1532
|
-
Pressable,
|
|
1533
|
-
{
|
|
1534
|
-
href: item.link,
|
|
1535
|
-
className: "flex cursor-pointer flex-row items-center gap-3 rounded-md transition-colors",
|
|
1536
|
-
onClick: () => setIsOpen(false),
|
|
1537
|
-
children: [
|
|
1538
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: item.icon, size: 16 }),
|
|
1539
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: item.title })
|
|
1540
|
-
]
|
|
1541
|
-
},
|
|
1542
|
-
item.title
|
|
1543
|
-
)) })
|
|
1544
|
-
] })
|
|
1545
|
-
] }) })
|
|
1463
|
+
orientation: "vertical",
|
|
1464
|
+
className: "data-[orientation=vertical]:h-auto"
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
1468
|
+
/* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: group.label }),
|
|
1469
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: group.links.map((link) => /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1470
|
+
Pressable,
|
|
1471
|
+
{
|
|
1472
|
+
href: link.href,
|
|
1473
|
+
className: "group flex cursor-pointer flex-row gap-3",
|
|
1474
|
+
children: [
|
|
1475
|
+
link.icon && /* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: link.icon, size: 20 }) }),
|
|
1476
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
1477
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
|
|
1478
|
+
link.title,
|
|
1479
|
+
/* @__PURE__ */ jsx(
|
|
1480
|
+
DynamicIcon,
|
|
1481
|
+
{
|
|
1482
|
+
name: "lucide/chevron-right",
|
|
1483
|
+
size: 16,
|
|
1484
|
+
className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
|
|
1485
|
+
}
|
|
1486
|
+
)
|
|
1487
|
+
] }),
|
|
1488
|
+
link.description && /* @__PURE__ */ jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: link.description })
|
|
1546
1489
|
] })
|
|
1547
|
-
]
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1490
|
+
]
|
|
1491
|
+
}
|
|
1492
|
+
) }, link.title)) }),
|
|
1493
|
+
group.featuredImage && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: group.featuredImage.href || "#", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-muted p-3", children: /* @__PURE__ */ jsx(
|
|
1494
|
+
Img,
|
|
1495
|
+
{
|
|
1496
|
+
src: group.featuredImage.src,
|
|
1497
|
+
alt: group.featuredImage.alt || "Featured image",
|
|
1498
|
+
className: "aspect-video w-full max-w-[240px] rounded-md object-cover object-center",
|
|
1499
|
+
optixFlowConfig
|
|
1500
|
+
}
|
|
1501
|
+
) }) }) }) })
|
|
1502
|
+
] })
|
|
1503
|
+
] }, `group-${groupIndex}`)) }) })
|
|
1504
|
+
] }, `desktop-menu-item-${index}`);
|
|
1505
|
+
}
|
|
1506
|
+
return /* @__PURE__ */ jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, className: navigationMenuTriggerStyle(), children: /* @__PURE__ */ jsx(Pressable, { href: item.href, children: item.label }) }) }, `desktop-menu-item-${index}`);
|
|
1507
|
+
};
|
|
1508
|
+
var MobileNavigationMenu = ({
|
|
1509
|
+
open,
|
|
1510
|
+
onClose,
|
|
1511
|
+
menu,
|
|
1512
|
+
mobileAuthActions,
|
|
1513
|
+
mobileAuthActionsSlot,
|
|
1514
|
+
mobileMenuClassName
|
|
1515
|
+
}) => {
|
|
1516
|
+
const renderMobileAuthActions = useMemo(() => {
|
|
1517
|
+
if (mobileAuthActionsSlot) return mobileAuthActionsSlot;
|
|
1518
|
+
if (!mobileAuthActions || mobileAuthActions.length === 0) return null;
|
|
1519
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: mobileAuthActions.map((action, index) => {
|
|
1520
|
+
const {
|
|
1521
|
+
label,
|
|
1522
|
+
icon,
|
|
1523
|
+
iconAfter,
|
|
1524
|
+
children,
|
|
1525
|
+
className: actionClassName,
|
|
1526
|
+
...pressableProps
|
|
1527
|
+
} = action;
|
|
1528
|
+
return /* @__PURE__ */ jsx(
|
|
1529
|
+
Pressable,
|
|
1530
|
+
{
|
|
1531
|
+
asButton: true,
|
|
1532
|
+
className: cn("w-full", actionClassName),
|
|
1533
|
+
onClick: onClose,
|
|
1534
|
+
...pressableProps,
|
|
1535
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1536
|
+
icon,
|
|
1537
|
+
label,
|
|
1538
|
+
iconAfter
|
|
1539
|
+
] })
|
|
1540
|
+
},
|
|
1541
|
+
index
|
|
1542
|
+
);
|
|
1543
|
+
}) });
|
|
1544
|
+
}, [mobileAuthActionsSlot, mobileAuthActions, onClose]);
|
|
1545
|
+
return /* @__PURE__ */ jsx(
|
|
1546
|
+
NavbarMobileMenu,
|
|
1547
|
+
{
|
|
1548
|
+
open,
|
|
1549
|
+
onClose,
|
|
1550
|
+
title: "Mobile Navigation",
|
|
1551
|
+
className: mobileMenuClassName,
|
|
1552
|
+
children: /* @__PURE__ */ jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1553
|
+
/* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menu.map((item, index) => {
|
|
1554
|
+
if (item.groups && item.groups.length > 0) {
|
|
1555
|
+
return /* @__PURE__ */ jsxs(
|
|
1556
|
+
AccordionItem,
|
|
1557
|
+
{
|
|
1558
|
+
value: `nav-${index}`,
|
|
1559
|
+
className: "border-b-0",
|
|
1560
|
+
children: [
|
|
1561
|
+
/* @__PURE__ */ 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 }),
|
|
1562
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
1563
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 px-4 text-[10px] text-muted-foreground uppercase", children: group.label }),
|
|
1564
|
+
group.links.map((link) => /* @__PURE__ */ jsxs(
|
|
1565
|
+
Pressable,
|
|
1566
|
+
{
|
|
1567
|
+
href: link.href,
|
|
1568
|
+
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",
|
|
1569
|
+
onClick: onClose,
|
|
1570
|
+
children: [
|
|
1571
|
+
link.icon && /* @__PURE__ */ jsx(
|
|
1572
|
+
DynamicIcon,
|
|
1573
|
+
{
|
|
1574
|
+
name: link.icon,
|
|
1575
|
+
size: 16,
|
|
1576
|
+
className: "stroke-muted-foreground"
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
link.title
|
|
1580
|
+
]
|
|
1581
|
+
},
|
|
1582
|
+
link.title
|
|
1583
|
+
))
|
|
1584
|
+
] }, `mobile-group-${groupIndex}`)) })
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
`nav-item-${index}`
|
|
1588
|
+
);
|
|
1558
1589
|
}
|
|
1559
|
-
|
|
1560
|
-
|
|
1590
|
+
return /* @__PURE__ */ jsx(
|
|
1591
|
+
Pressable,
|
|
1592
|
+
{
|
|
1593
|
+
href: item.href,
|
|
1594
|
+
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",
|
|
1595
|
+
onClick: onClose,
|
|
1596
|
+
children: item.label
|
|
1597
|
+
},
|
|
1598
|
+
`nav-link-${index}`
|
|
1599
|
+
);
|
|
1600
|
+
}) }),
|
|
1601
|
+
renderMobileAuthActions
|
|
1602
|
+
] }) })
|
|
1561
1603
|
}
|
|
1562
1604
|
);
|
|
1563
1605
|
};
|
|
@@ -1162,7 +1162,7 @@ var NavbarMobileMenu = ({
|
|
|
1162
1162
|
"data-state": open ? "open" : "closed",
|
|
1163
1163
|
children: [
|
|
1164
1164
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }) }),
|
|
1165
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-
|
|
1165
|
+
/* @__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(
|
|
1166
1166
|
"button",
|
|
1167
1167
|
{
|
|
1168
1168
|
onClick: onClose,
|
|
@@ -1857,7 +1857,7 @@ var DesktopMenuItem = ({
|
|
|
1857
1857
|
if (hasDropdown) {
|
|
1858
1858
|
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { value: `${index}`, children: [
|
|
1859
1859
|
/* @__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 }),
|
|
1860
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "
|
|
1860
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { className: "rounded-xl! border-0! p-4!", children: renderDropdownContent(
|
|
1861
1861
|
{ ...item, layout: effectiveLayout },
|
|
1862
1862
|
optixFlowConfig
|
|
1863
1863
|
) })
|
|
@@ -1928,7 +1928,7 @@ var renderDropdownContent = (item, optixFlowConfig) => {
|
|
|
1928
1928
|
var renderMobileDropdownContent = (item) => {
|
|
1929
1929
|
switch (item.layout) {
|
|
1930
1930
|
case "solutions-with-platform":
|
|
1931
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
1931
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col space-y-2", children: item.solutionCards?.map((solution) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1932
1932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
1933
|
Pressable,
|
|
1934
1934
|
{
|
|
@@ -1956,7 +1956,7 @@ var renderMobileDropdownContent = (item) => {
|
|
|
1956
1956
|
Pressable,
|
|
1957
1957
|
{
|
|
1958
1958
|
href: product.href,
|
|
1959
|
-
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
1959
|
+
className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
|
|
1960
1960
|
children: product.title
|
|
1961
1961
|
},
|
|
1962
1962
|
product.id
|
|
@@ -1967,7 +1967,7 @@ var renderMobileDropdownContent = (item) => {
|
|
|
1967
1967
|
Pressable,
|
|
1968
1968
|
{
|
|
1969
1969
|
href: resource.href,
|
|
1970
|
-
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
1970
|
+
className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
|
|
1971
1971
|
children: [
|
|
1972
1972
|
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: resource.icon, size: 14 }),
|
|
1973
1973
|
resource.title
|
|
@@ -2056,7 +2056,7 @@ var MobileNavigationMenu = ({
|
|
|
2056
2056
|
typeof item.label === "string" ? item.label : `nav-${index}`
|
|
2057
2057
|
);
|
|
2058
2058
|
}) }),
|
|
2059
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-
|
|
2059
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4 flex flex-col gap-4", actionsClassName), children: renderActions })
|
|
2060
2060
|
] })
|
|
2061
2061
|
}
|
|
2062
2062
|
);
|