uibee 2.16.9 → 2.16.10
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.
|
@@ -9,23 +9,23 @@ type BubbleContent = {
|
|
|
9
9
|
stroke: string;
|
|
10
10
|
};
|
|
11
11
|
export type NavbarProps = {
|
|
12
|
-
|
|
13
|
-
disableLanguageToggle?: boolean;
|
|
14
|
-
onlyLogo?: boolean;
|
|
15
|
-
theme?: string;
|
|
16
|
-
disableThemeToggle?: boolean;
|
|
17
|
-
token?: string | null;
|
|
18
|
-
profilePath?: string;
|
|
19
|
-
loginPath: string;
|
|
20
|
-
logoutPath: string;
|
|
21
|
-
className?: string;
|
|
22
|
-
innerClassName?: string;
|
|
23
|
-
children: React.ReactNode;
|
|
24
|
-
bubble: {
|
|
12
|
+
bubble?: {
|
|
25
13
|
lang?: BubbleContent;
|
|
26
14
|
theme?: BubbleContent;
|
|
27
15
|
login?: BubbleContent;
|
|
28
16
|
};
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
disableLanguageToggle?: boolean;
|
|
20
|
+
disableThemeToggle?: boolean;
|
|
21
|
+
innerClassName?: string;
|
|
22
|
+
lang?: Language;
|
|
23
|
+
loginPath: string;
|
|
24
|
+
logoutPath: string;
|
|
25
|
+
onlyLogo?: boolean;
|
|
26
|
+
profilePath?: string;
|
|
27
|
+
theme?: string;
|
|
28
|
+
token?: string | null;
|
|
29
29
|
};
|
|
30
30
|
export default function Navbar({ lang, onlyLogo, disableLanguageToggle, disableThemeToggle, token, profilePath, loginPath, logoutPath, className, innerClassName, children, bubble }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -16,9 +16,9 @@ export default function Navbar({ lang, onlyLogo, disableLanguageToggle, disableT
|
|
|
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
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
|
-
_jsx(ThemeToggle, {}), bubble
|
|
20
|
-
_jsx(LanguageToggle, { language: lang }), bubble
|
|
21
|
-
_jsx(AuthButton, { profilePath: profilePath, token: token, loginPath: loginPath, logoutPath: logoutPath }), bubble
|
|
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 }), !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 }), 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uibee",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.10",
|
|
4
4
|
"description": "Shared components, functions and hooks for reuse across Login projects",
|
|
5
5
|
"homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@types/node": "^25.6.0",
|
|
43
43
|
"@types/react": "19.2.14",
|
|
44
44
|
"@types/react-dom": "^19.2.3",
|
|
45
|
-
"eslint": "^10.2.
|
|
45
|
+
"eslint": "^10.2.1",
|
|
46
46
|
"glob": "^13.0.6",
|
|
47
47
|
"postcss": "^8.5.10",
|
|
48
48
|
"tailwindcss": "^4.2.2",
|
|
49
49
|
"ts-node": "^10.9.2",
|
|
50
|
-
"typescript": "^6.0.
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
51
|
"typescript-eslint": "^8.58.2"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"react-dom": "19.2.5",
|
|
56
56
|
"react-markdown": "^10.1.0",
|
|
57
57
|
"remark-gfm": "^4.0.1",
|
|
58
|
-
"utilbee": "^1.4.
|
|
58
|
+
"utilbee": "^1.4.5"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -27,23 +27,23 @@ function hamburgerStyle (isOpen: boolean, isSecond?: boolean) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type NavbarProps = {
|
|
30
|
-
|
|
31
|
-
disableLanguageToggle?: boolean
|
|
32
|
-
onlyLogo?: boolean
|
|
33
|
-
theme?: string
|
|
34
|
-
disableThemeToggle?: boolean
|
|
35
|
-
token?: string | null
|
|
36
|
-
profilePath?: string
|
|
37
|
-
loginPath: string
|
|
38
|
-
logoutPath: string
|
|
39
|
-
className?: string
|
|
40
|
-
innerClassName?: string
|
|
41
|
-
children: React.ReactNode
|
|
42
|
-
bubble: {
|
|
30
|
+
bubble?: {
|
|
43
31
|
lang?: BubbleContent
|
|
44
32
|
theme?: BubbleContent
|
|
45
33
|
login?: BubbleContent
|
|
46
34
|
}
|
|
35
|
+
children: React.ReactNode
|
|
36
|
+
className?: string
|
|
37
|
+
disableLanguageToggle?: boolean
|
|
38
|
+
disableThemeToggle?: boolean
|
|
39
|
+
innerClassName?: string
|
|
40
|
+
lang?: Language
|
|
41
|
+
loginPath: string
|
|
42
|
+
logoutPath: string
|
|
43
|
+
onlyLogo?: boolean
|
|
44
|
+
profilePath?: string
|
|
45
|
+
theme?: string
|
|
46
|
+
token?: string | null
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export default function Navbar({
|
|
@@ -89,7 +89,7 @@ export default function Navbar({
|
|
|
89
89
|
{!disableThemeToggle &&
|
|
90
90
|
<ThemeToggle />
|
|
91
91
|
}
|
|
92
|
-
{bubble
|
|
92
|
+
{bubble?.theme?.condition && <Bubble
|
|
93
93
|
href={bubble.theme.href}
|
|
94
94
|
className={bubble.theme.className}
|
|
95
95
|
text={bubble.theme.text}
|
|
@@ -101,7 +101,7 @@ export default function Navbar({
|
|
|
101
101
|
language={lang}
|
|
102
102
|
/>
|
|
103
103
|
}
|
|
104
|
-
{bubble
|
|
104
|
+
{bubble?.lang?.condition && <Bubble
|
|
105
105
|
href={bubble.lang.href}
|
|
106
106
|
className={bubble.lang.className}
|
|
107
107
|
text={bubble.lang.text}
|
|
@@ -116,7 +116,7 @@ export default function Navbar({
|
|
|
116
116
|
logoutPath={logoutPath}
|
|
117
117
|
/>
|
|
118
118
|
}
|
|
119
|
-
{bubble
|
|
119
|
+
{bubble?.login?.condition && <Bubble
|
|
120
120
|
href={bubble.login.href}
|
|
121
121
|
className={bubble.login.className}
|
|
122
122
|
text={bubble.login.text}
|