@opensite/ui 0.9.4 → 0.9.6
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 +71 -29
- package/dist/navbar-animated-preview.js +71 -29
- package/dist/navbar-centered-menu.cjs +101 -31
- package/dist/navbar-centered-menu.js +101 -31
- package/dist/navbar-dark-icons.cjs +72 -30
- package/dist/navbar-dark-icons.js +72 -30
- package/dist/navbar-dropdown-menu.cjs +97 -30
- package/dist/navbar-dropdown-menu.js +97 -30
- package/dist/navbar-education-platform.cjs +71 -26
- package/dist/navbar-education-platform.js +71 -26
- package/dist/navbar-enterprise-mega.cjs +71 -29
- package/dist/navbar-enterprise-mega.js +71 -29
- package/dist/navbar-feature-grid.cjs +81 -28
- package/dist/navbar-feature-grid.js +81 -28
- package/dist/navbar-floating-pill.cjs +71 -26
- package/dist/navbar-floating-pill.js +71 -26
- package/dist/navbar-fullscreen-menu.cjs +71 -26
- package/dist/navbar-fullscreen-menu.js +72 -27
- package/dist/navbar-icon-links.cjs +72 -27
- package/dist/navbar-icon-links.js +72 -27
- package/dist/navbar-image-preview.cjs +2 -2
- package/dist/navbar-image-preview.js +2 -2
- package/dist/navbar-mega-menu.cjs +71 -40
- package/dist/navbar-mega-menu.js +71 -40
- package/dist/navbar-multi-column-groups.cjs +2 -2
- package/dist/navbar-multi-column-groups.js +2 -2
- package/dist/navbar-platform-resources.cjs +71 -26
- package/dist/navbar-platform-resources.js +71 -26
- package/dist/navbar-search-focused.cjs +2 -2
- package/dist/navbar-search-focused.js +2 -2
- package/dist/navbar-sidebar-mobile.cjs +2 -2
- package/dist/navbar-sidebar-mobile.js +2 -2
- package/dist/navbar-simple-links.cjs +72 -27
- package/dist/navbar-simple-links.js +72 -27
- package/dist/navbar-split-cta.cjs +2 -2
- package/dist/navbar-split-cta.js +2 -2
- package/dist/navbar-sticky-compact.cjs +2 -2
- package/dist/navbar-sticky-compact.js +2 -2
- package/dist/navbar-tabbed-sections.cjs +2 -2
- package/dist/navbar-tabbed-sections.js +2 -2
- package/dist/navbar-transparent-overlay.cjs +2 -2
- package/dist/navbar-transparent-overlay.js +2 -2
- package/dist/registry.cjs +242 -345
- package/dist/registry.js +242 -345
- package/package.json +6 -1
|
@@ -6,10 +6,10 @@ var clsx = require('clsx');
|
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var img = require('@page-speed/img');
|
|
10
9
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
11
10
|
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
11
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
12
|
+
var img = require('@page-speed/img');
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -1151,6 +1151,66 @@ function TooltipContent({
|
|
|
1151
1151
|
}
|
|
1152
1152
|
) });
|
|
1153
1153
|
}
|
|
1154
|
+
var NavbarLogo = ({
|
|
1155
|
+
logo,
|
|
1156
|
+
logoSlot,
|
|
1157
|
+
logoClassName,
|
|
1158
|
+
optixFlowConfig
|
|
1159
|
+
}) => {
|
|
1160
|
+
if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
|
|
1161
|
+
if (!logo) return null;
|
|
1162
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1163
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1164
|
+
Pressable,
|
|
1165
|
+
{
|
|
1166
|
+
href: logo.url || "/",
|
|
1167
|
+
className: cn("flex items-center", logoClassName),
|
|
1168
|
+
children: hasResponsiveSources ? (
|
|
1169
|
+
// Responsive logo with desktop/mobile sources
|
|
1170
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1172
|
+
img.Img,
|
|
1173
|
+
{
|
|
1174
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1175
|
+
className: cn(
|
|
1176
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1177
|
+
logo.className
|
|
1178
|
+
),
|
|
1179
|
+
alt: logo.alt || "Logo",
|
|
1180
|
+
optixFlowConfig
|
|
1181
|
+
}
|
|
1182
|
+
),
|
|
1183
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1184
|
+
img.Img,
|
|
1185
|
+
{
|
|
1186
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1187
|
+
className: cn(
|
|
1188
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1189
|
+
logo.className
|
|
1190
|
+
),
|
|
1191
|
+
alt: logo.alt || "Logo",
|
|
1192
|
+
optixFlowConfig
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
] })
|
|
1196
|
+
) : logo.src ? (
|
|
1197
|
+
// Standard single logo image
|
|
1198
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1199
|
+
img.Img,
|
|
1200
|
+
{
|
|
1201
|
+
src: logo.src,
|
|
1202
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1203
|
+
alt: logo.alt || "Logo",
|
|
1204
|
+
optixFlowConfig
|
|
1205
|
+
}
|
|
1206
|
+
)
|
|
1207
|
+
) : (
|
|
1208
|
+
// Text-based logo (title as string or React element)
|
|
1209
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1210
|
+
)
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
};
|
|
1154
1214
|
|
|
1155
1215
|
// lib/mediaPlaceholders.ts
|
|
1156
1216
|
var logoPlaceholders = {
|
|
@@ -1181,14 +1241,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1181
1241
|
),
|
|
1182
1242
|
// Navigation wrapper classes (for border and shadow)
|
|
1183
1243
|
navWrapperClasses: cn(
|
|
1184
|
-
"w-full",
|
|
1244
|
+
"w-full h-16 items-center",
|
|
1185
1245
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1186
1246
|
),
|
|
1187
1247
|
// Section container configuration for full-width navbars
|
|
1188
1248
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1189
1249
|
sectionContainerMaxWidth: "full",
|
|
1190
1250
|
// Spacing adjustment for Section component
|
|
1191
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1251
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1192
1252
|
};
|
|
1193
1253
|
}
|
|
1194
1254
|
var NavbarIconLinks = ({
|
|
@@ -1216,29 +1276,6 @@ var NavbarIconLinks = ({
|
|
|
1216
1276
|
}) => {
|
|
1217
1277
|
const [activeItem, setActiveItem] = React.useState(navItems?.[0]?.title || "");
|
|
1218
1278
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
1219
|
-
const renderLogo = React.useMemo(() => {
|
|
1220
|
-
if (logoSlot) return logoSlot;
|
|
1221
|
-
if (!logo) return null;
|
|
1222
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1223
|
-
Pressable,
|
|
1224
|
-
{
|
|
1225
|
-
href: logo.url || "/",
|
|
1226
|
-
className: cn("flex items-center gap-2", logoClassName),
|
|
1227
|
-
children: [
|
|
1228
|
-
logo.src && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1229
|
-
img.Img,
|
|
1230
|
-
{
|
|
1231
|
-
src: logo.src,
|
|
1232
|
-
className: cn("h-8", logo.className),
|
|
1233
|
-
alt: logo.alt || "Logo",
|
|
1234
|
-
optixFlowConfig
|
|
1235
|
-
}
|
|
1236
|
-
),
|
|
1237
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold", children: logo.title }) : logo.title)
|
|
1238
|
-
]
|
|
1239
|
-
}
|
|
1240
|
-
);
|
|
1241
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1242
1279
|
const renderAuthActions = React.useMemo(() => {
|
|
1243
1280
|
if (authActionsSlot) return authActionsSlot;
|
|
1244
1281
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1302,7 +1339,15 @@ var NavbarIconLinks = ({
|
|
|
1302
1339
|
),
|
|
1303
1340
|
children: [
|
|
1304
1341
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-6", children: [
|
|
1305
|
-
|
|
1342
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1343
|
+
NavbarLogo,
|
|
1344
|
+
{
|
|
1345
|
+
logo,
|
|
1346
|
+
logoSlot,
|
|
1347
|
+
logoClassName,
|
|
1348
|
+
optixFlowConfig
|
|
1349
|
+
}
|
|
1350
|
+
),
|
|
1306
1351
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1307
1352
|
NavigationMenu,
|
|
1308
1353
|
{
|
|
@@ -5,10 +5,10 @@ import { clsx } from 'clsx';
|
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { Img } from '@page-speed/img';
|
|
9
8
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
10
9
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
11
10
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
11
|
+
import { Img } from '@page-speed/img';
|
|
12
12
|
|
|
13
13
|
// components/blocks/navbars/navbar-icon-links.tsx
|
|
14
14
|
function cn(...inputs) {
|
|
@@ -1127,6 +1127,66 @@ function TooltipContent({
|
|
|
1127
1127
|
}
|
|
1128
1128
|
) });
|
|
1129
1129
|
}
|
|
1130
|
+
var NavbarLogo = ({
|
|
1131
|
+
logo,
|
|
1132
|
+
logoSlot,
|
|
1133
|
+
logoClassName,
|
|
1134
|
+
optixFlowConfig
|
|
1135
|
+
}) => {
|
|
1136
|
+
if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
|
|
1137
|
+
if (!logo) return null;
|
|
1138
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1139
|
+
return /* @__PURE__ */ jsx(
|
|
1140
|
+
Pressable,
|
|
1141
|
+
{
|
|
1142
|
+
href: logo.url || "/",
|
|
1143
|
+
className: cn("flex items-center", logoClassName),
|
|
1144
|
+
children: hasResponsiveSources ? (
|
|
1145
|
+
// Responsive logo with desktop/mobile sources
|
|
1146
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1147
|
+
/* @__PURE__ */ jsx(
|
|
1148
|
+
Img,
|
|
1149
|
+
{
|
|
1150
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1151
|
+
className: cn(
|
|
1152
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1153
|
+
logo.className
|
|
1154
|
+
),
|
|
1155
|
+
alt: logo.alt || "Logo",
|
|
1156
|
+
optixFlowConfig
|
|
1157
|
+
}
|
|
1158
|
+
),
|
|
1159
|
+
/* @__PURE__ */ jsx(
|
|
1160
|
+
Img,
|
|
1161
|
+
{
|
|
1162
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1163
|
+
className: cn(
|
|
1164
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1165
|
+
logo.className
|
|
1166
|
+
),
|
|
1167
|
+
alt: logo.alt || "Logo",
|
|
1168
|
+
optixFlowConfig
|
|
1169
|
+
}
|
|
1170
|
+
)
|
|
1171
|
+
] })
|
|
1172
|
+
) : logo.src ? (
|
|
1173
|
+
// Standard single logo image
|
|
1174
|
+
/* @__PURE__ */ jsx(
|
|
1175
|
+
Img,
|
|
1176
|
+
{
|
|
1177
|
+
src: logo.src,
|
|
1178
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1179
|
+
alt: logo.alt || "Logo",
|
|
1180
|
+
optixFlowConfig
|
|
1181
|
+
}
|
|
1182
|
+
)
|
|
1183
|
+
) : (
|
|
1184
|
+
// Text-based logo (title as string or React element)
|
|
1185
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1186
|
+
)
|
|
1187
|
+
}
|
|
1188
|
+
);
|
|
1189
|
+
};
|
|
1130
1190
|
|
|
1131
1191
|
// lib/mediaPlaceholders.ts
|
|
1132
1192
|
var logoPlaceholders = {
|
|
@@ -1157,14 +1217,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1157
1217
|
),
|
|
1158
1218
|
// Navigation wrapper classes (for border and shadow)
|
|
1159
1219
|
navWrapperClasses: cn(
|
|
1160
|
-
"w-full",
|
|
1220
|
+
"w-full h-16 items-center",
|
|
1161
1221
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1162
1222
|
),
|
|
1163
1223
|
// Section container configuration for full-width navbars
|
|
1164
1224
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1165
1225
|
sectionContainerMaxWidth: "full",
|
|
1166
1226
|
// Spacing adjustment for Section component
|
|
1167
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1227
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1168
1228
|
};
|
|
1169
1229
|
}
|
|
1170
1230
|
var NavbarIconLinks = ({
|
|
@@ -1192,29 +1252,6 @@ var NavbarIconLinks = ({
|
|
|
1192
1252
|
}) => {
|
|
1193
1253
|
const [activeItem, setActiveItem] = useState(navItems?.[0]?.title || "");
|
|
1194
1254
|
const [isOpen, setIsOpen] = useState(false);
|
|
1195
|
-
const renderLogo = useMemo(() => {
|
|
1196
|
-
if (logoSlot) return logoSlot;
|
|
1197
|
-
if (!logo) return null;
|
|
1198
|
-
return /* @__PURE__ */ jsxs(
|
|
1199
|
-
Pressable,
|
|
1200
|
-
{
|
|
1201
|
-
href: logo.url || "/",
|
|
1202
|
-
className: cn("flex items-center gap-2", logoClassName),
|
|
1203
|
-
children: [
|
|
1204
|
-
logo.src && /* @__PURE__ */ jsx(
|
|
1205
|
-
Img,
|
|
1206
|
-
{
|
|
1207
|
-
src: logo.src,
|
|
1208
|
-
className: cn("h-8", logo.className),
|
|
1209
|
-
alt: logo.alt || "Logo",
|
|
1210
|
-
optixFlowConfig
|
|
1211
|
-
}
|
|
1212
|
-
),
|
|
1213
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold", children: logo.title }) : logo.title)
|
|
1214
|
-
]
|
|
1215
|
-
}
|
|
1216
|
-
);
|
|
1217
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1218
1255
|
const renderAuthActions = useMemo(() => {
|
|
1219
1256
|
if (authActionsSlot) return authActionsSlot;
|
|
1220
1257
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1278,7 +1315,15 @@ var NavbarIconLinks = ({
|
|
|
1278
1315
|
),
|
|
1279
1316
|
children: [
|
|
1280
1317
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-6", children: [
|
|
1281
|
-
|
|
1318
|
+
/* @__PURE__ */ jsx(
|
|
1319
|
+
NavbarLogo,
|
|
1320
|
+
{
|
|
1321
|
+
logo,
|
|
1322
|
+
logoSlot,
|
|
1323
|
+
logoClassName,
|
|
1324
|
+
optixFlowConfig
|
|
1325
|
+
}
|
|
1326
|
+
),
|
|
1282
1327
|
/* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
1283
1328
|
NavigationMenu,
|
|
1284
1329
|
{
|
|
@@ -1298,14 +1298,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1298
1298
|
),
|
|
1299
1299
|
// Navigation wrapper classes (for border and shadow)
|
|
1300
1300
|
navWrapperClasses: cn(
|
|
1301
|
-
"w-full",
|
|
1301
|
+
"w-full h-16 items-center",
|
|
1302
1302
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1303
1303
|
),
|
|
1304
1304
|
// Section container configuration for full-width navbars
|
|
1305
1305
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1306
1306
|
sectionContainerMaxWidth: "full",
|
|
1307
1307
|
// Spacing adjustment for Section component
|
|
1308
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1308
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1309
1309
|
};
|
|
1310
1310
|
}
|
|
1311
1311
|
var MOBILE_BREAKPOINT = 1024;
|
|
@@ -1275,14 +1275,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1275
1275
|
),
|
|
1276
1276
|
// Navigation wrapper classes (for border and shadow)
|
|
1277
1277
|
navWrapperClasses: cn(
|
|
1278
|
-
"w-full",
|
|
1278
|
+
"w-full h-16 items-center",
|
|
1279
1279
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1280
1280
|
),
|
|
1281
1281
|
// Section container configuration for full-width navbars
|
|
1282
1282
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1283
1283
|
sectionContainerMaxWidth: "full",
|
|
1284
1284
|
// Spacing adjustment for Section component
|
|
1285
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1285
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
var MOBILE_BREAKPOINT = 1024;
|
|
@@ -932,6 +932,66 @@ var Section = React__namespace.default.forwardRef(
|
|
|
932
932
|
}
|
|
933
933
|
);
|
|
934
934
|
Section.displayName = "Section";
|
|
935
|
+
var NavbarLogo = ({
|
|
936
|
+
logo,
|
|
937
|
+
logoSlot,
|
|
938
|
+
logoClassName,
|
|
939
|
+
optixFlowConfig
|
|
940
|
+
}) => {
|
|
941
|
+
if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
|
|
942
|
+
if (!logo) return null;
|
|
943
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
944
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
945
|
+
Pressable,
|
|
946
|
+
{
|
|
947
|
+
href: logo.url || "/",
|
|
948
|
+
className: cn("flex items-center", logoClassName),
|
|
949
|
+
children: hasResponsiveSources ? (
|
|
950
|
+
// Responsive logo with desktop/mobile sources
|
|
951
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
952
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
953
|
+
img.Img,
|
|
954
|
+
{
|
|
955
|
+
src: logo.desktopSrc || logo.src || "",
|
|
956
|
+
className: cn(
|
|
957
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
958
|
+
logo.className
|
|
959
|
+
),
|
|
960
|
+
alt: logo.alt || "Logo",
|
|
961
|
+
optixFlowConfig
|
|
962
|
+
}
|
|
963
|
+
),
|
|
964
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
965
|
+
img.Img,
|
|
966
|
+
{
|
|
967
|
+
src: logo.mobileSrc || logo.src || "",
|
|
968
|
+
className: cn(
|
|
969
|
+
"h-8 w-auto object-contain md:hidden",
|
|
970
|
+
logo.className
|
|
971
|
+
),
|
|
972
|
+
alt: logo.alt || "Logo",
|
|
973
|
+
optixFlowConfig
|
|
974
|
+
}
|
|
975
|
+
)
|
|
976
|
+
] })
|
|
977
|
+
) : logo.src ? (
|
|
978
|
+
// Standard single logo image
|
|
979
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
980
|
+
img.Img,
|
|
981
|
+
{
|
|
982
|
+
src: logo.src,
|
|
983
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
984
|
+
alt: logo.alt || "Logo",
|
|
985
|
+
optixFlowConfig
|
|
986
|
+
}
|
|
987
|
+
)
|
|
988
|
+
) : (
|
|
989
|
+
// Text-based logo (title as string or React element)
|
|
990
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
991
|
+
)
|
|
992
|
+
}
|
|
993
|
+
);
|
|
994
|
+
};
|
|
935
995
|
function NavigationMenu({
|
|
936
996
|
className,
|
|
937
997
|
children,
|
|
@@ -1101,14 +1161,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1101
1161
|
),
|
|
1102
1162
|
// Navigation wrapper classes (for border and shadow)
|
|
1103
1163
|
navWrapperClasses: cn(
|
|
1104
|
-
"w-full",
|
|
1164
|
+
"w-full h-16 items-center",
|
|
1105
1165
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1106
1166
|
),
|
|
1107
1167
|
// Section container configuration for full-width navbars
|
|
1108
1168
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1109
1169
|
sectionContainerMaxWidth: "full",
|
|
1110
1170
|
// Spacing adjustment for Section component
|
|
1111
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1171
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1112
1172
|
};
|
|
1113
1173
|
}
|
|
1114
1174
|
var DesktopMenuItem = ({
|
|
@@ -1309,43 +1369,6 @@ var NavbarMegaMenu = ({
|
|
|
1309
1369
|
const [open, setOpen] = React.useState(false);
|
|
1310
1370
|
const [submenuIndex, setSubmenuIndex] = React.useState(null);
|
|
1311
1371
|
const activeSubmenu = submenuIndex !== null ? menuLinks?.[submenuIndex] : null;
|
|
1312
|
-
const renderLogo = () => {
|
|
1313
|
-
if (logoSlot) return logoSlot;
|
|
1314
|
-
if (!logo) return null;
|
|
1315
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1316
|
-
Pressable,
|
|
1317
|
-
{
|
|
1318
|
-
href: logo.url || "/",
|
|
1319
|
-
className: cn("flex items-center h-16 py-2", logoClassName),
|
|
1320
|
-
children: [
|
|
1321
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1322
|
-
img.Img,
|
|
1323
|
-
{
|
|
1324
|
-
src: logo.desktopSrc,
|
|
1325
|
-
className: cn(
|
|
1326
|
-
"hidden h-full w-auto object-contain dark:invert md:block",
|
|
1327
|
-
logo.className
|
|
1328
|
-
),
|
|
1329
|
-
alt: logo.alt || "Logo",
|
|
1330
|
-
optixFlowConfig
|
|
1331
|
-
}
|
|
1332
|
-
),
|
|
1333
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1334
|
-
img.Img,
|
|
1335
|
-
{
|
|
1336
|
-
src: logo.mobileSrc,
|
|
1337
|
-
className: cn(
|
|
1338
|
-
"h-full w-auto object-contain dark:invert md:hidden",
|
|
1339
|
-
logo.className
|
|
1340
|
-
),
|
|
1341
|
-
alt: logo.alt || "Logo",
|
|
1342
|
-
optixFlowConfig
|
|
1343
|
-
}
|
|
1344
|
-
)
|
|
1345
|
-
]
|
|
1346
|
-
}
|
|
1347
|
-
);
|
|
1348
|
-
};
|
|
1349
1372
|
const hasDropdownItems = (link) => Boolean(link.links?.length || link.dropdownGroups?.length);
|
|
1350
1373
|
const renderActions = () => {
|
|
1351
1374
|
if (!actions || actions.length === 0) return null;
|
|
@@ -1398,7 +1421,15 @@ var NavbarMegaMenu = ({
|
|
|
1398
1421
|
children: [
|
|
1399
1422
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: navWrapperClasses, children: [
|
|
1400
1423
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1401
|
-
(!open || submenuIndex === null) &&
|
|
1424
|
+
(!open || submenuIndex === null) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1425
|
+
NavbarLogo,
|
|
1426
|
+
{
|
|
1427
|
+
logo,
|
|
1428
|
+
logoSlot,
|
|
1429
|
+
logoClassName,
|
|
1430
|
+
optixFlowConfig
|
|
1431
|
+
}
|
|
1432
|
+
),
|
|
1402
1433
|
open && submenuIndex !== null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1403
1434
|
Pressable,
|
|
1404
1435
|
{
|
package/dist/navbar-mega-menu.js
CHANGED
|
@@ -910,6 +910,66 @@ var Section = React__default.forwardRef(
|
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
912
|
Section.displayName = "Section";
|
|
913
|
+
var NavbarLogo = ({
|
|
914
|
+
logo,
|
|
915
|
+
logoSlot,
|
|
916
|
+
logoClassName,
|
|
917
|
+
optixFlowConfig
|
|
918
|
+
}) => {
|
|
919
|
+
if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
|
|
920
|
+
if (!logo) return null;
|
|
921
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
922
|
+
return /* @__PURE__ */ jsx(
|
|
923
|
+
Pressable,
|
|
924
|
+
{
|
|
925
|
+
href: logo.url || "/",
|
|
926
|
+
className: cn("flex items-center", logoClassName),
|
|
927
|
+
children: hasResponsiveSources ? (
|
|
928
|
+
// Responsive logo with desktop/mobile sources
|
|
929
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
930
|
+
/* @__PURE__ */ jsx(
|
|
931
|
+
Img,
|
|
932
|
+
{
|
|
933
|
+
src: logo.desktopSrc || logo.src || "",
|
|
934
|
+
className: cn(
|
|
935
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
936
|
+
logo.className
|
|
937
|
+
),
|
|
938
|
+
alt: logo.alt || "Logo",
|
|
939
|
+
optixFlowConfig
|
|
940
|
+
}
|
|
941
|
+
),
|
|
942
|
+
/* @__PURE__ */ jsx(
|
|
943
|
+
Img,
|
|
944
|
+
{
|
|
945
|
+
src: logo.mobileSrc || logo.src || "",
|
|
946
|
+
className: cn(
|
|
947
|
+
"h-8 w-auto object-contain md:hidden",
|
|
948
|
+
logo.className
|
|
949
|
+
),
|
|
950
|
+
alt: logo.alt || "Logo",
|
|
951
|
+
optixFlowConfig
|
|
952
|
+
}
|
|
953
|
+
)
|
|
954
|
+
] })
|
|
955
|
+
) : logo.src ? (
|
|
956
|
+
// Standard single logo image
|
|
957
|
+
/* @__PURE__ */ jsx(
|
|
958
|
+
Img,
|
|
959
|
+
{
|
|
960
|
+
src: logo.src,
|
|
961
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
962
|
+
alt: logo.alt || "Logo",
|
|
963
|
+
optixFlowConfig
|
|
964
|
+
}
|
|
965
|
+
)
|
|
966
|
+
) : (
|
|
967
|
+
// Text-based logo (title as string or React element)
|
|
968
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
969
|
+
)
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
};
|
|
913
973
|
function NavigationMenu({
|
|
914
974
|
className,
|
|
915
975
|
children,
|
|
@@ -1079,14 +1139,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1079
1139
|
),
|
|
1080
1140
|
// Navigation wrapper classes (for border and shadow)
|
|
1081
1141
|
navWrapperClasses: cn(
|
|
1082
|
-
"w-full",
|
|
1142
|
+
"w-full h-16 items-center",
|
|
1083
1143
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1084
1144
|
),
|
|
1085
1145
|
// Section container configuration for full-width navbars
|
|
1086
1146
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1087
1147
|
sectionContainerMaxWidth: "full",
|
|
1088
1148
|
// Spacing adjustment for Section component
|
|
1089
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1149
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1090
1150
|
};
|
|
1091
1151
|
}
|
|
1092
1152
|
var DesktopMenuItem = ({
|
|
@@ -1287,43 +1347,6 @@ var NavbarMegaMenu = ({
|
|
|
1287
1347
|
const [open, setOpen] = useState(false);
|
|
1288
1348
|
const [submenuIndex, setSubmenuIndex] = useState(null);
|
|
1289
1349
|
const activeSubmenu = submenuIndex !== null ? menuLinks?.[submenuIndex] : null;
|
|
1290
|
-
const renderLogo = () => {
|
|
1291
|
-
if (logoSlot) return logoSlot;
|
|
1292
|
-
if (!logo) return null;
|
|
1293
|
-
return /* @__PURE__ */ jsxs(
|
|
1294
|
-
Pressable,
|
|
1295
|
-
{
|
|
1296
|
-
href: logo.url || "/",
|
|
1297
|
-
className: cn("flex items-center h-16 py-2", logoClassName),
|
|
1298
|
-
children: [
|
|
1299
|
-
/* @__PURE__ */ jsx(
|
|
1300
|
-
Img,
|
|
1301
|
-
{
|
|
1302
|
-
src: logo.desktopSrc,
|
|
1303
|
-
className: cn(
|
|
1304
|
-
"hidden h-full w-auto object-contain dark:invert md:block",
|
|
1305
|
-
logo.className
|
|
1306
|
-
),
|
|
1307
|
-
alt: logo.alt || "Logo",
|
|
1308
|
-
optixFlowConfig
|
|
1309
|
-
}
|
|
1310
|
-
),
|
|
1311
|
-
/* @__PURE__ */ jsx(
|
|
1312
|
-
Img,
|
|
1313
|
-
{
|
|
1314
|
-
src: logo.mobileSrc,
|
|
1315
|
-
className: cn(
|
|
1316
|
-
"h-full w-auto object-contain dark:invert md:hidden",
|
|
1317
|
-
logo.className
|
|
1318
|
-
),
|
|
1319
|
-
alt: logo.alt || "Logo",
|
|
1320
|
-
optixFlowConfig
|
|
1321
|
-
}
|
|
1322
|
-
)
|
|
1323
|
-
]
|
|
1324
|
-
}
|
|
1325
|
-
);
|
|
1326
|
-
};
|
|
1327
1350
|
const hasDropdownItems = (link) => Boolean(link.links?.length || link.dropdownGroups?.length);
|
|
1328
1351
|
const renderActions = () => {
|
|
1329
1352
|
if (!actions || actions.length === 0) return null;
|
|
@@ -1376,7 +1399,15 @@ var NavbarMegaMenu = ({
|
|
|
1376
1399
|
children: [
|
|
1377
1400
|
/* @__PURE__ */ jsxs("div", { className: navWrapperClasses, children: [
|
|
1378
1401
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1379
|
-
(!open || submenuIndex === null) &&
|
|
1402
|
+
(!open || submenuIndex === null) && /* @__PURE__ */ jsx(
|
|
1403
|
+
NavbarLogo,
|
|
1404
|
+
{
|
|
1405
|
+
logo,
|
|
1406
|
+
logoSlot,
|
|
1407
|
+
logoClassName,
|
|
1408
|
+
optixFlowConfig
|
|
1409
|
+
}
|
|
1410
|
+
),
|
|
1380
1411
|
open && submenuIndex !== null && /* @__PURE__ */ jsxs(
|
|
1381
1412
|
Pressable,
|
|
1382
1413
|
{
|
|
@@ -1233,14 +1233,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1233
1233
|
),
|
|
1234
1234
|
// Navigation wrapper classes (for border and shadow)
|
|
1235
1235
|
navWrapperClasses: cn(
|
|
1236
|
-
"w-full",
|
|
1236
|
+
"w-full h-16 items-center",
|
|
1237
1237
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1238
1238
|
),
|
|
1239
1239
|
// Section container configuration for full-width navbars
|
|
1240
1240
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1241
1241
|
sectionContainerMaxWidth: "full",
|
|
1242
1242
|
// Spacing adjustment for Section component
|
|
1243
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1243
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1244
1244
|
};
|
|
1245
1245
|
}
|
|
1246
1246
|
var MOBILE_BREAKPOINT = 1024;
|
|
@@ -1209,14 +1209,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1209
1209
|
),
|
|
1210
1210
|
// Navigation wrapper classes (for border and shadow)
|
|
1211
1211
|
navWrapperClasses: cn(
|
|
1212
|
-
"w-full",
|
|
1212
|
+
"w-full h-16 items-center",
|
|
1213
1213
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1214
1214
|
),
|
|
1215
1215
|
// Section container configuration for full-width navbars
|
|
1216
1216
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1217
1217
|
sectionContainerMaxWidth: "full",
|
|
1218
1218
|
// Spacing adjustment for Section component
|
|
1219
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1219
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
1222
|
var MOBILE_BREAKPOINT = 1024;
|