@pnkx-lib/ui 1.9.434 → 1.9.436
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/dist/style.css +1 -1
- package/es/chunks/{AntdIcon-gUuMvf83.js → AntdIcon-D_ySRKRj.js} +3 -3
- package/es/chunks/{CloseOutlined-D9hb-IcI.js → CloseOutlined-B3y9Maz0.js} +1 -1
- package/es/chunks/{DownOutlined-CkHKgaSi.js → DownOutlined-BlKl-wuu.js} +1 -1
- package/es/chunks/{InboxOutlined-Kgn4qaDi.js → InboxOutlined-CLTSIXAX.js} +1 -1
- package/es/chunks/{index-D7kJLZIi.js → index-t0ynpS_n.js} +2 -2
- package/es/fields/DatePicker.js +2 -2
- package/es/fields/Input.js +45 -45
- package/es/fields/Select.js +24 -24
- package/es/fields/Upload.js +1 -1
- package/es/index.js +1 -3
- package/es/ui/BreadcrumbHeading.js +2 -2
- package/es/ui/ExportFile.js +1 -1
- package/es/ui/Heading.js +2 -2
- package/es/ui/ImportFile.js +2 -2
- package/es/ui/Layout.js +4927 -1
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/{chunks/logo-header-DG8abRGF.js → ui/Sidebar/index.js} +504 -4
- package/es/ui/UploadComponent.js +1 -1
- package/es/ui/UploadMultiple.js +1 -1
- package/es/ui/index.js +69 -71
- package/package.json +1 -1
- package/types/components/hooks/useBreadcrumb.d.ts +2 -2
- package/types/components/ui/{SidebarV3 → Sidebar}/components/ContentArea.d.ts +1 -1
- package/types/components/ui/{SidebarV3 → Sidebar}/components/MainMenu/EachItem.d.ts +5 -5
- package/types/components/ui/{SidebarV3 → Sidebar}/components/MainMenu/index.d.ts +4 -4
- package/types/components/ui/{SidebarV3 → Sidebar}/components/MainSidebar.d.ts +3 -3
- package/types/components/ui/{SidebarV3/components/SidebarV3.d.ts → Sidebar/components/Sidebar.d.ts} +1 -1
- package/types/components/ui/{SidebarV3 → Sidebar}/hooks.d.ts +3 -3
- package/types/components/ui/Sidebar/index.d.ts +2 -0
- package/types/components/ui/{SidebarV3 → Sidebar}/types.d.ts +3 -3
- package/types/components/ui/Sidebar/utils.d.ts +2 -0
- package/types/components/ui/index.d.ts +1 -3
- package/types/components/utils/routeUtils.d.ts +2 -2
- package/types/ui/Sidebar/index.d.ts +2 -0
- package/es/chunks/BellIcon-Bv07EhTB.js +0 -45
- package/es/chunks/layout-C0dbwkpb.js +0 -4929
- package/es/ui/Sidebar.js +0 -412
- package/es/ui/SidebarV2.js +0 -303
- package/es/ui/SidebarV3/index.js +0 -465
- package/types/components/ui/Sidebar.d.ts +0 -23
- package/types/components/ui/SidebarV2.d.ts +0 -20
- package/types/components/ui/SidebarV3/index.d.ts +0 -2
- package/types/components/ui/SidebarV3/utils.d.ts +0 -2
- package/types/ui/Sidebar.d.ts +0 -2
- package/types/ui/SidebarV2.d.ts +0 -2
- package/types/ui/SidebarV3/index.d.ts +0 -2
- /package/types/components/ui/{SidebarV3 → Sidebar}/components/Header.d.ts +0 -0
- /package/types/components/ui/{SidebarV3 → Sidebar}/components/SearchHeader.d.ts +0 -0
- /package/types/components/ui/{SidebarV3 → Sidebar}/components/UserInfoSection.d.ts +0 -0
package/es/ui/Sidebar.js
DELETED
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useMemo, useCallback } from 'react';
|
|
3
|
-
import { useNavigate, useLocation } from 'react-router';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
5
|
-
import { u as useDebounce, l as logoHeaderText, S as SearchIcon, V as VietNamIcon, D as DownOutlinedIcon, R as RefIcon } from '../chunks/logo-header-DG8abRGF.js';
|
|
6
|
-
import { H as Header } from '../chunks/layout-C0dbwkpb.js';
|
|
7
|
-
import { AutoComplete, Divider, Dropdown, Flex } from 'antd';
|
|
8
|
-
import { Input } from '../fields/Input.js';
|
|
9
|
-
import { R as RefIcon$1 } from '../chunks/DownOutlined-CkHKgaSi.js';
|
|
10
|
-
|
|
11
|
-
const BellIcon = ({
|
|
12
|
-
size = 17,
|
|
13
|
-
color = "currentColor",
|
|
14
|
-
className,
|
|
15
|
-
style,
|
|
16
|
-
onClick,
|
|
17
|
-
"aria-label": ariaLabel,
|
|
18
|
-
title,
|
|
19
|
-
...props
|
|
20
|
-
}) => /* @__PURE__ */ jsx(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
className,
|
|
24
|
-
style: {
|
|
25
|
-
width: size,
|
|
26
|
-
height: size,
|
|
27
|
-
cursor: onClick ? "pointer" : "default",
|
|
28
|
-
...style
|
|
29
|
-
},
|
|
30
|
-
onClick,
|
|
31
|
-
role: onClick ? "button" : void 0,
|
|
32
|
-
"aria-label": ariaLabel,
|
|
33
|
-
title,
|
|
34
|
-
...props,
|
|
35
|
-
children: /* @__PURE__ */ jsx(
|
|
36
|
-
"svg",
|
|
37
|
-
{
|
|
38
|
-
width: "100%",
|
|
39
|
-
height: "100%",
|
|
40
|
-
viewBox: "0 0 15 17",
|
|
41
|
-
fill: "none",
|
|
42
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
-
children: /* @__PURE__ */ jsx(
|
|
44
|
-
"path",
|
|
45
|
-
{
|
|
46
|
-
fillRule: "evenodd",
|
|
47
|
-
clipRule: "evenodd",
|
|
48
|
-
d: "M7.5 0C8.32843 0 9 0.671573 9 1.5V2.208L9.19287 2.26645C11.4021 2.97942 13 5.05311 13 7.5V10.382C13 11.0637 13.5141 11.4675 13.7236 11.5528C14.6312 12.0112 15 12.879 15 13.618V14.0001C15 14.5523 14.5523 15 14.0001 15.0001L9.9499 15.0004C9.7181 16.1413 8.70933 17 7.5 17C6.29067 17 5.2819 16.1413 5.0501 15.0004L0.999914 15.0001C0.447663 15 0 14.5523 0 14.0001V13.618C0 12.8017 0.430447 12.0509 1.12384 11.6364C1.70795 11.3547 2 10.9365 2 10.382V7.5C2 4.98221 3.69181 2.85957 6.00065 2.20685L6 1.5C6 0.671573 6.67157 0 7.5 0ZM8.9144 15.0007H6.0856C6.29172 15.5829 6.84715 16 7.5 16C8.15285 16 8.70828 15.5829 8.9144 15.0007ZM7.5 1C7.22386 1 7 1.22386 7 1.5L7.0003 3.02743C4.75018 3.27602 3 5.18362 3 7.5V10.382C3 11.1983 2.56955 11.9491 1.87616 12.3636L1.76098 12.4232C1.47658 12.5799 1 12.9239 1 13.618V14H14V13.618C14 12.9216 13.5177 12.5793 13.2764 12.4472C12.5954 12.1303 12 11.3188 12 10.382V7.5C12 5.18397 10.2503 3.27659 8.00071 3.02754L8 1.5C8 1.22386 7.77614 1 7.5 1Z",
|
|
49
|
-
fill: color
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const defaultAvatar = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMvSURBVHgBtVdNTxNRFD1vijAUta1ugFVZ6FaIUZfi0pW4MNEV9RcA/0B+gfQXACs0MabiRuNCiSR+xEAxxA3ENjERwsIWlY/y0ee5M9M6pZ3pMJSTtH3zOnPPvefe+94bhQDIFXTcBPq1gTvQGDSApAbi8p8CihxntUIWZcz1JlQmiE3VlNDAiNIYrRAFQJ5Wp+jEdE9C5XFc4vVNPcLoHh2DsN4BjXGSTyEoMUkfa0aJFkApTHTH1FhT4rVNPUlPU2glKH1PTD10TxnuC4m05aQC2rRs1/jiYK2gU7yaxCmC6Rtj1U9UiUma5Ogth0mvh8raehARhSa94A1pvR2Nvr6EKtpSGxj2Iz0sAxe6gG7W91k29OEhQkE6hI+POk4w4qLOeREfkLQ3Rt9c1bC7D/za4lyIyCtRGz8Legg+0bZHakkF5hlb9jBwou4Xk4N+N5Y9CMISO+RDBhv8CpoQlw5q54rbQJuB0GCKbqr1oi40WxYlz1HK29EObO3a143yK3PyOZDi88m/5NkIshZLdHs09nvbVuAoqcge7QBWN4DFH6yLNv9UCKdiRZ8gWzbB+U7g5VfbKenzP1Tl3lWqs+dd+TJfREhUSZcoX2VxgT33fIG/ZuPitKQuy/blYVQkk9aBbkLqWHP/12Xa5PFovexycDD4PdeIOMpCml8B3nxjsWhrewtE6r5HijGzaN/rJud4SaTOHPHGivIZvd3Zt69fLwN/S5TSCEbqNiaLz6tlW/YKuCa9U3K86VTIWZUGO7IXWSDmkkjmhfhaErjUTU8XApC6IHmWNX7wMguuhHxPXPUZslOQIC2hS8vMLtWSOo6ji+2SZavMZo9HKjCcSv/43VJzuvp4gVFvlJB7v4L4OfNky6EfuLDkL5q4dXtA5a2FL8Go51cxfpqkgkgE40Iq4xrBnnzWcjoYwekgff+6qh4g6zI180lPscCG0UJQxekHN1TKPVe3xzg3pNE6pI+SNiQWiCRMtRxH8wiPIt8mxtzyuuHbFDMfeAg0kHKkTyIgobSn2Y6JuwPKcx8I3I1Pv+ghXbZOK3Jw6Mf/7VSM5/mZ44tbxmxD1o+wgn+8Lj0W61iuOwAAAABJRU5ErkJggg==";
|
|
58
|
-
|
|
59
|
-
const items = [
|
|
60
|
-
{ key: "1", label: "Hồ sơ" },
|
|
61
|
-
{ key: "4", label: "Cài đặt" },
|
|
62
|
-
{ key: "2", label: "Đăng xuất" }
|
|
63
|
-
];
|
|
64
|
-
const Title = (props) => /* @__PURE__ */ jsx(Flex, { align: "center", justify: "space-between", children: props.title });
|
|
65
|
-
const renderItem = (title, path) => ({
|
|
66
|
-
value: title,
|
|
67
|
-
label: /* @__PURE__ */ jsx(Flex, { align: "center", justify: "space-between", children: title }),
|
|
68
|
-
path
|
|
69
|
-
});
|
|
70
|
-
function getDataOption(menu, searchValue) {
|
|
71
|
-
return menu.reduce((acc, itemMenu) => {
|
|
72
|
-
const groupName = itemMenu.name;
|
|
73
|
-
(itemMenu.children ?? []).forEach((itemChildren) => {
|
|
74
|
-
(itemChildren.children ?? []).forEach(
|
|
75
|
-
(itemSub) => {
|
|
76
|
-
if (!searchValue || itemSub.name.toLowerCase().includes(searchValue.toLowerCase())) {
|
|
77
|
-
let group = acc.find((g) => g.label.props.title === groupName);
|
|
78
|
-
if (!group) {
|
|
79
|
-
group = {
|
|
80
|
-
label: /* @__PURE__ */ jsx(Title, { title: groupName }),
|
|
81
|
-
options: []
|
|
82
|
-
};
|
|
83
|
-
acc.push(group);
|
|
84
|
-
}
|
|
85
|
-
const path = `${itemChildren.path}/${itemSub.path}`;
|
|
86
|
-
group.options.push(renderItem(itemSub.name, path));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
});
|
|
91
|
-
return acc;
|
|
92
|
-
}, []);
|
|
93
|
-
}
|
|
94
|
-
function SidebarMenu({
|
|
95
|
-
menu,
|
|
96
|
-
activeMainMenu,
|
|
97
|
-
setActiveMainMenu,
|
|
98
|
-
setOpenSubCollapse,
|
|
99
|
-
collapse,
|
|
100
|
-
setCollapse,
|
|
101
|
-
pathUrl,
|
|
102
|
-
handleNavigateModule
|
|
103
|
-
}) {
|
|
104
|
-
return /* @__PURE__ */ jsx("nav", { className: twMerge("flex mt-2 flex-1 flex-col px-2"), children: /* @__PURE__ */ jsx("ul", { role: "list", className: twMerge("-mx-2 space-y-1 relative"), children: menu.flatMap((item) => {
|
|
105
|
-
const isActiveMainMenu = item?.code ? activeMainMenu === item?.code : activeMainMenu === item.path;
|
|
106
|
-
const isActivePathUrl = pathUrl === item.path;
|
|
107
|
-
const isActive = isActiveMainMenu || isActivePathUrl;
|
|
108
|
-
return /* @__PURE__ */ jsx(
|
|
109
|
-
"li",
|
|
110
|
-
{
|
|
111
|
-
className: twMerge(
|
|
112
|
-
"relative cursor-pointer",
|
|
113
|
-
isActive ? "px-2" : "ml-0 px-2"
|
|
114
|
-
),
|
|
115
|
-
children: /* @__PURE__ */ jsx(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
className: twMerge(
|
|
119
|
-
"relative group hover:text-black",
|
|
120
|
-
!collapse && "hover:bg-[#FFFFFF] rounded-lg"
|
|
121
|
-
),
|
|
122
|
-
children: /* @__PURE__ */ jsxs(
|
|
123
|
-
"a",
|
|
124
|
-
{
|
|
125
|
-
onClick: () => {
|
|
126
|
-
setActiveMainMenu(item.code ? item.code : item?.path);
|
|
127
|
-
setOpenSubCollapse(true);
|
|
128
|
-
setCollapse(false);
|
|
129
|
-
handleNavigateModule(item.path);
|
|
130
|
-
},
|
|
131
|
-
className: twMerge(
|
|
132
|
-
"rounded-lg py-2 m-auto text-sm whitespace-nowrap max-w-2xl leading-6 font-semibold relative z-10",
|
|
133
|
-
collapse ? "pl-4" : "justify-center",
|
|
134
|
-
"flex items-center gap-2 transition-all duration-150 ease-in-out",
|
|
135
|
-
isActive ? "bg-[#007BE5] text-white" : "text-white hover:bg-[#007BE5] hover:text-white"
|
|
136
|
-
),
|
|
137
|
-
children: [
|
|
138
|
-
item.icon,
|
|
139
|
-
collapse && item.name
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
},
|
|
146
|
-
item.name
|
|
147
|
-
);
|
|
148
|
-
}) }) });
|
|
149
|
-
}
|
|
150
|
-
function SidebarSubMenu({
|
|
151
|
-
newMenu,
|
|
152
|
-
activeMainMenu,
|
|
153
|
-
openSubmenu,
|
|
154
|
-
handleClickSubmenu,
|
|
155
|
-
handleClick,
|
|
156
|
-
pathUrl
|
|
157
|
-
}) {
|
|
158
|
-
return /* @__PURE__ */ jsx(
|
|
159
|
-
"nav",
|
|
160
|
-
{
|
|
161
|
-
className: twMerge("flex flex-1 transition-all duration-300 flex-col"),
|
|
162
|
-
children: /* @__PURE__ */ jsx("ul", { role: "list", className: twMerge("cursor-pointer ml-[10px]"), children: newMenu?.map((sub) => {
|
|
163
|
-
const isActiveMainMenu = activeMainMenu === sub.path;
|
|
164
|
-
if (!isActiveMainMenu) return null;
|
|
165
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
166
|
-
/* @__PURE__ */ jsx(
|
|
167
|
-
"div",
|
|
168
|
-
{
|
|
169
|
-
className: "pl-4 py-2 text-[16px] font-[600] text-[#131313]",
|
|
170
|
-
style: {
|
|
171
|
-
boxShadow: "0px 0px 6px 0px rgba(0, 6, 36, 0.12), 0px 2px 4px 0px rgba(0, 6, 36, 0.12)"
|
|
172
|
-
},
|
|
173
|
-
children: sub.name
|
|
174
|
-
}
|
|
175
|
-
),
|
|
176
|
-
/* @__PURE__ */ jsx("ul", { children: sub?.children?.map((itemSubMenu) => {
|
|
177
|
-
const shouldShowToggleIcon = itemSubMenu?.isShow && Array.isArray(itemSubMenu.children) && itemSubMenu.children.length > 0;
|
|
178
|
-
const isActiveSubMenu = pathUrl.startsWith(
|
|
179
|
-
`/${itemSubMenu.path.replace(/^\/+/, "")}`
|
|
180
|
-
);
|
|
181
|
-
return /* @__PURE__ */ jsxs("li", { children: [
|
|
182
|
-
/* @__PURE__ */ jsxs(
|
|
183
|
-
"a",
|
|
184
|
-
{
|
|
185
|
-
onClick: () => handleClickSubmenu(itemSubMenu, itemSubMenu.isShow),
|
|
186
|
-
className: twMerge(
|
|
187
|
-
isActiveSubMenu && !itemSubMenu.isShow ? "bg-[#E7F0FF] !text-[#007BE5]" : isActiveSubMenu && itemSubMenu.isShow ? "!text-[#007BE5]" : "",
|
|
188
|
-
"group flex gap-x-3 select-none p-3 text-gray-700 hover:bg-[#E7F0FF] hover:text-[#007BE5] text-sm leading-6 transition-all duration-300 font-semibold items-center"
|
|
189
|
-
),
|
|
190
|
-
children: [
|
|
191
|
-
itemSubMenu.icon,
|
|
192
|
-
itemSubMenu.name,
|
|
193
|
-
shouldShowToggleIcon && (openSubmenu === itemSubMenu.name ? /* @__PURE__ */ jsx(RefIcon, { className: "w-4 h-4 ml-auto" }) : /* @__PURE__ */ jsx(RefIcon$1, { className: "w-4 h-4 ml-auto" }))
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
itemSubMenu.isShow && openSubmenu === itemSubMenu.name && /* @__PURE__ */ jsx("ul", { className: "transition-all duration-300", children: itemSubMenu?.children?.map(
|
|
198
|
-
(itemChildrenSubMenu) => {
|
|
199
|
-
const itemFullPath = `/${itemSubMenu.path.replace(
|
|
200
|
-
/^\//,
|
|
201
|
-
""
|
|
202
|
-
)}/${itemChildrenSubMenu.path.replace(
|
|
203
|
-
/^\/|\/$/g,
|
|
204
|
-
""
|
|
205
|
-
)}`;
|
|
206
|
-
return /* @__PURE__ */ jsx(
|
|
207
|
-
"li",
|
|
208
|
-
{
|
|
209
|
-
onClick: () => handleClick(itemFullPath),
|
|
210
|
-
className: twMerge(
|
|
211
|
-
pathUrl.startsWith(itemFullPath) ? "bg-[#E7F0FF] !text-[#007BE5]" : "",
|
|
212
|
-
"text-sm hover:bg-[#E7F0FF] hover:text-[#007BE5] transition-all duration-300 max-w-lg truncate py-2 flex items-center"
|
|
213
|
-
),
|
|
214
|
-
children: /* @__PURE__ */ jsxs("div", { className: "ml-4 flex items-center gap-4", children: [
|
|
215
|
-
itemChildrenSubMenu.icon,
|
|
216
|
-
itemChildrenSubMenu.name
|
|
217
|
-
] })
|
|
218
|
-
},
|
|
219
|
-
`${itemChildrenSubMenu.path}-${itemChildrenSubMenu.path}`
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
) })
|
|
223
|
-
] }, itemSubMenu.path);
|
|
224
|
-
}) })
|
|
225
|
-
] }, sub?.path);
|
|
226
|
-
}) })
|
|
227
|
-
}
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
const Sidebar = ({ children, menu, userInfo }) => {
|
|
231
|
-
const navigate = useNavigate();
|
|
232
|
-
const location = useLocation();
|
|
233
|
-
const pathUrl = location.pathname;
|
|
234
|
-
const [activeMainMenu, setActiveMainMenu] = useState("");
|
|
235
|
-
const [openSubmenu, setOpenSubmenu] = useState(null);
|
|
236
|
-
const [collapse, setCollapse] = useState(false);
|
|
237
|
-
const [openSubCollapse, setOpenSubCollapse] = useState(false);
|
|
238
|
-
const [valueSearch, setValueSearch] = useState("");
|
|
239
|
-
const searchSidebar = useDebounce(valueSearch, 300);
|
|
240
|
-
const newMenu = useMemo(
|
|
241
|
-
() => menu?.filter((route) => route?.isShow)?.flatMap((route) => route?.children)?.filter(Boolean),
|
|
242
|
-
[menu]
|
|
243
|
-
);
|
|
244
|
-
const dataOption = useMemo(
|
|
245
|
-
() => getDataOption(newMenu, searchSidebar),
|
|
246
|
-
[newMenu, searchSidebar]
|
|
247
|
-
);
|
|
248
|
-
const handleClickSubmenu = useCallback(
|
|
249
|
-
(item, menuDropdown) => {
|
|
250
|
-
if (menuDropdown) {
|
|
251
|
-
setOpenSubmenu((prev) => prev === item.name ? null : item.name);
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
navigate(item.path);
|
|
255
|
-
},
|
|
256
|
-
[navigate]
|
|
257
|
-
);
|
|
258
|
-
const handleClick = useCallback(
|
|
259
|
-
(itemPath) => {
|
|
260
|
-
console.log("click path", pathUrl + itemPath);
|
|
261
|
-
navigate(itemPath);
|
|
262
|
-
},
|
|
263
|
-
[navigate]
|
|
264
|
-
);
|
|
265
|
-
const handleSelect = useCallback(
|
|
266
|
-
(_value, path) => {
|
|
267
|
-
navigate(path.path);
|
|
268
|
-
},
|
|
269
|
-
[navigate]
|
|
270
|
-
);
|
|
271
|
-
const handleNavigateModule = (path) => {
|
|
272
|
-
navigate(path);
|
|
273
|
-
};
|
|
274
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
275
|
-
/* @__PURE__ */ jsx(
|
|
276
|
-
Header,
|
|
277
|
-
{
|
|
278
|
-
style: {
|
|
279
|
-
backgroundColor: "#FFFFFF",
|
|
280
|
-
display: "flex",
|
|
281
|
-
width: "100%",
|
|
282
|
-
borderBottom: "1px solid white",
|
|
283
|
-
boxShadow: "0 1px 1px rgba(0, 0, 0, 0.15)",
|
|
284
|
-
height: "56px"
|
|
285
|
-
},
|
|
286
|
-
children: /* @__PURE__ */ jsxs("div", { className: "w-full flex items-center justify-between", children: [
|
|
287
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center ml-[-2rem]", children: /* @__PURE__ */ jsx("img", { src: logoHeaderText, alt: "logo", width: 200 }) }),
|
|
288
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
289
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-end", children: /* @__PURE__ */ jsx(
|
|
290
|
-
AutoComplete,
|
|
291
|
-
{
|
|
292
|
-
classNames: {
|
|
293
|
-
popup: { root: "certain-category-search-dropdown" }
|
|
294
|
-
},
|
|
295
|
-
popupMatchSelectWidth: 500,
|
|
296
|
-
style: { width: 500 },
|
|
297
|
-
options: dataOption ?? [],
|
|
298
|
-
onSelect: handleSelect,
|
|
299
|
-
onChange: (value) => setValueSearch(value),
|
|
300
|
-
children: /* @__PURE__ */ jsx(
|
|
301
|
-
Input,
|
|
302
|
-
{
|
|
303
|
-
className: "!placeholder:bg-[#E7F0FF] !bg-[#E7F0FF] !border !border-[#BDE3FF]",
|
|
304
|
-
placeholder: "Tìm kiếm theo chức năng,module của hệ thống",
|
|
305
|
-
iconStartInput: /* @__PURE__ */ jsx("div", { className: "w-5 h-5", children: /* @__PURE__ */ jsx(SearchIcon, { className: "w-5 text-[#116DFF]" }) })
|
|
306
|
-
}
|
|
307
|
-
)
|
|
308
|
-
}
|
|
309
|
-
) }),
|
|
310
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx("li", { className: "list-none cursor-pointer group flex items-center", children: /* @__PURE__ */ jsxs(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
className: twMerge(
|
|
314
|
-
collapse ? "" : "justify-center",
|
|
315
|
-
"text-black flex items-center rounded-md gap-2"
|
|
316
|
-
),
|
|
317
|
-
children: [
|
|
318
|
-
/* @__PURE__ */ jsx(Divider, { type: "vertical" }),
|
|
319
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-center gap-4 items-center", children: [
|
|
320
|
-
/* @__PURE__ */ jsx(VietNamIcon, { className: "w-6 h-6" }),
|
|
321
|
-
/* @__PURE__ */ jsx(BellIcon, { className: "w-6 h-6" })
|
|
322
|
-
] })
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
) }) }),
|
|
326
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx("a", { onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx("li", { className: "list-none cursor-pointer group flex items-center", children: /* @__PURE__ */ jsxs(
|
|
327
|
-
"div",
|
|
328
|
-
{
|
|
329
|
-
className: twMerge(
|
|
330
|
-
collapse ? "" : "justify-center",
|
|
331
|
-
"text-black flex items-center rounded-md gap-2"
|
|
332
|
-
),
|
|
333
|
-
children: [
|
|
334
|
-
/* @__PURE__ */ jsx(Divider, { type: "vertical" }),
|
|
335
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center w-10 h-10 rounded-full", children: /* @__PURE__ */ jsx(
|
|
336
|
-
"img",
|
|
337
|
-
{
|
|
338
|
-
src: userInfo?.avatar || defaultAvatar,
|
|
339
|
-
alt: "default_avatar"
|
|
340
|
-
}
|
|
341
|
-
) }),
|
|
342
|
-
/* @__PURE__ */ jsx("p", { children: userInfo?.name }),
|
|
343
|
-
/* @__PURE__ */ jsx(Dropdown, { menu: { items }, children: /* @__PURE__ */ jsx(DownOutlinedIcon, { className: "w-6 h-6" }) })
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
) }) }) })
|
|
347
|
-
] })
|
|
348
|
-
] })
|
|
349
|
-
}
|
|
350
|
-
),
|
|
351
|
-
/* @__PURE__ */ jsxs("div", { className: "flex relative h-[calc(100vh-56px)] overflow-y-hidden", children: [
|
|
352
|
-
/* @__PURE__ */ jsx(
|
|
353
|
-
"div",
|
|
354
|
-
{
|
|
355
|
-
onMouseEnter: () => setCollapse(true),
|
|
356
|
-
onMouseLeave: () => setCollapse(false),
|
|
357
|
-
className: twMerge(
|
|
358
|
-
"flex flex-col gap-y-5 h-full bg-[#001523] transition-all z-50 duration-300",
|
|
359
|
-
collapse ? "w-[255px]" : "w-[54px]",
|
|
360
|
-
openSubCollapse && "absolute"
|
|
361
|
-
),
|
|
362
|
-
children: /* @__PURE__ */ jsx(
|
|
363
|
-
SidebarMenu,
|
|
364
|
-
{
|
|
365
|
-
menu: newMenu,
|
|
366
|
-
activeMainMenu,
|
|
367
|
-
setActiveMainMenu,
|
|
368
|
-
setOpenSubCollapse,
|
|
369
|
-
collapse,
|
|
370
|
-
pathUrl,
|
|
371
|
-
setCollapse,
|
|
372
|
-
handleNavigateModule
|
|
373
|
-
}
|
|
374
|
-
)
|
|
375
|
-
}
|
|
376
|
-
),
|
|
377
|
-
openSubCollapse && /* @__PURE__ */ jsx(
|
|
378
|
-
"div",
|
|
379
|
-
{
|
|
380
|
-
className: twMerge(
|
|
381
|
-
openSubCollapse ? "ml-10" : "ml-0",
|
|
382
|
-
collapse ? "w-17" : "w-[250px]",
|
|
383
|
-
"flex flex-col border-gray-200 bg-[#FFFFFF] shadow h-screen transition-all duration-300"
|
|
384
|
-
),
|
|
385
|
-
children: /* @__PURE__ */ jsx(
|
|
386
|
-
SidebarSubMenu,
|
|
387
|
-
{
|
|
388
|
-
newMenu,
|
|
389
|
-
activeMainMenu,
|
|
390
|
-
openSubmenu,
|
|
391
|
-
handleClickSubmenu,
|
|
392
|
-
handleClick,
|
|
393
|
-
pathUrl
|
|
394
|
-
}
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
),
|
|
398
|
-
/* @__PURE__ */ jsx(
|
|
399
|
-
"div",
|
|
400
|
-
{
|
|
401
|
-
className: twMerge(
|
|
402
|
-
collapse && openSubCollapse ? "ml-[7%]" : "",
|
|
403
|
-
"flex-1 h-full overflow-y-auto scrollbar-none transition-all duration-300"
|
|
404
|
-
),
|
|
405
|
-
children
|
|
406
|
-
}
|
|
407
|
-
)
|
|
408
|
-
] })
|
|
409
|
-
] });
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
export { Sidebar };
|