funuicss 3.7.3 → 3.7.4

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/css/fun.css CHANGED
@@ -1653,6 +1653,195 @@ border-radius: var(--borderRadius);
1653
1653
  cursor: pointer;
1654
1654
  }
1655
1655
 
1656
+ /* AppBar Dropdown Styles */
1657
+ .nav_item {
1658
+ position: relative;
1659
+ }
1660
+
1661
+ .nav_item.has-dropdown .nav_link {
1662
+ cursor: pointer;
1663
+ }
1664
+
1665
+ .nav_link-arrow {
1666
+ transition: transform 0.3s ease;
1667
+ margin-left: 0.25rem;
1668
+ }
1669
+
1670
+ .nav_item.dropdown-open .nav_link-arrow {
1671
+ transform: rotate(180deg);
1672
+ }
1673
+
1674
+ /* Dropdown Menu */
1675
+ .nav_dropdown-menu {
1676
+ position: absolute;
1677
+ top: 100%;
1678
+ left: 0;
1679
+ background: var(--page-bg);
1680
+ border: var(--border);
1681
+ border-radius: 0.5rem;
1682
+ box-shadow: var(--card);
1683
+ min-width: 200px;
1684
+ z-index: 1000;
1685
+ opacity: 0;
1686
+ transform: translateY(-10px);
1687
+ font-size: var(--minifiedFontSize);
1688
+ visibility: hidden;
1689
+ transition: all 0.3s ease;
1690
+ }
1691
+
1692
+ .nav_item.dropdown-open .nav_dropdown-menu {
1693
+ opacity: 1;
1694
+ transform: translateY(0);
1695
+ visibility: visible;
1696
+ }
1697
+
1698
+ /* Dropdown Links */
1699
+ .nav_dropdown-menu .nav_item {
1700
+ border-bottom: var(--border);
1701
+ }
1702
+
1703
+ .nav_dropdown-menu .nav_item:last-child {
1704
+ border-bottom: none;
1705
+ }
1706
+
1707
+ .nav_dropdown-menu .nav_link {
1708
+ display: block;
1709
+ text-decoration: none;
1710
+ transition: all 0.2s ease;
1711
+ border-radius: 0;
1712
+ }
1713
+
1714
+ .nav_dropdown-menu .nav_link:hover {
1715
+ background: var(--lighter);
1716
+ color: var(--primary) !important;
1717
+ }
1718
+
1719
+ .nav_dropdown-menu .nav_link.active {
1720
+ background: var(--primary100);
1721
+ color: var(--primary);
1722
+ font-weight: 500;
1723
+ }
1724
+
1725
+ /* Nested Dropdowns */
1726
+ .nav_dropdown-menu .nav_dropdown-menu {
1727
+ top: 0;
1728
+ left: 100%;
1729
+ margin-left: 0.25rem;
1730
+ }
1731
+
1732
+ .nav_dropdown-menu .nav_item.has-dropdown .nav_link {
1733
+ display: flex;
1734
+ justify-content: space-between;
1735
+ align-items: center;
1736
+ }
1737
+
1738
+ /* Mobile Dropdown Styles */
1739
+ .nav_dropdown-mobile {
1740
+ position: static !important;
1741
+ box-shadow: none !important;
1742
+ border: none !important;
1743
+ background: var(--raiseOpaque) !important;
1744
+ margin-left: 1rem;
1745
+ margin-top: 0.5rem;
1746
+ opacity: 1 !important;
1747
+ transform: none !important;
1748
+ visibility: visible !important;
1749
+ max-height: 0;
1750
+ overflow: hidden;
1751
+ transition: max-height 0.3s ease;
1752
+ }
1753
+
1754
+ .nav_item.dropdown-open .nav_dropdown-mobile {
1755
+ max-height: 500px;
1756
+ }
1757
+
1758
+ .nav_dropdown-mobile .nav_link {
1759
+ padding: 0.5rem 1rem !important;
1760
+ }
1761
+
1762
+ /* Mobile Menu */
1763
+ .nav_mobile-menu {
1764
+ position: fixed;
1765
+ top: var(--navHeight);
1766
+ left: 0;
1767
+ right: 0;
1768
+ bottom: 0;
1769
+ background: var(--raiseOpaque);
1770
+ z-index: 999;
1771
+ overflow-y: auto;
1772
+ padding: 1rem;
1773
+ border-top: var(--border);
1774
+ }
1775
+
1776
+ .nav_mobile-menu .nav_links {
1777
+ align-items: flex-start !important;
1778
+ }
1779
+
1780
+ .nav_mobile-menu .nav_item {
1781
+ width: 100%;
1782
+ }
1783
+
1784
+ .nav_mobile-menu .nav_link {
1785
+ width: 100%;
1786
+ justify-content: space-between;
1787
+ padding: 1rem !important;
1788
+ border-bottom: var(--border);
1789
+ }
1790
+
1791
+ /* Active Link Styles */
1792
+ .nav_link.active {
1793
+ color: var(--primary) !important;
1794
+ font-weight: 600;
1795
+ }
1796
+
1797
+ /* Hover Effects */
1798
+ .nav_link:hover {
1799
+ color: var(--primary) !important;
1800
+ }
1801
+
1802
+ /* Icon Styles */
1803
+ .nav_link-icon {
1804
+ display: flex;
1805
+ align-items: center;
1806
+ transition: transform 0.2s ease;
1807
+ }
1808
+
1809
+ .nav_link:hover .nav_link-icon.prefix {
1810
+ transform: translateX(-2px);
1811
+ }
1812
+
1813
+ .nav_link:hover .nav_link-icon.suffix {
1814
+ transform: translateX(2px);
1815
+ }
1816
+
1817
+ /* Smooth Transitions */
1818
+ .nav_link,
1819
+ .nav_link-content,
1820
+ .nav_dropdown-menu {
1821
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1822
+ }
1823
+
1824
+ /* Focus States */
1825
+ .nav_link:focus {
1826
+ outline: 2px solid var(--primary);
1827
+ outline-offset: 2px;
1828
+ }
1829
+
1830
+ /* Responsive */
1831
+ @media (max-width: 768px) {
1832
+ .nav_dropdown-menu {
1833
+ position: static;
1834
+ box-shadow: none;
1835
+ border: none;
1836
+ background: var(--raiseOpaque);
1837
+ margin-left: 1rem;
1838
+ }
1839
+
1840
+ .nav_item.dropdown-open .nav_dropdown-menu {
1841
+ max-height: 500px;
1842
+ }
1843
+ }
1844
+
1656
1845
 
