namirasoft-site-react 1.3.442 → 1.3.444

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 (39) hide show
  1. package/dist/App.js +27 -4
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/NSBoxDate.d.ts +1 -1
  4. package/dist/components/NSBoxDate.js +1 -1
  5. package/dist/components/NSBoxDate.js.map +1 -1
  6. package/dist/components/NSBoxFile.d.ts +2 -1
  7. package/dist/components/NSBoxFile.js.map +1 -1
  8. package/dist/components/NSCardScreenshot.d.ts +1 -1
  9. package/dist/components/NSCardScreenshot.js.map +1 -1
  10. package/dist/components/NSChartColumn.d.ts +1 -1
  11. package/dist/components/NSChartColumn.js.map +1 -1
  12. package/dist/components/NSChartPie.d.ts +1 -1
  13. package/dist/components/NSChartPie.js.map +1 -1
  14. package/dist/components/NSChartTable.d.ts +1 -1
  15. package/dist/components/NSChartTable.js.map +1 -1
  16. package/dist/components/NSDownload.d.ts +1 -1
  17. package/dist/components/NSDownload.js +2 -2
  18. package/dist/components/NSDownload.js.map +1 -1
  19. package/dist/components/NSTable.module.css +7 -1
  20. package/dist/components/NSTimeTable.d.ts +1 -1
  21. package/dist/components/NSTimeTable.js.map +1 -1
  22. package/dist/components/NSTimelineMonthly.d.ts +1 -0
  23. package/dist/components/NSTimelineMonthly.js +2 -2
  24. package/dist/components/NSTimelineMonthly.js.map +1 -1
  25. package/dist/components/NSTimelineMonthly.module.css +4 -0
  26. package/logo.png +0 -0
  27. package/package.json +1 -1
  28. package/src/App.tsx +28 -4
  29. package/src/components/NSBoxDate.tsx +2 -2
  30. package/src/components/NSBoxFile.tsx +104 -87
  31. package/src/components/NSCardScreenshot.tsx +27 -24
  32. package/src/components/NSChartColumn.tsx +97 -102
  33. package/src/components/NSChartPie.tsx +2 -2
  34. package/src/components/NSChartTable.tsx +85 -81
  35. package/src/components/NSDownload.tsx +55 -48
  36. package/src/components/NSTable.module.css +7 -1
  37. package/src/components/NSTimeTable.tsx +38 -35
  38. package/src/components/NSTimelineMonthly.module.css +4 -0
  39. package/src/components/NSTimelineMonthly.tsx +18 -14
@@ -1,94 +1,98 @@
1
1
  import { Table, Progress } from 'antd';
2
2
  import { ColumnType } from 'antd/es/table';
3
- import { IBaseComponentProps } from '../main';
3
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
4
4
  import Styles from "./NSChartTable.module.css"
5
5
 
