@opensite/ui 0.9.8 → 1.0.0
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 +1 -1
- package/dist/navbar-animated-preview.js +1 -1
- package/dist/navbar-enterprise-mega.cjs +104 -139
- package/dist/navbar-enterprise-mega.js +104 -139
- package/dist/navbar-fullscreen-menu.cjs +190 -66
- package/dist/navbar-fullscreen-menu.d.cts +4 -0
- package/dist/navbar-fullscreen-menu.d.ts +4 -0
- package/dist/navbar-fullscreen-menu.js +190 -66
- package/dist/navbar-image-preview.cjs +69 -27
- package/dist/navbar-image-preview.js +69 -27
- package/dist/navbar-multi-column-groups.cjs +69 -27
- package/dist/navbar-multi-column-groups.js +69 -27
- package/dist/navbar-search-focused.cjs +69 -24
- package/dist/navbar-search-focused.js +69 -24
- package/dist/navbar-sidebar-mobile.cjs +78 -25
- package/dist/navbar-sidebar-mobile.js +78 -25
- package/dist/navbar-split-cta.cjs +69 -24
- package/dist/navbar-split-cta.js +69 -24
- package/dist/navbar-sticky-compact.cjs +73 -37
- package/dist/navbar-sticky-compact.js +73 -37
- package/dist/navbar-tabbed-sections.cjs +69 -24
- package/dist/navbar-tabbed-sections.js +69 -24
- package/dist/navbar-transparent-overlay.cjs +73 -37
- package/dist/navbar-transparent-overlay.js +73 -37
- package/dist/registry.cjs +294 -446
- package/dist/registry.js +294 -446
- package/package.json +1 -1
|
@@ -450,6 +450,111 @@ var Pressable = React__namespace.forwardRef(
|
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
Pressable.displayName = "Pressable";
|
|
453
|
+
var svgCache = /* @__PURE__ */ new Map();
|
|
454
|
+
function DynamicIcon({
|
|
455
|
+
name,
|
|
456
|
+
size = 28,
|
|
457
|
+
color,
|
|
458
|
+
className,
|
|
459
|
+
alt
|
|
460
|
+
}) {
|
|
461
|
+
const [svgContent, setSvgContent] = React__namespace.useState(null);
|
|
462
|
+
const [isLoading, setIsLoading] = React__namespace.useState(true);
|
|
463
|
+
const [error, setError] = React__namespace.useState(null);
|
|
464
|
+
const { url, iconName } = React__namespace.useMemo(() => {
|
|
465
|
+
const separator = name.includes("/") ? "/" : ":";
|
|
466
|
+
const [prefix, iconName2] = name.split(separator);
|
|
467
|
+
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
468
|
+
return {
|
|
469
|
+
url: baseUrl,
|
|
470
|
+
iconName: iconName2
|
|
471
|
+
};
|
|
472
|
+
}, [name, size]);
|
|
473
|
+
React__namespace.useEffect(() => {
|
|
474
|
+
let isMounted = true;
|
|
475
|
+
const fetchSvg = async () => {
|
|
476
|
+
const cached = svgCache.get(url);
|
|
477
|
+
if (cached) {
|
|
478
|
+
if (isMounted) {
|
|
479
|
+
setSvgContent(cached);
|
|
480
|
+
setIsLoading(false);
|
|
481
|
+
}
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
try {
|
|
485
|
+
setIsLoading(true);
|
|
486
|
+
setError(null);
|
|
487
|
+
const response = await fetch(url);
|
|
488
|
+
if (!response.ok) {
|
|
489
|
+
throw new Error(`Failed to fetch icon: ${response.status}`);
|
|
490
|
+
}
|
|
491
|
+
let svg = await response.text();
|
|
492
|
+
svg = processSvgForCurrentColor(svg);
|
|
493
|
+
svgCache.set(url, svg);
|
|
494
|
+
if (isMounted) {
|
|
495
|
+
setSvgContent(svg);
|
|
496
|
+
setIsLoading(false);
|
|
497
|
+
}
|
|
498
|
+
} catch (err) {
|
|
499
|
+
if (isMounted) {
|
|
500
|
+
setError(err instanceof Error ? err.message : "Failed to load icon");
|
|
501
|
+
setIsLoading(false);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
fetchSvg();
|
|
506
|
+
return () => {
|
|
507
|
+
isMounted = false;
|
|
508
|
+
};
|
|
509
|
+
}, [url]);
|
|
510
|
+
if (isLoading) {
|
|
511
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
512
|
+
"span",
|
|
513
|
+
{
|
|
514
|
+
className: cn("inline-block", className),
|
|
515
|
+
style: { width: size, height: size },
|
|
516
|
+
"aria-hidden": "true"
|
|
517
|
+
}
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
if (error || !svgContent) {
|
|
521
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
522
|
+
"span",
|
|
523
|
+
{
|
|
524
|
+
className: cn("inline-block", className),
|
|
525
|
+
style: { width: size, height: size },
|
|
526
|
+
role: "img",
|
|
527
|
+
"aria-label": alt || iconName
|
|
528
|
+
}
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
+
"span",
|
|
533
|
+
{
|
|
534
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
535
|
+
style: {
|
|
536
|
+
width: size,
|
|
537
|
+
height: size,
|
|
538
|
+
color: color || "inherit"
|
|
539
|
+
},
|
|
540
|
+
role: "img",
|
|
541
|
+
"aria-label": alt || iconName,
|
|
542
|
+
dangerouslySetInnerHTML: { __html: svgContent }
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
function processSvgForCurrentColor(svg) {
|
|
547
|
+
let processed = svg;
|
|
548
|
+
processed = processed.replace(
|
|
549
|
+
/stroke=["'](#000000|#000|black)["']/gi,
|
|
550
|
+
'stroke="currentColor"'
|
|
551
|
+
);
|
|
552
|
+
processed = processed.replace(
|
|
553
|
+
/fill=["'](#000000|#000|black)["']/gi,
|
|
554
|
+
'fill="currentColor"'
|
|
555
|
+
);
|
|
556
|
+
return processed;
|
|
557
|
+
}
|
|
453
558
|
var maxWidthStyles = {
|
|
454
559
|
sm: "max-w-screen-sm",
|
|
455
560
|
md: "max-w-screen-md",
|
|
@@ -954,34 +1059,38 @@ var NavbarFullscreenMenu = ({
|
|
|
954
1059
|
const renderMenuItems = React.useMemo(() => {
|
|
955
1060
|
if (menuSlot) return menuSlot;
|
|
956
1061
|
if (!menuItems || menuItems.length === 0) return null;
|
|
957
|
-
return menuItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1062
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "group/menu-container", children: menuItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
958
1063
|
"div",
|
|
959
1064
|
{
|
|
960
|
-
className: "mb-5 animate-in slide-in-from-bottom-4 fade-in",
|
|
1065
|
+
className: "group/menu-item mb-5 animate-in slide-in-from-bottom-4 fade-in",
|
|
961
1066
|
style: {
|
|
962
1067
|
animationDelay: `${0.2 + index * 0.1}s`,
|
|
963
1068
|
animationFillMode: "both"
|
|
964
1069
|
},
|
|
965
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Pressable, { href: item.href, className: "
|
|
966
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 text-4xl font-black text-foreground uppercase transition-all duration-300 md:text-6xl group-hover:opacity-
|
|
967
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-0 h-1 w-0 bg-primary transition-all duration-300 group-hover:w-full" })
|
|
1070
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Pressable, { href: item.href, className: "relative inline-block", children: [
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 text-4xl font-black text-foreground uppercase transition-all duration-300 md:text-6xl group-hover/menu-container:opacity-50 group-hover/menu-container:blur-[4px] group-hover/menu-item:!opacity-100 group-hover/menu-item:!blur-none", children: item.label }),
|
|
1072
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-0 h-1 w-0 bg-primary transition-all duration-300 group-hover/menu-item:w-full" })
|
|
968
1073
|
] })
|
|
969
1074
|
},
|
|
970
1075
|
item.label
|
|
971
|
-
));
|
|
1076
|
+
)) });
|
|
972
1077
|
}, [menuSlot, menuItems]);
|
|
973
1078
|
const renderSocialLinks = React.useMemo(() => {
|
|
974
1079
|
if (socialLinksSlot) return socialLinksSlot;
|
|
975
1080
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
976
|
-
return socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.
|
|
1081
|
+
return socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
977
1082
|
Pressable,
|
|
978
1083
|
{
|
|
979
1084
|
href: link.href,
|
|
980
1085
|
target: "_blank",
|
|
981
1086
|
rel: "noopener noreferrer",
|
|
982
|
-
className: "group flex items-center gap-2
|
|
1087
|
+
className: "group flex items-center gap-2 text-muted-foreground transition-all duration-300 hover:text-foreground hover:translate-x-1",
|
|
983
1088
|
style: { animationDelay: `${0.8 + index * 0.1}s` },
|
|
984
|
-
|
|
1089
|
+
"aria-label": typeof link.label === "string" ? link.label : void 0,
|
|
1090
|
+
children: [
|
|
1091
|
+
link.icon ?? (link.iconName && /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: link.iconName, size: 20 })),
|
|
1092
|
+
!link.icon && !link.iconName && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-sm tracking-wider", children: link.label })
|
|
1093
|
+
]
|
|
985
1094
|
},
|
|
986
1095
|
link.label
|
|
987
1096
|
));
|
|
@@ -995,18 +1104,18 @@ var NavbarFullscreenMenu = ({
|
|
|
995
1104
|
sectionContainerMaxWidth,
|
|
996
1105
|
spacingOverride
|
|
997
1106
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
998
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1107
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1108
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
|
+
Section,
|
|
1110
|
+
{
|
|
1111
|
+
background,
|
|
1112
|
+
spacing: spacingOverride ?? spacing,
|
|
1113
|
+
className: sectionClasses,
|
|
1114
|
+
pattern,
|
|
1115
|
+
patternOpacity,
|
|
1116
|
+
containerClassName: sectionContainerClassName,
|
|
1117
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1118
|
+
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(
|
|
1010
1119
|
"nav",
|
|
1011
1120
|
{
|
|
1012
1121
|
className: cn(
|
|
@@ -1023,60 +1132,75 @@ var NavbarFullscreenMenu = ({
|
|
|
1023
1132
|
optixFlowConfig
|
|
1024
1133
|
}
|
|
1025
1134
|
) }),
|
|
1026
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-50", children: /* @__PURE__ */ jsxRuntime.
|
|
1135
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1027
1136
|
"button",
|
|
1028
1137
|
{
|
|
1029
1138
|
onClick: toggleMenu,
|
|
1030
|
-
className: "text-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
"span",
|
|
1034
|
-
{
|
|
1035
|
-
className: `inline-block transition-all duration-200 ${isOpen ? "opacity-0 -translate-y-2" : "opacity-100 translate-y-0"}`,
|
|
1036
|
-
style: { display: isOpen ? "none" : "inline-block" },
|
|
1037
|
-
children: isOpen ? "" : "\u2630"
|
|
1038
|
-
}
|
|
1039
|
-
),
|
|
1040
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
-
"span",
|
|
1042
|
-
{
|
|
1043
|
-
className: `inline-block transition-all duration-200 ${isOpen ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"}`,
|
|
1044
|
-
style: { display: isOpen ? "inline-block" : "none" },
|
|
1045
|
-
children: isOpen ? "\u2715" : ""
|
|
1046
|
-
}
|
|
1047
|
-
)
|
|
1048
|
-
]
|
|
1139
|
+
className: "text-2xl tracking-wider text-foreground transition-colors hover:text-muted-foreground",
|
|
1140
|
+
"aria-label": isOpen ? "Close menu" : "Open menu",
|
|
1141
|
+
children: "\u2630"
|
|
1049
1142
|
}
|
|
1050
1143
|
) })
|
|
1051
1144
|
]
|
|
1052
1145
|
}
|
|
1146
|
+
) }) }) })
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1149
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1150
|
+
"div",
|
|
1151
|
+
{
|
|
1152
|
+
className: cn(
|
|
1153
|
+
"fixed inset-0 z-50 flex flex-col bg-background animate-in fade-in duration-300",
|
|
1154
|
+
overlayClassName
|
|
1053
1155
|
),
|
|
1054
|
-
|
|
1055
|
-
"div",
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1156
|
+
children: [
|
|
1157
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
1158
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1159
|
+
NavbarLogo,
|
|
1160
|
+
{
|
|
1161
|
+
logo,
|
|
1162
|
+
logoSlot,
|
|
1163
|
+
logoClassName,
|
|
1164
|
+
optixFlowConfig
|
|
1165
|
+
}
|
|
1060
1166
|
),
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
|
+
"button",
|
|
1169
|
+
{
|
|
1170
|
+
onClick: toggleMenu,
|
|
1171
|
+
className: "text-2xl text-foreground transition-colors hover:text-muted-foreground",
|
|
1172
|
+
"aria-label": "Close menu",
|
|
1173
|
+
children: "\u2715"
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
] }),
|
|
1177
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center overflow-y-auto px-6 py-8", children: [
|
|
1178
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1179
|
+
"div",
|
|
1180
|
+
{
|
|
1181
|
+
className: cn(
|
|
1182
|
+
"mb-12 max-h-[60vh] overflow-y-auto text-center md:max-h-none",
|
|
1183
|
+
menuItemsClassName
|
|
1184
|
+
),
|
|
1185
|
+
children: renderMenuItems
|
|
1186
|
+
}
|
|
1187
|
+
),
|
|
1188
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1189
|
+
"div",
|
|
1190
|
+
{
|
|
1191
|
+
className: cn(
|
|
1192
|
+
"flex flex-col items-center gap-6 sm:flex-row sm:gap-10 animate-in slide-in-from-bottom-4 fade-in",
|
|
1193
|
+
socialLinksClassName
|
|
1194
|
+
),
|
|
1195
|
+
style: { animationDelay: "0.7s", animationFillMode: "both" },
|
|
1196
|
+
children: renderSocialLinks
|
|
1197
|
+
}
|
|
1198
|
+
)
|
|
1199
|
+
] })
|
|
1200
|
+
]
|
|
1201
|
+
}
|
|
1202
|
+
)
|
|
1203
|
+
] });
|
|
1080
1204
|
};
|
|
1081
1205
|
|
|
1082
1206
|
exports.NavbarFullscreenMenu = NavbarFullscreenMenu;
|
|
@@ -14,6 +14,10 @@ interface MenuItem {
|
|
|
14
14
|
interface SocialLink {
|
|
15
15
|
label: string;
|
|
16
16
|
href: string;
|
|
17
|
+
/** Optional React icon component */
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
/** Icon name in format: prefix/name (e.g., "simple-icons/twitter") */
|
|
20
|
+
iconName?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Props for the NavbarFullscreenMenu component
|
|
@@ -14,6 +14,10 @@ interface MenuItem {
|
|
|
14
14
|
interface SocialLink {
|
|
15
15
|
label: string;
|
|
16
16
|
href: string;
|
|
17
|
+
/** Optional React icon component */
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
/** Icon name in format: prefix/name (e.g., "simple-icons/twitter") */
|
|
20
|
+
iconName?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Props for the NavbarFullscreenMenu component
|
|
@@ -429,6 +429,111 @@ var Pressable = React.forwardRef(
|
|
|
429
429
|
}
|
|
430
430
|
);
|
|
431
431
|
Pressable.displayName = "Pressable";
|
|
432
|
+
var svgCache = /* @__PURE__ */ new Map();
|
|
433
|
+
function DynamicIcon({
|
|
434
|
+
name,
|
|
435
|
+
size = 28,
|
|
436
|
+
color,
|
|
437
|
+
className,
|
|
438
|
+
alt
|
|
439
|
+
}) {
|
|
440
|
+
const [svgContent, setSvgContent] = React.useState(null);
|
|
441
|
+
const [isLoading, setIsLoading] = React.useState(true);
|
|
442
|
+
const [error, setError] = React.useState(null);
|
|
443
|
+
const { url, iconName } = React.useMemo(() => {
|
|
444
|
+
const separator = name.includes("/") ? "/" : ":";
|
|
445
|
+
const [prefix, iconName2] = name.split(separator);
|
|
446
|
+
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
447
|
+
return {
|
|
448
|
+
url: baseUrl,
|
|
449
|
+
iconName: iconName2
|
|
450
|
+
};
|
|
451
|
+
}, [name, size]);
|
|
452
|
+
React.useEffect(() => {
|
|
453
|
+
let isMounted = true;
|
|
454
|
+
const fetchSvg = async () => {
|
|
455
|
+
const cached = svgCache.get(url);
|
|
456
|
+
if (cached) {
|
|
457
|
+
if (isMounted) {
|
|
458
|
+
setSvgContent(cached);
|
|
459
|
+
setIsLoading(false);
|
|
460
|
+
}
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
try {
|
|
464
|
+
setIsLoading(true);
|
|
465
|
+
setError(null);
|
|
466
|
+
const response = await fetch(url);
|
|
467
|
+
if (!response.ok) {
|
|
468
|
+
throw new Error(`Failed to fetch icon: ${response.status}`);
|
|
469
|
+
}
|
|
470
|
+
let svg = await response.text();
|
|
471
|
+
svg = processSvgForCurrentColor(svg);
|
|
472
|
+
svgCache.set(url, svg);
|
|
473
|
+
if (isMounted) {
|
|
474
|
+
setSvgContent(svg);
|
|
475
|
+
setIsLoading(false);
|
|
476
|
+
}
|
|
477
|
+
} catch (err) {
|
|
478
|
+
if (isMounted) {
|
|
479
|
+
setError(err instanceof Error ? err.message : "Failed to load icon");
|
|
480
|
+
setIsLoading(false);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
fetchSvg();
|
|
485
|
+
return () => {
|
|
486
|
+
isMounted = false;
|
|
487
|
+
};
|
|
488
|
+
}, [url]);
|
|
489
|
+
if (isLoading) {
|
|
490
|
+
return /* @__PURE__ */ jsx(
|
|
491
|
+
"span",
|
|
492
|
+
{
|
|
493
|
+
className: cn("inline-block", className),
|
|
494
|
+
style: { width: size, height: size },
|
|
495
|
+
"aria-hidden": "true"
|
|
496
|
+
}
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
if (error || !svgContent) {
|
|
500
|
+
return /* @__PURE__ */ jsx(
|
|
501
|
+
"span",
|
|
502
|
+
{
|
|
503
|
+
className: cn("inline-block", className),
|
|
504
|
+
style: { width: size, height: size },
|
|
505
|
+
role: "img",
|
|
506
|
+
"aria-label": alt || iconName
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
return /* @__PURE__ */ jsx(
|
|
511
|
+
"span",
|
|
512
|
+
{
|
|
513
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
514
|
+
style: {
|
|
515
|
+
width: size,
|
|
516
|
+
height: size,
|
|
517
|
+
color: color || "inherit"
|
|
518
|
+
},
|
|
519
|
+
role: "img",
|
|
520
|
+
"aria-label": alt || iconName,
|
|
521
|
+
dangerouslySetInnerHTML: { __html: svgContent }
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
function processSvgForCurrentColor(svg) {
|
|
526
|
+
let processed = svg;
|
|
527
|
+
processed = processed.replace(
|
|
528
|
+
/stroke=["'](#000000|#000|black)["']/gi,
|
|
529
|
+
'stroke="currentColor"'
|
|
530
|
+
);
|
|
531
|
+
processed = processed.replace(
|
|
532
|
+
/fill=["'](#000000|#000|black)["']/gi,
|
|
533
|
+
'fill="currentColor"'
|
|
534
|
+
);
|
|
535
|
+
return processed;
|
|
536
|
+
}
|
|
432
537
|
var maxWidthStyles = {
|
|
433
538
|
sm: "max-w-screen-sm",
|
|
434
539
|
md: "max-w-screen-md",
|
|
@@ -933,34 +1038,38 @@ var NavbarFullscreenMenu = ({
|
|
|
933
1038
|
const renderMenuItems = useMemo(() => {
|
|
934
1039
|
if (menuSlot) return menuSlot;
|
|
935
1040
|
if (!menuItems || menuItems.length === 0) return null;
|
|
936
|
-
return menuItems.map((item, index) => /* @__PURE__ */ jsx(
|
|
1041
|
+
return /* @__PURE__ */ jsx("div", { className: "group/menu-container", children: menuItems.map((item, index) => /* @__PURE__ */ jsx(
|
|
937
1042
|
"div",
|
|
938
1043
|
{
|
|
939
|
-
className: "mb-5 animate-in slide-in-from-bottom-4 fade-in",
|
|
1044
|
+
className: "group/menu-item mb-5 animate-in slide-in-from-bottom-4 fade-in",
|
|
940
1045
|
style: {
|
|
941
1046
|
animationDelay: `${0.2 + index * 0.1}s`,
|
|
942
1047
|
animationFillMode: "both"
|
|
943
1048
|
},
|
|
944
|
-
children: /* @__PURE__ */ jsxs(Pressable, { href: item.href, className: "
|
|
945
|
-
/* @__PURE__ */ jsx("span", { className: "relative z-10 text-4xl font-black text-foreground uppercase transition-all duration-300 md:text-6xl group-hover:opacity-
|
|
946
|
-
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 h-1 w-0 bg-primary transition-all duration-300 group-hover:w-full" })
|
|
1049
|
+
children: /* @__PURE__ */ jsxs(Pressable, { href: item.href, className: "relative inline-block", children: [
|
|
1050
|
+
/* @__PURE__ */ jsx("span", { className: "relative z-10 text-4xl font-black text-foreground uppercase transition-all duration-300 md:text-6xl group-hover/menu-container:opacity-50 group-hover/menu-container:blur-[4px] group-hover/menu-item:!opacity-100 group-hover/menu-item:!blur-none", children: item.label }),
|
|
1051
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 h-1 w-0 bg-primary transition-all duration-300 group-hover/menu-item:w-full" })
|
|
947
1052
|
] })
|
|
948
1053
|
},
|
|
949
1054
|
item.label
|
|
950
|
-
));
|
|
1055
|
+
)) });
|
|
951
1056
|
}, [menuSlot, menuItems]);
|
|
952
1057
|
const renderSocialLinks = useMemo(() => {
|
|
953
1058
|
if (socialLinksSlot) return socialLinksSlot;
|
|
954
1059
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
955
|
-
return socialLinks.map((link, index) => /* @__PURE__ */
|
|
1060
|
+
return socialLinks.map((link, index) => /* @__PURE__ */ jsxs(
|
|
956
1061
|
Pressable,
|
|
957
1062
|
{
|
|
958
1063
|
href: link.href,
|
|
959
1064
|
target: "_blank",
|
|
960
1065
|
rel: "noopener noreferrer",
|
|
961
|
-
className: "group flex items-center gap-2
|
|
1066
|
+
className: "group flex items-center gap-2 text-muted-foreground transition-all duration-300 hover:text-foreground hover:translate-x-1",
|
|
962
1067
|
style: { animationDelay: `${0.8 + index * 0.1}s` },
|
|
963
|
-
|
|
1068
|
+
"aria-label": typeof link.label === "string" ? link.label : void 0,
|
|
1069
|
+
children: [
|
|
1070
|
+
link.icon ?? (link.iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: link.iconName, size: 20 })),
|
|
1071
|
+
!link.icon && !link.iconName && /* @__PURE__ */ jsx("span", { className: "font-mono text-sm tracking-wider", children: link.label })
|
|
1072
|
+
]
|
|
964
1073
|
},
|
|
965
1074
|
link.label
|
|
966
1075
|
));
|
|
@@ -974,18 +1083,18 @@ var NavbarFullscreenMenu = ({
|
|
|
974
1083
|
sectionContainerMaxWidth,
|
|
975
1084
|
spacingOverride
|
|
976
1085
|
} = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
|
|
977
|
-
return /* @__PURE__ */
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
/* @__PURE__ */ jsxs(
|
|
1086
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1087
|
+
/* @__PURE__ */ jsx(
|
|
1088
|
+
Section,
|
|
1089
|
+
{
|
|
1090
|
+
background,
|
|
1091
|
+
spacing: spacingOverride ?? spacing,
|
|
1092
|
+
className: sectionClasses,
|
|
1093
|
+
pattern,
|
|
1094
|
+
patternOpacity,
|
|
1095
|
+
containerClassName: sectionContainerClassName,
|
|
1096
|
+
containerMaxWidth: sectionContainerMaxWidth,
|
|
1097
|
+
children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
|
|
989
1098
|
"nav",
|
|
990
1099
|
{
|
|
991
1100
|
className: cn(
|
|
@@ -1002,60 +1111,75 @@ var NavbarFullscreenMenu = ({
|
|
|
1002
1111
|
optixFlowConfig
|
|
1003
1112
|
}
|
|
1004
1113
|
) }),
|
|
1005
|
-
/* @__PURE__ */ jsx("div", { className: "z-50", children: /* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ jsx("div", { className: "z-50", children: /* @__PURE__ */ jsx(
|
|
1006
1115
|
"button",
|
|
1007
1116
|
{
|
|
1008
1117
|
onClick: toggleMenu,
|
|
1009
|
-
className: "text-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
"span",
|
|
1013
|
-
{
|
|
1014
|
-
className: `inline-block transition-all duration-200 ${isOpen ? "opacity-0 -translate-y-2" : "opacity-100 translate-y-0"}`,
|
|
1015
|
-
style: { display: isOpen ? "none" : "inline-block" },
|
|
1016
|
-
children: isOpen ? "" : "\u2630"
|
|
1017
|
-
}
|
|
1018
|
-
),
|
|
1019
|
-
/* @__PURE__ */ jsx(
|
|
1020
|
-
"span",
|
|
1021
|
-
{
|
|
1022
|
-
className: `inline-block transition-all duration-200 ${isOpen ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"}`,
|
|
1023
|
-
style: { display: isOpen ? "inline-block" : "none" },
|
|
1024
|
-
children: isOpen ? "\u2715" : ""
|
|
1025
|
-
}
|
|
1026
|
-
)
|
|
1027
|
-
]
|
|
1118
|
+
className: "text-2xl tracking-wider text-foreground transition-colors hover:text-muted-foreground",
|
|
1119
|
+
"aria-label": isOpen ? "Close menu" : "Open menu",
|
|
1120
|
+
children: "\u2630"
|
|
1028
1121
|
}
|
|
1029
1122
|
) })
|
|
1030
1123
|
]
|
|
1031
1124
|
}
|
|
1125
|
+
) }) }) })
|
|
1126
|
+
}
|
|
1127
|
+
),
|
|
1128
|
+
isOpen && /* @__PURE__ */ jsxs(
|
|
1129
|
+
"div",
|
|
1130
|
+
{
|
|
1131
|
+
className: cn(
|
|
1132
|
+
"fixed inset-0 z-50 flex flex-col bg-background animate-in fade-in duration-300",
|
|
1133
|
+
overlayClassName
|
|
1032
1134
|
),
|
|
1033
|
-
|
|
1034
|
-
"div",
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1135
|
+
children: [
|
|
1136
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
1137
|
+
/* @__PURE__ */ jsx(
|
|
1138
|
+
NavbarLogo,
|
|
1139
|
+
{
|
|
1140
|
+
logo,
|
|
1141
|
+
logoSlot,
|
|
1142
|
+
logoClassName,
|
|
1143
|
+
optixFlowConfig
|
|
1144
|
+
}
|
|
1039
1145
|
),
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1146
|
+
/* @__PURE__ */ jsx(
|
|
1147
|
+
"button",
|
|
1148
|
+
{
|
|
1149
|
+
onClick: toggleMenu,
|
|
1150
|
+
className: "text-2xl text-foreground transition-colors hover:text-muted-foreground",
|
|
1151
|
+
"aria-label": "Close menu",
|
|
1152
|
+
children: "\u2715"
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1155
|
+
] }),
|
|
1156
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center overflow-y-auto px-6 py-8", children: [
|
|
1157
|
+
/* @__PURE__ */ jsx(
|
|
1158
|
+
"div",
|
|
1159
|
+
{
|
|
1160
|
+
className: cn(
|
|
1161
|
+
"mb-12 max-h-[60vh] overflow-y-auto text-center md:max-h-none",
|
|
1162
|
+
menuItemsClassName
|
|
1163
|
+
),
|
|
1164
|
+
children: renderMenuItems
|
|
1165
|
+
}
|
|
1166
|
+
),
|
|
1167
|
+
/* @__PURE__ */ jsx(
|
|
1168
|
+
"div",
|
|
1169
|
+
{
|
|
1170
|
+
className: cn(
|
|
1171
|
+
"flex flex-col items-center gap-6 sm:flex-row sm:gap-10 animate-in slide-in-from-bottom-4 fade-in",
|
|
1172
|
+
socialLinksClassName
|
|
1173
|
+
),
|
|
1174
|
+
style: { animationDelay: "0.7s", animationFillMode: "both" },
|
|
1175
|
+
children: renderSocialLinks
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
] })
|
|
1179
|
+
]
|
|
1180
|
+
}
|
|
1181
|
+
)
|
|
1182
|
+
] });
|
|
1059
1183
|
};
|
|
1060
1184
|
|
|
1061
1185
|
export { NavbarFullscreenMenu };
|