@kt-components/layout-header-sidebar 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/README.md +59 -0
- package/dist/index.d.mts +101 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +391 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +356 -0
- package/dist/index.mjs.map +1 -0
- package/dist/src/styles.css +875 -0
- package/dist/src/styles.css.map +1 -0
- package/dist/src/styles.d.mts +2 -0
- package/dist/src/styles.d.ts +2 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# KT Components Layout Header Sidebar
|
|
2
|
+
|
|
3
|
+
Reusable Header and Sidebar layout components for Next.js applications, pre-styled with Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- React 18+
|
|
8
|
+
- TailwindCSS 3 (or just use the pre-built styles)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @kt-components/layout-header-sidebar
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
Enable the styles in your project. Add this line to your **root layout** file (e.g., `app/layout.tsx` or `pages/_app.tsx`):
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import "@kt-components/layout-header-sidebar/dist/styles.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Header with Notifications
|
|
27
|
+
|
|
28
|
+
Now supports a built-in notification dropdown.
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Header, NotificationItem } from '@kt-components/layout-header-sidebar';
|
|
32
|
+
|
|
33
|
+
function App() {
|
|
34
|
+
const user = {
|
|
35
|
+
firstName: 'สมชาย',
|
|
36
|
+
lastName: 'ใจดี',
|
|
37
|
+
pictureUrl: 'https://example.com/avatar.jpg'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// ...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Sidebar Component
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { SharedSidebar, MenuItem } from '@kt-components/layout-header-sidebar';
|
|
47
|
+
// ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Toggle Sidebar Programmatically
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { toggleSidebar } from '@kt-components/layout-header-sidebar';
|
|
54
|
+
// ...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Props
|
|
58
|
+
|
|
59
|
+
See TypeScript definitions for full prop list.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
|
|
4
|
+
interface NotificationItem {
|
|
5
|
+
id: string | number;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
date: string;
|
|
9
|
+
type: 'reminder' | 'success' | 'info';
|
|
10
|
+
isRead?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface HeaderProps {
|
|
14
|
+
user?: {
|
|
15
|
+
firstName?: string;
|
|
16
|
+
lastName?: string;
|
|
17
|
+
pictureUrl?: string;
|
|
18
|
+
};
|
|
19
|
+
sidebarId?: string;
|
|
20
|
+
overlayId?: string;
|
|
21
|
+
notificationBell?: React$1.ReactNode;
|
|
22
|
+
notifications?: NotificationItem[];
|
|
23
|
+
}
|
|
24
|
+
declare function Header({ user, sidebarId, overlayId, notificationBell, notifications }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface MenuItem {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
path: string;
|
|
30
|
+
icon: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
interface MenuListProps {
|
|
33
|
+
menuItems: MenuItem[];
|
|
34
|
+
onItemClick: (path: string) => void;
|
|
35
|
+
}
|
|
36
|
+
declare function MenuList({ menuItems, onItemClick }: MenuListProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
interface User$1 {
|
|
39
|
+
id?: string | number;
|
|
40
|
+
firstName?: string;
|
|
41
|
+
lastName?: string;
|
|
42
|
+
pictureUrl?: string;
|
|
43
|
+
role?: string;
|
|
44
|
+
}
|
|
45
|
+
interface SharedSidebarProps {
|
|
46
|
+
user: User$1 | null;
|
|
47
|
+
menuItems: MenuItem[];
|
|
48
|
+
sidebarId?: string;
|
|
49
|
+
overlayId?: string;
|
|
50
|
+
profilePath: string;
|
|
51
|
+
roleLabel: string;
|
|
52
|
+
roleColor?: string;
|
|
53
|
+
onNavigate: (path: string) => void;
|
|
54
|
+
onLogout: () => void;
|
|
55
|
+
}
|
|
56
|
+
declare function SharedSidebar({ user, menuItems, sidebarId, overlayId, profilePath, roleLabel, roleColor, onNavigate, onLogout }: SharedSidebarProps): react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
interface User {
|
|
59
|
+
id?: string | number;
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
pictureUrl?: string;
|
|
63
|
+
role?: string;
|
|
64
|
+
}
|
|
65
|
+
interface UserProfileProps {
|
|
66
|
+
user: User | null;
|
|
67
|
+
roleLabel: string;
|
|
68
|
+
roleColor?: string;
|
|
69
|
+
}
|
|
70
|
+
declare function UserProfile({ user, roleLabel, roleColor }: UserProfileProps): react_jsx_runtime.JSX.Element | null;
|
|
71
|
+
|
|
72
|
+
interface ProfileButtonProps {
|
|
73
|
+
onClick: () => void;
|
|
74
|
+
}
|
|
75
|
+
declare function ProfileButton({ onClick }: ProfileButtonProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
interface LogoutButtonProps {
|
|
78
|
+
onLogout: () => void;
|
|
79
|
+
}
|
|
80
|
+
declare function LogoutButton({ onLogout }: LogoutButtonProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Toggle sidebar visibility (Right side)
|
|
84
|
+
* @param sidebarId - ID of the sidebar element
|
|
85
|
+
* @param overlayId - ID of the overlay element
|
|
86
|
+
*/
|
|
87
|
+
declare function toggleSidebar(sidebarId?: string, overlayId?: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* Close sidebar (Right side)
|
|
90
|
+
* @param sidebarId - ID of the sidebar element
|
|
91
|
+
* @param overlayId - ID of the overlay element
|
|
92
|
+
*/
|
|
93
|
+
declare function closeSidebar(sidebarId?: string, overlayId?: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Open sidebar (Right side)
|
|
96
|
+
* @param sidebarId - ID of the sidebar element
|
|
97
|
+
* @param overlayId - ID of the overlay element
|
|
98
|
+
*/
|
|
99
|
+
declare function openSidebar(sidebarId?: string, overlayId?: string): void;
|
|
100
|
+
|
|
101
|
+
export { Header, LogoutButton, type MenuItem, MenuList, type NotificationItem, ProfileButton, SharedSidebar, UserProfile, closeSidebar, openSidebar, toggleSidebar };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
|
|
4
|
+
interface NotificationItem {
|
|
5
|
+
id: string | number;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
date: string;
|
|
9
|
+
type: 'reminder' | 'success' | 'info';
|
|
10
|
+
isRead?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface HeaderProps {
|
|
14
|
+
user?: {
|
|
15
|
+
firstName?: string;
|
|
16
|
+
lastName?: string;
|
|
17
|
+
pictureUrl?: string;
|
|
18
|
+
};
|
|
19
|
+
sidebarId?: string;
|
|
20
|
+
overlayId?: string;
|
|
21
|
+
notificationBell?: React$1.ReactNode;
|
|
22
|
+
notifications?: NotificationItem[];
|
|
23
|
+
}
|
|
24
|
+
declare function Header({ user, sidebarId, overlayId, notificationBell, notifications }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
interface MenuItem {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
path: string;
|
|
30
|
+
icon: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
interface MenuListProps {
|
|
33
|
+
menuItems: MenuItem[];
|
|
34
|
+
onItemClick: (path: string) => void;
|
|
35
|
+
}
|
|
36
|
+
declare function MenuList({ menuItems, onItemClick }: MenuListProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
interface User$1 {
|
|
39
|
+
id?: string | number;
|
|
40
|
+
firstName?: string;
|
|
41
|
+
lastName?: string;
|
|
42
|
+
pictureUrl?: string;
|
|
43
|
+
role?: string;
|
|
44
|
+
}
|
|
45
|
+
interface SharedSidebarProps {
|
|
46
|
+
user: User$1 | null;
|
|
47
|
+
menuItems: MenuItem[];
|
|
48
|
+
sidebarId?: string;
|
|
49
|
+
overlayId?: string;
|
|
50
|
+
profilePath: string;
|
|
51
|
+
roleLabel: string;
|
|
52
|
+
roleColor?: string;
|
|
53
|
+
onNavigate: (path: string) => void;
|
|
54
|
+
onLogout: () => void;
|
|
55
|
+
}
|
|
56
|
+
declare function SharedSidebar({ user, menuItems, sidebarId, overlayId, profilePath, roleLabel, roleColor, onNavigate, onLogout }: SharedSidebarProps): react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
interface User {
|
|
59
|
+
id?: string | number;
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
pictureUrl?: string;
|
|
63
|
+
role?: string;
|
|
64
|
+
}
|
|
65
|
+
interface UserProfileProps {
|
|
66
|
+
user: User | null;
|
|
67
|
+
roleLabel: string;
|
|
68
|
+
roleColor?: string;
|
|
69
|
+
}
|
|
70
|
+
declare function UserProfile({ user, roleLabel, roleColor }: UserProfileProps): react_jsx_runtime.JSX.Element | null;
|
|
71
|
+
|
|
72
|
+
interface ProfileButtonProps {
|
|
73
|
+
onClick: () => void;
|
|
74
|
+
}
|
|
75
|
+
declare function ProfileButton({ onClick }: ProfileButtonProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
interface LogoutButtonProps {
|
|
78
|
+
onLogout: () => void;
|
|
79
|
+
}
|
|
80
|
+
declare function LogoutButton({ onLogout }: LogoutButtonProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Toggle sidebar visibility (Right side)
|
|
84
|
+
* @param sidebarId - ID of the sidebar element
|
|
85
|
+
* @param overlayId - ID of the overlay element
|
|
86
|
+
*/
|
|
87
|
+
declare function toggleSidebar(sidebarId?: string, overlayId?: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* Close sidebar (Right side)
|
|
90
|
+
* @param sidebarId - ID of the sidebar element
|
|
91
|
+
* @param overlayId - ID of the overlay element
|
|
92
|
+
*/
|
|
93
|
+
declare function closeSidebar(sidebarId?: string, overlayId?: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Open sidebar (Right side)
|
|
96
|
+
* @param sidebarId - ID of the sidebar element
|
|
97
|
+
* @param overlayId - ID of the overlay element
|
|
98
|
+
*/
|
|
99
|
+
declare function openSidebar(sidebarId?: string, overlayId?: string): void;
|
|
100
|
+
|
|
101
|
+
export { Header, LogoutButton, type MenuItem, MenuList, type NotificationItem, ProfileButton, SharedSidebar, UserProfile, closeSidebar, openSidebar, toggleSidebar };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Header: () => Header,
|
|
24
|
+
LogoutButton: () => LogoutButton,
|
|
25
|
+
MenuList: () => MenuList,
|
|
26
|
+
ProfileButton: () => ProfileButton,
|
|
27
|
+
SharedSidebar: () => SharedSidebar,
|
|
28
|
+
UserProfile: () => UserProfile,
|
|
29
|
+
closeSidebar: () => closeSidebar,
|
|
30
|
+
openSidebar: () => openSidebar,
|
|
31
|
+
toggleSidebar: () => toggleSidebar
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
|
34
|
+
|
|
35
|
+
// header/Header.tsx
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
|
|
38
|
+
// sidebar/utils.ts
|
|
39
|
+
function toggleSidebar(sidebarId = "sidebar", overlayId = "sidebar-overlay") {
|
|
40
|
+
const sidebar = document.getElementById(sidebarId);
|
|
41
|
+
const overlay = document.getElementById(overlayId);
|
|
42
|
+
if (sidebar && overlay) {
|
|
43
|
+
const isOpen = sidebar.classList.contains("translate-x-0");
|
|
44
|
+
if (isOpen) {
|
|
45
|
+
sidebar.classList.remove("translate-x-0");
|
|
46
|
+
sidebar.classList.add("translate-x-full");
|
|
47
|
+
overlay.classList.add("hidden");
|
|
48
|
+
} else {
|
|
49
|
+
sidebar.classList.remove("translate-x-full");
|
|
50
|
+
sidebar.classList.add("translate-x-0");
|
|
51
|
+
overlay.classList.remove("hidden");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function closeSidebar(sidebarId = "sidebar", overlayId = "sidebar-overlay") {
|
|
56
|
+
const sidebar = document.getElementById(sidebarId);
|
|
57
|
+
const overlay = document.getElementById(overlayId);
|
|
58
|
+
if (sidebar) {
|
|
59
|
+
sidebar.classList.remove("translate-x-0");
|
|
60
|
+
sidebar.classList.add("translate-x-full");
|
|
61
|
+
}
|
|
62
|
+
if (overlay) {
|
|
63
|
+
overlay.classList.add("hidden");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function openSidebar(sidebarId = "sidebar", overlayId = "sidebar-overlay") {
|
|
67
|
+
const sidebar = document.getElementById(sidebarId);
|
|
68
|
+
const overlay = document.getElementById(overlayId);
|
|
69
|
+
if (sidebar) {
|
|
70
|
+
sidebar.classList.remove("translate-x-full");
|
|
71
|
+
sidebar.classList.add("translate-x-0");
|
|
72
|
+
}
|
|
73
|
+
if (overlay) {
|
|
74
|
+
overlay.classList.remove("hidden");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// header/NotificationList.tsx
|
|
79
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
80
|
+
function NotificationList({ notifications, onClose }) {
|
|
81
|
+
const unreadCount = notifications.filter((n) => !n.isRead).length;
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fixed inset-0 bg-black/20 z-40 sm:hidden", onClick: onClose }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "fixed sm:absolute inset-x-4 top-20 sm:inset-auto sm:right-0 sm:top-full sm:mt-2 w-auto sm:w-96 bg-white rounded-xl shadow-2xl sm:shadow-xl border border-gray-100 overflow-hidden z-50 animate-in fade-in zoom-in-95 duration-200 origin-top sm:origin-top-right", children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-5 py-4 bg-[#EAFDF6] border-b border-teal-100", children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "font-bold text-lg text-gray-900", children: "\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" }) }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm text-gray-500 mt-0.5", children: [
|
|
88
|
+
unreadCount,
|
|
89
|
+
" \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E21\u0E48"
|
|
90
|
+
] })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "max-h-[60vh] overflow-y-auto", children: notifications.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "p-8 text-center text-gray-500", children: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" }) : notifications.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "p-4 border-b border-gray-50 hover:bg-gray-50 transition-colors cursor-pointer relative group", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-4", children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-shrink-0 mt-1", children: [
|
|
94
|
+
item.type === "reminder" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-10 h-10 rounded-full bg-blue-50 text-blue-500 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }),
|
|
95
|
+
item.type === "success" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-10 h-10 rounded-full bg-green-50 text-green-500 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
|
|
96
|
+
item.type === "info" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-10 h-10 rounded-full bg-gray-50 text-gray-500 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between items-start mb-1", children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-semibold text-gray-900 text-sm leading-snug", children: item.title }),
|
|
101
|
+
!item.isRead && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-2 h-2 rounded-full bg-blue-500 mt-1.5 flex-shrink-0" })
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-gray-500 line-clamp-2 mb-1.5 leading-relaxed", children: item.description }),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-gray-400", children: item.date })
|
|
105
|
+
] })
|
|
106
|
+
] }) }, item.id)) }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "p-4 bg-gray-50 border-t border-gray-100 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
+
"button",
|
|
109
|
+
{
|
|
110
|
+
className: "text-sm text-gray-500 hover:text-gray-700 font-medium",
|
|
111
|
+
onClick: onClose,
|
|
112
|
+
children: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21"
|
|
113
|
+
}
|
|
114
|
+
) })
|
|
115
|
+
] })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// header/Header.tsx
|
|
120
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
121
|
+
function Header({
|
|
122
|
+
user,
|
|
123
|
+
sidebarId = "sidebar",
|
|
124
|
+
overlayId = "sidebar-overlay",
|
|
125
|
+
notificationBell,
|
|
126
|
+
notifications = []
|
|
127
|
+
// Default to empty array
|
|
128
|
+
}) {
|
|
129
|
+
const displayName = `${user?.firstName || ""} ${user?.lastName || ""}`.trim() || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
130
|
+
const firstChar = user?.firstName?.charAt(0) || "\u0E1C";
|
|
131
|
+
const [isNotificationsOpen, setIsNotificationsOpen] = (0, import_react.useState)(false);
|
|
132
|
+
const notificationRef = (0, import_react.useRef)(null);
|
|
133
|
+
const handleToggleSidebar = () => {
|
|
134
|
+
toggleSidebar(sidebarId, overlayId);
|
|
135
|
+
};
|
|
136
|
+
(0, import_react.useEffect)(() => {
|
|
137
|
+
const handleClickOutside = (event) => {
|
|
138
|
+
if (notificationRef.current && !notificationRef.current.contains(event.target)) {
|
|
139
|
+
setIsNotificationsOpen(false);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
143
|
+
return () => {
|
|
144
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
145
|
+
};
|
|
146
|
+
}, []);
|
|
147
|
+
const unreadCount = notifications.filter((n) => !n.isRead).length;
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("header", { className: "bg-white shadow-sm sticky top-0 z-10 lg:static", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between px-5 py-3.5", children: [
|
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
150
|
+
user?.pictureUrl ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
151
|
+
"img",
|
|
152
|
+
{
|
|
153
|
+
src: user.pictureUrl,
|
|
154
|
+
alt: displayName,
|
|
155
|
+
width: 44,
|
|
156
|
+
height: 44,
|
|
157
|
+
className: "rounded-full object-cover border-2 border-teal-100 w-[44px] h-[44px]"
|
|
158
|
+
}
|
|
159
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-11 h-11 bg-gradient-to-br from-teal-400 to-teal-600 rounded-full flex items-center justify-center shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-white text-lg font-semibold", children: firstChar }) }),
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { className: "text-sm font-semibold text-gray-900", children: [
|
|
161
|
+
"\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35, ",
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-[#1E7D55]", children: displayName })
|
|
163
|
+
] }) })
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative", ref: notificationRef, children: [
|
|
167
|
+
notificationBell || /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
168
|
+
"button",
|
|
169
|
+
{
|
|
170
|
+
className: "p-2.5 rounded-lg transition-colors hover:bg-gray-100 relative",
|
|
171
|
+
onClick: () => setIsNotificationsOpen(!isNotificationsOpen),
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "22", height: "24", viewBox: "0 0 22 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M21.2321 13.4463L19.3618 6.71712C18.8136 4.74574 17.6222 3.01418 15.9769 1.79767C14.3316 0.581165 12.3269 -0.0504751 10.2814 0.00315377C8.23593 0.0567826 6.26708 0.792603 4.6878 2.09365C3.10852 3.3947 2.00945 5.18632 1.5653 7.18371L0.11728 13.6954C-0.0426654 14.4149 -0.0389674 15.1611 0.128101 15.879C0.29517 16.5969 0.621344 17.2681 1.08254 17.8431C1.54374 18.418 2.12818 18.8821 2.79272 19.2009C3.45727 19.5198 4.18494 19.6853 4.92202 19.6853H6.01861C6.24454 20.7979 6.84817 21.7982 7.72723 22.5167C8.60629 23.2352 9.70671 23.6277 10.842 23.6277C11.9774 23.6277 13.0778 23.2352 13.9569 22.5167C14.8359 21.7982 15.4396 20.7979 15.6655 19.6853H16.4904C17.2492 19.6853 17.9977 19.5099 18.6774 19.1728C19.3572 18.8357 19.9498 18.346 20.409 17.742C20.8682 17.1379 21.1815 16.4359 21.3245 15.6907C21.4674 14.9455 21.4352 14.1774 21.2321 13.4463ZM10.842 21.654C10.2334 21.6515 9.64049 21.461 9.1443 21.1086C8.6481 20.7562 8.27291 20.2591 8.07005 19.6853H13.614C13.4112 20.2591 13.036 20.7562 12.5398 21.1086C12.0436 21.461 11.4506 21.6515 10.842 21.654ZM18.8411 16.55C18.5668 16.9139 18.2114 17.2088 17.8032 17.4113C17.3949 17.6138 16.9451 17.7183 16.4894 17.7165H4.92202C4.47982 17.7164 4.04328 17.6171 3.64463 17.4257C3.24598 17.2344 2.89539 16.9559 2.61874 16.611C2.34208 16.266 2.14643 15.8633 2.04622 15.4326C1.94602 15.0019 1.94381 14.5542 2.03977 14.1226L3.4868 7.60994C3.83561 6.04105 4.69886 4.63379 5.93932 3.61186C7.17978 2.58992 8.72625 2.01197 10.3329 1.96988C11.9395 1.92779 13.5142 2.42398 14.8064 3.37956C16.0987 4.33515 17.0344 5.69528 17.4649 7.24376L19.3352 13.9729C19.4588 14.4114 19.4785 14.8725 19.3927 15.3199C19.3069 15.7672 19.1181 16.1884 18.8411 16.55Z", fill: "#060D26" }) }),
|
|
174
|
+
unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute top-1.5 right-1.5 min-w-[18px] h-[18px] bg-red-500 rounded-full flex items-center justify-center text-[10px] font-bold text-white px-1 border-2 border-white", children: unreadCount })
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
isNotificationsOpen && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
179
|
+
NotificationList,
|
|
180
|
+
{
|
|
181
|
+
notifications,
|
|
182
|
+
onClose: () => setIsNotificationsOpen(false)
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
] }),
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
187
|
+
"button",
|
|
188
|
+
{
|
|
189
|
+
onClick: handleToggleSidebar,
|
|
190
|
+
className: "p-2.5 rounded-lg transition-colors hover:bg-gray-100",
|
|
191
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "27", height: "18", viewBox: "0 0 27 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M1.1875 17.8426C0.851042 17.8426 0.569077 17.7287 0.341604 17.501C0.113868 17.2735 0 16.9914 0 16.6547C0 16.3182 0.113868 16.0363 0.341604 15.8088C0.569077 15.5816 0.851042 15.468 1.1875 15.468H25.7292C26.0656 15.468 26.3476 15.5817 26.5751 15.8092C26.8028 16.0369 26.9167 16.3192 26.9167 16.6559C26.9167 16.9923 26.8028 17.2743 26.5751 17.5018C26.3476 17.729 26.0656 17.8426 25.7292 17.8426H1.1875ZM1.1875 10.1088C0.851042 10.1088 0.569077 9.99492 0.341604 9.76719C0.113868 9.53945 0 9.25735 0 8.9209C0 8.58417 0.113868 8.30221 0.341604 8.075C0.569077 7.84753 0.851042 7.73379 1.1875 7.73379H25.7292C26.0656 7.73379 26.3476 7.84766 26.5751 8.0754C26.8028 8.30313 26.9167 8.58523 26.9167 8.92169C26.9167 9.25841 26.8028 9.54037 26.5751 9.76758C26.3476 9.99506 26.0656 10.1088 25.7292 10.1088H1.1875ZM1.1875 2.3746C0.851042 2.3746 0.569077 2.26087 0.341604 2.0334C0.113868 1.80566 0 1.52343 0 1.18671C0 0.850249 0.113868 0.568284 0.341604 0.340812C0.569077 0.113604 0.851042 0 1.1875 0H25.7292C26.0656 0 26.3476 0.113868 26.5751 0.341604C26.8028 0.569077 26.9167 0.851174 26.9167 1.1879C26.9167 1.52435 26.8028 1.80632 26.5751 2.03379C26.3476 2.261 26.0656 2.3746 25.7292 2.3746H1.1875Z", fill: "#1C1B1F" }) })
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
] })
|
|
195
|
+
] }) });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// sidebar/UserProfile.tsx
|
|
199
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
200
|
+
function UserProfile({ user, roleLabel, roleColor = "orange" }) {
|
|
201
|
+
if (!user) return null;
|
|
202
|
+
const getFullName = () => {
|
|
203
|
+
if (user.firstName && user.lastName) {
|
|
204
|
+
return `${user.firstName} ${user.lastName}`;
|
|
205
|
+
}
|
|
206
|
+
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
207
|
+
};
|
|
208
|
+
const getInitial = () => {
|
|
209
|
+
return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
|
|
210
|
+
};
|
|
211
|
+
const getRoleColorClass = () => {
|
|
212
|
+
const colors = {
|
|
213
|
+
orange: "bg-orange-500",
|
|
214
|
+
teal: "bg-teal-500",
|
|
215
|
+
blue: "bg-blue-500",
|
|
216
|
+
green: "bg-green-500",
|
|
217
|
+
purple: "bg-purple-500"
|
|
218
|
+
};
|
|
219
|
+
return colors[roleColor] || "bg-orange-500";
|
|
220
|
+
};
|
|
221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-5 border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
222
|
+
user.pictureUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
223
|
+
"img",
|
|
224
|
+
{
|
|
225
|
+
src: user.pictureUrl,
|
|
226
|
+
alt: getFullName(),
|
|
227
|
+
width: 56,
|
|
228
|
+
height: 56,
|
|
229
|
+
className: "w-14 h-14 rounded-full shadow-lg object-cover"
|
|
230
|
+
}
|
|
231
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-14 h-14 bg-gradient-to-br from-teal-400 to-teal-600 rounded-full flex items-center justify-center text-white font-bold shadow-lg text-xl", children: getInitial() }),
|
|
232
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
233
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "font-bold text-gray-900 truncate text-base", children: getFullName() }),
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "text-sm text-gray-500 flex items-center gap-1", children: [
|
|
235
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `w-2 h-2 ${getRoleColorClass()} rounded-full` }),
|
|
236
|
+
roleLabel
|
|
237
|
+
] })
|
|
238
|
+
] })
|
|
239
|
+
] }) });
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// sidebar/ProfileButton.tsx
|
|
243
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
244
|
+
function ProfileButton({ onClick }) {
|
|
245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-5 pt-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
246
|
+
"button",
|
|
247
|
+
{
|
|
248
|
+
onClick,
|
|
249
|
+
className: "w-full flex items-center gap-4 px-4 py-3.5 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-8 h-8 flex items-center justify-center text-gray-600 flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: "w-6 h-6", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
252
|
+
"path",
|
|
253
|
+
{
|
|
254
|
+
strokeLinecap: "round",
|
|
255
|
+
strokeLinejoin: "round",
|
|
256
|
+
strokeWidth: 2,
|
|
257
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
258
|
+
}
|
|
259
|
+
) }) }),
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 text-left font-medium text-base", children: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27" })
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
) });
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// sidebar/MenuList.tsx
|
|
267
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
268
|
+
function MenuList({ menuItems, onItemClick }) {
|
|
269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("nav", { className: "flex-1 p-5 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "space-y-1", children: menuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
270
|
+
"button",
|
|
271
|
+
{
|
|
272
|
+
onClick: () => onItemClick(item.path),
|
|
273
|
+
className: "w-full flex items-center gap-4 px-4 py-3.5 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-8 h-8 flex items-center justify-center text-gray-600 flex-shrink-0", children: item.icon }),
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex-1 text-left font-medium text-base", children: item.title })
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
) }, item.id)) }) });
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// sidebar/LogoutButton.tsx
|
|
283
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
284
|
+
function LogoutButton({ onLogout }) {
|
|
285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "p-5 border-t border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
286
|
+
"button",
|
|
287
|
+
{
|
|
288
|
+
onClick: onLogout,
|
|
289
|
+
className: "w-full flex items-center gap-4 px-4 py-3.5 rounded-lg text-red-600 hover:bg-red-50 transition-colors",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
292
|
+
"path",
|
|
293
|
+
{
|
|
294
|
+
strokeLinecap: "round",
|
|
295
|
+
strokeLinejoin: "round",
|
|
296
|
+
strokeWidth: 2,
|
|
297
|
+
d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
|
298
|
+
}
|
|
299
|
+
) }),
|
|
300
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex-1 text-left font-medium text-base", children: "\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A" })
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
) });
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// sidebar/SharedSidebar.tsx
|
|
307
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
308
|
+
function SharedSidebar({
|
|
309
|
+
user,
|
|
310
|
+
menuItems,
|
|
311
|
+
sidebarId = "sidebar",
|
|
312
|
+
overlayId = "sidebar-overlay",
|
|
313
|
+
profilePath,
|
|
314
|
+
roleLabel,
|
|
315
|
+
roleColor = "orange",
|
|
316
|
+
onNavigate,
|
|
317
|
+
onLogout
|
|
318
|
+
}) {
|
|
319
|
+
const closeSidebar2 = () => {
|
|
320
|
+
const sidebar = document.getElementById(sidebarId);
|
|
321
|
+
if (sidebar) {
|
|
322
|
+
sidebar.classList.add("translate-x-full");
|
|
323
|
+
sidebar.classList.remove("translate-x-0");
|
|
324
|
+
}
|
|
325
|
+
const overlay = document.getElementById(overlayId);
|
|
326
|
+
if (overlay) {
|
|
327
|
+
overlay.classList.add("hidden");
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const handleProfileClick = () => {
|
|
331
|
+
onNavigate(profilePath);
|
|
332
|
+
closeSidebar2();
|
|
333
|
+
};
|
|
334
|
+
const handleMenuItemClick = (path) => {
|
|
335
|
+
onNavigate(path);
|
|
336
|
+
closeSidebar2();
|
|
337
|
+
};
|
|
338
|
+
const handleLogout = () => {
|
|
339
|
+
closeSidebar2();
|
|
340
|
+
onLogout();
|
|
341
|
+
};
|
|
342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
343
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
344
|
+
"div",
|
|
345
|
+
{
|
|
346
|
+
id: overlayId,
|
|
347
|
+
className: "fixed inset-0 bg-black/50 z-40 hidden",
|
|
348
|
+
onClick: closeSidebar2
|
|
349
|
+
}
|
|
350
|
+
),
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
352
|
+
"aside",
|
|
353
|
+
{
|
|
354
|
+
id: sidebarId,
|
|
355
|
+
className: "fixed top-0 right-0 h-full w-[80vw] max-w-80 bg-white shadow-2xl z-50 transform translate-x-full transition-transform duration-300 flex flex-col",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
358
|
+
UserProfile,
|
|
359
|
+
{
|
|
360
|
+
user,
|
|
361
|
+
roleLabel,
|
|
362
|
+
roleColor
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ProfileButton, { onClick: handleProfileClick }),
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
367
|
+
MenuList,
|
|
368
|
+
{
|
|
369
|
+
menuItems,
|
|
370
|
+
onItemClick: handleMenuItemClick
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LogoutButton, { onLogout: handleLogout })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
] });
|
|
378
|
+
}
|
|
379
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
380
|
+
0 && (module.exports = {
|
|
381
|
+
Header,
|
|
382
|
+
LogoutButton,
|
|
383
|
+
MenuList,
|
|
384
|
+
ProfileButton,
|
|
385
|
+
SharedSidebar,
|
|
386
|
+
UserProfile,
|
|
387
|
+
closeSidebar,
|
|
388
|
+
openSidebar,
|
|
389
|
+
toggleSidebar
|
|
390
|
+
});
|
|
391
|
+
//# sourceMappingURL=index.js.map
|