@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.
Files changed (47) hide show
  1. package/dist/navbar-animated-preview.cjs +67 -82
  2. package/dist/navbar-animated-preview.js +67 -81
  3. package/dist/navbar-centered-menu.cjs +101 -125
  4. package/dist/navbar-centered-menu.js +101 -124
  5. package/dist/navbar-dark-icons.cjs +67 -81
  6. package/dist/navbar-dark-icons.js +67 -80
  7. package/dist/navbar-dropdown-menu.cjs +87 -122
  8. package/dist/navbar-dropdown-menu.js +87 -121
  9. package/dist/navbar-education-platform.cjs +1 -1
  10. package/dist/navbar-education-platform.js +1 -1
  11. package/dist/navbar-enterprise-mega.cjs +7 -7
  12. package/dist/navbar-enterprise-mega.js +7 -7
  13. package/dist/navbar-feature-grid.cjs +131 -150
  14. package/dist/navbar-feature-grid.d.cts +9 -1
  15. package/dist/navbar-feature-grid.d.ts +9 -1
  16. package/dist/navbar-feature-grid.js +131 -149
  17. package/dist/navbar-floating-pill.cjs +2 -2
  18. package/dist/navbar-floating-pill.js +2 -2
  19. package/dist/navbar-fullscreen-menu.cjs +1 -1
  20. package/dist/navbar-fullscreen-menu.js +1 -1
  21. package/dist/navbar-icon-links.cjs +102 -138
  22. package/dist/navbar-icon-links.js +102 -137
  23. package/dist/navbar-image-preview.cjs +64 -95
  24. package/dist/navbar-image-preview.js +64 -94
  25. package/dist/navbar-mega-menu.cjs +1 -1
  26. package/dist/navbar-mega-menu.js +1 -1
  27. package/dist/navbar-multi-column-groups.cjs +67 -81
  28. package/dist/navbar-multi-column-groups.js +67 -80
  29. package/dist/navbar-platform-resources.cjs +80 -42
  30. package/dist/navbar-platform-resources.js +80 -42
  31. package/dist/navbar-search-focused.cjs +76 -93
  32. package/dist/navbar-search-focused.js +76 -92
  33. package/dist/navbar-sidebar-mobile.cjs +76 -93
  34. package/dist/navbar-sidebar-mobile.js +76 -92
  35. package/dist/navbar-simple-links.cjs +1 -1
  36. package/dist/navbar-simple-links.js +1 -1
  37. package/dist/navbar-split-cta.cjs +78 -95
  38. package/dist/navbar-split-cta.js +78 -94
  39. package/dist/navbar-sticky-compact.cjs +82 -100
  40. package/dist/navbar-sticky-compact.js +82 -99
  41. package/dist/navbar-tabbed-sections.cjs +91 -115
  42. package/dist/navbar-tabbed-sections.js +91 -114
  43. package/dist/navbar-transparent-overlay.cjs +1 -1
  44. package/dist/navbar-transparent-overlay.js +1 -1
  45. package/dist/registry.cjs +594 -618
  46. package/dist/registry.js +593 -617
  47. 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 w-full px-2 sm:px-4 lg:px-8 max-w-7xl relative z-10"
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
- open && /* @__PURE__ */ jsxs(
1591
- "div",
1646
+ /* @__PURE__ */ jsx(
1647
+ NavbarMobileMenu,
1592
1648
  {
1593
- className: cn(
1594
- "absolute inset-0 top-[72px] flex h-[calc(100vh-72px)] w-full flex-col overflow-scroll border-t border-border bg-background lg:hidden",
1595
- mobileMenuClassName
1596
- ),
1597
- children: [
1598
- /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "w-full", children: menuLinks?.map((link, index) => {
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-2 border-dashed",
1660
+ className: "border-b-0",
1605
1661
  children: [
1606
- /* @__PURE__ */ jsx(AccordionTrigger, { className: "px-2 py-4 text-left hover:no-underline", children: link.label }),
1607
- /* @__PURE__ */ jsx(AccordionContent, { className: "px-2 pb-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: link.links?.map((item, itemIndex) => /* @__PURE__ */ jsxs(
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: "group flex items-start gap-4 rounded-lg p-2 hover:bg-muted",
1667
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground hover:text-foreground",
1612
1668
  children: [
1613
- item.image && /* @__PURE__ */ jsx("div", { className: "h-10 w-10 overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsx(
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: 16
1673
+ size: 14
1627
1674
  }
1628
- ) : null }),
1629
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
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
- "div",
1690
+ Pressable,
1647
1691
  {
1648
- className: "border-b-2 border-dashed",
1649
- children: /* @__PURE__ */ jsx(
1650
- Pressable,
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
- "mx-8 mt-auto flex flex-col gap-4 py-12",
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 Overlay2 = patternOverlays[pattern];
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: Overlay2()
834
+ children: Overlay()
837
835
  }
838
836
  );
839
837
  }
@@ -1089,80 +1087,62 @@ function NavigationMenuLink({
1089
1087
  }
1090
1088
  );
1091
1089
  }
1092
- function Sheet({ ...props }) {
1093
- return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
1094
- }
1095
- function SheetTrigger({
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
- ...props
1108
- }) {
1109
- return /* @__PURE__ */ jsxRuntime.jsx(
1110
- SheetPrimitive__namespace.Overlay,
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
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
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
- ...props
1118
- }
1119
- );
1120
- }
1121
- function SheetContent({
1122
- className,
1123
- children,
1124
- side = "right",
1125
- ...props
1126
- }) {
1127
- return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
1128
- /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
1129
- /* @__PURE__ */ jsxRuntime.jsxs(
1130
- SheetPrimitive__namespace.Content,
1131
- {
1132
- "data-slot": "sheet-content",
1133
- className: cn(
1134
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1135
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
1136
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
1137
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
1138
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
1139
- className
1140
- ),
1141
- ...props,
1142
- children: [
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 w-full px-2 sm:px-4 lg:px-8 max-w-7xl relative z-10"
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(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [
1354
- /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, className: "lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(
1355
- Pressable,
1356
- {
1357
- variant: "ghost",
1358
- size: "icon",
1359
- asButton: true,
1360
- onClick: () => {
1361
- },
1362
- children: [
1363
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
1364
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
1365
- ]
1366
- }
1367
- ) }),
1368
- /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-[280px]", children: [
1369
- /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Navigation Menu" }),
1370
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 pt-8", children: [
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 Overlay2 = patternOverlays[pattern];
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: Overlay2()
812
+ children: Overlay()
814
813
  }
815
814
  );
816
815
  }
@@ -1066,80 +1065,62 @@ function NavigationMenuLink({
1066
1065
  }
1067
1066
  );
1068
1067
  }
1069
- function Sheet({ ...props }) {
1070
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
1071
- }
1072
- function SheetTrigger({
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
- ...props
1085
- }) {
1086
- return /* @__PURE__ */ jsx(
1087
- SheetPrimitive.Overlay,
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
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
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
- ...props
1095
- }
1096
- );
1097
- }
1098
- function SheetContent({
1099
- className,
1100
- children,
1101
- side = "right",
1102
- ...props
1103
- }) {
1104
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1105
- /* @__PURE__ */ jsx(SheetOverlay, {}),
1106
- /* @__PURE__ */ jsxs(
1107
- SheetPrimitive.Content,
1108
- {
1109
- "data-slot": "sheet-content",
1110
- className: cn(
1111
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1112
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
1113
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
1114
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
1115
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
1116
- className
1117
- ),
1118
- ...props,
1119
- children: [
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 w-full px-2 sm:px-4 lg:px-8 max-w-7xl relative z-10"
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(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [
1331
- /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, className: "lg:hidden", children: /* @__PURE__ */ jsxs(
1332
- Pressable,
1333
- {
1334
- variant: "ghost",
1335
- size: "icon",
1336
- asButton: true,
1337
- onClick: () => {
1338
- },
1339
- children: [
1340
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
1341
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
1342
- ]
1343
- }
1344
- ) }),
1345
- /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-[280px]", children: [
1346
- /* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Navigation Menu" }),
1347
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 pt-8", children: [
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
  ) }) }) })