1657
1846
 
1658
1847
  /* video */
@@ -1727,7 +1916,7 @@ border-radius: var(--borderRadius);
1727
1916
  line-height: 0;
1728
1917
  color: var(--text-color);
1729
1918
  }
1730
-
1919
+
1731
1920
 
1732
1921
 
1733
1922
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.7.3",
2
+ "version": "3.7.4",
3
3
  "name": "funuicss",
4
4
  "description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
5
5
  "main": "index.js",
@@ -1,20 +1,50 @@
1
1
  import * as React from 'react';
2
+ interface NavLink {
3
+ label: string;
4
+ href: string;
5
+ icon?: string;
6
+ iconPosition?: 'prefix' | 'suffix';
7
+ children?: NavLink[];
8
+ active?: boolean;
9
+ className?: string;
10
+ }
2
11
  interface NavbarProps {
3
12
  fixedTop?: boolean;
4
13
  funcss?: string;
5
14
  padding?: string;
6
15
  fixedBottom?: boolean;
7
16
  justify?: string;
17
+ transparent?: boolean;
8
18
  children?: React.ReactNode;
9
19
  left?: React.ReactNode;
10
20
  center?: React.ReactNode;
11
21
  right?: React.ReactNode;
12
22
  sidebarTrigger?: React.ReactNode;
13
- transparent?: boolean;
14
23
  sideBar?: number;
15
24
  hasSidebar?: boolean;
16
25
  sidebarOpen?: boolean;
17
26
  openSidebar?: () => void;
27
+ variant?: string;
28
+ leftLinks?: NavLink[] | string;
29
+ centerLinks?: NavLink[] | string;
30
+ rightLinks?: NavLink[] | string;
31
+ renderLink?: (link: NavLink, index: number) => React.ReactNode;
32
+ mobileMenuBreakpoint?: number;
33
+ logoType?: 'text' | 'image' | 'both' | 'none';
34
+ logoText?: string;
35
+ logoTextSize?: string;
36
+ logoTextColor?: string;
37
+ logoTextWeight?: string;
38
+ logoUrl?: string;
39
+ logoAlt?: string;
40
+ logoWidth?: string;
41
+ logoHeight?: string;
42
+ logoHref?: string;
43
+ onLogoClick?: () => void;
44
+ linkGap?: string;
45
+ linkPadding?: string;
46
+ activeLinkColor?: string;
47
+ dropdownArrow?: boolean;
18
48
  }
