@opensite/ui 1.1.0 → 1.1.2
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 +15 -11
- package/dist/navbar-animated-preview.js +15 -11
- package/dist/navbar-centered-menu.cjs +8 -4
- package/dist/navbar-centered-menu.js +8 -4
- package/dist/navbar-dark-icons.cjs +8 -4
- package/dist/navbar-dark-icons.js +8 -4
- package/dist/navbar-dropdown-menu.cjs +8 -4
- package/dist/navbar-dropdown-menu.js +8 -4
- package/dist/navbar-education-platform.cjs +8 -4
- package/dist/navbar-education-platform.js +8 -4
- package/dist/navbar-enterprise-mega.cjs +8 -4
- package/dist/navbar-enterprise-mega.js +8 -4
- package/dist/navbar-feature-grid.cjs +8 -4
- package/dist/navbar-feature-grid.js +8 -4
- package/dist/navbar-icon-links.cjs +8 -4
- package/dist/navbar-icon-links.js +8 -4
- package/dist/navbar-image-preview.cjs +8 -4
- package/dist/navbar-image-preview.js +8 -4
- package/dist/navbar-mega-menu.cjs +8 -4
- package/dist/navbar-mega-menu.js +8 -4
- package/dist/navbar-multi-column-groups.cjs +8 -4
- package/dist/navbar-multi-column-groups.js +8 -4
- package/dist/navbar-platform-resources.cjs +8 -4
- package/dist/navbar-platform-resources.js +8 -4
- package/dist/navbar-search-focused.cjs +179 -97
- package/dist/navbar-search-focused.js +179 -97
- package/dist/navbar-sidebar-mobile.cjs +8 -4
- package/dist/navbar-sidebar-mobile.js +8 -4
- package/dist/navbar-simple-links.cjs +8 -4
- package/dist/navbar-simple-links.js +8 -4
- package/dist/navbar-split-cta.cjs +8 -4
- package/dist/navbar-split-cta.js +8 -4
- package/dist/navbar-sticky-compact.cjs +10 -16
- package/dist/navbar-sticky-compact.js +10 -16
- package/dist/navbar-tabbed-sections.cjs +8 -4
- package/dist/navbar-tabbed-sections.js +8 -4
- package/dist/navbar-transparent-overlay.cjs +9 -4
- package/dist/navbar-transparent-overlay.js +9 -4
- package/dist/registry.cjs +175 -118
- package/dist/registry.js +175 -118
- package/package.json +1 -1
|
@@ -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,14 +1205,17 @@ var NavbarMobileMenu = ({
|
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
1207
|
className: cn(
|
|
1207
|
-
|
|
1208
|
-
|
|
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",
|
|
1212
1213
|
{
|
|
1213
1214
|
onClick: onClose,
|
|
1214
|
-
className:
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"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",
|
|
1217
|
+
closeIconClassName
|
|
1218
|
+
),
|
|
1215
1219
|
"aria-label": "Close mobile menu",
|
|
1216
1220
|
children: [
|
|
1217
1221
|
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1228,17 @@ var NavbarMobileMenu = ({
|
|
|
1227
1228
|
"div",
|
|
1228
1229
|
{
|
|
1229
1230
|
className: cn(
|
|
1230
|
-
|
|
1231
|
-
|
|
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",
|
|
1235
1236
|
{
|
|
1236
1237
|
onClick: onClose,
|
|
1237
|
-
className:
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"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",
|
|
1240
|
+
closeIconClassName
|
|
1241
|
+
),
|
|
1238
1242
|
"aria-label": "Close mobile menu",
|
|
1239
1243
|
children: [
|
|
1240
1244
|
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
package/dist/navbar-mega-menu.js
CHANGED
|
@@ -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,14 +1205,17 @@ var NavbarMobileMenu = ({
|
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
1207
|
className: cn(
|
|
1207
|
-
|
|
1208
|
-
|
|
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",
|
|
1212
1213
|
{
|
|
1213
1214
|
onClick: onClose,
|
|
1214
|
-
className:
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"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",
|
|
1217
|
+
closeIconClassName
|
|
1218
|
+
),
|
|
1215
1219
|
"aria-label": "Close mobile menu",
|
|
1216
1220
|
children: [
|
|
1217
1221
|
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1228,17 @@ var NavbarMobileMenu = ({
|
|
|
1227
1228
|
"div",
|
|
1228
1229
|
{
|
|
1229
1230
|
className: cn(
|
|
1230
|
-
|
|
1231
|
-
|
|
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",
|
|
1235
1236
|
{
|
|
1236
1237
|
onClick: onClose,
|
|
1237
|
-
className:
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"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",
|
|
1240
|
+
closeIconClassName
|
|
1241
|
+
),
|
|
1238
1242
|
"aria-label": "Close mobile menu",
|
|
1239
1243
|
children: [
|
|
1240
1244
|
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1205,17 @@ var NavbarMobileMenu = ({
|
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
1207
|
className: cn(
|
|
1207
|
-
|
|
1208
|
-
|
|
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",
|
|
1212
1213
|
{
|
|
1213
1214
|
onClick: onClose,
|
|
1214
|
-
className:
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"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",
|
|
1217
|
+
closeIconClassName
|
|
1218
|
+
),
|
|
1215
1219
|
"aria-label": "Close mobile menu",
|
|
1216
1220
|
children: [
|
|
1217
1221
|
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1228,17 @@ var NavbarMobileMenu = ({
|
|
|
1227
1228
|
"div",
|
|
1228
1229
|
{
|
|
1229
1230
|
className: cn(
|
|
1230
|
-
|
|
1231
|
-
|
|
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",
|
|
1235
1236
|
{
|
|
1236
1237
|
onClick: onClose,
|
|
1237
|
-
className:
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"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",
|
|
1240
|
+
closeIconClassName
|
|
1241
|
+
),
|
|
1238
1242
|
"aria-label": "Close mobile menu",
|
|
1239
1243
|
children: [
|
|
1240
1244
|
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1205,17 @@ var NavbarMobileMenu = ({
|
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
1207
|
className: cn(
|
|
1207
|
-
|
|
1208
|
-
|
|
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",
|
|
1212
1213
|
{
|
|
1213
1214
|
onClick: onClose,
|
|
1214
|
-
className:
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"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",
|
|
1217
|
+
closeIconClassName
|
|
1218
|
+
),
|
|
1215
1219
|
"aria-label": "Close mobile menu",
|
|
1216
1220
|
children: [
|
|
1217
1221
|
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -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,14 +1139,17 @@ var NavbarMobileMenu = ({
|
|
|
1122
1139
|
"div",
|
|
1123
1140
|
{
|
|
1124
1141
|
className: cn(
|
|
1125
|
-
|
|
1126
|
-
|
|
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",
|
|
1130
1147
|
{
|
|
1131
1148
|
onClick: onClose,
|
|
1132
|
-
className:
|
|
1149
|
+
className: cn(
|
|
1150
|
+
"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",
|
|
1151
|
+
closeIconClassName
|
|
1152
|
+
),
|
|
1133
1153
|
"aria-label": "Close mobile menu",
|
|
1134
1154
|
children: [
|
|
1135
1155
|
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
|
|
@@ -1215,6 +1235,11 @@ var NavbarSearchFocused = ({
|
|
|
1215
1235
|
optixFlowConfig
|
|
1216
1236
|
}) => {
|
|
1217
1237
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
1238
|
+
const [searchQuery, setSearchQuery] = React.useState("");
|
|
1239
|
+
const handleSearchSubmit = (e) => {
|
|
1240
|
+
e.preventDefault();
|
|
1241
|
+
onSearch?.(searchQuery);
|
|
1242
|
+
};
|
|
1218
1243
|
const renderNavigation = (items) => {
|
|
1219
1244
|
if (navigationSlot) return navigationSlot;
|
|
1220
1245
|
if (!items || items.length === 0) return null;
|
|
@@ -1260,7 +1285,7 @@ var NavbarSearchFocused = ({
|
|
|
1260
1285
|
);
|
|
1261
1286
|
});
|
|
1262
1287
|
}, [authActionsSlot, authActions]);
|
|
1263
|
-
|
|
1288
|
+
React.useMemo(() => {
|
|
1264
1289
|
if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
|
|
1265
1290
|
if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
|
|
1266
1291
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: mobileMenuActions.map((action, index) => {
|
|
@@ -1289,100 +1314,157 @@ var NavbarSearchFocused = ({
|
|
|
1289
1314
|
sectionContainerMaxWidth,
|
|
1290
1315
|
spacingOverride
|
|
1291
1316
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1292
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
"
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
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
|
-
}
|
|
1317
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1318
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
|
+
Section,
|
|
1320
|
+
{
|
|
1321
|
+
background,
|
|
1322
|
+
spacing: spacingOverride ?? spacing,
|
|
1323
|
+
className: sectionClasses,
|
|
1324
|
+
pattern,
|
|
1325
|
+
patternOpacity,
|
|
1326
|
+
containerClassName: sectionContainerClassName,
|
|
1327
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1328
|
+
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(
|
|
1329
|
+
"nav",
|
|
1330
|
+
{
|
|
1331
|
+
className: cn(
|
|
1332
|
+
"flex items-center justify-between gap-4 py-3 lg:gap-6",
|
|
1333
|
+
navClassName
|
|
1332
1334
|
),
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1335
|
+
children: [
|
|
1336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1337
|
+
NavbarLogo,
|
|
1338
|
+
{
|
|
1339
|
+
logo,
|
|
1340
|
+
logoSlot,
|
|
1341
|
+
logoClassName,
|
|
1342
|
+
optixFlowConfig
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1346
|
+
NavigationMenu,
|
|
1347
|
+
{
|
|
1348
|
+
className: cn("hidden lg:flex", navigationMenuClassName),
|
|
1349
|
+
children: renderNavigation(navItems ?? [])
|
|
1350
|
+
}
|
|
1351
|
+
),
|
|
1352
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden flex-1 max-w-md lg:block", children: searchSlot ?? /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSearchSubmit, className: "relative", children: [
|
|
1353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1354
|
+
DynamicIcon,
|
|
1355
|
+
{
|
|
1356
|
+
name: "lucide/search",
|
|
1357
|
+
size: 16,
|
|
1358
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
1359
|
+
}
|
|
1339
1360
|
),
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1361
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1362
|
+
Input,
|
|
1363
|
+
{
|
|
1364
|
+
type: "search",
|
|
1365
|
+
placeholder: typeof searchPlaceholder === "string" ? searchPlaceholder : "Search...",
|
|
1366
|
+
value: searchQuery,
|
|
1367
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
1368
|
+
className: "pl-9 pr-4"
|
|
1369
|
+
}
|
|
1370
|
+
)
|
|
1371
|
+
] }) }),
|
|
1372
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1373
|
+
"div",
|
|
1374
|
+
{
|
|
1375
|
+
className: cn(
|
|
1376
|
+
"hidden shrink-0 items-center gap-2 lg:flex",
|
|
1377
|
+
actionsClassName
|
|
1378
|
+
),
|
|
1379
|
+
children: renderAuthActions
|
|
1380
|
+
}
|
|
1381
|
+
),
|
|
1382
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1383
|
+
Pressable,
|
|
1384
|
+
{
|
|
1385
|
+
variant: "ghost",
|
|
1386
|
+
size: "icon",
|
|
1387
|
+
asButton: true,
|
|
1388
|
+
className: "lg:hidden",
|
|
1389
|
+
onClick: () => setIsOpen(!isOpen),
|
|
1390
|
+
children: [
|
|
1391
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
|
|
1392
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1393
|
+
]
|
|
1394
|
+
}
|
|
1395
|
+
)
|
|
1396
|
+
]
|
|
1397
|
+
}
|
|
1398
|
+
) }) }) })
|
|
1399
|
+
}
|
|
1400
|
+
),
|
|
1401
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1402
|
+
MobileNavigationMenu,
|
|
1403
|
+
{
|
|
1404
|
+
open: isOpen,
|
|
1405
|
+
setOpen: setIsOpen,
|
|
1406
|
+
navItems: navItems ?? [],
|
|
1407
|
+
navigationSlot,
|
|
1408
|
+
mobileMenuActions: mobileMenuActions ?? authActions,
|
|
1409
|
+
mobileMenuActionsSlot: mobileMenuActionsSlot ?? authActionsSlot
|
|
1410
|
+
}
|
|
1411
|
+
)
|
|
1412
|
+
] });
|
|
1413
|
+
};
|
|
1414
|
+
var MobileNavigationMenu = ({
|
|
1415
|
+
open,
|
|
1416
|
+
setOpen,
|
|
1417
|
+
navItems,
|
|
1418
|
+
navigationSlot,
|
|
1419
|
+
mobileMenuActions,
|
|
1420
|
+
mobileMenuActionsSlot
|
|
1421
|
+
}) => {
|
|
1422
|
+
const handleClose = () => setOpen(false);
|
|
1423
|
+
const renderMobileActions = React.useMemo(() => {
|
|
1424
|
+
if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
|
|
1425
|
+
if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
|
|
1426
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex flex-col gap-4", children: mobileMenuActions.map((action, index) => {
|
|
1427
|
+
const {
|
|
1428
|
+
label,
|
|
1429
|
+
icon,
|
|
1430
|
+
iconAfter,
|
|
1431
|
+
children,
|
|
1432
|
+
className: actionClassName,
|
|
1433
|
+
...pressableProps
|
|
1434
|
+
} = action;
|
|
1435
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1436
|
+
Pressable,
|
|
1437
|
+
{
|
|
1438
|
+
asButton: true,
|
|
1439
|
+
className: cn("w-full", actionClassName),
|
|
1440
|
+
onClick: handleClose,
|
|
1441
|
+
...pressableProps,
|
|
1442
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1443
|
+
icon,
|
|
1444
|
+
label,
|
|
1445
|
+
iconAfter
|
|
1446
|
+
] })
|
|
1447
|
+
},
|
|
1448
|
+
index
|
|
1449
|
+
);
|
|
1450
|
+
}) });
|
|
1451
|
+
}, [mobileMenuActionsSlot, mobileMenuActions]);
|
|
1452
|
+
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: [
|
|
1453
|
+
navigationSlot ?? /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col", children: navItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1454
|
+
Pressable,
|
|
1455
|
+
{
|
|
1456
|
+
href: item.url,
|
|
1457
|
+
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",
|
|
1458
|
+
onClick: handleClose,
|
|
1459
|
+
children: [
|
|
1460
|
+
item.icon ?? (item.iconName && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 16 })),
|
|
1461
|
+
item.title
|
|
1462
|
+
]
|
|
1463
|
+
},
|
|
1464
|
+
`nav-link-${index}`
|
|
1465
|
+
)) }),
|
|
1466
|
+
renderMobileActions
|
|
1467
|
+
] }) }) });
|
|
1386
1468
|
};
|
|
1387
1469
|
|
|
1388
1470
|
exports.NavbarSearchFocused = NavbarSearchFocused;
|