@opensite/ui 1.0.3 → 1.0.5
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 +67 -82
- package/dist/navbar-animated-preview.js +67 -81
- package/dist/navbar-centered-menu.cjs +101 -125
- package/dist/navbar-centered-menu.js +101 -124
- package/dist/navbar-dark-icons.cjs +67 -81
- package/dist/navbar-dark-icons.js +67 -80
- package/dist/navbar-dropdown-menu.cjs +87 -122
- package/dist/navbar-dropdown-menu.js +87 -121
- package/dist/navbar-education-platform.cjs +1 -1
- package/dist/navbar-education-platform.js +1 -1
- package/dist/navbar-enterprise-mega.cjs +7 -7
- package/dist/navbar-enterprise-mega.js +7 -7
- package/dist/navbar-feature-grid.cjs +131 -150
- package/dist/navbar-feature-grid.d.cts +9 -1
- package/dist/navbar-feature-grid.d.ts +9 -1
- package/dist/navbar-feature-grid.js +131 -149
- package/dist/navbar-floating-pill.cjs +2 -2
- package/dist/navbar-floating-pill.js +2 -2
- package/dist/navbar-fullscreen-menu.cjs +1 -1
- package/dist/navbar-fullscreen-menu.js +1 -1
- package/dist/navbar-icon-links.cjs +102 -138
- package/dist/navbar-icon-links.js +102 -137
- package/dist/navbar-image-preview.cjs +64 -95
- package/dist/navbar-image-preview.js +64 -94
- package/dist/navbar-mega-menu.cjs +1 -1
- package/dist/navbar-mega-menu.js +1 -1
- package/dist/navbar-multi-column-groups.cjs +67 -81
- package/dist/navbar-multi-column-groups.js +67 -80
- package/dist/navbar-platform-resources.cjs +80 -42
- package/dist/navbar-platform-resources.js +80 -42
- package/dist/navbar-search-focused.cjs +76 -93
- package/dist/navbar-search-focused.js +76 -92
- package/dist/navbar-sidebar-mobile.cjs +76 -93
- package/dist/navbar-sidebar-mobile.js +76 -92
- package/dist/navbar-simple-links.cjs +1 -1
- package/dist/navbar-simple-links.js +1 -1
- package/dist/navbar-split-cta.cjs +78 -95
- package/dist/navbar-split-cta.js +78 -94
- package/dist/navbar-sticky-compact.cjs +82 -100
- package/dist/navbar-sticky-compact.js +82 -99
- package/dist/navbar-tabbed-sections.cjs +91 -115
- package/dist/navbar-tabbed-sections.js +91 -114
- package/dist/navbar-transparent-overlay.cjs +1 -1
- package/dist/navbar-transparent-overlay.js +1 -1
- package/dist/registry.cjs +594 -618
- package/dist/registry.js +593 -617
- package/package.json +1 -1
|
@@ -1169,6 +1169,62 @@ function NavigationMenuLink({
|
|
|
1169
1169
|
}
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
|
+
var NavbarMobileMenu = ({
|
|
1173
|
+
open,
|
|
1174
|
+
onClose,
|
|
1175
|
+
children,
|
|
1176
|
+
className,
|
|
1177
|
+
contentClassName,
|
|
1178
|
+
title = "Mobile Navigation"
|
|
1179
|
+
}) => {
|
|
1180
|
+
React.useEffect(() => {
|
|
1181
|
+
if (open) {
|
|
1182
|
+
const originalOverflow = document.body.style.overflow;
|
|
1183
|
+
document.body.style.overflow = "hidden";
|
|
1184
|
+
return () => {
|
|
1185
|
+
document.body.style.overflow = originalOverflow;
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
}, [open]);
|
|
1189
|
+
if (!open) return null;
|
|
1190
|
+
return /* @__PURE__ */ jsxs(
|
|
1191
|
+
"div",
|
|
1192
|
+
{
|
|
1193
|
+
className: cn(
|
|
1194
|
+
"fixed inset-0 z-[998] flex flex-col bg-background",
|
|
1195
|
+
"animate-in slide-in-from-top duration-300",
|
|
1196
|
+
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=closed]:duration-300",
|
|
1197
|
+
className
|
|
1198
|
+
),
|
|
1199
|
+
"data-state": open ? "open" : "closed",
|
|
1200
|
+
children: [
|
|
1201
|
+
/* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("h2", { children: title }) }),
|
|
1202
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsxs(
|
|
1203
|
+
"button",
|
|
1204
|
+
{
|
|
1205
|
+
onClick: onClose,
|
|
1206
|
+
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",
|
|
1207
|
+
"aria-label": "Close mobile menu",
|
|
1208
|
+
children: [
|
|
1209
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1210
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1211
|
+
]
|
|
1212
|
+
}
|
|
1213
|
+
) }),
|
|
1214
|
+
/* @__PURE__ */ jsx(
|
|
1215
|
+
"div",
|
|
1216
|
+
{
|
|
1217
|
+
className: cn(
|
|
1218
|
+
"h-full overflow-y-auto pt-20 pb-8 px-4 sm:px-6",
|
|
1219
|
+
contentClassName
|
|
1220
|
+
),
|
|
1221
|
+
children
|
|
1222
|
+
}
|
|
1223
|
+
)
|
|
1224
|
+
]
|
|
1225
|
+
}
|
|
1226
|
+
);
|
|
1227
|
+
};
|
|
1172
1228
|
|
|
1173
1229
|
// components/blocks/navbars/types.ts
|
|
1174
1230
|
function getLinkUrl(item) {
|
|
@@ -1190,7 +1246,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1190
1246
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
1191
1247
|
containerWrapperClasses: cn(
|
|
1192
1248
|
"w-full",
|
|
1193
|
-
isFloatingBar && "mx-auto
|
|
1249
|
+
isFloatingBar && "mx-auto container relative z-10 px-0 sm:px-0 lg:px-0"
|
|
1194
1250
|
),
|
|
1195
1251
|
// Inner container classes (only for fullScreenContainerizedLinks - this containerizes the content inside the navbar)
|
|
1196
1252
|
innerContainerClasses: cn(
|
|
@@ -1587,53 +1643,41 @@ var NavbarPlatformResources = ({
|
|
|
1587
1643
|
}
|
|
1588
1644
|
) })
|
|
1589
1645
|
] }),
|
|
1590
|
-
|
|
1591
|
-
|
|
1646
|
+
/* @__PURE__ */ jsx(
|
|
1647
|
+
NavbarMobileMenu,
|
|
1592
1648
|
{
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
children: [
|
|
1598
|
-
/* @__PURE__ */ jsx(Accordion, { type: "
|
|
1649
|
+
open,
|
|
1650
|
+
onClose: () => setOpen(false),
|
|
1651
|
+
title: "Mobile Navigation",
|
|
1652
|
+
contentClassName: "pt-10 pb-20",
|
|
1653
|
+
children: /* @__PURE__ */ jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
|
|
1654
|
+
/* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menuLinks?.map((link, index) => {
|
|
1599
1655
|
if (hasDropdownItems(link)) {
|
|
1600
1656
|
return /* @__PURE__ */ jsxs(
|
|
1601
1657
|
AccordionItem,
|
|
1602
1658
|
{
|
|
1603
1659
|
value: `menu-${index}`,
|
|
1604
|
-
className: "border-b-
|
|
1660
|
+
className: "border-b-0",
|
|
1605
1661
|
children: [
|
|
1606
|
-
/* @__PURE__ */ jsx(AccordionTrigger, { className: "
|
|
1607
|
-
/* @__PURE__ */ jsx(AccordionContent, { className: "
|
|
1662
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { className: "h-15 items-center text-base font-normal text-foreground hover:no-underline", children: link.label }),
|
|
1663
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "max-h-[60dvh] overflow-y-auto space-y-2", children: link.links?.map((item, itemIndex) => /* @__PURE__ */ jsxs(
|
|
1608
1664
|
Pressable,
|
|
1609
1665
|
{
|
|
1610
1666
|
href: getLinkUrl(item),
|
|
1611
|
-
className: "
|
|
1667
|
+
className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground hover:text-foreground",
|
|
1612
1668
|
children: [
|
|
1613
|
-
item.
|
|
1614
|
-
Img,
|
|
1615
|
-
{
|
|
1616
|
-
src: item.image,
|
|
1617
|
-
alt: typeof item.label === "string" ? item.label : "Menu item",
|
|
1618
|
-
className: "h-full w-full object-cover object-center",
|
|
1619
|
-
optixFlowConfig
|
|
1620
|
-
}
|
|
1621
|
-
) }),
|
|
1622
|
-
!item.image && (item.icon || item.iconName) && /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-md border border-border bg-muted/40 text-muted-foreground", children: item.icon ? item.icon : item.iconName ? /* @__PURE__ */ jsx(
|
|
1669
|
+
(item.icon || item.iconName) && (item.icon ? item.icon : item.iconName ? /* @__PURE__ */ jsx(
|
|
1623
1670
|
DynamicIcon,
|
|
1624
1671
|
{
|
|
1625
1672
|
name: item.iconName,
|
|
1626
|
-
size:
|
|
1673
|
+
size: 14
|
|
1627
1674
|
}
|
|
1628
|
-
) : null
|
|
1629
|
-
|
|
1630
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: item.label }),
|
|
1631
|
-
item.description && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: item.description })
|
|
1632
|
-
] })
|
|
1675
|
+
) : null),
|
|
1676
|
+
item.label
|
|
1633
1677
|
]
|
|
1634
1678
|
},
|
|
1635
1679
|
`${typeof item.label === "string" ? item.label : "item"}-${itemIndex}`
|
|
1636
|
-
)) })
|
|
1680
|
+
)) })
|
|
1637
1681
|
]
|
|
1638
1682
|
},
|
|
1639
1683
|
`${typeof link.label === "string" ? link.label : "menu"}-${index}`
|
|
@@ -1643,17 +1687,11 @@ var NavbarPlatformResources = ({
|
|
|
1643
1687
|
return null;
|
|
1644
1688
|
}
|
|
1645
1689
|
return /* @__PURE__ */ jsx(
|
|
1646
|
-
|
|
1690
|
+
Pressable,
|
|
1647
1691
|
{
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
{
|
|
1652
|
-
href: link.href,
|
|
1653
|
-
className: "flex w-full items-center px-2 py-4 text-left text-sm font-medium",
|
|
1654
|
-
children: link.label
|
|
1655
|
-
}
|
|
1656
|
-
)
|
|
1692
|
+
href: link.href,
|
|
1693
|
+
className: "flex h-15 items-center text-base font-normal text-foreground",
|
|
1694
|
+
children: link.label
|
|
1657
1695
|
},
|
|
1658
1696
|
`${typeof link.label === "string" ? link.label : "menu"}-${index}`
|
|
1659
1697
|
);
|
|
@@ -1662,13 +1700,13 @@ var NavbarPlatformResources = ({
|
|
|
1662
1700
|
"div",
|
|
1663
1701
|
{
|
|
1664
1702
|
className: cn(
|
|
1665
|
-
"
|
|
1703
|
+
"mt-6 flex flex-col gap-4",
|
|
1666
1704
|
actionsClassName
|
|
1667
1705
|
),
|
|
1668
1706
|
children: renderActions
|
|
1669
1707
|
}
|
|
1670
1708
|
)
|
|
1671
|
-
]
|
|
1709
|
+
] })
|
|
1672
1710
|
}
|
|
1673
1711
|
)
|
|
1674
1712
|
]
|
|
@@ -8,7 +8,6 @@ var classVarianceAuthority = require('class-variance-authority');
|
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var img = require('@page-speed/img');
|
|
10
10
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
11
|
-
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
11
|
|
|
13
12
|
function _interopNamespace(e) {
|
|
14
13
|
if (e && e.__esModule) return e;
|
|
@@ -30,7 +29,6 @@ function _interopNamespace(e) {
|
|
|
30
29
|
|
|
31
30
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
31
|
var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
|
|
33
|
-
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
34
32
|
|
|
35
33
|
// components/blocks/navbars/navbar-search-focused.tsx
|
|
36
34
|
function cn(...inputs) {
|
|
@@ -826,14 +824,14 @@ function PatternBackground({
|
|
|
826
824
|
);
|
|
827
825
|
}
|
|
828
826
|
if (pattern in patternOverlays) {
|
|
829
|
-
const
|
|
827
|
+
const Overlay = patternOverlays[pattern];
|
|
830
828
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
831
829
|
"div",
|
|
832
830
|
{
|
|
833
831
|
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
834
832
|
style: { opacity, ...style },
|
|
835
833
|
"aria-hidden": "true",
|
|
836
|
-
children:
|
|
834
|
+
children: Overlay()
|
|
837
835
|
}
|
|
838
836
|
);
|
|
839
837
|
}
|
|
@@ -1089,80 +1087,62 @@ function NavigationMenuLink({
|
|
|
1089
1087
|
}
|
|
1090
1088
|
);
|
|
1091
1089
|
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
...props
|
|
1097
|
-
}) {
|
|
1098
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
1099
|
-
}
|
|
1100
|
-
function SheetPortal({
|
|
1101
|
-
...props
|
|
1102
|
-
}) {
|
|
1103
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1104
|
-
}
|
|
1105
|
-
function SheetOverlay({
|
|
1090
|
+
var NavbarMobileMenu = ({
|
|
1091
|
+
open,
|
|
1092
|
+
onClose,
|
|
1093
|
+
children,
|
|
1106
1094
|
className,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1095
|
+
contentClassName,
|
|
1096
|
+
title = "Mobile Navigation"
|
|
1097
|
+
}) => {
|
|
1098
|
+
React__namespace.useEffect(() => {
|
|
1099
|
+
if (open) {
|
|
1100
|
+
const originalOverflow = document.body.style.overflow;
|
|
1101
|
+
document.body.style.overflow = "hidden";
|
|
1102
|
+
return () => {
|
|
1103
|
+
document.body.style.overflow = originalOverflow;
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
}, [open]);
|
|
1107
|
+
if (!open) return null;
|
|
1108
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1109
|
+
"div",
|
|
1111
1110
|
{
|
|
1112
|
-
"data-slot": "sheet-overlay",
|
|
1113
1111
|
className: cn(
|
|
1114
|
-
"
|
|
1112
|
+
"fixed inset-0 z-[998] flex flex-col bg-background",
|
|
1113
|
+
"animate-in slide-in-from-top duration-300",
|
|
1114
|
+
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=closed]:duration-300",
|
|
1115
1115
|
className
|
|
1116
1116
|
),
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
children,
|
|
1144
|
-
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
1145
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1146
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1147
|
-
] })
|
|
1148
|
-
]
|
|
1149
|
-
}
|
|
1150
|
-
)
|
|
1151
|
-
] });
|
|
1152
|
-
}
|
|
1153
|
-
function SheetTitle({
|
|
1154
|
-
className,
|
|
1155
|
-
...props
|
|
1156
|
-
}) {
|
|
1157
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1158
|
-
SheetPrimitive__namespace.Title,
|
|
1159
|
-
{
|
|
1160
|
-
"data-slot": "sheet-title",
|
|
1161
|
-
className: cn("text-foreground font-semibold", className),
|
|
1162
|
-
...props
|
|
1117
|
+
"data-state": open ? "open" : "closed",
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }) }),
|
|
1120
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1121
|
+
"button",
|
|
1122
|
+
{
|
|
1123
|
+
onClick: onClose,
|
|
1124
|
+
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",
|
|
1125
|
+
"aria-label": "Close mobile menu",
|
|
1126
|
+
children: [
|
|
1127
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1128
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1129
|
+
]
|
|
1130
|
+
}
|
|
1131
|
+
) }),
|
|
1132
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1133
|
+
"div",
|
|
1134
|
+
{
|
|
1135
|
+
className: cn(
|
|
1136
|
+
"h-full overflow-y-auto pt-20 pb-8 px-4 sm:px-6",
|
|
1137
|
+
contentClassName
|
|
1138
|
+
),
|
|
1139
|
+
children
|
|
1140
|
+
}
|
|
1141
|
+
)
|
|
1142
|
+
]
|
|
1163
1143
|
}
|
|
1164
1144
|
);
|
|
1165
|
-
}
|
|
1145
|
+
};
|
|
1166
1146
|
|
|
1167
1147
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1168
1148
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1179,7 +1159,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1179
1159
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
1180
1160
|
containerWrapperClasses: cn(
|
|
1181
1161
|
"w-full",
|
|
1182
|
-
isFloatingBar && "mx-auto
|
|
1162
|
+
isFloatingBar && "mx-auto container relative z-10 px-0 sm:px-0 lg:px-0"
|
|
1183
1163
|
),
|
|
1184
1164
|
// Inner container classes (only for fullScreenContainerizedLinks - this containerizes the content inside the navbar)
|
|
1185
1165
|
innerContainerClasses: cn(
|
|
@@ -1350,24 +1330,27 @@ var NavbarSearchFocused = ({
|
|
|
1350
1330
|
children: renderAuthActions
|
|
1351
1331
|
}
|
|
1352
1332
|
),
|
|
1353
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1333
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1334
|
+
Pressable,
|
|
1335
|
+
{
|
|
1336
|
+
variant: "ghost",
|
|
1337
|
+
size: "icon",
|
|
1338
|
+
asButton: true,
|
|
1339
|
+
className: "lg:hidden",
|
|
1340
|
+
onClick: () => setIsOpen(!isOpen),
|
|
1341
|
+
children: [
|
|
1342
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
|
|
1343
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1344
|
+
]
|
|
1345
|
+
}
|
|
1346
|
+
),
|
|
1347
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1348
|
+
NavbarMobileMenu,
|
|
1349
|
+
{
|
|
1350
|
+
open: isOpen,
|
|
1351
|
+
onClose: () => setIsOpen(false),
|
|
1352
|
+
title: "Navigation Menu",
|
|
1353
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
|
|
1371
1354
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: navItems?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1372
1355
|
Pressable,
|
|
1373
1356
|
{
|
|
@@ -1381,10 +1364,10 @@ var NavbarSearchFocused = ({
|
|
|
1381
1364
|
},
|
|
1382
1365
|
index
|
|
1383
1366
|
)) }),
|
|
1384
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t pt-4", children: renderMobileMenuActions })
|
|
1367
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t pt-4 mt-6", children: renderMobileMenuActions })
|
|
1385
1368
|
] })
|
|
1386
|
-
|
|
1387
|
-
|
|
1369
|
+
}
|
|
1370
|
+
)
|
|
1388
1371
|
]
|
|
1389
1372
|
}
|
|
1390
1373
|
) }) }) })
|
|
@@ -7,7 +7,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
9
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
10
|
-
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
11
10
|
|
|
12
11
|
// components/blocks/navbars/navbar-search-focused.tsx
|
|
13
12
|
function cn(...inputs) {
|
|
@@ -803,14 +802,14 @@ function PatternBackground({
|
|
|
803
802
|
);
|
|
804
803
|
}
|
|
805
804
|
if (pattern in patternOverlays) {
|
|
806
|
-
const
|
|
805
|
+
const Overlay = patternOverlays[pattern];
|
|
807
806
|
return /* @__PURE__ */ jsx(
|
|
808
807
|
"div",
|
|
809
808
|
{
|
|
810
809
|
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
811
810
|
style: { opacity, ...style },
|
|
812
811
|
"aria-hidden": "true",
|
|
813
|
-
children:
|
|
812
|
+
children: Overlay()
|
|
814
813
|
}
|
|
815
814
|
);
|
|
816
815
|
}
|
|
@@ -1066,80 +1065,62 @@ function NavigationMenuLink({
|
|
|
1066
1065
|
}
|
|
1067
1066
|
);
|
|
1068
1067
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
...props
|
|
1074
|
-
}) {
|
|
1075
|
-
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
1076
|
-
}
|
|
1077
|
-
function SheetPortal({
|
|
1078
|
-
...props
|
|
1079
|
-
}) {
|
|
1080
|
-
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1081
|
-
}
|
|
1082
|
-
function SheetOverlay({
|
|
1068
|
+
var NavbarMobileMenu = ({
|
|
1069
|
+
open,
|
|
1070
|
+
onClose,
|
|
1071
|
+
children,
|
|
1083
1072
|
className,
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1073
|
+
contentClassName,
|
|
1074
|
+
title = "Mobile Navigation"
|
|
1075
|
+
}) => {
|
|
1076
|
+
React.useEffect(() => {
|
|
1077
|
+
if (open) {
|
|
1078
|
+
const originalOverflow = document.body.style.overflow;
|
|
1079
|
+
document.body.style.overflow = "hidden";
|
|
1080
|
+
return () => {
|
|
1081
|
+
document.body.style.overflow = originalOverflow;
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
}, [open]);
|
|
1085
|
+
if (!open) return null;
|
|
1086
|
+
return /* @__PURE__ */ jsxs(
|
|
1087
|
+
"div",
|
|
1088
1088
|
{
|
|
1089
|
-
"data-slot": "sheet-overlay",
|
|
1090
1089
|
className: cn(
|
|
1091
|
-
"
|
|
1090
|
+
"fixed inset-0 z-[998] flex flex-col bg-background",
|
|
1091
|
+
"animate-in slide-in-from-top duration-300",
|
|
1092
|
+
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=closed]:duration-300",
|
|
1092
1093
|
className
|
|
1093
1094
|
),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
children,
|
|
1121
|
-
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
1122
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1123
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1124
|
-
] })
|
|
1125
|
-
]
|
|
1126
|
-
}
|
|
1127
|
-
)
|
|
1128
|
-
] });
|
|
1129
|
-
}
|
|
1130
|
-
function SheetTitle({
|
|
1131
|
-
className,
|
|
1132
|
-
...props
|
|
1133
|
-
}) {
|
|
1134
|
-
return /* @__PURE__ */ jsx(
|
|
1135
|
-
SheetPrimitive.Title,
|
|
1136
|
-
{
|
|
1137
|
-
"data-slot": "sheet-title",
|
|
1138
|
-
className: cn("text-foreground font-semibold", className),
|
|
1139
|
-
...props
|
|
1095
|
+
"data-state": open ? "open" : "closed",
|
|
1096
|
+
children: [
|
|
1097
|
+
/* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("h2", { children: title }) }),
|
|
1098
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsxs(
|
|
1099
|
+
"button",
|
|
1100
|
+
{
|
|
1101
|
+
onClick: onClose,
|
|
1102
|
+
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",
|
|
1103
|
+
"aria-label": "Close mobile menu",
|
|
1104
|
+
children: [
|
|
1105
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
1106
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1107
|
+
]
|
|
1108
|
+
}
|
|
1109
|
+
) }),
|
|
1110
|
+
/* @__PURE__ */ jsx(
|
|
1111
|
+
"div",
|
|
1112
|
+
{
|
|
1113
|
+
className: cn(
|
|
1114
|
+
"h-full overflow-y-auto pt-20 pb-8 px-4 sm:px-6",
|
|
1115
|
+
contentClassName
|
|
1116
|
+
),
|
|
1117
|
+
children
|
|
1118
|
+
}
|
|
1119
|
+
)
|
|
1120
|
+
]
|
|
1140
1121
|
}
|
|
1141
1122
|
);
|
|
1142
|
-
}
|
|
1123
|
+
};
|
|
1143
1124
|
|
|
1144
1125
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1145
1126
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1156,7 +1137,7 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1156
1137
|
// Outer container wrapper (only for floating bar - this containerizes the entire navbar)
|
|
1157
1138
|
containerWrapperClasses: cn(
|
|
1158
1139
|
"w-full",
|
|
1159
|
-
isFloatingBar && "mx-auto
|
|
1140
|
+
isFloatingBar && "mx-auto container relative z-10 px-0 sm:px-0 lg:px-0"
|
|
1160
1141
|
),
|
|
1161
1142
|
// Inner container classes (only for fullScreenContainerizedLinks - this containerizes the content inside the navbar)
|
|
1162
1143
|
innerContainerClasses: cn(
|
|
@@ -1327,24 +1308,27 @@ var NavbarSearchFocused = ({
|
|
|
1327
1308
|
children: renderAuthActions
|
|
1328
1309
|
}
|
|
1329
1310
|
),
|
|
1330
|
-
/* @__PURE__ */ jsxs(
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1311
|
+
/* @__PURE__ */ jsxs(
|
|
1312
|
+
Pressable,
|
|
1313
|
+
{
|
|
1314
|
+
variant: "ghost",
|
|
1315
|
+
size: "icon",
|
|
1316
|
+
asButton: true,
|
|
1317
|
+
className: "lg:hidden",
|
|
1318
|
+
onClick: () => setIsOpen(!isOpen),
|
|
1319
|
+
children: [
|
|
1320
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
|
|
1321
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1322
|
+
]
|
|
1323
|
+
}
|
|
1324
|
+
),
|
|
1325
|
+
/* @__PURE__ */ jsx(
|
|
1326
|
+
NavbarMobileMenu,
|
|
1327
|
+
{
|
|
1328
|
+
open: isOpen,
|
|
1329
|
+
onClose: () => setIsOpen(false),
|
|
1330
|
+
title: "Navigation Menu",
|
|
1331
|
+
children: /* @__PURE__ */ jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
|
|
1348
1332
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: navItems?.map((item, index) => /* @__PURE__ */ jsxs(
|
|
1349
1333
|
Pressable,
|
|
1350
1334
|
{
|
|
@@ -1358,10 +1342,10 @@ var NavbarSearchFocused = ({
|
|
|
1358
1342
|
},
|
|
1359
1343
|
index
|
|
1360
1344
|
)) }),
|
|
1361
|
-
/* @__PURE__ */ jsx("div", { className: "border-t pt-4", children: renderMobileMenuActions })
|
|
1345
|
+
/* @__PURE__ */ jsx("div", { className: "border-t pt-4 mt-6", children: renderMobileMenuActions })
|
|
1362
1346
|
] })
|
|
1363
|
-
|
|
1364
|
-
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1365
1349
|
]
|
|
1366
1350
|
}
|
|
1367
1351
|
) }) }) })
|