@opensite/ui 1.1.2 → 1.1.4
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 +3 -3
- package/dist/navbar-animated-preview.js +3 -3
- 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 +2 -2
- package/dist/navbar-education-platform.js +2 -2
- package/dist/navbar-enterprise-mega.cjs +1 -1
- package/dist/navbar-enterprise-mega.js +1 -1
- package/dist/navbar-feature-grid.cjs +3 -3
- package/dist/navbar-feature-grid.js +3 -3
- package/dist/navbar-floating-pill.cjs +1 -1
- package/dist/navbar-floating-pill.js +1 -1
- package/dist/navbar-fullscreen-menu.cjs +1 -1
- package/dist/navbar-fullscreen-menu.js +1 -1
- package/dist/navbar-icon-links.cjs +1 -1
- package/dist/navbar-icon-links.js +1 -1
- package/dist/navbar-image-preview.cjs +114 -108
- package/dist/navbar-image-preview.js +114 -108
- package/dist/navbar-mega-menu.cjs +1 -2
- package/dist/navbar-mega-menu.js +1 -2
- package/dist/navbar-multi-column-groups.cjs +1 -1
- package/dist/navbar-multi-column-groups.js +1 -1
- package/dist/navbar-platform-resources.cjs +1 -1
- package/dist/navbar-platform-resources.js +1 -1
- package/dist/navbar-search-focused.cjs +2 -2
- package/dist/navbar-search-focused.js +2 -2
- package/dist/navbar-sidebar-mobile.cjs +1 -1
- package/dist/navbar-sidebar-mobile.js +1 -1
- package/dist/navbar-simple-links.cjs +1 -1
- package/dist/navbar-simple-links.js +1 -1
- package/dist/navbar-split-cta.cjs +2 -2
- package/dist/navbar-split-cta.js +2 -2
- package/dist/navbar-sticky-compact.cjs +4 -4
- package/dist/navbar-sticky-compact.js +4 -4
- package/dist/navbar-tabbed-sections.cjs +133 -44
- package/dist/navbar-tabbed-sections.js +132 -44
- package/dist/navbar-transparent-overlay.cjs +4 -12
- package/dist/navbar-transparent-overlay.js +4 -12
- package/dist/registry.cjs +197 -173
- package/dist/registry.js +197 -173
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var img = require('@page-speed/img');
|
|
10
|
+
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
10
11
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
11
12
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
12
13
|
|
|
@@ -29,6 +30,7 @@ function _interopNamespace(e) {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
+
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
32
34
|
var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
|
|
33
35
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
34
36
|
|
|
@@ -994,6 +996,66 @@ var NavbarLogo = ({
|
|
|
994
996
|
}
|
|
995
997
|
);
|
|
996
998
|
};
|
|
999
|
+
function Accordion({
|
|
1000
|
+
...props
|
|
1001
|
+
}) {
|
|
1002
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
|
|
1003
|
+
}
|
|
1004
|
+
function AccordionItem({
|
|
1005
|
+
className,
|
|
1006
|
+
...props
|
|
1007
|
+
}) {
|
|
1008
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1009
|
+
AccordionPrimitive__namespace.Item,
|
|
1010
|
+
{
|
|
1011
|
+
"data-slot": "accordion-item",
|
|
1012
|
+
className: cn("border-b ", className),
|
|
1013
|
+
...props
|
|
1014
|
+
}
|
|
1015
|
+
);
|
|
1016
|
+
}
|
|
1017
|
+
function AccordionTrigger({
|
|
1018
|
+
className,
|
|
1019
|
+
children,
|
|
1020
|
+
...props
|
|
1021
|
+
}) {
|
|
1022
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1023
|
+
AccordionPrimitive__namespace.Trigger,
|
|
1024
|
+
{
|
|
1025
|
+
"data-slot": "accordion-trigger",
|
|
1026
|
+
className: cn(
|
|
1027
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
1028
|
+
className
|
|
1029
|
+
),
|
|
1030
|
+
...props,
|
|
1031
|
+
children: [
|
|
1032
|
+
children,
|
|
1033
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
|
+
DynamicIcon,
|
|
1035
|
+
{
|
|
1036
|
+
name: "lucide/chevron-down",
|
|
1037
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
1038
|
+
}
|
|
1039
|
+
)
|
|
1040
|
+
]
|
|
1041
|
+
}
|
|
1042
|
+
) });
|
|
1043
|
+
}
|
|
1044
|
+
function AccordionContent({
|
|
1045
|
+
className,
|
|
1046
|
+
children,
|
|
1047
|
+
...props
|
|
1048
|
+
}) {
|
|
1049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1050
|
+
AccordionPrimitive__namespace.Content,
|
|
1051
|
+
{
|
|
1052
|
+
"data-slot": "accordion-content",
|
|
1053
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
1054
|
+
...props,
|
|
1055
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
997
1059
|
function NavigationMenu({
|
|
998
1060
|
className,
|
|
999
1061
|
children,
|
|
@@ -1270,7 +1332,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1270
1332
|
// Section wrapper classes - always full width for non-floating variants
|
|
1271
1333
|
sectionClasses: cn(
|
|
1272
1334
|
"inset-x-0 z-20",
|
|
1273
|
-
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1335
|
+
isFloatingBar ? "sticky top-4" : "fixed top-0",
|
|
1274
1336
|
customClasses?.className
|
|
1275
1337
|
),
|
|
1276
1338
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
@@ -1349,13 +1411,13 @@ var NavbarTabbedSections = ({
|
|
|
1349
1411
|
if (!menu || menu.length === 0) return null;
|
|
1350
1412
|
return menu.map(
|
|
1351
1413
|
(item, index) => item.tabs ? /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuItem, { children: [
|
|
1352
|
-
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { children: item.title }),
|
|
1414
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuTrigger, { className: "bg-transparent hover:bg-muted", children: item.title }),
|
|
1353
1415
|
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: item.tabs[0]?.id, className: "w-[600px]", children: [
|
|
1354
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b px-4 pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "h-auto bg-transparent p-0", children: item.tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1416
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b-2 px-4 pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "h-auto bg-transparent p-0", children: item.tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1355
1417
|
TabsTrigger,
|
|
1356
1418
|
{
|
|
1357
1419
|
value: tab.id,
|
|
1358
|
-
className: "rounded-none border-b-2 border-transparent px-4 py-2 data-[state=active]:border-b-primary hover:border-b-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
1420
|
+
className: "-mb-2 rounded-none border-b-2 border-transparent px-4 py-2 data-[state=active]:border-b-primary data-[state=active]:text-primary hover:border-b-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
1359
1421
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1360
1422
|
tab.icon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: tab.icon, size: 16 }),
|
|
1361
1423
|
tab.title
|
|
@@ -1364,20 +1426,28 @@ var NavbarTabbedSections = ({
|
|
|
1364
1426
|
tab.id
|
|
1365
1427
|
)) }) }),
|
|
1366
1428
|
item.tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: tab.id, className: "mt-0 p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-6", children: [
|
|
1367
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 space-y-
|
|
1368
|
-
|
|
1429
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 grid grid-cols-2 space-y-2 space-x-4", children: tab.links.map((link, linkIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1430
|
+
NavigationMenuLink,
|
|
1369
1431
|
{
|
|
1370
|
-
|
|
1371
|
-
className: "
|
|
1372
|
-
children:
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1432
|
+
asChild: true,
|
|
1433
|
+
className: "w-full",
|
|
1434
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1435
|
+
Pressable,
|
|
1436
|
+
{
|
|
1437
|
+
href: link.url,
|
|
1438
|
+
className: "w-full flex items-start gap-3 rounded-md p-3 hover:bg-muted",
|
|
1439
|
+
children: [
|
|
1440
|
+
link.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border bg-background", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: link.icon, size: 16 }) }),
|
|
1441
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1442
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium", children: link.title }),
|
|
1443
|
+
link.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: link.description })
|
|
1444
|
+
] })
|
|
1445
|
+
]
|
|
1446
|
+
}
|
|
1447
|
+
)
|
|
1448
|
+
},
|
|
1449
|
+
linkIndex
|
|
1450
|
+
)) }),
|
|
1381
1451
|
tab.featured && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[200px] shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1382
1452
|
Pressable,
|
|
1383
1453
|
{
|
|
@@ -1415,39 +1485,58 @@ var NavbarTabbedSections = ({
|
|
|
1415
1485
|
const renderMobileMenu = React.useMemo(() => {
|
|
1416
1486
|
if (menuSlot) return menuSlot;
|
|
1417
1487
|
if (!menu || menu.length === 0) return null;
|
|
1418
|
-
return menu.map(
|
|
1419
|
-
(item
|
|
1420
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1488
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "multiple", className: "w-full", children: menu.map((item, index) => {
|
|
1489
|
+
if (item.tabs && item.tabs.length > 0) {
|
|
1490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1491
|
+
AccordionItem,
|
|
1492
|
+
{
|
|
1493
|
+
value: `nav-${index}`,
|
|
1494
|
+
className: "border-b-0",
|
|
1495
|
+
children: [
|
|
1496
|
+
/* @__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.title }),
|
|
1497
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "overflow-x-none pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "multiple", className: "w-full pl-4", children: item.tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1498
|
+
AccordionItem,
|
|
1499
|
+
{
|
|
1500
|
+
value: tab.id,
|
|
1501
|
+
className: "border-b-0",
|
|
1502
|
+
children: [
|
|
1503
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "h-12 items-center p-0 px-4! text-sm leading-[3] font-medium text-muted-foreground hover:bg-muted hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1504
|
+
tab.icon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: tab.icon, size: 14 }),
|
|
1505
|
+
tab.title
|
|
1506
|
+
] }) }),
|
|
1507
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "overflow-x-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 pl-4", children: tab.links.map((link, linkIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1508
|
+
Pressable,
|
|
1509
|
+
{
|
|
1510
|
+
href: link.url,
|
|
1511
|
+
className: "flex items-center gap-2 rounded-md px-4 py-2 text-sm hover:bg-muted",
|
|
1512
|
+
onClick: () => setIsOpen(false),
|
|
1513
|
+
children: [
|
|
1514
|
+
link.icon && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: link.icon, size: 14 }),
|
|
1515
|
+
link.title
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
linkIndex
|
|
1519
|
+
)) }) })
|
|
1520
|
+
]
|
|
1521
|
+
},
|
|
1522
|
+
tab.id
|
|
1523
|
+
)) }) })
|
|
1524
|
+
]
|
|
1525
|
+
},
|
|
1526
|
+
`nav-item-${index}`
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
1530
|
Pressable,
|
|
1442
1531
|
{
|
|
1443
1532
|
href: item.url,
|
|
1444
|
-
className: "text-
|
|
1533
|
+
className: "flex h-15 items-center px-4 text-base font-normal text-muted-foreground hover:bg-muted",
|
|
1445
1534
|
onClick: () => setIsOpen(false),
|
|
1446
1535
|
children: item.title
|
|
1447
1536
|
},
|
|
1448
|
-
index
|
|
1449
|
-
)
|
|
1450
|
-
);
|
|
1537
|
+
`nav-link-${index}`
|
|
1538
|
+
);
|
|
1539
|
+
}) });
|
|
1451
1540
|
}, [menuSlot, menu]);
|
|
1452
1541
|
const {
|
|
1453
1542
|
sectionClasses,
|
|
@@ -6,6 +6,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Img } from '@page-speed/img';
|
|
9
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
9
10
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
10
11
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
11
12
|
|
|
@@ -971,6 +972,66 @@ var NavbarLogo = ({
|
|
|
971
972
|
}
|
|
972
973
|
);
|
|
973
974
|
};
|
|
975
|
+
function Accordion({
|
|
976
|
+
...props
|
|
977
|
+
}) {
|
|
978
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
979
|
+
}
|
|
980
|
+
function AccordionItem({
|
|
981
|
+
className,
|
|
982
|
+
...props
|
|
983
|
+
}) {
|
|
984
|
+
return /* @__PURE__ */ jsx(
|
|
985
|
+
AccordionPrimitive.Item,
|
|
986
|
+
{
|
|
987
|
+
"data-slot": "accordion-item",
|
|
988
|
+
className: cn("border-b ", className),
|
|
989
|
+
...props
|
|
990
|
+
}
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
function AccordionTrigger({
|
|
994
|
+
className,
|
|
995
|
+
children,
|
|
996
|
+
...props
|
|
997
|
+
}) {
|
|
998
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
999
|
+
AccordionPrimitive.Trigger,
|
|
1000
|
+
{
|
|
1001
|
+
"data-slot": "accordion-trigger",
|
|
1002
|
+
className: cn(
|
|
1003
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-center justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
1004
|
+
className
|
|
1005
|
+
),
|
|
1006
|
+
...props,
|
|
1007
|
+
children: [
|
|
1008
|
+
children,
|
|
1009
|
+
/* @__PURE__ */ jsx(
|
|
1010
|
+
DynamicIcon,
|
|
1011
|
+
{
|
|
1012
|
+
name: "lucide/chevron-down",
|
|
1013
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
1014
|
+
}
|
|
1015
|
+
)
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
) });
|
|
1019
|
+
}
|
|
1020
|
+
function AccordionContent({
|
|
1021
|
+
className,
|
|
1022
|
+
children,
|
|
1023
|
+
...props
|
|
1024
|
+
}) {
|
|
1025
|
+
return /* @__PURE__ */ jsx(
|
|
1026
|
+
AccordionPrimitive.Content,
|
|
1027
|
+
{
|
|
1028
|
+
"data-slot": "accordion-content",
|
|
1029
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
1030
|
+
...props,
|
|
1031
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
1032
|
+
}
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
974
1035
|
function NavigationMenu({
|
|
975
1036
|
className,
|
|
976
1037
|
children,
|
|
@@ -1247,7 +1308,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1247
1308
|
// Section wrapper classes - always full width for non-floating variants
|
|
1248
1309
|
sectionClasses: cn(
|
|
1249
1310
|
"inset-x-0 z-20",
|
|
1250
|
-
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1311
|
+
isFloatingBar ? "sticky top-4" : "fixed top-0",
|
|
1251
1312
|
customClasses?.className
|
|
1252
1313
|
),
|
|
1253
1314
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
@@ -1326,13 +1387,13 @@ var NavbarTabbedSections = ({
|
|
|
1326
1387
|
if (!menu || menu.length === 0) return null;
|
|
1327
1388
|
return menu.map(
|
|
1328
1389
|
(item, index) => item.tabs ? /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
|
|
1329
|
-
/* @__PURE__ */ jsx(NavigationMenuTrigger, { children: item.title }),
|
|
1390
|
+
/* @__PURE__ */ jsx(NavigationMenuTrigger, { className: "bg-transparent hover:bg-muted", children: item.title }),
|
|
1330
1391
|
/* @__PURE__ */ jsx(NavigationMenuContent, { children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: item.tabs[0]?.id, className: "w-[600px]", children: [
|
|
1331
|
-
/* @__PURE__ */ jsx("div", { className: "border-b px-4 pt-2", children: /* @__PURE__ */ jsx(TabsList, { className: "h-auto bg-transparent p-0", children: item.tabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1392
|
+
/* @__PURE__ */ jsx("div", { className: "border-b-2 px-4 pt-2", children: /* @__PURE__ */ jsx(TabsList, { className: "h-auto bg-transparent p-0", children: item.tabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1332
1393
|
TabsTrigger,
|
|
1333
1394
|
{
|
|
1334
1395
|
value: tab.id,
|
|
1335
|
-
className: "rounded-none border-b-2 border-transparent px-4 py-2 data-[state=active]:border-b-primary hover:border-b-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
1396
|
+
className: "-mb-2 rounded-none border-b-2 border-transparent px-4 py-2 data-[state=active]:border-b-primary data-[state=active]:text-primary hover:border-b-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
1336
1397
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1337
1398
|
tab.icon && /* @__PURE__ */ jsx(DynamicIcon, { name: tab.icon, size: 16 }),
|
|
1338
1399
|
tab.title
|
|
@@ -1341,20 +1402,28 @@ var NavbarTabbedSections = ({
|
|
|
1341
1402
|
tab.id
|
|
1342
1403
|
)) }) }),
|
|
1343
1404
|
item.tabs.map((tab) => /* @__PURE__ */ jsx(TabsContent, { value: tab.id, className: "mt-0 p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-6", children: [
|
|
1344
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 space-y-
|
|
1345
|
-
|
|
1405
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 grid grid-cols-2 space-y-2 space-x-4", children: tab.links.map((link, linkIndex) => /* @__PURE__ */ jsx(
|
|
1406
|
+
NavigationMenuLink,
|
|
1346
1407
|
{
|
|
1347
|
-
|
|
1348
|
-
className: "
|
|
1349
|
-
children:
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1408
|
+
asChild: true,
|
|
1409
|
+
className: "w-full",
|
|
1410
|
+
children: /* @__PURE__ */ jsxs(
|
|
1411
|
+
Pressable,
|
|
1412
|
+
{
|
|
1413
|
+
href: link.url,
|
|
1414
|
+
className: "w-full flex items-start gap-3 rounded-md p-3 hover:bg-muted",
|
|
1415
|
+
children: [
|
|
1416
|
+
link.icon && /* @__PURE__ */ jsx("div", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: link.icon, size: 16 }) }),
|
|
1417
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1418
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: link.title }),
|
|
1419
|
+
link.description && /* @__PURE__ */ jsx("p", { className: "text-xs", children: link.description })
|
|
1420
|
+
] })
|
|
1421
|
+
]
|
|
1422
|
+
}
|
|
1423
|
+
)
|
|
1424
|
+
},
|
|
1425
|
+
linkIndex
|
|
1426
|
+
)) }),
|
|
1358
1427
|
tab.featured && /* @__PURE__ */ jsx("div", { className: "w-[200px] shrink-0", children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1359
1428
|
Pressable,
|
|
1360
1429
|
{
|
|
@@ -1392,39 +1461,58 @@ var NavbarTabbedSections = ({
|
|
|
1392
1461
|
const renderMobileMenu = useMemo(() => {
|
|
1393
1462
|
if (menuSlot) return menuSlot;
|
|
1394
1463
|
if (!menu || menu.length === 0) return null;
|
|
1395
|
-
return menu.map(
|
|
1396
|
-
(item
|
|
1397
|
-
/* @__PURE__ */
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1464
|
+
return /* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menu.map((item, index) => {
|
|
1465
|
+
if (item.tabs && item.tabs.length > 0) {
|
|
1466
|
+
return /* @__PURE__ */ jsxs(
|
|
1467
|
+
AccordionItem,
|
|
1468
|
+
{
|
|
1469
|
+
value: `nav-${index}`,
|
|
1470
|
+
className: "border-b-0",
|
|
1471
|
+
children: [
|
|
1472
|
+
/* @__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 }),
|
|
1473
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none pb-4", children: /* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full pl-4", children: item.tabs.map((tab) => /* @__PURE__ */ jsxs(
|
|
1474
|
+
AccordionItem,
|
|
1475
|
+
{
|
|
1476
|
+
value: tab.id,
|
|
1477
|
+
className: "border-b-0",
|
|
1478
|
+
children: [
|
|
1479
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { className: "h-12 items-center p-0 px-4! text-sm leading-[3] font-medium text-muted-foreground hover:bg-muted hover:no-underline", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1480
|
+
tab.icon && /* @__PURE__ */ jsx(DynamicIcon, { name: tab.icon, size: 14 }),
|
|
1481
|
+
tab.title
|
|
1482
|
+
] }) }),
|
|
1483
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 pl-4", children: tab.links.map((link, linkIndex) => /* @__PURE__ */ jsxs(
|
|
1484
|
+
Pressable,
|
|
1485
|
+
{
|
|
1486
|
+
href: link.url,
|
|
1487
|
+
className: "flex items-center gap-2 rounded-md px-4 py-2 text-sm hover:bg-muted",
|
|
1488
|
+
onClick: () => setIsOpen(false),
|
|
1489
|
+
children: [
|
|
1490
|
+
link.icon && /* @__PURE__ */ jsx(DynamicIcon, { name: link.icon, size: 14 }),
|
|
1491
|
+
link.title
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
linkIndex
|
|
1495
|
+
)) }) })
|
|
1496
|
+
]
|
|
1497
|
+
},
|
|
1498
|
+
tab.id
|
|
1499
|
+
)) }) })
|
|
1500
|
+
]
|
|
1501
|
+
},
|
|
1502
|
+
`nav-item-${index}`
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
return /* @__PURE__ */ jsx(
|
|
1418
1506
|
Pressable,
|
|
1419
1507
|
{
|
|
1420
1508
|
href: item.url,
|
|
1421
|
-
className: "text-
|
|
1509
|
+
className: "flex h-15 items-center px-4 text-base font-normal text-muted-foreground hover:bg-muted",
|
|
1422
1510
|
onClick: () => setIsOpen(false),
|
|
1423
1511
|
children: item.title
|
|
1424
1512
|
},
|
|
1425
|
-
index
|
|
1426
|
-
)
|
|
1427
|
-
);
|
|
1513
|
+
`nav-link-${index}`
|
|
1514
|
+
);
|
|
1515
|
+
}) });
|
|
1428
1516
|
}, [menuSlot, menu]);
|
|
1429
1517
|
const {
|
|
1430
1518
|
sectionClasses,
|
|
@@ -1216,7 +1216,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1216
1216
|
// Section wrapper classes - always full width for non-floating variants
|
|
1217
1217
|
sectionClasses: cn(
|
|
1218
1218
|
"inset-x-0 z-20",
|
|
1219
|
-
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1219
|
+
isFloatingBar ? "sticky top-4" : "fixed top-0",
|
|
1220
1220
|
customClasses?.className
|
|
1221
1221
|
),
|
|
1222
1222
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
@@ -1404,18 +1404,10 @@ var NavbarTransparentOverlay = ({
|
|
|
1404
1404
|
onClick: () => setIsOpen(true),
|
|
1405
1405
|
className: cn(
|
|
1406
1406
|
"size-11",
|
|
1407
|
-
!isScrolled && "hover:bg-white/10"
|
|
1407
|
+
!isScrolled && "hover:bg-white/10",
|
|
1408
|
+
isScrolled ? "text-foreground" : "text-white"
|
|
1408
1409
|
),
|
|
1409
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1410
|
-
DynamicIcon,
|
|
1411
|
-
{
|
|
1412
|
-
name: "lucide/menu",
|
|
1413
|
-
size: 16,
|
|
1414
|
-
className: cn(
|
|
1415
|
-
isScrolled ? "stroke-foreground" : "stroke-white"
|
|
1416
|
-
)
|
|
1417
|
-
}
|
|
1418
|
-
)
|
|
1410
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 16 })
|
|
1419
1411
|
}
|
|
1420
1412
|
) })
|
|
1421
1413
|
] }) })
|
|
@@ -1194,7 +1194,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1194
1194
|
// Section wrapper classes - always full width for non-floating variants
|
|
1195
1195
|
sectionClasses: cn(
|
|
1196
1196
|
"inset-x-0 z-20",
|
|
1197
|
-
isFloatingBar ? "sticky top-4" : "top-0",
|
|
1197
|
+
isFloatingBar ? "sticky top-4" : "fixed top-0",
|
|
1198
1198
|
customClasses?.className
|
|
1199
1199
|
),
|
|
1200
1200
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
@@ -1382,18 +1382,10 @@ var NavbarTransparentOverlay = ({
|
|
|
1382
1382
|
onClick: () => setIsOpen(true),
|
|
1383
1383
|
className: cn(
|
|
1384
1384
|
"size-11",
|
|
1385
|
-
!isScrolled && "hover:bg-white/10"
|
|
1385
|
+
!isScrolled && "hover:bg-white/10",
|
|
1386
|
+
isScrolled ? "text-foreground" : "text-white"
|
|
1386
1387
|
),
|
|
1387
|
-
children: /* @__PURE__ */ jsx(
|
|
1388
|
-
DynamicIcon,
|
|
1389
|
-
{
|
|
1390
|
-
name: "lucide/menu",
|
|
1391
|
-
size: 16,
|
|
1392
|
-
className: cn(
|
|
1393
|
-
isScrolled ? "stroke-foreground" : "stroke-white"
|
|
1394
|
-
)
|
|
1395
|
-
}
|
|
1396
|
-
)
|
|
1388
|
+
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 16 })
|
|
1397
1389
|
}
|
|
1398
1390
|
) })
|
|
1399
1391
|
] }) })
|