@opensite/ui 1.1.0 → 1.1.1

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 (41) hide show
  1. package/dist/navbar-animated-preview.cjs +11 -10
  2. package/dist/navbar-animated-preview.js +11 -10
  3. package/dist/navbar-centered-menu.cjs +5 -4
  4. package/dist/navbar-centered-menu.js +5 -4
  5. package/dist/navbar-dark-icons.cjs +5 -4
  6. package/dist/navbar-dark-icons.js +5 -4
  7. package/dist/navbar-dropdown-menu.cjs +5 -4
  8. package/dist/navbar-dropdown-menu.js +5 -4
  9. package/dist/navbar-education-platform.cjs +5 -4
  10. package/dist/navbar-education-platform.js +5 -4
  11. package/dist/navbar-enterprise-mega.cjs +5 -4
  12. package/dist/navbar-enterprise-mega.js +5 -4
  13. package/dist/navbar-feature-grid.cjs +5 -4
  14. package/dist/navbar-feature-grid.js +5 -4
  15. package/dist/navbar-icon-links.cjs +5 -4
  16. package/dist/navbar-icon-links.js +5 -4
  17. package/dist/navbar-image-preview.cjs +5 -4
  18. package/dist/navbar-image-preview.js +5 -4
  19. package/dist/navbar-mega-menu.cjs +5 -4
  20. package/dist/navbar-mega-menu.js +5 -4
  21. package/dist/navbar-multi-column-groups.cjs +5 -4
  22. package/dist/navbar-multi-column-groups.js +5 -4
  23. package/dist/navbar-platform-resources.cjs +5 -4
  24. package/dist/navbar-platform-resources.js +5 -4
  25. package/dist/navbar-search-focused.cjs +176 -97
  26. package/dist/navbar-search-focused.js +176 -97
  27. package/dist/navbar-sidebar-mobile.cjs +5 -4
  28. package/dist/navbar-sidebar-mobile.js +5 -4
  29. package/dist/navbar-simple-links.cjs +5 -4
  30. package/dist/navbar-simple-links.js +5 -4
  31. package/dist/navbar-split-cta.cjs +5 -4
  32. package/dist/navbar-split-cta.js +5 -4
  33. package/dist/navbar-sticky-compact.cjs +7 -16
  34. package/dist/navbar-sticky-compact.js +7 -16
  35. package/dist/navbar-tabbed-sections.cjs +5 -4
  36. package/dist/navbar-tabbed-sections.js +5 -4
  37. package/dist/navbar-transparent-overlay.cjs +6 -4
  38. package/dist/navbar-transparent-overlay.js +6 -4
  39. package/dist/registry.cjs +171 -117
  40. package/dist/registry.js +171 -117
  41. package/package.json +1 -1
