namirasoft-site-react 1.3.82 → 1.3.84

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.
Files changed (56) hide show
  1. package/dist/App.js +2 -30
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/NSActionMenu.d.ts +14 -0
  4. package/dist/components/NSActionMenu.js +16 -0
  5. package/dist/components/NSActionMenu.js.map +1 -0
  6. package/dist/components/NSActionMenu.module.css +73 -0
  7. package/dist/components/NSButton.js +1 -1
  8. package/dist/components/NSButton.js.map +1 -1
  9. package/dist/components/NSButton.module.css +12 -5
  10. package/dist/components/NSButtonBlue.module.css +1 -0
  11. package/dist/components/NSButtonGreen.module.css +1 -0
  12. package/dist/components/NSButtonRed.module.css +1 -0
  13. package/dist/components/NSCard.module.css +1 -1
  14. package/dist/components/NSInput.module.css +26 -6
  15. package/dist/components/NSInputSearch.js +1 -2
  16. package/dist/components/NSInputSearch.js.map +1 -1
  17. package/dist/components/NSLayoutAction.d.ts +11 -0
  18. package/dist/components/NSLayoutAction.js +15 -0
  19. package/dist/components/NSLayoutAction.js.map +1 -0
  20. package/dist/components/NSLayoutAction.module.css +45 -0
  21. package/dist/components/NSLink.js +1 -1
  22. package/dist/components/NSLink.js.map +1 -1
  23. package/dist/components/NSModal.d.ts +4 -0
  24. package/dist/components/NSModal.js +6 -0
  25. package/dist/components/NSModal.js.map +1 -0
  26. package/dist/components/NSModal.module.css +0 -0
  27. package/dist/components/NSPanel.module.css +13 -9
  28. package/dist/components/NSSpace.js +1 -1
  29. package/dist/components/NSSpace.js.map +1 -1
  30. package/dist/components/NSTable.d.ts +1 -0
  31. package/dist/components/NSTable.js +1 -1
  32. package/dist/components/NSTable.js.map +1 -1
  33. package/dist/components/NSTable.module.css +8 -2
  34. package/package.json +1 -1
  35. package/public/assets/images/export-vector.png +0 -0
  36. package/public/assets/images/refresh-vector.png +0 -0
  37. package/src/App.tsx +101 -41
  38. package/src/components/NSActionMenu.module.css +73 -0
  39. package/src/components/NSActionMenu.tsx +67 -0
  40. package/src/components/NSButton.module.css +12 -5
  41. package/src/components/NSButton.tsx +2 -2
  42. package/src/components/NSButtonBlue.module.css +1 -0
  43. package/src/components/NSButtonGreen.module.css +1 -0
  44. package/src/components/NSButtonRed.module.css +1 -0
  45. package/src/components/NSCard.module.css +1 -1
  46. package/src/components/NSInput.module.css +26 -6
  47. package/src/components/NSInputSearch.tsx +73 -63
  48. package/src/components/NSLayoutAction.module.css +45 -0
  49. package/src/components/NSLayoutAction.tsx +62 -0
  50. package/src/components/NSLink.tsx +2 -2
  51. package/src/components/NSModal.module.css +0 -0
  52. package/src/components/NSModal.tsx +21 -0
  53. package/src/components/NSPanel.module.css +13 -9
  54. package/src/components/NSSpace.tsx +16 -16
  55. package/src/components/NSTable.module.css +8 -2
  56. 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
- style={props.style}
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
+
@@ -6,15 +6,7 @@
6
6
  align-items: center;
7
7
  gap: 8px;
8
8
  border-radius: 8px;
9
- margin: 0 auto;
10
- }
11
-
12
- @media only screen and (min-width: 768px) {
13
- .ns_panel_grid {
14
- flex-direction: row;
15
- max-width: 700px;
16
- flex-wrap: wrap;
17
- }
9
+ margin: 0 auto;
18
10
  }
19
11
 
20
12
  .ns_panel_column {
@@ -25,10 +17,22 @@ margin: 0 auto;
25
17
  align-items: center;
26
18
  border-radius: 8px;
27
19
  margin: 0 auto;
20
+ width: 100%;
28
21
  }
29
22
 
30
23
  @media only screen and (min-width: 768px) {
31
24
  .ns_panel_column {
32
25
  max-width: 700px;
33
26
  }
27
+ .ns_panel_grid {
28
+ flex-direction: row;
29
+ max-width: 700px;
30
+ flex-wrap: wrap;
31
+ }
32
+ }
33
+
34
+ @media only screen and (min-width: 380px) {
35
+ .ns_panel_column {
36
+ width: max-content;
37
+ }
34
38
  }
@@ -2,28 +2,28 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
2
 
3
3
  export interface INSSpaceProps extends IBaseComponentProps
4
4
  {
5
- size: NSSpaceSizeType;
5
+ size: NSSpaceSizeType;
6
6
  }
7
7
 
8
8
  export enum NSSpaceSizeType
9
9
  {
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",
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
- 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 }} />
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: 48px;
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/export-vector.png" }} onClick={() => { }} style={{ border: '1px solid rgba(3, 119, 255, 1)' }} />
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} />