@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 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,4 @@
1
+ declare const empty: (v: any) => boolean;
2
+ declare const notEmpty: (v: any) => boolean;
3
+ declare const isSame: (v1: any, v2: any) => boolean;
4
+ export { empty, notEmpty, isSame };
@@ -0,0 +1,4 @@
1
+ declare const ll: (message?: any, ...optionalParams: any[]) => void;
2
+ declare const nextTick: (callback: () => void) => void;
3
+ export { ll, nextTick };
4
+ export * from './compare';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CardLayoutProps } from './CardLayout.types';
3
+ declare const CardLayout: React.FC<CardLayoutProps>;
4
+ export default CardLayout;
@@ -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,3 @@
1
+ import CardLayout from './CardLayout';
2
+ export default CardLayout;
3
+ export { CardLayout };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DefaultLayoutProps } from './DefaultLayout.types';
3
+ declare const DefaultLayout: React.FC<DefaultLayoutProps>;
4
+ export default DefaultLayout;
@@ -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
+ }
@@ -0,0 +1,7 @@
1
+ export interface MenuTitle {
2
+ name: string;
3
+ parentName?: string;
4
+ }
5
+ export interface MenuTitleMap {
6
+ [key: string]: MenuTitle;
7
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SideMenuProps } from './SideMenu.types';
3
+ import 'simplebar-react/dist/simplebar.min.css';
4
+ declare const SideMenu: React.FC<SideMenuProps>;
5
+ export default SideMenu;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ import { SideMenuListProps } from '../SideMenuList';
3
+ export interface SideMenuProps extends SideMenuListProps {
4
+ logo: ReactNode;
5
+ }
@@ -0,0 +1,4 @@
1
+ import SideMenu from "./SideMenu";
2
+ export default SideMenu;
3
+ export { SideMenu };
4
+ export * from "./SideMenu.types";
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SideMenuListProps } from './SideMenuList.types';
3
+ declare const SideMenuList: React.FC<SideMenuListProps>;
4
+ export default SideMenuList;
@@ -0,0 +1,5 @@
1
+ import { MenuItem } from '../DefaultLayout.types';
2
+ export interface SideMenuListProps {
3
+ list: MenuItem[];
4
+ onClick?(menuItem: MenuItem): void;
5
+ }
@@ -0,0 +1,4 @@
1
+ import SideMenuList from "./SideMenuList";
2
+ export default SideMenuList;
3
+ export { SideMenuList };
4
+ export * from "./SideMenuList.types";
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SideMenuListItemProps } from './SideMenuListItem.types';
3
+ declare const SideMenuListItem: React.FC<SideMenuListItemProps>;
4
+ export default SideMenuListItem;
@@ -0,0 +1,5 @@
1
+ import { MenuItem } from '../DefaultLayout.types';
2
+ export interface SideMenuListItemProps {
3
+ info: MenuItem;
4
+ onClick?(menuItem: MenuItem): void;
5
+ }
@@ -0,0 +1,4 @@
1
+ import SideMenuListItem from "./SideMenuListItem";
2
+ export default SideMenuListItem;
3
+ export { SideMenuListItem };
4
+ export * from "./SideMenuListItem.types";
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface TitleProps {
3
+ title: string;
4
+ headTitle?: string;
5
+ }
6
+ declare const Title: React.FC<TitleProps>;
7
+ export default Title;
@@ -0,0 +1,4 @@
1
+ import DefaultLayout from './DefaultLayout';
2
+ export default DefaultLayout;
3
+ export { DefaultLayout };
4
+ export * from './DefaultLayout.types';
@@ -0,0 +1,2 @@
1
+ export * from './CardLayout';
2
+ export * from './DefaultLayout';