@@ -1198,7 +1198,8 @@ var NavbarMobileMenu = ({
1198
1198
  children,
1199
1199
  className,
1200
1200
  contentClassName,
1201
- closeContainerClassName = "",
1201
+ closeContainerClassName,
1202
+ closeIconClassName,
1202
1203
  title = "Mobile Navigation"
1203
1204
  }) => {
1204
1205
  React__namespace.useEffect(() => {
@@ -1227,8 +1228,8 @@ var NavbarMobileMenu = ({
1227
1228
  "div",
1228
1229
  {
1229
1230
  className: cn(
1230
- closeContainerClassName,
1231
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1231
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1232
+ closeContainerClassName
1232
1233
  ),
1233
1234
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1234
1235
  "button",
@@ -1237,7 +1238,7 @@ var NavbarMobileMenu = ({
1237
1238
  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",
1238
1239
  "aria-label": "Close mobile menu",
1239
1240
  children: [
1240
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1241
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1241
1242
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1242
1243
  ]
1243
1244
  }
@@ -1175,7 +1175,8 @@ var NavbarMobileMenu = ({
1175
1175
  children,
1176
1176
  className,
1177
1177
  contentClassName,
1178
- closeContainerClassName = "",
1178
+ closeContainerClassName,
1179
+ closeIconClassName,
1179
1180
  title = "Mobile Navigation"
1180
1181
  }) => {
1181
1182
  React.useEffect(() => {
@@ -1204,8 +1205,8 @@ var NavbarMobileMenu = ({
1204
1205
  "div",
1205
1206
  {
1206
1207
  className: cn(
1207
- closeContainerClassName,
1208
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1208
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1209
+ closeContainerClassName
1209
1210
  ),
1210
1211
  children: /* @__PURE__ */ jsxs(
1211
1212
  "button",
@@ -1214,7 +1215,7 @@ var NavbarMobileMenu = ({
1214
1215
  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",
1215
1216
  "aria-label": "Close mobile menu",
1216
1217
  children: [
1217
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1218
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1218
1219
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1219
1220
  ]
1220
1221
  }
@@ -1198,7 +1198,8 @@ var NavbarMobileMenu = ({
1198
1198
  children,
1199
1199
  className,
1200
1200
  contentClassName,
1201
- closeContainerClassName = "",
1201
+ closeContainerClassName,
1202
+ closeIconClassName,
1202
1203
  title = "Mobile Navigation"
1203
1204
  }) => {
1204
1205
  React__namespace.useEffect(() => {
@@ -1227,8 +1228,8 @@ var NavbarMobileMenu = ({
1227
1228
  "div",
1228
1229
  {
1229
1230
  className: cn(
1230
- closeContainerClassName,
1231
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1231
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1232
+ closeContainerClassName
1232
1233
  ),
1233
1234
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1234
1235
  "button",
@@ -1237,7 +1238,7 @@ var NavbarMobileMenu = ({
1237
1238
  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",
1238
1239
  "aria-label": "Close mobile menu",
1239
1240
  children: [
1240
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1241
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1241
1242
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1242
1243
  ]
1243
1244
  }
@@ -1175,7 +1175,8 @@ var NavbarMobileMenu = ({
1175
1175
  children,
1176
1176
  className,
1177
1177
  contentClassName,
1178
- closeContainerClassName = "",
1178
+ closeContainerClassName,
1179
+ closeIconClassName,
1179
1180
  title = "Mobile Navigation"
1180
1181
  }) => {
1181
1182
  React.useEffect(() => {
@@ -1204,8 +1205,8 @@ var NavbarMobileMenu = ({
1204
1205
  "div",
1205
1206
  {
1206
1207
  className: cn(
1207
- closeContainerClassName,
1208
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1208
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1209
+ closeContainerClassName
1209
1210
  ),
1210
1211
  children: /* @__PURE__ */ jsxs(
1211
1212
  "button",
@@ -1214,7 +1215,7 @@ var NavbarMobileMenu = ({
1214
1215
  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",
1215
1216
  "aria-label": "Close mobile menu",
1216
1217
  children: [
1217
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1218
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1218
1219
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1219
1220
  ]
1220
1221
  }
@@ -1198,7 +1198,8 @@ var NavbarMobileMenu = ({
1198
1198
  children,
1199
1199
  className,
1200
1200
  contentClassName,
1201
- closeContainerClassName = "",
1201
+ closeContainerClassName,
1202
+ closeIconClassName,
1202
1203
  title = "Mobile Navigation"
1203
1204
  }) => {
1204
1205
  React__namespace.useEffect(() => {
@@ -1227,8 +1228,8 @@ var NavbarMobileMenu = ({
1227
1228
  "div",
1228
1229
  {
1229
1230
  className: cn(
1230
- closeContainerClassName,
1231
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1231
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1232
+ closeContainerClassName
1232
1233
  ),
1233
1234
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1234
1235
  "button",
@@ -1237,7 +1238,7 @@ var NavbarMobileMenu = ({
1237
1238
  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",
1238
1239
  "aria-label": "Close mobile menu",
1239
1240
  children: [
1240
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1241
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1241
1242
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1242
1243
  ]
1243
1244
  }
@@ -1175,7 +1175,8 @@ var NavbarMobileMenu = ({
1175
1175
  children,
1176
1176
  className,
1177
1177
  contentClassName,
1178
- closeContainerClassName = "",
1178
+ closeContainerClassName,
1179
+ closeIconClassName,
1179
1180
  title = "Mobile Navigation"
1180
1181
  }) => {
1181
1182
  React.useEffect(() => {
@@ -1204,8 +1205,8 @@ var NavbarMobileMenu = ({
1204
1205
  "div",
1205
1206
  {
1206
1207
  className: cn(
1207
- closeContainerClassName,
1208
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1208
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1209
+ closeContainerClassName
1209
1210
  ),
1210
1211
  children: /* @__PURE__ */ jsxs(
1211
1212
  "button",
@@ -1214,7 +1215,7 @@ var NavbarMobileMenu = ({
1214
1215
  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",
1215
1216
  "aria-label": "Close mobile menu",
1216
1217
  children: [
1217
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1218
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1218
1219
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1219
1220
  ]
1220
1221
  }
@@ -992,6 +992,22 @@ var NavbarLogo = ({
992
992
  }
993
993
  );
994
994
  };
995
+ function Input({ className, type, ...props }) {
996
+ return /* @__PURE__ */ jsxRuntime.jsx(
997
+ "input",
998
+ {
999
+ type,
1000
+ "data-slot": "input",
1001
+ className: cn(
1002
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1003
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1004
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1005
+ className
1006
+ ),
1007
+ ...props
1008
+ }
1009
+ );
1010
+ }
995
1011
  function NavigationMenu({
996
1012
  className,
997
1013
  children,
@@ -1093,7 +1109,8 @@ var NavbarMobileMenu = ({
1093
1109
  children,
1094
1110
  className,
1095
1111
  contentClassName,
1096
- closeContainerClassName = "",
1112
+ closeContainerClassName,
1113
+ closeIconClassName,
1097
1114
  title = "Mobile Navigation"
1098
1115
  }) => {
1099
1116
  React__namespace.useEffect(() => {
@@ -1122,8 +1139,8 @@ var NavbarMobileMenu = ({
1122
1139
  "div",
1123
1140
  {
1124
1141
  className: cn(
1125
- closeContainerClassName,
1126
- "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
1142
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
1143
+ closeContainerClassName
1127
1144
  ),
1128
1145
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1129
1146
  "button",
@@ -1132,7 +1149,7 @@ var NavbarMobileMenu = ({
1132
1149
  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",
1133
1150
  "aria-label": "Close mobile menu",
1134
1151
  children: [
1135
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
1152
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
1136
1153
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1137
1154
  ]
1138
1155
  }
@@ -1215,6 +1232,11 @@ var NavbarSearchFocused = ({
1215
1232
  optixFlowConfig
1216
1233
  }) => {
1217
1234
  const [isOpen, setIsOpen] = React.useState(false);
1235
+ const [searchQuery, setSearchQuery] = React.useState("");
1236
+ const handleSearchSubmit = (e) => {
1237
+ e.preventDefault();
1238
+ onSearch?.(searchQuery);
1239
+ };
1218
1240
  const renderNavigation = (items) => {
1219
1241
  if (navigationSlot) return navigationSlot;
1220
1242
  if (!items || items.length === 0) return null;
@@ -1260,7 +1282,7 @@ var NavbarSearchFocused = ({
1260
1282
  );
1261
1283
  });
1262
1284
  }, [authActionsSlot, authActions]);
1263
- const renderMobileMenuActions = React.useMemo(() => {
1285
+ React.useMemo(() => {
1264
1286
  if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
1265
1287
  if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
1266
1288
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: mobileMenuActions.map((action, index) => {
@@ -1289,100 +1311,157 @@ var NavbarSearchFocused = ({
1289
1311
  sectionContainerMaxWidth,
1290
1312
  spacingOverride
1291
1313
  } = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
1292
- return /* @__PURE__ */ jsxRuntime.jsx(
1293
- Section,
1294
- {
1295
- background,
1296
- spacing: spacingOverride ?? spacing,
1297
- className: sectionClasses,
1298
- pattern,
1299
- patternOpacity,
1300
- containerClassName: sectionContainerClassName,
1301
- containerMaxWidth: sectionContainerMaxWidth,
1302
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
1303
- "nav",
1304
- {
1305
- className: cn(
1306
- "flex items-center gap-4 py-3 lg:gap-8",
1307
- navClassName
1308
- ),
1309
- children: [
1310
- /* @__PURE__ */ jsxRuntime.jsx(
1311
- NavbarLogo,
1312
- {
1313
- logo,
1314
- logoSlot,
1315
- logoClassName,
1316
- optixFlowConfig
1317
- }
1318
- ),
1319
- /* @__PURE__ */ jsxRuntime.jsx(
1320
- NavigationMenu,
1321
- {
1322
- className: cn("hidden lg:flex", navigationMenuClassName),
1323
- children: renderNavigation(navItems?.slice(0, 2) ?? [])
1324
- }
1325
- ),
1326
- /* @__PURE__ */ jsxRuntime.jsx(
1327
- NavigationMenu,
1328
- {
1329
- className: cn("hidden lg:flex", navigationMenuClassName),
1330
- children: renderNavigation(navItems?.slice(2) ?? [])
1331
- }
1314
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1315
+ /* @__PURE__ */ jsxRuntime.jsx(
1316
+ Section,
1317
+ {
1318
+ background,
1319
+ spacing: spacingOverride ?? spacing,
1320
+ className: sectionClasses,
1321
+ pattern,
1322
+ patternOpacity,
1323
+ containerClassName: sectionContainerClassName,
1324
+ containerMaxWidth: sectionContainerMaxWidth,
1325
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxRuntime.jsxs(
1326
+ "nav",
1327
+ {
1328
+ className: cn(
1329
+ "flex items-center justify-between gap-4 py-3 lg:gap-6",
1330
+ navClassName
1332
1331
  ),
1333
- /* @__PURE__ */ jsxRuntime.jsx(
1334
- "div",
1335
- {
1336
- className: cn(
1337
- "hidden shrink-0 items-center gap-2 lg:flex",
1338
- actionsClassName
1332
+ children: [
1333
+ /* @__PURE__ */ jsxRuntime.jsx(
1334
+ NavbarLogo,
1335
+ {
1336
+ logo,
1337
+ logoSlot,
1338
+ logoClassName,
1339
+ optixFlowConfig
1340
+ }
1341
+ ),
1342
+ /* @__PURE__ */ jsxRuntime.jsx(
1343
+ NavigationMenu,
1344
+ {
1345
+ className: cn("hidden lg:flex", navigationMenuClassName),
1346
+ children: renderNavigation(navItems ?? [])
1347
+ }
1348
+ ),
1349
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-1 max-w-md lg:block", children: searchSlot ?? /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSearchSubmit, className: "relative", children: [
1350
+ /* @__PURE__ */ jsxRuntime.jsx(
1351
+ DynamicIcon,
1352
+ {
1353
+ name: "lucide/search",
1354
+ size: 16,
1355
+ className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
1356
+ }
1339
1357
  ),
1340
- children: renderAuthActions
1341
- }
1342
- ),
1343
- /* @__PURE__ */ jsxRuntime.jsxs(
1344
- Pressable,
1345
- {
1346
- variant: "ghost",
1347
- size: "icon",
1348
- asButton: true,
1349
- className: "lg:hidden",
1350
- onClick: () => setIsOpen(!isOpen),
1351
- children: [
1352
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
1353
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
1354
- ]
1355
- }
1356
- ),
1357
- /* @__PURE__ */ jsxRuntime.jsx(
1358
- NavbarMobileMenu,
1359
- {
1360
- open: isOpen,
1361
- onClose: () => setIsOpen(false),
1362
- title: "Navigation Menu",
1363
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
1364
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: navItems?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
1365
- Pressable,
1366
- {
1367
- href: item.url,
1368
- className: "flex items-center gap-2 rounded-md py-2 text-base font-medium",
1369
- onClick: () => setIsOpen(false),
1370
- children: [
1371
- item.icon ?? (item.iconName && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 16 })),
1372
- item.title
1373
- ]
1374
- },
1375
- index
1376
- )) }),
1377
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t pt-4 mt-6", children: renderMobileMenuActions })
1378
- ] })
1379
- }
1380
- )
1381
- ]
1382
- }
1383
- ) }) }) })
1384
- }
1385
- );
1358
+ /* @__PURE__ */ jsxRuntime.jsx(
1359
+ Input,
1360
+ {
1361
+ type: "search",
1362
+ placeholder: typeof searchPlaceholder === "string" ? searchPlaceholder : "Search...",
1363
+ value: searchQuery,
1364
+ onChange: (e) => setSearchQuery(e.target.value),
1365
+ className: "pl-9 pr-4"
1366
+ }
1367
+ )
1368
+ ] }) }),
1369
+ /* @__PURE__ */ jsxRuntime.jsx(
1370
+ "div",
1371
+ {
1372
+ className: cn(
1373
+ "hidden shrink-0 items-center gap-2 lg:flex",
1374
+ actionsClassName
1375
+ ),
1376
+ children: renderAuthActions
1377
+ }
1378
+ ),
1379
+ /* @__PURE__ */ jsxRuntime.jsxs(
1380
+ Pressable,
1381
+ {
1382
+ variant: "ghost",
1383
+ size: "icon",
1384
+ asButton: true,
1385
+ className: "lg:hidden",
1386
+ onClick: () => setIsOpen(!isOpen),
1387
+ children: [
1388
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
1389
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
1390
+ ]
1391
+ }
1392
+ )
1393
+ ]
1394
+ }
1395
+ ) }) }) })
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ jsxRuntime.jsx(
1399
+ MobileNavigationMenu,
1400
+ {
1401
+ open: isOpen,
1402
+ setOpen: setIsOpen,
1403
+ navItems: navItems ?? [],
1404
+ navigationSlot,
1405
+ mobileMenuActions: mobileMenuActions ?? authActions,
1406
+ mobileMenuActionsSlot: mobileMenuActionsSlot ?? authActionsSlot
1407
+ }
1408
+ )
1409
+ ] });
1410
+ };
1411
+ var MobileNavigationMenu = ({
1412
+ open,
1413
+ setOpen,
1414
+ navItems,
1415
+ navigationSlot,
1416
+ mobileMenuActions,
1417
+ mobileMenuActionsSlot
1418
+ }) => {
1419
+ const handleClose = () => setOpen(false);
1420
+ const renderMobileActions = React.useMemo(() => {
1421
+ if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
1422
+ if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
1423
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex flex-col gap-4", children: mobileMenuActions.map((action, index) => {
1424
+ const {
1425
+ label,
1426
+ icon,
1427
+ iconAfter,
1428
+ children,
1429
+ className: actionClassName,
1430
+ ...pressableProps
1431
+ } = action;
1432
+ return /* @__PURE__ */ jsxRuntime.jsx(
1433
+ Pressable,
1434
+ {
1435
+ asButton: true,
1436
+ className: cn("w-full", actionClassName),
1437
+ onClick: handleClose,
1438
+ ...pressableProps,
1439
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1440
+ icon,
1441
+ label,
1442
+ iconAfter
1443
+ ] })
1444
+ },
1445
+ index
1446
+ );
1447
+ }) });
1448
+ }, [mobileMenuActionsSlot, mobileMenuActions]);
1449
+ return /* @__PURE__ */ jsxRuntime.jsx(NavbarMobileMenu, { open, onClose: handleClose, title: "Navigation Menu", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
1450
+ navigationSlot ?? /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col", children: navItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
1451
+ Pressable,
1452
+ {
1453
+ href: item.url,
1454
+ className: "flex h-15 items-center gap-2 rounded-md 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",
1455
+ onClick: handleClose,
1456
+ children: [
1457
+ item.icon ?? (item.iconName && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 16 })),
1458
+ item.title
1459
+ ]
1460
+ },
1461
+ `nav-link-${index}`
1462
+ )) }),
1463
+ renderMobileActions
1464
+ ] }) }) });
1386
1465
  };
1387
1466
 
1388
1467
  exports.NavbarSearchFocused = NavbarSearchFocused;