@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 } 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';
|
|
@@ -1199,7 +1199,7 @@ var NavbarMobileMenu = ({
|
|
|
1199
1199
|
"data-state": open ? "open" : "closed",
|
|
1200
1200
|
children: [
|
|
1201
1201
|
/* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("h2", { children: title }) }),
|
|
1202
|
-
/* @__PURE__ */ jsx("div", { className: "absolute top-
|
|
1202
|
+
/* @__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(
|
|
1203
1203
|
"button",
|
|
1204
1204
|
{
|
|
1205
1205
|
onClick: onClose,
|
|
@@ -1284,7 +1284,29 @@ var NavbarSidebarMobile = ({
|
|
|
1284
1284
|
optixFlowConfig
|
|
1285
1285
|
}) => {
|
|
1286
1286
|
const [isOpen, setIsOpen] = useState(false);
|
|
1287
|
-
const
|
|
1287
|
+
const MOBILE_BREAKPOINT = 1024;
|
|
1288
|
+
useEffect(() => {
|
|
1289
|
+
if (typeof window === "undefined") return;
|
|
1290
|
+
const handleResize = () => {
|
|
1291
|
+
if (window.innerWidth > MOBILE_BREAKPOINT) {
|
|
1292
|
+
setIsOpen(false);
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
handleResize();
|
|
1296
|
+
window.addEventListener("resize", handleResize);
|
|
1297
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
1298
|
+
}, []);
|
|
1299
|
+
useEffect(() => {
|
|
1300
|
+
if (typeof document === "undefined") return;
|
|
1301
|
+
document.body.style.overflow = isOpen ? "hidden" : "auto";
|
|
1302
|
+
return () => {
|
|
1303
|
+
document.body.style.overflow = "auto";
|
|
1304
|
+
};
|
|
1305
|
+
}, [isOpen]);
|
|
1306
|
+
const handleMobileMenu = () => {
|
|
1307
|
+
setIsOpen(!isOpen);
|
|
1308
|
+
};
|
|
1309
|
+
const renderAuthActions = useMemo(() => {
|
|
1288
1310
|
if (authActionsSlot) return authActionsSlot;
|
|
1289
1311
|
if (!authActions || authActions.length === 0) return null;
|
|
1290
1312
|
return authActions.map((action, index) => {
|
|
@@ -1311,17 +1333,12 @@ var NavbarSidebarMobile = ({
|
|
|
1311
1333
|
index
|
|
1312
1334
|
);
|
|
1313
1335
|
});
|
|
1314
|
-
};
|
|
1336
|
+
}, [authActionsSlot, authActions]);
|
|
1315
1337
|
const renderMenu = () => {
|
|
1316
1338
|
if (menuSlot) return null;
|
|
1317
1339
|
if (!menu || menu.length === 0) return null;
|
|
1318
1340
|
return menu;
|
|
1319
1341
|
};
|
|
1320
|
-
const renderMobileExtraLinks = () => {
|
|
1321
|
-
if (mobileExtraLinksSlot) return null;
|
|
1322
|
-
if (!mobileExtraLinks || mobileExtraLinks.length === 0) return null;
|
|
1323
|
-
return mobileExtraLinks;
|
|
1324
|
-
};
|
|
1325
1342
|
const {
|
|
1326
1343
|
sectionClasses,
|
|
1327
1344
|
containerWrapperClasses,
|
|
@@ -1331,171 +1348,223 @@ var NavbarSidebarMobile = ({
|
|
|
1331
1348
|
sectionContainerMaxWidth,
|
|
1332
1349
|
spacingOverride
|
|
1333
1350
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1334
|
-
return /* @__PURE__ */
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
"
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
children: [
|
|
1352
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-8", children: [
|
|
1353
|
-
/* @__PURE__ */ jsx(
|
|
1354
|
-
NavbarLogo,
|
|
1355
|
-
{
|
|
1356
|
-
logo,
|
|
1357
|
-
logoSlot,
|
|
1358
|
-
logoClassName,
|
|
1359
|
-
optixFlowConfig
|
|
1360
|
-
}
|
|
1361
|
-
),
|
|
1362
|
-
/* @__PURE__ */ jsx(
|
|
1363
|
-
NavigationMenu,
|
|
1364
|
-
{
|
|
1365
|
-
className: cn("hidden lg:flex", navigationMenuClassName),
|
|
1366
|
-
children: /* @__PURE__ */ jsx(NavigationMenuList, { children: menuSlot ? menuSlot : renderMenu()?.map(
|
|
1367
|
-
(item, index) => item.items ? /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
1368
|
-
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: item.title }),
|
|
1369
|
-
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx("ul", { className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2", children: item.items.map((subItem, subIndex) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1370
|
-
Pressable,
|
|
1371
|
-
{
|
|
1372
|
-
href: subItem.url,
|
|
1373
|
-
className: "block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
1374
|
-
children: [
|
|
1375
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1376
|
-
subItem.icon && /* @__PURE__ */ jsx(
|
|
1377
|
-
DynamicIcon,
|
|
1378
|
-
{
|
|
1379
|
-
name: subItem.icon,
|
|
1380
|
-
size: 16
|
|
1381
|
-
}
|
|
1382
|
-
),
|
|
1383
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium leading-none", children: subItem.title })
|
|
1384
|
-
] }),
|
|
1385
|
-
subItem.description && /* @__PURE__ */ jsx("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: subItem.description })
|
|
1386
|
-
]
|
|
1387
|
-
}
|
|
1388
|
-
) }) }, subIndex)) }) })
|
|
1389
|
-
] }, index) : /* @__PURE__ */ jsx(NavigationMenuItem, { children: /* @__PURE__ */ jsx(
|
|
1390
|
-
NavigationMenuLink,
|
|
1391
|
-
{
|
|
1392
|
-
asChild: true,
|
|
1393
|
-
className: navigationMenuTriggerStyle(),
|
|
1394
|
-
children: /* @__PURE__ */ jsx(Pressable, { href: item.url, children: item.title })
|
|
1395
|
-
}
|
|
1396
|
-
) }, index)
|
|
1397
|
-
) })
|
|
1398
|
-
}
|
|
1399
|
-
)
|
|
1400
|
-
] }),
|
|
1401
|
-
/* @__PURE__ */ jsx(
|
|
1402
|
-
"div",
|
|
1403
|
-
{
|
|
1404
|
-
className: cn(
|
|
1405
|
-
"hidden items-center gap-2 lg:flex",
|
|
1406
|
-
actionsClassName
|
|
1407
|
-
),
|
|
1408
|
-
children: renderAuthActions()
|
|
1409
|
-
}
|
|
1410
|
-
),
|
|
1411
|
-
/* @__PURE__ */ jsxs(
|
|
1412
|
-
Pressable,
|
|
1413
|
-
{
|
|
1414
|
-
variant: "outline",
|
|
1415
|
-
size: "icon",
|
|
1416
|
-
asButton: true,
|
|
1417
|
-
className: "lg:hidden",
|
|
1418
|
-
onClick: () => setIsOpen(!isOpen),
|
|
1419
|
-
children: [
|
|
1420
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
|
|
1421
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1422
|
-
]
|
|
1423
|
-
}
|
|
1351
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1352
|
+
/* @__PURE__ */ jsx(
|
|
1353
|
+
Section,
|
|
1354
|
+
{
|
|
1355
|
+
background,
|
|
1356
|
+
spacing: spacingOverride ?? spacing,
|
|
1357
|
+
className: sectionClasses,
|
|
1358
|
+
pattern,
|
|
1359
|
+
patternOpacity,
|
|
1360
|
+
containerClassName: sectionContainerClassName,
|
|
1361
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1362
|
+
children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
|
|
1363
|
+
"nav",
|
|
1364
|
+
{
|
|
1365
|
+
className: cn(
|
|
1366
|
+
"flex items-center justify-between py-4",
|
|
1367
|
+
navClassName
|
|
1424
1368
|
),
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
{
|
|
1451
|
-
href: subItem.url,
|
|
1452
|
-
className: "flex items-center gap-2 rounded-md py-2 text-sm text-muted-foreground hover:text-foreground",
|
|
1453
|
-
onClick: () => setIsOpen(false),
|
|
1454
|
-
children: [
|
|
1369
|
+
children: [
|
|
1370
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-8", children: [
|
|
1371
|
+
/* @__PURE__ */ jsx(
|
|
1372
|
+
NavbarLogo,
|
|
1373
|
+
{
|
|
1374
|
+
logo,
|
|
1375
|
+
logoSlot,
|
|
1376
|
+
logoClassName,
|
|
1377
|
+
optixFlowConfig
|
|
1378
|
+
}
|
|
1379
|
+
),
|
|
1380
|
+
/* @__PURE__ */ jsx(
|
|
1381
|
+
NavigationMenu,
|
|
1382
|
+
{
|
|
1383
|
+
className: cn("hidden lg:flex", navigationMenuClassName),
|
|
1384
|
+
children: /* @__PURE__ */ jsx(NavigationMenuList, { children: menuSlot ? menuSlot : renderMenu()?.map(
|
|
1385
|
+
(item, index) => item.items ? /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
1386
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: item.title }),
|
|
1387
|
+
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsx("ul", { className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2", children: item.items.map((subItem, subIndex) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1388
|
+
Pressable,
|
|
1389
|
+
{
|
|
1390
|
+
href: subItem.url,
|
|
1391
|
+
className: "block w-full select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-muted focus:bg-muted",
|
|
1392
|
+
children: [
|
|
1393
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1455
1394
|
subItem.icon && /* @__PURE__ */ jsx(
|
|
1456
1395
|
DynamicIcon,
|
|
1457
1396
|
{
|
|
1458
1397
|
name: subItem.icon,
|
|
1459
|
-
size:
|
|
1398
|
+
size: 16
|
|
1460
1399
|
}
|
|
1461
1400
|
),
|
|
1462
|
-
subItem.title
|
|
1463
|
-
]
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
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
|
-
|
|
1401
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium leading-none", children: subItem.title })
|
|
1402
|
+
] }),
|
|
1403
|
+
subItem.description && /* @__PURE__ */ jsx("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: subItem.description })
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
) }) }, subIndex)) }) })
|
|
1407
|
+
] }, index) : /* @__PURE__ */ jsx(NavigationMenuItem, { children: /* @__PURE__ */ jsx(
|
|
1408
|
+
NavigationMenuLink,
|
|
1409
|
+
{
|
|
1410
|
+
asChild: true,
|
|
1411
|
+
className: navigationMenuTriggerStyle(),
|
|
1412
|
+
children: /* @__PURE__ */ jsx(Pressable, { href: item.url, children: item.title })
|
|
1413
|
+
}
|
|
1414
|
+
) }, index)
|
|
1415
|
+
) })
|
|
1416
|
+
}
|
|
1417
|
+
)
|
|
1418
|
+
] }),
|
|
1419
|
+
/* @__PURE__ */ jsx(
|
|
1420
|
+
"div",
|
|
1421
|
+
{
|
|
1422
|
+
className: cn(
|
|
1423
|
+
"hidden items-center gap-2 lg:flex",
|
|
1424
|
+
actionsClassName
|
|
1425
|
+
),
|
|
1426
|
+
children: renderAuthActions
|
|
1427
|
+
}
|
|
1428
|
+
),
|
|
1429
|
+
/* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsx(
|
|
1430
|
+
Pressable,
|
|
1431
|
+
{
|
|
1432
|
+
className: "size-11",
|
|
1433
|
+
variant: "ghost",
|
|
1434
|
+
size: "icon",
|
|
1435
|
+
asButton: true,
|
|
1436
|
+
onClick: handleMobileMenu,
|
|
1437
|
+
children: /* @__PURE__ */ jsx(
|
|
1438
|
+
DynamicIcon,
|
|
1439
|
+
{
|
|
1440
|
+
name: "lucide/menu",
|
|
1441
|
+
size: 22,
|
|
1442
|
+
className: "stroke-foreground"
|
|
1443
|
+
}
|
|
1444
|
+
)
|
|
1445
|
+
}
|
|
1446
|
+
) })
|
|
1447
|
+
]
|
|
1448
|
+
}
|
|
1449
|
+
) }) }) })
|
|
1450
|
+
}
|
|
1451
|
+
),
|
|
1452
|
+
/* @__PURE__ */ jsx(
|
|
1453
|
+
MobileNavigationMenu,
|
|
1454
|
+
{
|
|
1455
|
+
open: isOpen,
|
|
1456
|
+
setOpen: setIsOpen,
|
|
1457
|
+
menu: menu ?? [],
|
|
1458
|
+
menuSlot,
|
|
1459
|
+
authActions,
|
|
1460
|
+
authActionsSlot,
|
|
1461
|
+
mobileExtraLinks,
|
|
1462
|
+
mobileExtraLinksSlot
|
|
1463
|
+
}
|
|
1464
|
+
)
|
|
1465
|
+
] });
|
|
1466
|
+
};
|
|
1467
|
+
var MobileNavigationMenu = ({
|
|
1468
|
+
open,
|
|
1469
|
+
setOpen,
|
|
1470
|
+
menu,
|
|
1471
|
+
menuSlot,
|
|
1472
|
+
authActions,
|
|
1473
|
+
authActionsSlot,
|
|
1474
|
+
mobileExtraLinks,
|
|
1475
|
+
mobileExtraLinksSlot
|
|
1476
|
+
}) => {
|
|
1477
|
+
const renderMobileAuthActions = useMemo(() => {
|
|
1478
|
+
if (authActionsSlot) return authActionsSlot;
|
|
1479
|
+
if (!authActions || authActions.length === 0) return null;
|
|
1480
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: authActions.map((action, index) => {
|
|
1481
|
+
const {
|
|
1482
|
+
label,
|
|
1483
|
+
icon,
|
|
1484
|
+
iconAfter,
|
|
1485
|
+
children,
|
|
1486
|
+
className: actionClassName,
|
|
1487
|
+
...pressableProps
|
|
1488
|
+
} = action;
|
|
1489
|
+
return /* @__PURE__ */ jsx(
|
|
1490
|
+
Pressable,
|
|
1491
|
+
{
|
|
1492
|
+
asButton: true,
|
|
1493
|
+
className: cn("w-full", actionClassName),
|
|
1494
|
+
...pressableProps,
|
|
1495
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1496
|
+
icon,
|
|
1497
|
+
label,
|
|
1498
|
+
iconAfter
|
|
1499
|
+
] })
|
|
1500
|
+
},
|
|
1501
|
+
index
|
|
1502
|
+
);
|
|
1503
|
+
}) });
|
|
1504
|
+
}, [authActionsSlot, authActions]);
|
|
1505
|
+
const renderMobileExtraLinks = useMemo(() => {
|
|
1506
|
+
if (mobileExtraLinksSlot) return mobileExtraLinksSlot;
|
|
1507
|
+
if (!mobileExtraLinks || mobileExtraLinks.length === 0) return null;
|
|
1508
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-wrap gap-x-4 gap-y-2", children: mobileExtraLinks.map((link, index) => /* @__PURE__ */ jsx(
|
|
1509
|
+
Pressable,
|
|
1510
|
+
{
|
|
1511
|
+
href: link.url,
|
|
1512
|
+
className: "text-xs text-muted-foreground hover:text-foreground",
|
|
1513
|
+
children: link.title
|
|
1514
|
+
},
|
|
1515
|
+
index
|
|
1516
|
+
)) });
|
|
1517
|
+
}, [mobileExtraLinksSlot, mobileExtraLinks]);
|
|
1518
|
+
return /* @__PURE__ */ jsx(
|
|
1519
|
+
NavbarMobileMenu,
|
|
1520
|
+
{
|
|
1521
|
+
open,
|
|
1522
|
+
onClose: () => setOpen(false),
|
|
1523
|
+
title: "Navigation Menu",
|
|
1524
|
+
children: /* @__PURE__ */ jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1525
|
+
/* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "w-full", children: menuSlot ? menuSlot : menu.map(
|
|
1526
|
+
(item, index) => item.items ? /* @__PURE__ */ jsxs(
|
|
1527
|
+
AccordionItem,
|
|
1528
|
+
{
|
|
1529
|
+
value: `nav-${index}`,
|
|
1530
|
+
className: "border-b-0",
|
|
1531
|
+
children: [
|
|
1532
|
+
/* @__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.title }),
|
|
1533
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.items.map((subItem, subIndex) => /* @__PURE__ */ jsxs(
|
|
1534
|
+
Pressable,
|
|
1535
|
+
{
|
|
1536
|
+
href: subItem.url,
|
|
1537
|
+
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",
|
|
1538
|
+
children: [
|
|
1539
|
+
subItem.icon && /* @__PURE__ */ jsx(
|
|
1540
|
+
DynamicIcon,
|
|
1541
|
+
{
|
|
1542
|
+
name: subItem.icon,
|
|
1543
|
+
size: 16,
|
|
1544
|
+
className: "stroke-muted-foreground"
|
|
1545
|
+
}
|
|
1546
|
+
),
|
|
1547
|
+
subItem.title
|
|
1548
|
+
]
|
|
1549
|
+
},
|
|
1550
|
+
`mobile-link-${index}-${subIndex}`
|
|
1551
|
+
)) })
|
|
1552
|
+
]
|
|
1553
|
+
},
|
|
1554
|
+
`nav-item-${index}`
|
|
1555
|
+
) : /* @__PURE__ */ jsx(
|
|
1556
|
+
Pressable,
|
|
1557
|
+
{
|
|
1558
|
+
href: item.url,
|
|
1559
|
+
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 nth-last-1:border-0",
|
|
1560
|
+
children: item.title
|
|
1561
|
+
},
|
|
1562
|
+
`nav-link-${index}`
|
|
1563
|
+
)
|
|
1564
|
+
) }),
|
|
1565
|
+
renderMobileAuthActions,
|
|
1566
|
+
renderMobileExtraLinks
|
|
1567
|
+
] }) })
|
|
1499
1568
|
}
|
|
1500
1569
|
);
|
|
1501
1570
|
};
|