6
- interface DataType {
7
- key: string;
8
- job: string;
9
- totalHours: number;
10
- percentage: number;
11
- cost: number;
12
- income: number;
13
- benefit: number;
6
+ interface DataType
7
+ {
8
+ key: string;
9
+ job: string;
10
+ totalHours: number;
11
+ percentage: number;
12
+ cost: number;
13
+ income: number;
14
+ benefit: number;
14
15
  }
15
16
 
16
- interface CustomTableProps extends IBaseComponentProps {
17
- data: DataType[];
17
+ interface CustomTableProps extends IBaseComponentProps
18
+ {
19
+ data: DataType[];
18
20
  }
19
21
 
20
- const NSChartTable = (props: CustomTableProps) => {
21
- const getColor = (percentage: number) => {
22
- if (percentage >= 75) return '#368F01';
23
- if (percentage >= 60) return ' #44B400';
24
- if (percentage >= 50) return '#56E500';
25
- if (percentage >= 25) return '#FAFF00';
26
- return 'red';
27
- };
22
+ const NSChartTable = (props: CustomTableProps) =>
23
+ {
24
+ const getColor = (percentage: number) =>
25
+ {
26
+ if (percentage >= 75) return '#368F01';
27
+ if (percentage >= 60) return ' #44B400';
28
+ if (percentage >= 50) return '#56E500';
29
+ if (percentage >= 25) return '#FAFF00';
30
+ return 'red';
31
+ };
28
32
 
29
- const columns: ColumnType<DataType>[] = [
30
- {
31
- title: '',
32
- dataIndex: 'job',
33
- key: 'job',
34
- },
35
- {
36
- title: 'Total Hours',
37
- dataIndex: 'totalHours',
38
- key: 'totalHours',
39
- render: (text: number) => <div>{text}</div>,
40
- },
41
- {
42
- title: 'Percentage',
43
- dataIndex: 'percentage',
44
- key: 'percentage',
45
- render: (text: number) => <div>{text}%</div>,
46
- },
47
- {
48
- title: 'Cost',
49
- dataIndex: 'cost',
50
- key: 'cost',
51
- render: (text: number) => <div>${text}</div>,
52
- },
53
- {
54
- title: 'Income',
55
- dataIndex: 'income',
56
- key: 'income',
57
- render: (text: number) => <div>${text}</div>,
58
- },
59
- {
60
- title: 'Benefit',
61
- dataIndex: 'benefit',
62
- key: 'benefit',
63
- render: (text: number) => <div>${text}</div>,
64
- },
65
- {
66
- title: '',
67
- dataIndex: 'totalHours',
68
- key: 'chart',
69
- render: (totalHours: number, record: DataType) => (
70
- <Progress
71
- percent={(totalHours / 8) * 100}
72
- showInfo={false}
73
- strokeColor={getColor(record.percentage)}
74
- strokeWidth={16}
75
- size={{ width: 310, height: 16 }}
76
- />
77
- ),
78
- },
79
- ];
33
+ const columns: ColumnType<DataType>[] = [
34
+ {
35
+ title: '',
36
+ dataIndex: 'job',
37
+ key: 'job',
38
+ },
39
+ {
40
+ title: 'Total Hours',
41
+ dataIndex: 'totalHours',
42
+ key: 'totalHours',
43
+ render: (text: number) => <div>{text}</div>,
44
+ },
45
+ {
46
+ title: 'Percentage',
47
+ dataIndex: 'percentage',
48
+ key: 'percentage',
49
+ render: (text: number) => <div>{text}%</div>,
50
+ },
51
+ {
52
+ title: 'Cost',
53
+ dataIndex: 'cost',
54
+ key: 'cost',
55
+ render: (text: number) => <div>${text}</div>,
56
+ },
57
+ {
58
+ title: 'Income',
59
+ dataIndex: 'income',
60
+ key: 'income',
61
+ render: (text: number) => <div>${text}</div>,
62
+ },
63
+ {
64
+ title: 'Benefit',
65
+ dataIndex: 'benefit',
66
+ key: 'benefit',
67
+ render: (text: number) => <div>${text}</div>,
68
+ },
69
+ {
70
+ title: '',
71
+ dataIndex: 'totalHours',
72
+ key: 'chart',
73
+ render: (totalHours: number, record: DataType) => (
74
+ <Progress
75
+ percent={(totalHours / 8) * 100}
76
+ showInfo={false}
77
+ strokeColor={getColor(record.percentage)}
78
+ strokeWidth={16}
79
+ size={{ width: 310, height: 16 }}
80
+ />
81
+ ),
82
+ },
83
+ ];
80
84
 
81
- return (
82
- <div>
83
- <Table
84
- columns={columns}
85
- dataSource={props.data}
86
- pagination={false}
87
- scroll={{ x: 800 }}
88
- rowClassName={() => Styles.custom_row}
89
- />
90
- </div>
91
- );
85
+ return (
86
+ <div>
87
+ <Table
88
+ columns={columns}
89
+ dataSource={props.data}
90
+ pagination={false}
91
+ scroll={{ x: 800 }}
92
+ rowClassName={() => Styles.custom_row}
93
+ />
94
+ </div>
95
+ );
92
96
  };
93
97
 
94
98
  export default NSChartTable;
@@ -1,58 +1,65 @@
1
1
  import { useState } from "react";
2
- import { IBaseComponentProps, NSButtonBlue } from "../main";
2
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { NSBoxRadio } from "./NSBoxRadio";
4
- import Styles from "./NSDownload.module.css"
5
4
  import { NSLine } from "./NSLine";
5
+ import { NSButtonBlue } from "./NSButtonBlue";
6
+ import Styles from "./NSDownload.module.css"
6
7
 
7
- export interface NSDownloadProps extends IBaseComponentProps {
8
- releaseDate: string;
8
+ export interface NSDownloadProps extends IBaseComponentProps
9
+ {
10
+ releaseDate: string;
9
11
  }
10
12
 
11
- function NSDownload(props: NSDownloadProps) {
12
- const [state, setState] = useState("32-bit");
13
+ function NSDownload(props: NSDownloadProps)
14
+ {
15
+ const [state, setState] = useState("32-bit");
13
16
 
14
- return (
15
- <div className={`${Styles.download_parent} ${props.classList?.join(' ')}`}>
16
- <div className={Styles.download_header}>
17
- <h3 style={{ color: "#141B5C" }}>Choose Your Windows Architecture</h3>
18
- <div className={Styles.radio_group}>
19
- <NSBoxRadio
20
- title={"32-bit"}
21
- required={false}
22
- isSelected={state === "32-bit"}
23
- onChanged={(event) => {
24
- let value = event.getValue();
25
- if (value) {
26
- setState("32-bit");
27
- }
28
- }}
29
- classList={[Styles.radio_button]}
30
- />
31
- <NSBoxRadio
32
- title={"64-bit"}
33
- required={false}
34
- isSelected={state === "64-bit"}
35
- onChanged={(event) => {
36
- let value = event.getValue();
37
- if (value) {
38
- setState("64-bit");
39
- }
40
- }}
41
- classList={[Styles.radio_button]}
42
- />
43
- </div>
44
- </div>
45
- <NSLine />
46
- <div className={Styles.download_detail}>
47
- <h4 style={{ color: "#141B5C" }}>For Windows 7 and higher, Windows Server 2008 R2 and higher.</h4>
48
- <div>
49
- <p style={{ marginBottom: "0" }}>Latest Version</p>
50
- <p style={{ marginBottom: "0" }}>Release Date: {props.releaseDate}</p>
51
- </div>
52
- <NSButtonBlue title="Download" onClick={() => { }} classList={[Styles.download_button]} />
53
- </div>
54
- </div>
55
- );
17
+ return (
18
+ <div className={`${Styles.download_parent} ${props.classList?.join(' ')}`}>
19
+ <div className={Styles.download_header}>
20
+ <h3 style={{ color: "#141B5C" }}>Choose Your Windows Architecture</h3>
21
+ <div className={Styles.radio_group}>
22
+ <NSBoxRadio
23
+ title={"32-bit"}
24
+ required={false}
25
+ isSelected={state === "32-bit"}
26
+ onChanged={(event) =>
27
+ {
28
+ let value = event.getValue();
29
+ if (value)
30
+ {
31
+ setState("32-bit");
32
+ }
33
+ }}
34
+ classList={[Styles.radio_button]}
35
+ />
36
+ <NSBoxRadio
37
+ title={"64-bit"}
38
+ required={false}
39
+ isSelected={state === "64-bit"}
40
+ onChanged={(event) =>
41
+ {
42
+ let value = event.getValue();
43
+ if (value)
44
+ {
45
+ setState("64-bit");
46
+ }
47
+ }}
48
+ classList={[Styles.radio_button]}
49
+ />
50
+ </div>
51
+ </div>
52
+ <NSLine />
53
+ <div className={Styles.download_detail}>
54
+ <h4 style={{ color: "#141B5C" }}>For Windows 7 and higher, Windows Server 2008 R2 and higher.</h4>
55
+ <div>
56
+ <p style={{ marginBottom: "0" }}>Latest Version</p>
57
+ <p style={{ marginBottom: "0" }}>Release Date: {props.releaseDate}</p>
58
+ </div>
59
+ <NSButtonBlue title="Download" onClick={() => { }} classList={[Styles.download_button]} />
60
+ </div>
61
+ </div>
62
+ );
56
63
  }
57
64
 
58
65
  export default NSDownload;
@@ -61,7 +61,7 @@
61
61
  display: flex;
62
62
  flex-direction: row;
63
63
  flex-wrap: wrap;
64
- justify-content: space-between;
64
+ justify-content: center;
65
65
  align-items: center;
66
66
  width: 100%;
67
67
  gap: 16px;
@@ -82,6 +82,12 @@
82
82
  justify-content: center
83
83
  }
84
84
 
85
+ @media screen and (min-width: 420px) {
86
+ .ns_button {
87
+ justify-content: space-between;
88
+ }
89
+ }
90
+
85
91
  @media screen and (min-width: 992px) {
86
92
  .ns_table {
87
93
  color: #000000;
@@ -1,47 +1,50 @@
1
1
  import { ConfigProvider, Table } from 'antd';
2
2
  import type { TableProps } from 'antd';
3
- import { IBaseComponentProps } from '../main';
3
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
4
4
  import Styles from "./NSTimeTable.module.css"
5
5
 
6
- interface DataType {
7
- key: string;
8
- year: string;
9
- month: string;
10
- week: string;
11
- today: string;
6
+ interface DataType
7
+ {
8
+ key: string;
9
+ year: string;
10
+ month: string;
11
+ week: string;
12
+ today: string;
12
13
  }
13
14
 
14
- export interface NSTimeTableProps extends IBaseComponentProps {
15
- rows: DataType[];
16
- columns: TableProps<DataType>['columns'];
15
+ export interface NSTimeTableProps extends IBaseComponentProps
16
+ {
17
+ rows: DataType[];
18
+ columns: TableProps<DataType>['columns'];
17
19
  }
18
20
 
19
- const NSTimeTable = (props: NSTimeTableProps) => {
21
+ const NSTimeTable = (props: NSTimeTableProps) =>
22
+ {
20
23
 
21
- return (
22
- <ConfigProvider theme={{
23
- components: {
24
- Table: {
25
- headerBg: "#141B5C",
26
- headerColor: "#fff",
27
- headerSplitColor: "#141B5C",
28
- cellFontSize: 16,
29
- colorText: "#141B5C",
30
- }
31
- }
32
- }}>
33
- <Table
34
- columns={props.columns}
35
- dataSource={props.rows}
36
- bordered={false}
37
- rowClassName={Styles.custom_row}
38
- rowHoverable={false}
39
- scroll={{
40
- x: true
41
- }}
42
- />
43
- </ConfigProvider>
44
- )
24
+ return (
25
+ <ConfigProvider theme={{
26
+ components: {
27
+ Table: {
28
+ headerBg: "#141B5C",
29
+ headerColor: "#fff",
30
+ headerSplitColor: "#141B5C",
31
+ cellFontSize: 16,
32
+ colorText: "#141B5C",
33
+ }
34
+ }
35
+ }}>
36
+ <Table
37
+ columns={props.columns}
38
+ dataSource={props.rows}
39
+ bordered={false}
40
+ rowClassName={Styles.custom_row}
41
+ rowHoverable={false}
42
+ scroll={{
43
+ x: true
44
+ }}
45
+ />
46
+ </ConfigProvider>
47
+ )
45
48
  };
46
49
 
47
50
  export default NSTimeTable;
@@ -48,4 +48,8 @@
48
48
  overflow-x: scroll;
49
49
  -ms-overflow-style: none;
50
50
  scrollbar-width: none;
51
+ }
52
+
53
+ .ns_time_line_title {
54
+ color: #141B5C;
51
55
  }
@@ -5,11 +5,12 @@ export interface NSdata
5
5
  {
6
6
  title: string;
7
7
  value: number;
8
- percentage:number;
8
+ percentage: number;
9
9
  }
10
10
  export interface INSNSTimelineMonthlyProps extends IBaseComponentProps
11
11
  {
12
12
  data: NSdata[];
13
+ title?: string;
13
14
  }
14
15
 
15
16
  export function NSTimelineMonthly(props: INSNSTimelineMonthlyProps)
@@ -20,20 +21,23 @@ export function NSTimelineMonthly(props: INSNSTimelineMonthlyProps)
20
21
  return percentage.toString() + "%";
21
22
  }
22
23
  return (
23
- <div className={Styles.ns_parent}>
24
- <div className={Styles.ns_time_line_monthly}>
25
- {
26
- props.data.map((card, index) => (
27
- <div className={Styles.ns_time_line_monthly_card} key={index}>
28
- <h5 className={Styles.ns_time_line_monthly_card_week_day}>{card.title}</h5>
29
- <span className={Styles.ns_time_line_cards_hour}>{card.value}</span>
30
- <div className={Styles.ns_time_line_monthly_card_parent_chart}>
31
- <div className={Styles.ns_time_line_monthly_card_bar} style={{ width: getPercentage(card.value), background: Color.getColor(card.percentage)}}>bar</div>
24
+ <>
25
+ <div className={Styles.ns_parent}>
26
+ <h5 className={Styles.ns_time_line_title}>{props.title}</h5>
27
+ <div className={Styles.ns_time_line_monthly}>
28
+ {
29
+ props.data.map((card, index) => (
30
+ <div className={Styles.ns_time_line_monthly_card} key={index}>
31
+ <h5 className={Styles.ns_time_line_monthly_card_week_day}>{card.title}</h5>
32
+ <span className={Styles.ns_time_line_cards_hour}>{card.value}</span>
33
+ <div className={Styles.ns_time_line_monthly_card_parent_chart}>
34
+ <div className={Styles.ns_time_line_monthly_card_bar} style={{ width: getPercentage(card.value), background: Color.getColor(card.percentage) }}>bar</div>
35
+ </div>
32
36
  </div>
33
- </div>
34
- ))
35
- }
37
+ ))
38
+ }
39
+ </div>
36
40
  </div>
37
- </div>
41
+ </>
38
42
  );
39
43
  }