uibee 2.16.11 → 2.16.12
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.
|
@@ -15,10 +15,10 @@ function hamburgerStyle(isOpen, isSecond) {
|
|
|
15
15
|
export default function Navbar({ children, bubble, className, disableLanguageToggle, disableThemeToggle, innerClassName, lang, loginPath, logoutPath, onlyLogo, profilePath, token }) {
|
|
16
16
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
17
17
|
return (_jsx("div", { className: `${isMobileMenuOpen ? 'bg-[#181818f0]' : 'bg-[#18181899]'} backdrop-blur-xl fixed top-0 z-900 w-full ${className}`, children: _jsxs("div", { className: `flex w-full max-w-6xl m-auto p-2 transition duration-500 800px:justify-between 800px:p-4 ${isMobileMenuOpen ? 'h-screen bg-login-900/20 800px:h-20' : ''} ${innerClassName}
|
|
18
|
-
`, children: [_jsx("div", { className: 'block h-12 p-1 800px:p-0', children: _jsx(Link, { href: '/', onClick: () => setIsMobileMenuOpen(false), children: _jsx(LogoSmall, {}) }) }), onlyLogo ? null : (_jsxs(_Fragment, { children: [_jsx("nav", { className: 'hidden 800px:flex 800px:justify-between 800px:items-center 800px:w-fill max-w-200', children: children }), _jsxs("nav", { className: 'flex w-[calc(100vw-8rem)] justify-end h-12 800px:w-fit', children: [!disableThemeToggle &&
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
`, children: [_jsx("div", { className: 'block h-12 p-1 800px:p-0', children: _jsx(Link, { href: '/', onClick: () => setIsMobileMenuOpen(false), children: _jsx(LogoSmall, {}) }) }), onlyLogo ? null : (_jsxs(_Fragment, { children: [_jsx("nav", { className: 'hidden 800px:flex 800px:justify-between 800px:items-center 800px:w-fill max-w-200', children: children }), _jsxs("nav", { className: 'flex w-[calc(100vw-8rem)] justify-end h-12 800px:w-fit', children: [_jsxs("div", { className: 'grid gap-2', children: [!disableThemeToggle &&
|
|
19
|
+
_jsx(ThemeToggle, {}), bubble?.theme?.condition && _jsx(Bubble, { href: bubble.theme.href, className: bubble.theme.className, text: bubble.theme.text, fill: bubble.theme.fill, stroke: bubble.theme.stroke })] }), _jsxs("div", { className: 'grid gap-2', children: [!disableLanguageToggle &&
|
|
20
|
+
_jsx(LanguageToggle, { language: lang }), bubble?.lang?.condition && _jsx(Bubble, { href: bubble.lang.href, className: bubble.lang.className, text: bubble.lang.text, fill: bubble.lang.fill, stroke: bubble.lang.stroke })] }), _jsxs("div", { className: 'grid gap-2', children: [loginPath && logoutPath &&
|
|
21
|
+
_jsx(AuthButton, { profilePath: profilePath, token: token, loginPath: loginPath, logoutPath: logoutPath }), bubble?.login?.condition && _jsx(Bubble, { href: bubble.login.href, className: bubble.login.className, text: bubble.login.text, fill: bubble.login.fill, stroke: bubble.login.stroke })] })] }), _jsxs("button", { className: 'w-12 h-12 relative cursor-pointer bg-none border-none 800px:hidden', onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen), children: [_jsx("div", { className: hamburgerStyle(isMobileMenuOpen) }), _jsx("div", { className: hamburgerStyle(isMobileMenuOpen, true) })] }), _jsx("nav", { className: `fixed top-16 w-[calc(100%-2rem)] max-w-140 mx-auto left-0 right-0 800px:hidden
|
|
22
22
|
transition-all duration-500 ease-in-out overflow-hidden
|
|
23
23
|
${isMobileMenuOpen ? 'max-h-[calc(100vh-4rem)] opacity-100' : 'max-h-0 opacity-0'}`, onClick: () => setIsMobileMenuOpen(false), children: React.Children.map(children, (child, index) => (_jsx("div", { className: `transition-all duration-500 ease-out ${isMobileMenuOpen
|
|
24
24
|
? 'opacity-100 transform translate-y-0'
|
package/package.json
CHANGED
|
@@ -86,43 +86,49 @@ export default function Navbar({
|
|
|
86
86
|
|
|
87
87
|
{/* Controls */}
|
|
88
88
|
<nav className='flex w-[calc(100vw-8rem)] justify-end h-12 800px:w-fit'>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
89
|
+
<div className='grid gap-2'>
|
|
90
|
+
{!disableThemeToggle &&
|
|
91
|
+
<ThemeToggle />
|
|
92
|
+
}
|
|
93
|
+
{bubble?.theme?.condition && <Bubble
|
|
94
|
+
href={bubble.theme.href}
|
|
95
|
+
className={bubble.theme.className}
|
|
96
|
+
text={bubble.theme.text}
|
|
97
|
+
fill={bubble.theme.fill}
|
|
98
|
+
stroke={bubble.theme.stroke}
|
|
99
|
+
/>}
|
|
100
|
+
</div>
|
|
101
|
+
<div className='grid gap-2'>
|
|
102
|
+
{!disableLanguageToggle &&
|
|
103
|
+
<LanguageToggle
|
|
104
|
+
language={lang}
|
|
105
|
+
/>
|
|
106
|
+
}
|
|
107
|
+
{bubble?.lang?.condition && <Bubble
|
|
108
|
+
href={bubble.lang.href}
|
|
109
|
+
className={bubble.lang.className}
|
|
110
|
+
text={bubble.lang.text}
|
|
111
|
+
fill={bubble.lang.fill}
|
|
112
|
+
stroke={bubble.lang.stroke}
|
|
113
|
+
/>}
|
|
114
|
+
</div>
|
|
115
|
+
<div className='grid gap-2'>
|
|
116
|
+
{loginPath && logoutPath &&
|
|
117
|
+
<AuthButton
|
|
118
|
+
profilePath={profilePath}
|
|
119
|
+
token={token}
|
|
120
|
+
loginPath={loginPath}
|
|
121
|
+
logoutPath={logoutPath}
|
|
122
|
+
/>
|
|
123
|
+
}
|
|
124
|
+
{bubble?.login?.condition && <Bubble
|
|
125
|
+
href={bubble.login.href}
|
|
126
|
+
className={bubble.login.className}
|
|
127
|
+
text={bubble.login.text}
|
|
128
|
+
fill={bubble.login.fill}
|
|
129
|
+
stroke={bubble.login.stroke}
|
|
130
|
+
/>}
|
|
131
|
+
</div>
|
|
126
132
|
</nav>
|
|
127
133
|
|
|
128
134
|
{/* Mobile Menu Button */}
|