@pdg/react-admin-layout 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 +20 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/types.d.ts +13 -0
- package/dist/@util/compare.d.ts +4 -0
- package/dist/@util/index.d.ts +4 -0
- package/dist/CardLayout/CardLayout.d.ts +4 -0
- package/dist/CardLayout/CardLayout.types.d.ts +7 -0
- package/dist/CardLayout/index.d.ts +3 -0
- package/dist/DefaultLayout/DefaultLayout.d.ts +4 -0
- package/dist/DefaultLayout/DefaultLayout.types.d.ts +22 -0
- package/dist/DefaultLayout/DefaultLayout.types.private.d.ts +7 -0
- package/dist/DefaultLayout/SideMenu/SideMenu.d.ts +5 -0
- package/dist/DefaultLayout/SideMenu/SideMenu.types.d.ts +5 -0
- package/dist/DefaultLayout/SideMenu/index.d.ts +4 -0
- package/dist/DefaultLayout/SideMenuList/SideMenuList.d.ts +4 -0
- package/dist/DefaultLayout/SideMenuList/SideMenuList.types.d.ts +5 -0
- package/dist/DefaultLayout/SideMenuList/index.d.ts +4 -0
- package/dist/DefaultLayout/SideMenuListItem/SideMenuListItem.d.ts +4 -0
- package/dist/DefaultLayout/SideMenuListItem/SideMenuListItem.types.d.ts +5 -0
- package/dist/DefaultLayout/SideMenuListItem/index.d.ts +4 -0
- package/dist/DefaultLayout/Title.d.ts +7 -0
- package/dist/DefaultLayout/index.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +7534 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +7534 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @pdg/react-admin-layout
|
|
2
|
+
|
|
3
|
+
Admin Layout for React
|
|
4
|
+
|
|
5
|
+
## 설치
|
|
6
|
+
```
|
|
7
|
+
npm install -D @pdg/react-admin-layout @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### index.html 에 추가
|
|
11
|
+
```
|
|
12
|
+
...
|
|
13
|
+
<head>
|
|
14
|
+
...
|
|
15
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
|
|
16
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
|
17
|
+
...
|
|
18
|
+
</head>
|
|
19
|
+
...
|
|
20
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '@mui/material/styles';
|
|
4
|
+
export declare type PartialPick<T, K extends keyof T> = Partial<Pick<T, K>>;
|
|
5
|
+
export declare type PartialOmit<T, K extends keyof T> = Partial<Omit<T, K>>;
|
|
6
|
+
export interface CommonProps {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export interface CommonSxProps extends CommonProps {
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CardProps } from '@mui/material';
|
|
3
|
+
export interface CardLayoutProps extends Partial<CardProps> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CardLayoutDefaultProps: Pick<CardLayoutProps, 'backgroundColor'>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CommonSxProps } from '../@types';
|
|
3
|
+
export interface SubMenuItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
depth: number;
|
|
7
|
+
uri: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MenuItem {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
depth: number;
|
|
13
|
+
uri?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
items?: SubMenuItem[];
|
|
16
|
+
}
|
|
17
|
+
export interface DefaultLayoutProps extends CommonSxProps {
|
|
18
|
+
logo: ReactNode;
|
|
19
|
+
menu?: MenuItem[];
|
|
20
|
+
appBarControl?: ReactNode;
|
|
21
|
+
onMenuClick?(menuItem: MenuItem): void;
|
|
22
|
+
}
|
package/dist/index.d.ts
ADDED