listpage-next 0.0.254 → 0.0.256
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/components/PageLayout/components/PageLogo/index.d.ts +2 -1
- package/dist/components/PageLayout/components/PageLogo/index.js +3 -1
- package/dist/features/ReactApp/Layout.d.ts +1 -1
- package/dist/features/ReactApp/Layout.js +18 -3
- package/dist/ui/Menu/index.js +1 -1
- package/dist/ui.css +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export interface PageLogoProps {
|
|
3
3
|
src?: string;
|
|
4
4
|
icon?: ReactNode;
|
|
5
5
|
title?: ReactNode;
|
|
6
|
+
style?: CSSProperties;
|
|
6
7
|
}
|
|
7
8
|
export declare const PageLogo: (props: PageLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Image } from "antd";
|
|
|
3
3
|
import { styled } from "styled-components";
|
|
4
4
|
import { usePageContext } from "../PageProvider/index.js";
|
|
5
5
|
const PageLogo = (props)=>{
|
|
6
|
-
const { src, icon, title } = props;
|
|
6
|
+
const { src, icon, title, style } = props;
|
|
7
7
|
const { collapsed } = usePageContext();
|
|
8
8
|
const image = src && /*#__PURE__*/ jsx(Image, {
|
|
9
9
|
width: 22,
|
|
@@ -13,9 +13,11 @@ const PageLogo = (props)=>{
|
|
|
13
13
|
});
|
|
14
14
|
const avatar = icon;
|
|
15
15
|
if (collapsed) return /*#__PURE__*/ jsx(LogoContentCollapseWrapper, {
|
|
16
|
+
style: style,
|
|
16
17
|
children: image || avatar
|
|
17
18
|
});
|
|
18
19
|
return /*#__PURE__*/ jsxs(LogoContentWrapper, {
|
|
20
|
+
style: style,
|
|
19
21
|
children: [
|
|
20
22
|
image || avatar,
|
|
21
23
|
title && /*#__PURE__*/ jsx(TitleContentWrapper, {
|
|
@@ -3,7 +3,7 @@ import { type MenuItem } from '../../ui/Menu';
|
|
|
3
3
|
export interface LayoutProps {
|
|
4
4
|
menus: MenuItem[];
|
|
5
5
|
basename?: string;
|
|
6
|
-
title?:
|
|
6
|
+
title?: ReactNode;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export declare const Layout: (props: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { Outlet, useNavigate } from "react-router-dom";
|
|
4
|
-
import { PageLayout } from "../../components/index.js";
|
|
4
|
+
import { PageLayout, usePageContext } from "../../components/index.js";
|
|
5
5
|
import { Menu } from "../../ui/Menu/index.js";
|
|
6
6
|
import { getDefaultActiveKey } from "./utils.js";
|
|
7
7
|
const Layout = (props)=>{
|
|
@@ -14,14 +14,29 @@ const Layout = (props)=>{
|
|
|
14
14
|
return /*#__PURE__*/ jsx(PageLayout, {
|
|
15
15
|
logo: {
|
|
16
16
|
icon,
|
|
17
|
-
title
|
|
17
|
+
title,
|
|
18
|
+
style: {
|
|
19
|
+
backgroundColor: '#000c17'
|
|
20
|
+
}
|
|
18
21
|
},
|
|
19
22
|
content: /*#__PURE__*/ jsx(Outlet, {}),
|
|
20
|
-
|
|
23
|
+
siderProps: {
|
|
24
|
+
style: {
|
|
25
|
+
padding: 0
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
sider: /*#__PURE__*/ jsx(Sider, {
|
|
21
29
|
items: menus,
|
|
22
30
|
defaultActiveKey: defaultActiveKey,
|
|
23
31
|
onSelect: navigate
|
|
24
32
|
})
|
|
25
33
|
});
|
|
26
34
|
};
|
|
35
|
+
const Sider = (props)=>{
|
|
36
|
+
const { collapsed } = usePageContext();
|
|
37
|
+
return /*#__PURE__*/ jsx(Menu, {
|
|
38
|
+
isCollapsed: collapsed,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
};
|
|
27
42
|
export { Layout };
|
package/dist/ui/Menu/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const Menu = (props)=>{
|
|
|
18
18
|
]);
|
|
19
19
|
};
|
|
20
20
|
return /*#__PURE__*/ jsxs("div", {
|
|
21
|
-
className: `overflow-y-auto overflow-x-hidden
|
|
21
|
+
className: `h-full overflow-y-auto overflow-x-hidden scrollbar-hide bg-[#000c17] ${isCollapsed ? 'w-[47px]' : 'flex-1 py-2 px-2'}`,
|
|
22
22
|
children: [
|
|
23
23
|
!isCollapsed && title && /*#__PURE__*/ jsx("div", {
|
|
24
24
|
className: "px-3 mb-2 mt-2 text-[11px] font-medium text-neutral-500 uppercase tracking-widest",
|
package/dist/ui.css
CHANGED