uibee 2.16.9 → 2.16.11

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.
@@ -1,4 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export default function Bubble({ href, className, fill, stroke, text }) {
3
- return (_jsxs("a", { href: href, className: className, children: [_jsxs("svg", { viewBox: '0 0 24 12', className: 'absolute -top-[0.68rem] right-6 h-3 w-6', "aria-hidden": 'true', children: [_jsx("path", { d: 'M12 0 24 12H0Z', fill: fill, stroke: stroke, strokeWidth: '1.5', strokeLinejoin: 'round' }), _jsx("path", { d: 'M12 0 24 12H0Z', fill: fill })] }), _jsx("span", { children: text })] }));
3
+ return (_jsxs("a", { href: href, className: className, children: [_jsxs("svg", { viewBox: '0 0 24 12', className: 'absolute -top-[0.65rem] right-6 h-3 w-6', "aria-hidden": 'true', children: [_jsx("path", { d: 'M12 0 24 12H0Z', fill: fill, stroke: stroke, strokeWidth: '1.5', strokeLinejoin: 'round' }), _jsx("path", { d: 'M12 0 24 12H0Z', fill: fill })] }), _jsx("span", { children: text })] }));
4
4
  }
@@ -9,23 +9,23 @@ type BubbleContent = {
9
9
  stroke: string;
10
10
  };
11
11
  export type NavbarProps = {
12
- lang?: Language;
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
12
  children: React.ReactNode;
24
- bubble: {
13
+ bubble?: {
25
14
  lang?: BubbleContent;
26
15
  theme?: BubbleContent;
27
16
  login?: BubbleContent;
28
17
  };
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
- export default function Navbar({ lang, onlyLogo, disableLanguageToggle, disableThemeToggle, token, profilePath, loginPath, logoutPath, className, innerClassName, children, bubble }: NavbarProps): import("react/jsx-runtime").JSX.Element;
30
+ export default function Navbar({ children, bubble, className, disableLanguageToggle, disableThemeToggle, innerClassName, lang, loginPath, logoutPath, onlyLogo, profilePath, token }: NavbarProps): import("react/jsx-runtime").JSX.Element;
31
31
  export {};
@@ -12,13 +12,13 @@ function hamburgerStyle(isOpen, isSecond) {
12
12
  ? `top-6 ${isSecond ? 'rotate-45' : '-rotate-45'}`
13
13
  : isSecond ? 'top-7' : 'top-4'}`;
14
14
  }
15
- export default function Navbar({ lang, onlyLogo, disableLanguageToggle, disableThemeToggle, token, profilePath, loginPath, logoutPath, className, innerClassName, children, bubble }) {
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
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.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
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'
@@ -333,8 +333,8 @@
333
333
  .end {
334
334
  inset-inline-end: var(--spacing);
335
335
  }
336
- .-top-\[0\.68rem\] {
337
- top: calc(0.68rem * -1);
336
+ .-top-\[0\.65rem\] {
337
+ top: calc(0.65rem * -1);
338
338
  }
339
339
  .top-0 {
340
340
  top: calc(var(--spacing) * 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.16.9",
3
+ "version": "2.16.11",
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.0",
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.2",
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.1"
58
+ "utilbee": "^1.4.5"
59
59
  }
60
60
  }
@@ -14,7 +14,7 @@ export default function Bubble({ href, className, fill, stroke, text }: BubbleTe
14
14
  >
15
15
  <svg
16
16
  viewBox='0 0 24 12'
17
- className='absolute -top-[0.68rem] right-6 h-3 w-6'
17
+ className='absolute -top-[0.65rem] right-6 h-3 w-6'
18
18
  aria-hidden='true'
19
19
  >
20
20
  <path
@@ -27,38 +27,38 @@ function hamburgerStyle (isOpen: boolean, isSecond?: boolean) {
27
27
  }
28
28
 
29
29
  export type NavbarProps = {
30
- lang?: Language
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
30
  children: React.ReactNode
42
- bubble: {
31
+ bubble?: {
43
32
  lang?: BubbleContent
44
33
  theme?: BubbleContent
45
34
  login?: BubbleContent
46
35
  }
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({
50
- lang,
51
- onlyLogo,
50
+ children,
51
+ bubble,
52
+ className,
52
53
  disableLanguageToggle,
53
54
  disableThemeToggle,
54
- token,
55
- profilePath,
55
+ innerClassName,
56
+ lang,
56
57
  loginPath,
57
58
  logoutPath,
58
- className,
59
- innerClassName,
60
- children,
61
- bubble
59
+ onlyLogo,
60
+ profilePath,
61
+ token
62
62
  }: NavbarProps) {
63
63
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false)
64
64
 
@@ -89,7 +89,7 @@ export default function Navbar({
89
89
  {!disableThemeToggle &&
90
90
  <ThemeToggle />
91
91
  }
92
- {bubble.theme?.condition && <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.lang?.condition && <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.login?.condition && <Bubble
119
+ {bubble?.login?.condition && <Bubble
120
120
  href={bubble.login.href}
121
121
  className={bubble.login.className}
122
122
  text={bubble.login.text}