19
- export default function AppBar({ fixedTop, funcss, padding, fixedBottom, justify, left, center, right, sideBar, sidebarTrigger, transparent, hasSidebar, openSidebar, sidebarOpen }: NavbarProps): React.JSX.Element;
49
+ export default function AppBar(localProps: NavbarProps): React.JSX.Element;
20
50
  export {};
@@ -33,6 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  return result;
34
34
  };
35
35
  })();
36
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
37
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
38
+ if (ar || !(i in from)) {
39
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
40
+ ar[i] = from[i];
41
+ }
42
+ }
43
+ return to.concat(ar || Array.prototype.slice.call(from));
44
+ };
36
45
  var __importDefault = (this && this.__importDefault) || function (mod) {
37
46
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
47
  };
@@ -40,18 +49,174 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
49
  exports.default = AppBar;
41
50
  var React = __importStar(require("react"));
42
51
  var react_1 = require("react");
43
- var navigation_1 = require("next/navigation"); // <-- Updated import
52
+ var navigation_1 = require("next/navigation");
44
53
  var Hamburger_1 = __importDefault(require("./Hamburger"));
45
- function AppBar(_a) {
46
- var fixedTop = _a.fixedTop, funcss = _a.funcss, padding = _a.padding, fixedBottom = _a.fixedBottom, justify = _a.justify, left = _a.left, center = _a.center, right = _a.right, sideBar = _a.sideBar, sidebarTrigger = _a.sidebarTrigger, transparent = _a.transparent, hasSidebar = _a.hasSidebar, openSidebar = _a.openSidebar, _b = _a.sidebarOpen, sidebarOpen = _b === void 0 ? false : _b;
47
- var _c = (0, react_1.useState)(false), isMobileMenuOpen = _c[0], setIsMobileMenuOpen = _c[1];
48
- var _d = (0, react_1.useState)(false), isMobileScreen = _d[0], setIsMobileScreen = _d[1];
49
- var pathname = (0, navigation_1.usePathname)(); // <-- New hook to detect path changes
54
+ var componentUtils_1 = require("../../utils/componentUtils");
55
+ var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
56
+ // Parse string to object utility
57
+ var parseIfString = function (value, fallback) {
58
+ if (typeof value === 'string') {
59
+ try {
60
+ var parsed = JSON.parse(value);
61
+ if (Array.isArray(fallback) && !Array.isArray(parsed)) {
62
+ console.warn('Parsed value is not an array, using fallback');
63
+ return fallback;
64
+ }
65
+ return parsed;
66
+ }
67
+ catch (error) {
68
+ console.error('Failed to parse JSON string:', error);
69
+ return fallback;
70
+ }
71
+ }
72
+ if (value == null) {
73
+ return fallback;
74
+ }
75
+ return value;
76
+ };
77
+ // Dropdown Arrow Icon Component
78
+ var DropdownArrow = function (_a) {
79
+ var isOpen = _a.isOpen;
80
+ return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", style: {
81
+ transition: 'transform 0.3s ease',
82
+ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)'
83
+ } },
84
+ React.createElement("path", { d: "M4 6 L8 10 L12 6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })));
85
+ };
86
+ // Link Item Component with Dropdown Support
87
+ var LinkItem = function (_a) {
88
+ var link = _a.link, renderLink = _a.renderLink, _b = _a.linkPadding, linkPadding = _b === void 0 ? '0.5rem 1rem' : _b, _c = _a.activeLinkColor, activeLinkColor = _c === void 0 ? 'primary' : _c, _d = _a.dropdownArrow, dropdownArrow = _d === void 0 ? true : _d, _e = _a.isMobile, isMobile = _e === void 0 ? false : _e;
89
+ var _f = (0, react_1.useState)(false), isOpen = _f[0], setIsOpen = _f[1];
90
+ var _g = (0, react_1.useState)(null), iconNode = _g[0], setIconNode = _g[1];
91
+ var timeoutRef = (0, react_1.useRef)();
92
+ var dropdownRef = (0, react_1.useRef)(null);
93
+ // Handle dynamic icon loading
94
+ (0, react_1.useEffect)(function () {
95
+ if (link.icon) {
96
+ (0, getDynamicIcon_1.getDynamicIcon)(link.icon).then(setIconNode);
97
+ }
98
+ else {
99
+ setIconNode(null);
100
+ }
101
+ }, [link.icon]);
102
+ // Close dropdown when clicking outside
103
+ (0, react_1.useEffect)(function () {
104
+ var handleClickOutside = function (event) {
105
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
106
+ setIsOpen(false);
107
+ }
108
+ };
109
+ if (isOpen) {
110
+ document.addEventListener('mousedown', handleClickOutside);
111
+ }
112
+ return function () {
113
+ document.removeEventListener('mousedown', handleClickOutside);
114
+ };
115
+ }, [isOpen]);
116
+ var hasChildren = link.children && link.children.length > 0;
117
+ var handleMouseEnter = function () {
118
+ if (timeoutRef.current)
119
+ clearTimeout(timeoutRef.current);
120
+ if (!isMobile && hasChildren) {
121
+ setIsOpen(true);
122
+ }
123
+ };
124
+ var handleMouseLeave = function () {
125
+ if (!isMobile) {
126
+ timeoutRef.current = setTimeout(function () { return setIsOpen(false); }, 150);
127
+ }
128
+ };
129
+ var handleClick = function (e) {
130
+ if (hasChildren && isMobile) {
131
+ e.preventDefault();
132
+ setIsOpen(!isOpen);
133
+ }
134
+ };
135
+ var linkContent = (React.createElement("span", { className: "nav_link-content ".concat(link.active ? 'active' : '', " ").concat(link.className || ''), style: {
136
+ display: 'flex',
137
+ alignItems: 'center',
138
+ gap: '0.5rem',
139
+ padding: linkPadding,
140
+ color: 'inherit',
141
+ textDecoration: 'none'
142
+ } },
143
+ iconNode && link.iconPosition !== 'suffix' && (React.createElement("span", { className: "nav_link-icon prefix", style: { display: 'flex', alignItems: 'center' } }, iconNode)),
144
+ React.createElement("span", { className: "nav_link-text" }, link.label),
145
+ iconNode && link.iconPosition === 'suffix' && (React.createElement("span", { className: "nav_link-icon suffix", style: { display: 'flex', alignItems: 'center' } }, iconNode)),
146
+ hasChildren && dropdownArrow && (React.createElement("span", { className: "nav_link-arrow", style: { display: 'flex', alignItems: 'center' } },
147
+ React.createElement(DropdownArrow, { isOpen: isOpen })))));
148
+ // If custom renderer is provided, use it
149
+ if (renderLink) {
150
+ return renderLink(link, 0);
151
+ }
152
+ return (React.createElement("div", { ref: dropdownRef, className: "nav_item ".concat(hasChildren ? 'has-dropdown' : '', " ").concat(isOpen ? 'dropdown-open' : ''), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: { position: 'relative' } },
153
+ React.createElement("a", { href: link.href, className: "nav_link ".concat(link.active ? 'active' : ''), onClick: handleClick, style: {
154
+ textDecoration: 'none',
155
+ color: 'inherit',
156
+ display: 'flex',
157
+ alignItems: 'center'
158
+ } }, linkContent),
159
+ hasChildren && isOpen && (React.createElement("div", { className: "nav_dropdown-menu ".concat(isMobile ? 'nav_dropdown-mobile' : '') }, link.children.map(function (child, index) { return (React.createElement(LinkItem, { key: index, link: child, renderLink: renderLink, linkPadding: linkPadding, activeLinkColor: activeLinkColor, dropdownArrow: dropdownArrow, isMobile: isMobile })); })))));
160
+ };
161
+ // Links component to render navigation links
162
+ var NavLinks = function (_a) {
163
+ var links = _a.links, renderLink = _a.renderLink, _b = _a.linkGap, linkGap = _b === void 0 ? '1rem' : _b, _c = _a.linkPadding, linkPadding = _c === void 0 ? '0.5rem 1rem' : _c, _d = _a.activeLinkColor, activeLinkColor = _d === void 0 ? 'primary' : _d, _e = _a.dropdownArrow, dropdownArrow = _e === void 0 ? true : _e, _f = _a.isMobile, isMobile = _f === void 0 ? false : _f;
164
+ if (!links || !Array.isArray(links) || links.length === 0) {
165
+ return null;
166
+ }
167
+ return (React.createElement("div", { className: "nav_links", style: {
168
+ display: 'flex',
169
+ alignItems: 'center',
170
+ gap: linkGap,
171
+ flexDirection: isMobile ? 'column' : 'row'
172
+ } }, links.map(function (link, index) { return (React.createElement(LinkItem, { key: index, link: link, renderLink: renderLink, linkPadding: linkPadding, activeLinkColor: activeLinkColor, dropdownArrow: dropdownArrow, isMobile: isMobile })); })));
173
+ };
174
+ // Logo component with multiple display options
175
+ var Logo = function (_a) {
176
+ var _b = _a.type, type = _b === void 0 ? 'text' : _b, _c = _a.text, text = _c === void 0 ? 'MyApp' : _c, _d = _a.textSize, textSize = _d === void 0 ? 'xl' : _d, _e = _a.textColor, textColor = _e === void 0 ? 'primary' : _e, _f = _a.textWeight, textWeight = _f === void 0 ? 'bold' : _f, _g = _a.url, url = _g === void 0 ? '' : _g, _h = _a.alt, alt = _h === void 0 ? 'Logo' : _h, _j = _a.width, width = _j === void 0 ? '40px' : _j, _k = _a.height, height = _k === void 0 ? 'auto' : _k, _l = _a.href, href = _l === void 0 ? '/' : _l, onClick = _a.onClick;
177
+ if (type === 'none')
178
+ return null;
179
+ var logoContent = (React.createElement("div", { className: "logo-content", style: { display: 'flex', alignItems: 'center', gap: '0.75rem' } },
180
+ (type === 'image' || type === 'both') && url && (React.createElement("img", { src: url, alt: alt, style: {
181
+ width: width,
182
+ height: height,
183
+ objectFit: 'contain',
184
+ display: 'block'
185
+ }, className: "logo-image" })),
186
+ (type === 'text' || type === 'both') && text && (React.createElement("span", { className: "logo-text text-".concat(textSize, " text-").concat(textColor, " font-").concat(textWeight), style: {
187
+ lineHeight: 1,
188
+ whiteSpace: 'nowrap'
189
+ } }, text))));
190
+ // Wrap in link if href provided
191
+ if (href) {
192
+ return (React.createElement("a", { href: href, onClick: onClick, style: {
193
+ textDecoration: 'none',
194
+ color: 'inherit',
195
+ display: 'flex',
196
+ alignItems: 'center'
197
+ }, className: "logo-link" }, logoContent));
198
+ }
199
+ return (React.createElement("div", { onClick: onClick, style: { cursor: onClick ? 'pointer' : 'default' }, className: "logo-container" }, logoContent));
200
+ };
201
+ function AppBar(localProps) {
202
+ // Use component configuration with variant support
203
+ var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('AppBar', localProps.variant).mergeWithLocal;
204
+ // Merge with config - LOCAL PROPS OVERRIDE CONFIG
205
+ var mergedProps = mergeWithLocal(localProps).props;
206
+ // Parse link props if they're strings
207
+ var parsedLeftLinks = parseIfString(mergedProps.leftLinks, []);
208
+ var parsedCenterLinks = parseIfString(mergedProps.centerLinks, []);
209
+ var parsedRightLinks = parseIfString(mergedProps.rightLinks, []);
210
+ // Use mergedProps directly
211
+ var final = mergedProps;
212
+ var _a = (0, react_1.useState)(false), isMobileMenuOpen = _a[0], setIsMobileMenuOpen = _a[1];
213
+ var _b = (0, react_1.useState)(false), isMobileScreen = _b[0], setIsMobileScreen = _b[1];
214
+ var pathname = (0, navigation_1.usePathname)();
50
215
  var toggleMenu = function () { return setIsMobileMenuOpen(function (prev) { return !prev; }); };
51
216
  var closeMenu = function () { return setIsMobileMenuOpen(false); };
52
217
  (0, react_1.useEffect)(function () {
53
218
  var handleResize = function () {
54
- var isMobile = window.innerWidth < 992;
219
+ var isMobile = window.innerWidth < (final.mobileMenuBreakpoint || 992);
55
220
  setIsMobileScreen(isMobile);
56
221
  if (!isMobile) {
57
222
  closeMenu(); // close on larger screens
@@ -60,7 +225,7 @@ function AppBar(_a) {
60
225
  handleResize(); // initial check
61
226
  window.addEventListener('resize', handleResize);
62
227
  return function () { return window.removeEventListener('resize', handleResize); };
63
- }, []);
228
+ }, [final.mobileMenuBreakpoint]);
64
229
  // Automatically close menu on route (pathname) change
65
230
  (0, react_1.useEffect)(function () {
66
231
  closeMenu();
@@ -69,19 +234,56 @@ function AppBar(_a) {
69
234
  var isOpen = _a.isOpen;
70
235
  return React.createElement(Hamburger_1.default, { isOpen: isOpen });
71
236
  };
72
- return (React.createElement("nav", {
73
- // the id will be used to get the height for the sidebar in the sidebar file
74
- id: 'appBar', className: "navigation-bar\n ".concat(isMobileMenuOpen ? 'navbar-mobile-open' : '', "\n ").concat(funcss || '', "\n ").concat(fixedTop ? 'fixed_top_navbar' : '', "\n ").concat(sideBar ? 'there_is_sidebar' : '', "\n ").concat(transparent ? 'transparent' : '', "\n ").concat(fixedBottom ? 'fixedBottom' : '', "\n "), style: {
75
- padding: "".concat(padding || ''),
76
- justifyContent: "".concat(justify || ''),
77
- } },
78
- React.createElement("div", { className: "logoWrapper" },
79
- left,
80
- isMobileScreen && isMobileMenuOpen && (React.createElement("div", { className: "hover-text-error pointer _closeNav", onClick: closeMenu },
81
- React.createElement(Trigger, { isOpen: isMobileMenuOpen })))),
82
- React.createElement("div", { className: "linkWrapper" }, center),
83
- React.createElement("div", { className: "linkWrapper" }, right),
84
- isMobileScreen && !isMobileMenuOpen && (React.createElement(React.Fragment, null, hasSidebar ?
85
- React.createElement("span", { className: "sidebar-trigger pointer hover-text-primary", onClick: openSidebar }, sidebarTrigger || React.createElement(Trigger, { isOpen: sidebarOpen }))
86
- : React.createElement("span", { className: "sidebar-trigger pointer hover-text-primary", onClick: toggleMenu }, sidebarTrigger || React.createElement(Trigger, { isOpen: isMobileMenuOpen }))))));
237
+ // Enhanced left section with logo customization
238
+ var renderLeftSection = function () {
239
+ // If custom left content is provided, use it (overrides everything)
240
+ if (final.left)
241
+ return final.left;
242
+ // Render logo based on configuration
243
+ var shouldRenderLogo = final.logoType && final.logoType !== 'none';
244
+ var hasLeftLinks = parsedLeftLinks.length > 0;
245
+ return (React.createElement("div", { className: "left-section", style: { display: 'flex', alignItems: 'center', gap: '2rem' } },
246
+ shouldRenderLogo && (React.createElement(Logo, { type: final.logoType, text: final.logoText, textSize: final.logoTextSize, textColor: final.logoTextColor, textWeight: final.logoTextWeight, url: final.logoUrl, alt: final.logoAlt, width: final.logoWidth, height: final.logoHeight, href: final.logoHref, onClick: final.onLogoClick })),
247
+ hasLeftLinks && !isMobileScreen && (React.createElement(NavLinks, { links: parsedLeftLinks, renderLink: final.renderLink, linkGap: final.linkGap, linkPadding: final.linkPadding, activeLinkColor: final.activeLinkColor, dropdownArrow: final.dropdownArrow }))));
248
+ };
249
+ var renderCenterSection = function () {
250
+ if (final.center)
251
+ return final.center;
252
+ if (parsedCenterLinks.length > 0 && !isMobileScreen) {
253
+ return (React.createElement(NavLinks, { links: parsedCenterLinks, renderLink: final.renderLink, linkGap: final.linkGap, linkPadding: final.linkPadding, activeLinkColor: final.activeLinkColor, dropdownArrow: final.dropdownArrow }));
254
+ }
255
+ return null;
256
+ };
257
+ var renderRightSection = function () {
258
+ if (final.right)
259
+ return final.right;
260
+ if (parsedRightLinks.length > 0 && !isMobileScreen) {
261
+ return (React.createElement(NavLinks, { links: parsedRightLinks, renderLink: final.renderLink, linkGap: final.linkGap, linkPadding: final.linkPadding, activeLinkColor: final.activeLinkColor, dropdownArrow: final.dropdownArrow }));
262
+ }
263
+ return null;
264
+ };
265
+ // Mobile menu content
266
+ var renderMobileMenu = function () {
267
+ if (!isMobileScreen || !isMobileMenuOpen)
268
+ return null;
269
+ var allLinks = __spreadArray(__spreadArray(__spreadArray([], parsedLeftLinks, true), parsedCenterLinks, true), parsedRightLinks, true);
270
+ return (React.createElement("div", { className: "nav_mobile-menu" },
271
+ React.createElement(NavLinks, { links: allLinks, renderLink: final.renderLink, linkGap: "0.5rem", linkPadding: "1rem", activeLinkColor: final.activeLinkColor, dropdownArrow: final.dropdownArrow, isMobile: true })));
272
+ };
273
+ return (React.createElement(React.Fragment, null,
274
+ React.createElement("nav", { id: 'appBar', className: "navigation-bar\n ".concat(isMobileMenuOpen ? 'navbar-mobile-open' : '', "\n ").concat(final.funcss || '', "\n ").concat(final.fixedTop ? 'fixed_top_navbar' : '', "\n ").concat(final.sideBar ? 'there_is_sidebar' : '', "\n ").concat(final.transparent ? 'transparent' : '', "\n ").concat(final.fixedBottom ? 'fixedBottom' : '', "\n "), style: {
275
+ padding: "".concat(final.padding || ''),
276
+ justifyContent: "".concat(final.justify || ''),
277
+ } },
278
+ React.createElement("div", { className: "logoWrapper" },
279
+ renderLeftSection(),
280
+ isMobileScreen && isMobileMenuOpen && (React.createElement("div", { className: "hover-text-error pointer _closeNav", onClick: closeMenu },
281
+ React.createElement(Trigger, { isOpen: isMobileMenuOpen })))),
282
+ React.createElement("div", { className: "linkWrapper" }, renderCenterSection()),
283
+ React.createElement("div", { className: "linkWrapper" }, renderRightSection()),
284
+ isMobileScreen && !isMobileMenuOpen && (React.createElement(React.Fragment, null, final.hasSidebar ?
285
+ React.createElement("span", { className: "sidebar-trigger pointer hover-text-primary", onClick: final.openSidebar }, final.sidebarTrigger || React.createElement(Trigger, { isOpen: final.sidebarOpen }))
286
+ :
287
+ React.createElement("span", { className: "sidebar-trigger pointer hover-text-primary", onClick: toggleMenu }, final.sidebarTrigger || React.createElement(Trigger, { isOpen: isMobileMenuOpen }))))),
288
+ renderMobileMenu()));
87
289
  }