@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 AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
11
10
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
12
11
|
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
|
+
var img = require('@page-speed/img');
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -1203,6 +1203,66 @@ function SheetTitle({
|
|
|
1203
1203
|
}
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
|
+
var NavbarLogo = ({
|
|
1207
|
+
logo,
|
|
1208
|
+
logoSlot,
|
|
1209
|
+
logoClassName,
|
|
1210
|
+
optixFlowConfig
|
|
1211
|
+
}) => {
|
|
1212
|
+
if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
|
|
1213
|
+
if (!logo) return null;
|
|
1214
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1215
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1216
|
+
Pressable,
|
|
1217
|
+
{
|
|
1218
|
+
href: logo.url || "/",
|
|
1219
|
+
className: cn("flex items-center", logoClassName),
|
|
1220
|
+
children: hasResponsiveSources ? (
|
|
1221
|
+
// Responsive logo with desktop/mobile sources
|
|
1222
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1223
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1224
|
+
img.Img,
|
|
1225
|
+
{
|
|
1226
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1227
|
+
className: cn(
|
|
1228
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1229
|
+
logo.className
|
|
1230
|
+
),
|
|
1231
|
+
alt: logo.alt || "Logo",
|
|
1232
|
+
optixFlowConfig
|
|
1233
|
+
}
|
|
1234
|
+
),
|
|
1235
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1236
|
+
img.Img,
|
|
1237
|
+
{
|
|
1238
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1239
|
+
className: cn(
|
|
1240
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1241
|
+
logo.className
|
|
1242
|
+
),
|
|
1243
|
+
alt: logo.alt || "Logo",
|
|
1244
|
+
optixFlowConfig
|
|
1245
|
+
}
|
|
1246
|
+
)
|
|
1247
|
+
] })
|
|
1248
|
+
) : logo.src ? (
|
|
1249
|
+
// Standard single logo image
|
|
1250
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1251
|
+
img.Img,
|
|
1252
|
+
{
|
|
1253
|
+
src: logo.src,
|
|
1254
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1255
|
+
alt: logo.alt || "Logo",
|
|
1256
|
+
optixFlowConfig
|
|
1257
|
+
}
|
|
1258
|
+
)
|
|
1259
|
+
) : (
|
|
1260
|
+
// Text-based logo (title as string or React element)
|
|
1261
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1262
|
+
)
|
|
1263
|
+
}
|
|
1264
|
+
);
|
|
1265
|
+
};
|
|
1206
1266
|
|
|
1207
1267
|
// lib/mediaPlaceholders.ts
|
|
1208
1268
|
var logoPlaceholders = {
|
|
@@ -1233,14 +1293,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1233
1293
|
),
|
|
1234
1294
|
// Navigation wrapper classes (for border and shadow)
|
|
1235
1295
|
navWrapperClasses: cn(
|
|
1236
|
-
"w-full",
|
|
1296
|
+
"w-full h-16 items-center",
|
|
1237
1297
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1238
1298
|
),
|
|
1239
1299
|
// Section container configuration for full-width navbars
|
|
1240
1300
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1241
1301
|
sectionContainerMaxWidth: "full",
|
|
1242
1302
|
// Spacing adjustment for Section component
|
|
1243
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1303
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1244
1304
|
};
|
|
1245
1305
|
}
|
|
1246
1306
|
var MOBILE_BREAKPOINT = 1024;
|
|
@@ -1291,32 +1351,6 @@ var NavbarDarkIcons = ({
|
|
|
1291
1351
|
const handleMobileMenu = () => {
|
|
1292
1352
|
setOpen(!open);
|
|
1293
1353
|
};
|
|
1294
|
-
const renderLogo = React.useMemo(() => {
|
|
1295
|
-
if (logoSlot) return logoSlot;
|
|
1296
|
-
if (!logo) return null;
|
|
1297
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1298
|
-
Pressable,
|
|
1299
|
-
{
|
|
1300
|
-
href: logo.url || "/",
|
|
1301
|
-
className: cn(
|
|
1302
|
-
"flex max-h-8 items-center gap-2 text-lg font-semibold tracking-tighter",
|
|
1303
|
-
logoClassName
|
|
1304
|
-
),
|
|
1305
|
-
children: [
|
|
1306
|
-
logo.src && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1307
|
-
img.Img,
|
|
1308
|
-
{
|
|
1309
|
-
src: logo.src,
|
|
1310
|
-
alt: logo.alt || "Logo",
|
|
1311
|
-
className: cn("inline-block size-8 invert", logo.className),
|
|
1312
|
-
optixFlowConfig
|
|
1313
|
-
}
|
|
1314
|
-
),
|
|
1315
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden md:inline-block", children: logo.title }) : logo.title)
|
|
1316
|
-
]
|
|
1317
|
-
}
|
|
1318
|
-
);
|
|
1319
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1320
1354
|
const renderAuthActions = React.useMemo(() => {
|
|
1321
1355
|
if (authActionsSlot) return authActionsSlot;
|
|
1322
1356
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1390,7 +1424,15 @@ var NavbarDarkIcons = ({
|
|
|
1390
1424
|
navClassName
|
|
1391
1425
|
),
|
|
1392
1426
|
children: [
|
|
1393
|
-
|
|
1427
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
+
NavbarLogo,
|
|
1429
|
+
{
|
|
1430
|
+
logo,
|
|
1431
|
+
logoSlot,
|
|
1432
|
+
logoClassName,
|
|
1433
|
+
optixFlowConfig
|
|
1434
|
+
}
|
|
1435
|
+
),
|
|
1394
1436
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1395
1437
|
NavigationMenu,
|
|
1396
1438
|
{
|
|
@@ -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 AccordionPrimitive from '@radix-ui/react-accordion';
|
|
10
9
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
11
10
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
11
|
+
import { Img } from '@page-speed/img';
|
|
12
12
|
|
|
13
13
|
// components/blocks/navbars/navbar-dark-icons.tsx
|
|
14
14
|
function cn(...inputs) {
|
|
@@ -1179,6 +1179,66 @@ function SheetTitle({
|
|
|
1179
1179
|
}
|
|
1180
1180
|
);
|
|
1181
1181
|
}
|
|
1182
|
+
var NavbarLogo = ({
|
|
1183
|
+
logo,
|
|
1184
|
+
logoSlot,
|
|
1185
|
+
logoClassName,
|
|
1186
|
+
optixFlowConfig
|
|
1187
|
+
}) => {
|
|
1188
|
+
if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
|
|
1189
|
+
if (!logo) return null;
|
|
1190
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1191
|
+
return /* @__PURE__ */ jsx(
|
|
1192
|
+
Pressable,
|
|
1193
|
+
{
|
|
1194
|
+
href: logo.url || "/",
|
|
1195
|
+
className: cn("flex items-center", logoClassName),
|
|
1196
|
+
children: hasResponsiveSources ? (
|
|
1197
|
+
// Responsive logo with desktop/mobile sources
|
|
1198
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1199
|
+
/* @__PURE__ */ jsx(
|
|
1200
|
+
Img,
|
|
1201
|
+
{
|
|
1202
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1203
|
+
className: cn(
|
|
1204
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1205
|
+
logo.className
|
|
1206
|
+
),
|
|
1207
|
+
alt: logo.alt || "Logo",
|
|
1208
|
+
optixFlowConfig
|
|
1209
|
+
}
|
|
1210
|
+
),
|
|
1211
|
+
/* @__PURE__ */ jsx(
|
|
1212
|
+
Img,
|
|
1213
|
+
{
|
|
1214
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1217
|
+
logo.className
|
|
1218
|
+
),
|
|
1219
|
+
alt: logo.alt || "Logo",
|
|
1220
|
+
optixFlowConfig
|
|
1221
|
+
}
|
|
1222
|
+
)
|
|
1223
|
+
] })
|
|
1224
|
+
) : logo.src ? (
|
|
1225
|
+
// Standard single logo image
|
|
1226
|
+
/* @__PURE__ */ jsx(
|
|
1227
|
+
Img,
|
|
1228
|
+
{
|
|
1229
|
+
src: logo.src,
|
|
1230
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1231
|
+
alt: logo.alt || "Logo",
|
|
1232
|
+
optixFlowConfig
|
|
1233
|
+
}
|
|
1234
|
+
)
|
|
1235
|
+
) : (
|
|
1236
|
+
// Text-based logo (title as string or React element)
|
|
1237
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1238
|
+
)
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
};
|
|
1182
1242
|
|
|
1183
1243
|
// lib/mediaPlaceholders.ts
|
|
1184
1244
|
var logoPlaceholders = {
|
|
@@ -1209,14 +1269,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1209
1269
|
),
|
|
1210
1270
|
// Navigation wrapper classes (for border and shadow)
|
|
1211
1271
|
navWrapperClasses: cn(
|
|
1212
|
-
"w-full",
|
|
1272
|
+
"w-full h-16 items-center",
|
|
1213
1273
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1214
1274
|
),
|
|
1215
1275
|
// Section container configuration for full-width navbars
|
|
1216
1276
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1217
1277
|
sectionContainerMaxWidth: "full",
|
|
1218
1278
|
// Spacing adjustment for Section component
|
|
1219
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1279
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1220
1280
|
};
|
|
1221
1281
|
}
|
|
1222
1282
|
var MOBILE_BREAKPOINT = 1024;
|
|
@@ -1267,32 +1327,6 @@ var NavbarDarkIcons = ({
|
|
|
1267
1327
|
const handleMobileMenu = () => {
|
|
1268
1328
|
setOpen(!open);
|
|
1269
1329
|
};
|
|
1270
|
-
const renderLogo = useMemo(() => {
|
|
1271
|
-
if (logoSlot) return logoSlot;
|
|
1272
|
-
if (!logo) return null;
|
|
1273
|
-
return /* @__PURE__ */ jsxs(
|
|
1274
|
-
Pressable,
|
|
1275
|
-
{
|
|
1276
|
-
href: logo.url || "/",
|
|
1277
|
-
className: cn(
|
|
1278
|
-
"flex max-h-8 items-center gap-2 text-lg font-semibold tracking-tighter",
|
|
1279
|
-
logoClassName
|
|
1280
|
-
),
|
|
1281
|
-
children: [
|
|
1282
|
-
logo.src && /* @__PURE__ */ jsx(
|
|
1283
|
-
Img,
|
|
1284
|
-
{
|
|
1285
|
-
src: logo.src,
|
|
1286
|
-
alt: logo.alt || "Logo",
|
|
1287
|
-
className: cn("inline-block size-8 invert", logo.className),
|
|
1288
|
-
optixFlowConfig
|
|
1289
|
-
}
|
|
1290
|
-
),
|
|
1291
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "hidden md:inline-block", children: logo.title }) : logo.title)
|
|
1292
|
-
]
|
|
1293
|
-
}
|
|
1294
|
-
);
|
|
1295
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1296
1330
|
const renderAuthActions = useMemo(() => {
|
|
1297
1331
|
if (authActionsSlot) return authActionsSlot;
|
|
1298
1332
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1366,7 +1400,15 @@ var NavbarDarkIcons = ({
|
|
|
1366
1400
|
navClassName
|
|
1367
1401
|
),
|
|
1368
1402
|
children: [
|
|
1369
|
-
|
|
1403
|
+
/* @__PURE__ */ jsx(
|
|
1404
|
+
NavbarLogo,
|
|
1405
|
+
{
|
|
1406
|
+
logo,
|
|
1407
|
+
logoSlot,
|
|
1408
|
+
logoClassName,
|
|
1409
|
+
optixFlowConfig
|
|
1410
|
+
}
|
|
1411
|
+
),
|
|
1370
1412
|
/* @__PURE__ */ jsx(
|
|
1371
1413
|
NavigationMenu,
|
|
1372
1414
|
{
|
|
@@ -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 AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
11
10
|
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
12
11
|
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
|
+
var img = require('@page-speed/img');
|
|
13
13
|
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -1222,6 +1222,66 @@ function SheetTitle({
|
|
|
1222
1222
|
// lib/mediaPlaceholders.ts
|
|
1223
1223
|
var logoPlaceholders = {
|
|
1224
1224
|
logoMark: "https://cdn.ing/assets/i/r/285975/eud79qeya11q5w6ueyhklueardyx/monochrome-rounded-square-app-icon-circular-emblem.png"};
|
|
1225
|
+
var NavbarLogo = ({
|
|
1226
|
+
logo,
|
|
1227
|
+
logoSlot,
|
|
1228
|
+
logoClassName,
|
|
1229
|
+
optixFlowConfig
|
|
1230
|
+
}) => {
|
|
1231
|
+
if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
|
|
1232
|
+
if (!logo) return null;
|
|
1233
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
+
Pressable,
|
|
1236
|
+
{
|
|
1237
|
+
href: logo.url || "/",
|
|
1238
|
+
className: cn("flex items-center", logoClassName),
|
|
1239
|
+
children: hasResponsiveSources ? (
|
|
1240
|
+
// Responsive logo with desktop/mobile sources
|
|
1241
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1242
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
img.Img,
|
|
1244
|
+
{
|
|
1245
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1246
|
+
className: cn(
|
|
1247
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1248
|
+
logo.className
|
|
1249
|
+
),
|
|
1250
|
+
alt: logo.alt || "Logo",
|
|
1251
|
+
optixFlowConfig
|
|
1252
|
+
}
|
|
1253
|
+
),
|
|
1254
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1255
|
+
img.Img,
|
|
1256
|
+
{
|
|
1257
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1258
|
+
className: cn(
|
|
1259
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1260
|
+
logo.className
|
|
1261
|
+
),
|
|
1262
|
+
alt: logo.alt || "Logo",
|
|
1263
|
+
optixFlowConfig
|
|
1264
|
+
}
|
|
1265
|
+
)
|
|
1266
|
+
] })
|
|
1267
|
+
) : logo.src ? (
|
|
1268
|
+
// Standard single logo image
|
|
1269
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
|
+
img.Img,
|
|
1271
|
+
{
|
|
1272
|
+
src: logo.src,
|
|
1273
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1274
|
+
alt: logo.alt || "Logo",
|
|
1275
|
+
optixFlowConfig
|
|
1276
|
+
}
|
|
1277
|
+
)
|
|
1278
|
+
) : (
|
|
1279
|
+
// Text-based logo (title as string or React element)
|
|
1280
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1281
|
+
)
|
|
1282
|
+
}
|
|
1283
|
+
);
|
|
1284
|
+
};
|
|
1225
1285
|
|
|
1226
1286
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1227
1287
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1248,14 +1308,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1248
1308
|
),
|
|
1249
1309
|
// Navigation wrapper classes (for border and shadow)
|
|
1250
1310
|
navWrapperClasses: cn(
|
|
1251
|
-
"w-full",
|
|
1311
|
+
"w-full h-16 items-center",
|
|
1252
1312
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1253
1313
|
),
|
|
1254
1314
|
// Section container configuration for full-width navbars
|
|
1255
1315
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1256
1316
|
sectionContainerMaxWidth: "full",
|
|
1257
1317
|
// Spacing adjustment for Section component
|
|
1258
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1318
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1259
1319
|
};
|
|
1260
1320
|
}
|
|
1261
1321
|
var SubMenuLink = ({
|
|
@@ -1334,29 +1394,6 @@ var NavbarDropdownMenu = ({
|
|
|
1334
1394
|
patternOpacity,
|
|
1335
1395
|
optixFlowConfig
|
|
1336
1396
|
}) => {
|
|
1337
|
-
const renderLogo = React.useMemo(() => {
|
|
1338
|
-
if (logoSlot) return logoSlot;
|
|
1339
|
-
if (!logo) return null;
|
|
1340
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1341
|
-
Pressable,
|
|
1342
|
-
{
|
|
1343
|
-
href: logo.url || "/",
|
|
1344
|
-
className: cn("flex items-center gap-2", logoClassName),
|
|
1345
|
-
children: [
|
|
1346
|
-
logo.src && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
-
img.Img,
|
|
1348
|
-
{
|
|
1349
|
-
src: logo.src,
|
|
1350
|
-
className: cn("max-h-8 dark:invert", logo.className),
|
|
1351
|
-
alt: logo.alt || "Logo",
|
|
1352
|
-
optixFlowConfig
|
|
1353
|
-
}
|
|
1354
|
-
),
|
|
1355
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1356
|
-
]
|
|
1357
|
-
}
|
|
1358
|
-
);
|
|
1359
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1360
1397
|
const renderAuthActions = React.useMemo(() => {
|
|
1361
1398
|
if (authActionsSlot) return authActionsSlot;
|
|
1362
1399
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1424,7 +1461,15 @@ var NavbarDropdownMenu = ({
|
|
|
1424
1461
|
),
|
|
1425
1462
|
children: [
|
|
1426
1463
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-6", children: [
|
|
1427
|
-
|
|
1464
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1465
|
+
NavbarLogo,
|
|
1466
|
+
{
|
|
1467
|
+
logo,
|
|
1468
|
+
logoSlot,
|
|
1469
|
+
logoClassName,
|
|
1470
|
+
optixFlowConfig
|
|
1471
|
+
}
|
|
1472
|
+
),
|
|
1428
1473
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu, { className: navigationMenuClassName, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuList, { children: renderMenu }) }) })
|
|
1429
1474
|
] }),
|
|
1430
1475
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-2", actionsClassName), children: renderAuthActions })
|
|
@@ -1432,7 +1477,15 @@ var NavbarDropdownMenu = ({
|
|
|
1432
1477
|
}
|
|
1433
1478
|
),
|
|
1434
1479
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("block lg:hidden", mobileNavClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1435
|
-
|
|
1480
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1481
|
+
NavbarLogo,
|
|
1482
|
+
{
|
|
1483
|
+
logo,
|
|
1484
|
+
logoSlot,
|
|
1485
|
+
logoClassName,
|
|
1486
|
+
optixFlowConfig
|
|
1487
|
+
}
|
|
1488
|
+
),
|
|
1436
1489
|
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
1437
1490
|
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1438
1491
|
Pressable,
|
|
@@ -1446,7 +1499,15 @@ var NavbarDropdownMenu = ({
|
|
|
1446
1499
|
}
|
|
1447
1500
|
) }),
|
|
1448
1501
|
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { className: "overflow-y-auto", children: [
|
|
1449
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children:
|
|
1502
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1503
|
+
NavbarLogo,
|
|
1504
|
+
{
|
|
1505
|
+
logo,
|
|
1506
|
+
logoSlot,
|
|
1507
|
+
logoClassName,
|
|
1508
|
+
optixFlowConfig
|
|
1509
|
+
}
|
|
1510
|
+
) }) }),
|
|
1450
1511
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 p-4", children: [
|
|
1451
1512
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1452
1513
|
Accordion,
|
|
@@ -1457,7 +1518,13 @@ var NavbarDropdownMenu = ({
|
|
|
1457
1518
|
children: renderMobileMenu
|
|
1458
1519
|
}
|
|
1459
1520
|
),
|
|
1460
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1521
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
|
+
"div",
|
|
1523
|
+
{
|
|
1524
|
+
className: cn("flex flex-col gap-3", actionsClassName),
|
|
1525
|
+
children: renderAuthActions
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1461
1528
|
] })
|
|
1462
1529
|
] })
|
|
1463
1530
|
] })
|
|
@@ -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 AccordionPrimitive from '@radix-ui/react-accordion';
|
|
10
9
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
11
10
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
11
|
+
import { Img } from '@page-speed/img';
|
|
12
12
|
|
|
13
13
|
// components/blocks/navbars/navbar-dropdown-menu.tsx
|
|
14
14
|
function cn(...inputs) {
|
|
@@ -1198,6 +1198,66 @@ function SheetTitle({
|
|
|
1198
1198
|
// lib/mediaPlaceholders.ts
|
|
1199
1199
|
var logoPlaceholders = {
|
|
1200
1200
|
logoMark: "https://cdn.ing/assets/i/r/285975/eud79qeya11q5w6ueyhklueardyx/monochrome-rounded-square-app-icon-circular-emblem.png"};
|
|
1201
|
+
var NavbarLogo = ({
|
|
1202
|
+
logo,
|
|
1203
|
+
logoSlot,
|
|
1204
|
+
logoClassName,
|
|
1205
|
+
optixFlowConfig
|
|
1206
|
+
}) => {
|
|
1207
|
+
if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
|
|
1208
|
+
if (!logo) return null;
|
|
1209
|
+
const hasResponsiveSources = logo.desktopSrc || logo.mobileSrc;
|
|
1210
|
+
return /* @__PURE__ */ jsx(
|
|
1211
|
+
Pressable,
|
|
1212
|
+
{
|
|
1213
|
+
href: logo.url || "/",
|
|
1214
|
+
className: cn("flex items-center", logoClassName),
|
|
1215
|
+
children: hasResponsiveSources ? (
|
|
1216
|
+
// Responsive logo with desktop/mobile sources
|
|
1217
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1218
|
+
/* @__PURE__ */ jsx(
|
|
1219
|
+
Img,
|
|
1220
|
+
{
|
|
1221
|
+
src: logo.desktopSrc || logo.src || "",
|
|
1222
|
+
className: cn(
|
|
1223
|
+
"hidden h-8 w-auto object-contain md:block",
|
|
1224
|
+
logo.className
|
|
1225
|
+
),
|
|
1226
|
+
alt: logo.alt || "Logo",
|
|
1227
|
+
optixFlowConfig
|
|
1228
|
+
}
|
|
1229
|
+
),
|
|
1230
|
+
/* @__PURE__ */ jsx(
|
|
1231
|
+
Img,
|
|
1232
|
+
{
|
|
1233
|
+
src: logo.mobileSrc || logo.src || "",
|
|
1234
|
+
className: cn(
|
|
1235
|
+
"h-8 w-auto object-contain md:hidden",
|
|
1236
|
+
logo.className
|
|
1237
|
+
),
|
|
1238
|
+
alt: logo.alt || "Logo",
|
|
1239
|
+
optixFlowConfig
|
|
1240
|
+
}
|
|
1241
|
+
)
|
|
1242
|
+
] })
|
|
1243
|
+
) : logo.src ? (
|
|
1244
|
+
// Standard single logo image
|
|
1245
|
+
/* @__PURE__ */ jsx(
|
|
1246
|
+
Img,
|
|
1247
|
+
{
|
|
1248
|
+
src: logo.src,
|
|
1249
|
+
className: cn("max-h-8 w-auto object-contain", logo.className),
|
|
1250
|
+
alt: logo.alt || "Logo",
|
|
1251
|
+
optixFlowConfig
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
) : (
|
|
1255
|
+
// Text-based logo (title as string or React element)
|
|
1256
|
+
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1257
|
+
)
|
|
1258
|
+
}
|
|
1259
|
+
);
|
|
1260
|
+
};
|
|
1201
1261
|
|
|
1202
1262
|
// components/blocks/navbars/layout-variant-utils.ts
|
|
1203
1263
|
function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
|
|
@@ -1224,14 +1284,14 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
|
|
|
1224
1284
|
),
|
|
1225
1285
|
// Navigation wrapper classes (for border and shadow)
|
|
1226
1286
|
navWrapperClasses: cn(
|
|
1227
|
-
"w-full",
|
|
1287
|
+
"w-full h-16 items-center",
|
|
1228
1288
|
isFloatingBar ? "border border-border/50 shadow-sm rounded-full" : "border-b border-border/50 shadow-sm flex justify-center"
|
|
1229
1289
|
),
|
|
1230
1290
|
// Section container configuration for full-width navbars
|
|
1231
1291
|
sectionContainerClassName: "px-0 sm:px-0 lg:px-0",
|
|
1232
1292
|
sectionContainerMaxWidth: "full",
|
|
1233
1293
|
// Spacing adjustment for Section component
|
|
1234
|
-
spacingOverride: isFloatingBar ? "none" :
|
|
1294
|
+
spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
|
|
1235
1295
|
};
|
|
1236
1296
|
}
|
|
1237
1297
|
var SubMenuLink = ({
|
|
@@ -1310,29 +1370,6 @@ var NavbarDropdownMenu = ({
|
|
|
1310
1370
|
patternOpacity,
|
|
1311
1371
|
optixFlowConfig
|
|
1312
1372
|
}) => {
|
|
1313
|
-
const renderLogo = useMemo(() => {
|
|
1314
|
-
if (logoSlot) return logoSlot;
|
|
1315
|
-
if (!logo) return null;
|
|
1316
|
-
return /* @__PURE__ */ jsxs(
|
|
1317
|
-
Pressable,
|
|
1318
|
-
{
|
|
1319
|
-
href: logo.url || "/",
|
|
1320
|
-
className: cn("flex items-center gap-2", logoClassName),
|
|
1321
|
-
children: [
|
|
1322
|
-
logo.src && /* @__PURE__ */ jsx(
|
|
1323
|
-
Img,
|
|
1324
|
-
{
|
|
1325
|
-
src: logo.src,
|
|
1326
|
-
className: cn("max-h-8 dark:invert", logo.className),
|
|
1327
|
-
alt: logo.alt || "Logo",
|
|
1328
|
-
optixFlowConfig
|
|
1329
|
-
}
|
|
1330
|
-
),
|
|
1331
|
-
logo.title && (typeof logo.title === "string" ? /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold tracking-tighter", children: logo.title }) : logo.title)
|
|
1332
|
-
]
|
|
1333
|
-
}
|
|
1334
|
-
);
|
|
1335
|
-
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
1336
1373
|
const renderAuthActions = useMemo(() => {
|
|
1337
1374
|
if (authActionsSlot) return authActionsSlot;
|
|
1338
1375
|
if (!authActions || authActions.length === 0) return null;
|
|
@@ -1400,7 +1437,15 @@ var NavbarDropdownMenu = ({
|
|
|
1400
1437
|
),
|
|
1401
1438
|
children: [
|
|
1402
1439
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-6", children: [
|
|
1403
|
-
|
|
1440
|
+
/* @__PURE__ */ jsx(
|
|
1441
|
+
NavbarLogo,
|
|
1442
|
+
{
|
|
1443
|
+
logo,
|
|
1444
|
+
logoSlot,
|
|
1445
|
+
logoClassName,
|
|
1446
|
+
optixFlowConfig
|
|
1447
|
+
}
|
|
1448
|
+
),
|
|
1404
1449
|
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(NavigationMenu, { className: navigationMenuClassName, children: /* @__PURE__ */ jsx(NavigationMenuList, { children: renderMenu }) }) })
|
|
1405
1450
|
] }),
|
|
1406
1451
|
/* @__PURE__ */ jsx("div", { className: cn("flex gap-2", actionsClassName), children: renderAuthActions })
|
|
@@ -1408,7 +1453,15 @@ var NavbarDropdownMenu = ({
|
|
|
1408
1453
|
}
|
|
1409
1454
|
),
|
|
1410
1455
|
/* @__PURE__ */ jsx("div", { className: cn("block lg:hidden", mobileNavClassName), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1411
|
-
|
|
1456
|
+
/* @__PURE__ */ jsx(
|
|
1457
|
+
NavbarLogo,
|
|
1458
|
+
{
|
|
1459
|
+
logo,
|
|
1460
|
+
logoSlot,
|
|
1461
|
+
logoClassName,
|
|
1462
|
+
optixFlowConfig
|
|
1463
|
+
}
|
|
1464
|
+
),
|
|
1412
1465
|
/* @__PURE__ */ jsxs(Sheet, { children: [
|
|
1413
1466
|
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1414
1467
|
Pressable,
|
|
@@ -1422,7 +1475,15 @@ var NavbarDropdownMenu = ({
|
|
|
1422
1475
|
}
|
|
1423
1476
|
) }),
|
|
1424
1477
|
/* @__PURE__ */ jsxs(SheetContent, { className: "overflow-y-auto", children: [
|
|
1425
|
-
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children:
|
|
1478
|
+
/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: /* @__PURE__ */ jsx(
|
|
1479
|
+
NavbarLogo,
|
|
1480
|
+
{
|
|
1481
|
+
logo,
|
|
1482
|
+
logoSlot,
|
|
1483
|
+
logoClassName,
|
|
1484
|
+
optixFlowConfig
|
|
1485
|
+
}
|
|
1486
|
+
) }) }),
|
|
1426
1487
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 p-4", children: [
|
|
1427
1488
|
/* @__PURE__ */ jsx(
|
|
1428
1489
|
Accordion,
|
|
@@ -1433,7 +1494,13 @@ var NavbarDropdownMenu = ({
|
|
|
1433
1494
|
children: renderMobileMenu
|
|
1434
1495
|
}
|
|
1435
1496
|
),
|
|
1436
|
-
/* @__PURE__ */ jsx(
|
|
1497
|
+
/* @__PURE__ */ jsx(
|
|
1498
|
+
"div",
|
|
1499
|
+
{
|
|
1500
|
+
className: cn("flex flex-col gap-3", actionsClassName),
|
|
1501
|
+
children: renderAuthActions
|
|
1502
|
+
}
|
|
1503
|
+
)
|
|
1437
1504
|
] })
|
|
1438
1505
|
] })
|
|
1439
1506
|
] })
|