namirasoft-site-react 1.3.81 → 1.3.83
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/App.js +2 -30
- package/dist/App.js.map +1 -1
- package/dist/components/NSActionMenu.d.ts +14 -0
- package/dist/components/NSActionMenu.js +16 -0
- package/dist/components/NSActionMenu.js.map +1 -0
- package/dist/components/NSActionMenu.module.css +73 -0
- package/dist/components/NSButton.js +1 -1
- package/dist/components/NSButton.js.map +1 -1
- package/dist/components/NSButton.module.css +18 -6
- package/dist/components/NSButtonBlue.module.css +1 -0
- package/dist/components/NSButtonGreen.module.css +1 -0
- package/dist/components/NSButtonRed.module.css +1 -0
- package/dist/components/NSCard.module.css +1 -1
- package/dist/components/NSInput.module.css +26 -6
- package/dist/components/NSInputSearch.js +1 -2
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSLayout.js +1 -1
- package/dist/components/NSLayoutAction.d.ts +11 -0
- package/dist/components/NSLayoutAction.js +15 -0
- package/dist/components/NSLayoutAction.js.map +1 -0
- package/dist/components/NSLayoutAction.module.css +45 -0
- package/dist/components/NSLink.js +1 -1
- package/dist/components/NSLink.js.map +1 -1
- package/dist/components/NSModal.d.ts +4 -0
- package/dist/components/NSModal.js +6 -0
- package/dist/components/NSModal.js.map +1 -0
- package/dist/components/NSModal.module.css +0 -0
- package/dist/components/NSSpace.js +1 -1
- package/dist/components/NSSpace.js.map +1 -1
- package/dist/components/NSTable.d.ts +1 -0
- package/dist/components/NSTable.js +1 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.module.css +8 -2
- package/package.json +2 -2
- package/public/assets/images/export-vector.png +0 -0
- package/public/assets/images/refresh-vector.png +0 -0
- package/src/App.tsx +101 -41
- package/src/components/NSActionMenu.module.css +73 -0
- package/src/components/NSActionMenu.tsx +67 -0
- package/src/components/NSButton.module.css +18 -6
- package/src/components/NSButton.tsx +2 -2
- package/src/components/NSButtonBlue.module.css +1 -0
- package/src/components/NSButtonGreen.module.css +1 -0
- package/src/components/NSButtonRed.module.css +1 -0
- package/src/components/NSCard.module.css +1 -1
- package/src/components/NSInput.module.css +26 -6
- package/src/components/NSInputSearch.tsx +73 -63
- package/src/components/NSLayout.tsx +1 -1
- package/src/components/NSLayoutAction.module.css +45 -0
- package/src/components/NSLayoutAction.tsx +62 -0
- package/src/components/NSLink.tsx +2 -2
- package/src/components/NSModal.module.css +0 -0
- package/src/components/NSModal.tsx +21 -0
- package/src/components/NSSpace.tsx +16 -16
- package/src/components/NSTable.module.css +8 -2
- package/src/components/NSTable.tsx +4 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NSLayout, INSLayoutProps } from './NSLayout';
|
|
3
|
+
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
4
|
+
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
5
|
+
import Styles from './NSLayoutAction.module.css';
|
|
6
|
+
import { INSActionMenuProps, NSActionMenu } from './NSActionMenu';
|
|
7
|
+
|
|
8
|
+
export interface INSLayoutActionProps extends INSLayoutProps, IBaseComponentProps
|
|
9
|
+
{
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
actions: INSActionMenuProps[];
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function NSLayoutAction(props: INSLayoutActionProps)
|
|
17
|
+
{
|
|
18
|
+
let lines = (props.description ?? "").split(/(\n|\\n|<br>|<br\s*\/>)/gm);
|
|
19
|
+
|
|
20
|
+
const filtered_actions = props.actions.filter((action) => action.group)
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<NSLayout {...props}>
|
|
24
|
+
|
|
25
|
+
<div className={Styles.ns_action_bar_holder}>
|
|
26
|
+
<div className={Styles.ns_action_bar_title}>
|
|
27
|
+
<h1 className={Styles.title}>{props.title}</h1>
|
|
28
|
+
{
|
|
29
|
+
props.description && lines &&
|
|
30
|
+
<>
|
|
31
|
+
<p className={Styles.description}>
|
|
32
|
+
{
|
|
33
|
+
lines.map((line, index) =>
|
|
34
|
+
{
|
|
35
|
+
return <>
|
|
36
|
+
{line.trim()}
|
|
37
|
+
{index != lines.length - 1 && <br />}
|
|
38
|
+
</>
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
</p>
|
|
42
|
+
<NSSpace size={NSSpaceSizeType.MINI} />
|
|
43
|
+
</>
|
|
44
|
+
}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className={Styles.ns_actions_hodler}>
|
|
48
|
+
{filtered_actions.map((action) =>
|
|
49
|
+
<NSActionMenu
|
|
50
|
+
key={action.id}
|
|
51
|
+
group={action.group}
|
|
52
|
+
items={action.items}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
<NSSpace size={NSSpaceSizeType.SMALL} />
|
|
59
|
+
{props.children}
|
|
60
|
+
</NSLayout>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -12,12 +12,12 @@ export function NSLink(props: INSILinkProps)
|
|
|
12
12
|
<div
|
|
13
13
|
id={props.id}
|
|
14
14
|
className={`${Styles.ns_link_parent} ${props.classList?.join(" ")}`}
|
|
15
|
-
|
|
16
|
-
>
|
|
15
|
+
>
|
|
17
16
|
<a
|
|
18
17
|
className={`text-white text-decoration-none ${props.title ? Styles.ns_link : Styles.ns_link_absolute}`}
|
|
19
18
|
href={props.href}
|
|
20
19
|
target={props?.target ?? "_self"}
|
|
20
|
+
style={props.style}
|
|
21
21
|
>
|
|
22
22
|
{props.title}
|
|
23
23
|
</a>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IBaseComponentProps } from "../main";
|
|
2
|
+
import Styles from './NSModal.module.css';
|
|
3
|
+
|
|
4
|
+
export interface INSModalProps extends IBaseComponentProps
|
|
5
|
+
{ }
|
|
6
|
+
export function NSModal()
|
|
7
|
+
{
|
|
8
|
+
return (
|
|
9
|
+
<section className={Styles.ns_modal}>
|
|
10
|
+
<div className={Styles.ns_modal_container}>
|
|
11
|
+
<img
|
|
12
|
+
src=""
|
|
13
|
+
width={24}
|
|
14
|
+
height={24}
|
|
15
|
+
alt="close modal"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -2,28 +2,28 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
|
2
2
|
|
|
3
3
|
export interface INSSpaceProps extends IBaseComponentProps
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
size: NSSpaceSizeType;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export enum NSSpaceSizeType
|
|
9
9
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
NANO = "4px",
|
|
11
|
+
MICRO = "8px",
|
|
12
|
+
MINI = "16px",
|
|
13
|
+
SMALL = "24px",
|
|
14
|
+
MEDUIM = "32px",
|
|
15
|
+
NORMAL = "48px",
|
|
16
|
+
LARGE = "64px",
|
|
17
|
+
XLARGE = "80px",
|
|
18
|
+
XXLARGE = "96px",
|
|
19
|
+
XXXLARGE = "128px",
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export function NSSpace(props: INSSpaceProps)
|
|
23
23
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
return (
|
|
25
|
+
<hr id={props.id}
|
|
26
|
+
className={props.classList?.join(" ")}
|
|
27
|
+
style={{ ...props.style, width: "100%", height: props.size, margin: "0px", padding: "0px", background: "transparent", color: "transparent", border: 0, position: "relative", zIndex: -1 }} />
|
|
28
|
+
);
|
|
29
29
|
}
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
color: rgba(20, 27, 92, 1);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.ns_search_input{
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
.ns_table thead {
|
|
8
15
|
clip: rect(0 0 0 0);
|
|
9
16
|
position: fixed;
|
|
@@ -41,7 +48,6 @@
|
|
|
41
48
|
flex-direction: row;
|
|
42
49
|
justify-content: space-between;
|
|
43
50
|
align-items: center;
|
|
44
|
-
gap: 48px;
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
/* Modal */
|
|
@@ -128,7 +134,7 @@
|
|
|
128
134
|
flex-direction: row;
|
|
129
135
|
justify-content: space-between;
|
|
130
136
|
align-items: center;
|
|
131
|
-
gap:
|
|
137
|
+
gap: 24px;
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
@media screen and (min-width: 1024px) {
|
|
@@ -16,6 +16,7 @@ export interface INSTableProps<RowType> extends IBaseComponentProps
|
|
|
16
16
|
getRowKey: (row: RowType, rowIndex: number) => string;
|
|
17
17
|
getColumnAttributes?: (column: string, columnIndex: number) => { [key: string]: string };
|
|
18
18
|
getCell?: (row: RowType, column: string, rowIndex: number, columnIndex: number) => any;
|
|
19
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export interface NSTableState<RowType>
|
|
@@ -40,7 +41,7 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
40
41
|
{
|
|
41
42
|
this.setState({ rows });
|
|
42
43
|
}
|
|
43
|
-
getValueSearch(e: React.ChangeEvent<HTMLInputElement>):string
|
|
44
|
+
getValueSearch(e: React.ChangeEvent<HTMLInputElement>): string
|
|
44
45
|
{
|
|
45
46
|
return e.target.value
|
|
46
47
|
}
|
|
@@ -93,8 +94,8 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
93
94
|
<NSPagination size={50} page={5} />
|
|
94
95
|
<NSSpace size={NSSpaceSizeType.SMALL} />
|
|
95
96
|
<div className={Styles.ns_button}>
|
|
96
|
-
<NSButton title='Export' icon={{ src: "/assets/images/export-vector.png" }} onClick={() => { }} style={{ border: '1px solid rgba(255, 148, 50, 1)' }} />
|
|
97
|
-
<NSButton title='Refresh' icon={{ src: "/assets/images/
|
|
97
|
+
<NSButton title='Export' icon={{ src: "/assets/images/export-vector.png" }} onClick={() => { }} style={{ border: '1px solid rgba(255, 148, 50, 1)', width: "128px" }} />
|
|
98
|
+
<NSButton title='Refresh' icon={{ src: "/assets/images/refresh-vector.png" }} onClick={() => { }} style={{ border: '1px solid rgba(3, 119, 255, 1)', width: "128px" }} />
|
|
98
99
|
</div>
|
|
99
100
|
</section>
|
|
100
101
|
<NSSpace size={NSSpaceSizeType.SMALL} />
|