@opensite/ui 1.0.9 → 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.
- package/dist/navbar-animated-preview.cjs +30 -19
- package/dist/navbar-animated-preview.js +30 -19
- package/dist/navbar-centered-menu.cjs +21 -10
- package/dist/navbar-centered-menu.js +21 -10
- package/dist/navbar-dark-icons.cjs +21 -10
- package/dist/navbar-dark-icons.js +21 -10
- package/dist/navbar-dropdown-menu.cjs +21 -10
- package/dist/navbar-dropdown-menu.js +21 -10
- package/dist/navbar-education-platform.cjs +82 -56
- package/dist/navbar-education-platform.js +82 -56
- package/dist/navbar-enterprise-mega.cjs +22 -11
- package/dist/navbar-enterprise-mega.js +22 -11
- package/dist/navbar-feature-grid.cjs +21 -10
- package/dist/navbar-feature-grid.js +21 -10
- package/dist/navbar-icon-links.cjs +21 -10
- package/dist/navbar-icon-links.js +21 -10
- package/dist/navbar-image-preview.cjs +21 -10
- package/dist/navbar-image-preview.js +21 -10
- package/dist/navbar-mega-menu.cjs +21 -10
- package/dist/navbar-mega-menu.js +21 -10
- package/dist/navbar-multi-column-groups.cjs +53 -35
- package/dist/navbar-multi-column-groups.js +53 -35
- package/dist/navbar-platform-resources.cjs +21 -10
- package/dist/navbar-platform-resources.js +21 -10
- package/dist/navbar-search-focused.cjs +192 -103
- package/dist/navbar-search-focused.js +192 -103
- package/dist/navbar-sidebar-mobile.cjs +22 -10
- package/dist/navbar-sidebar-mobile.js +22 -10
- package/dist/navbar-simple-links.cjs +23 -12
- package/dist/navbar-simple-links.js +23 -12
- package/dist/navbar-split-cta.cjs +21 -10
- package/dist/navbar-split-cta.js +21 -10
- package/dist/navbar-sticky-compact.cjs +231 -123
- package/dist/navbar-sticky-compact.js +230 -123
- package/dist/navbar-tabbed-sections.cjs +21 -10
- package/dist/navbar-tabbed-sections.js +21 -10
- package/dist/navbar-transparent-overlay.cjs +23 -10
- package/dist/navbar-transparent-overlay.js +23 -10
- package/dist/registry.cjs +435 -302
- package/dist/registry.js +435 -302
- package/package.json +1 -1
|
@@ -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,6 +1109,8 @@ var NavbarMobileMenu = ({
|
|
|
1093
1109
|
children,
|
|
1094
1110
|
className,
|
|
1095
1111
|
contentClassName,
|
|
1112
|
+
closeContainerClassName,
|
|
1113
|
+
closeIconClassName,
|
|
1096
1114
|
title = "Mobile Navigation"
|
|
1097
1115
|
}) => {
|
|
1098
1116
|
React__namespace.useEffect(() => {
|
|
@@ -1117,18 +1135,27 @@ var NavbarMobileMenu = ({
|
|
|
1117
1135
|
"data-state": open ? "open" : "closed",
|
|
1118
1136
|
children: [
|
|
1119
1137
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }) }),
|
|
1120
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
-
"
|
|
1138
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
|
+
"div",
|
|
1122
1140
|
{
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1141
|
+
className: cn(
|
|
1142
|
+
"absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
|
|
1143
|
+
closeContainerClassName
|
|
1144
|
+
),
|
|
1145
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1146
|
+
"button",
|
|
1147
|
+
{
|
|
1148
|
+
onClick: onClose,
|
|
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",
|
|
1150
|
+
"aria-label": "Close mobile menu",
|
|
1151
|
+
children: [
|
|
1152
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
|
|
1153
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1154
|
+
]
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1130
1157
|
}
|
|
1131
|
-
)
|
|
1158
|
+
),
|
|
1132
1159
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1133
1160
|
"div",
|
|
1134
1161
|
{
|
|
@@ -1205,6 +1232,11 @@ var NavbarSearchFocused = ({
|
|
|
1205
1232
|
optixFlowConfig
|
|
1206
1233
|
}) => {
|
|
1207
1234
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
1235
|
+
const [searchQuery, setSearchQuery] = React.useState("");
|
|
1236
|
+
const handleSearchSubmit = (e) => {
|
|
1237
|
+
e.preventDefault();
|
|
1238
|
+
onSearch?.(searchQuery);
|
|
1239
|
+
};
|
|
1208
1240
|
const renderNavigation = (items) => {
|
|
1209
1241
|
if (navigationSlot) return navigationSlot;
|
|
1210
1242
|
if (!items || items.length === 0) return null;
|
|
@@ -1250,7 +1282,7 @@ var NavbarSearchFocused = ({
|
|
|
1250
1282
|
);
|
|
1251
1283
|
});
|
|
1252
1284
|
}, [authActionsSlot, authActions]);
|
|
1253
|
-
|
|
1285
|
+
React.useMemo(() => {
|
|
1254
1286
|
if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
|
|
1255
1287
|
if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
|
|
1256
1288
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: mobileMenuActions.map((action, index) => {
|
|
@@ -1279,100 +1311,157 @@ var NavbarSearchFocused = ({
|
|
|
1279
1311
|
sectionContainerMaxWidth,
|
|
1280
1312
|
spacingOverride
|
|
1281
1313
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
1282
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
"
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
children: [
|
|
1300
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1301
|
-
NavbarLogo,
|
|
1302
|
-
{
|
|
1303
|
-
logo,
|
|
1304
|
-
logoSlot,
|
|
1305
|
-
logoClassName,
|
|
1306
|
-
optixFlowConfig
|
|
1307
|
-
}
|
|
1308
|
-
),
|
|
1309
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1310
|
-
NavigationMenu,
|
|
1311
|
-
{
|
|
1312
|
-
className: cn("hidden lg:flex", navigationMenuClassName),
|
|
1313
|
-
children: renderNavigation(navItems?.slice(0, 2) ?? [])
|
|
1314
|
-
}
|
|
1315
|
-
),
|
|
1316
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
NavigationMenu,
|
|
1318
|
-
{
|
|
1319
|
-
className: cn("hidden lg:flex", navigationMenuClassName),
|
|
1320
|
-
children: renderNavigation(navItems?.slice(2) ?? [])
|
|
1321
|
-
}
|
|
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
|
|
1322
1331
|
),
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
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
|
+
}
|
|
1329
1357
|
),
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
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
|
-
|
|
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
|
+
] }) }) });
|
|
1376
1465
|
};
|
|
1377
1466
|
|
|
1378
1467
|
exports.NavbarSearchFocused = NavbarSearchFocused;
|