namirasoft-site-react 1.3.39 → 1.3.42
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 +30 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSButtonGroup.d.ts +2 -0
- package/dist/components/NSButtonGroup.js +7 -0
- package/dist/components/NSButtonGroup.js.map +1 -0
- package/dist/components/NSButtonGroup.module.css +38 -0
- package/dist/components/NSInputDuration.d.ts +4 -2
- package/dist/components/NSInputDuration.js +12 -9
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +4 -2
- package/dist/components/NSInputEmail.js +16 -12
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +4 -2
- package/dist/components/NSInputFloat.js +11 -8
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +4 -2
- package/dist/components/NSInputIP.js +12 -9
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +4 -2
- package/dist/components/NSInputInteger.js +12 -9
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +4 -4
- package/dist/components/NSInputSearch.js +11 -17
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +4 -2
- package/dist/components/NSInputTime.js +12 -9
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSSection.d.ts +1 -0
- package/dist/components/NSSection.js +4 -1
- package/dist/components/NSSection.js.map +1 -1
- package/dist/components/NSSection.module.css +6 -0
- package/dist/components/NSSpace.js.map +1 -1
- package/dist/components/NSTable.d.ts +1 -0
- package/dist/components/NSTable.js +6 -2
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.module.css +121 -88
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
- package/public/assets/images/close-vector.png +0 -0
- package/src/App.tsx +46 -8
- package/src/components/NSButtonGroup.module.css +38 -0
- package/src/components/NSButtonGroup.tsx +12 -0
- package/src/components/NSInputDuration.tsx +18 -14
- package/src/components/NSInputEmail.tsx +36 -31
- package/src/components/NSInputFloat.tsx +16 -11
- package/src/components/NSInputIP.tsx +14 -10
- package/src/components/NSInputInteger.tsx +14 -10
- package/src/components/NSInputSearch.tsx +16 -24
- package/src/components/NSInputTime.tsx +13 -9
- package/src/components/NSSection.module.css +6 -0
- package/src/components/NSSection.tsx +7 -2
- package/src/components/NSSpace.tsx +2 -1
- package/src/components/NSTable.module.css +121 -88
- package/src/components/NSTable.tsx +28 -9
- package/src/main.ts +1 -0
|
@@ -1,113 +1,146 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
font-weight: 300;
|
|
5
|
-
padding: 16px;
|
|
6
|
-
color: white;
|
|
7
|
-
font-size: 16px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ns_tbody td {
|
|
11
|
-
background-color: rgb(173, 178, 206);
|
|
1
|
+
.ns_table {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
12
4
|
color: rgba(20, 27, 92, 1);
|
|
13
|
-
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
|
|
5
|
+
}
|
|
17
6
|
|
|
7
|
+
.ns_table thead {
|
|
8
|
+
clip: rect(0 0 0 0);
|
|
9
|
+
position: fixed;
|
|
18
10
|
}
|
|
19
11
|
|
|
20
|
-
.ns_table {
|
|
21
|
-
|
|
12
|
+
.ns_table tr {
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
padding: 16px;
|
|
15
|
+
display: block;
|
|
16
|
+
background-color: rgba(20, 27, 92, 0.3);
|
|
17
|
+
margin: 16px 0;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
.ns_table td {
|
|
21
|
+
|
|
22
|
+
display: block;
|
|
23
|
+
padding: 8px 0;
|
|
24
|
+
font-size: .8em;
|
|
25
|
+
text-align: right;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
padding: 24px 0;
|
|
28
|
+
.ns_table td::before {
|
|
29
|
+
content: attr(data-label);
|
|
30
|
+
float: left;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
text-transform: uppercase;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
/* Button Group */
|
|
36
|
+
.ns_button_group {
|
|
39
37
|
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
40
39
|
align-items: center;
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Modal */
|
|
43
|
+
.ns_modal {
|
|
44
|
+
position: fixed;
|
|
45
|
+
height: fit-content;
|
|
46
|
+
top: 25%;
|
|
47
|
+
left: 0;
|
|
43
48
|
border-radius: 8px;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
color:
|
|
49
|
-
background-color: transparent;
|
|
49
|
+
padding: 24px;
|
|
50
|
+
margin: 0 16px;
|
|
51
|
+
background-color: rgba(188, 194, 244, 1);
|
|
52
|
+
z-index: 10;
|
|
53
|
+
color: rgba(20, 27, 92, 1);
|
|
50
54
|
}
|
|
51
55
|
|
|
52
|
-
.
|
|
53
|
-
|
|
56
|
+
.ns_modal a {
|
|
57
|
+
float: right;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
.
|
|
57
|
-
|
|
60
|
+
.modal img {
|
|
61
|
+
width: 32px;
|
|
62
|
+
height: 32px;
|
|
63
|
+
right: 0;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
|
-
@media
|
|
61
|
-
.
|
|
62
|
-
|
|
66
|
+
@media screen and (min-width: 768px) {
|
|
67
|
+
.ns_table {
|
|
68
|
+
color: #000000;
|
|
63
69
|
}
|
|
64
|
-
}
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
height: 24px;
|
|
73
|
-
border-radius: 24px;
|
|
74
|
-
border: none;
|
|
75
|
-
text-align: center;
|
|
76
|
-
padding-top: 2px;
|
|
77
|
-
}
|
|
71
|
+
.ns_table thead {
|
|
72
|
+
position: static;
|
|
73
|
+
background-color: rgba(20, 27, 92, 1);
|
|
74
|
+
border-top-left-radius: 8px;
|
|
75
|
+
border-top-right-radius: 8px;
|
|
76
|
+
}
|
|
78
77
|
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
font-size: 12px;
|
|
83
|
-
width: 96px;
|
|
84
|
-
height: 24px;
|
|
85
|
-
border-radius: 24px;
|
|
86
|
-
border: none;
|
|
87
|
-
text-align: center;
|
|
88
|
-
padding-top: 2px;
|
|
89
|
-
}
|
|
78
|
+
.ns_table tbody {
|
|
79
|
+
background-color: rgba(20, 27, 92, 0.3);
|
|
80
|
+
}
|
|
90
81
|
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
padding-top: 2px;
|
|
101
|
-
}
|
|
82
|
+
.ns_table tr {
|
|
83
|
+
display: grid;
|
|
84
|
+
grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
|
|
85
|
+
padding: 12px 16px;
|
|
86
|
+
margin: 0;
|
|
87
|
+
border-radius: 0;
|
|
88
|
+
border-bottom: 1px solid rgba(20, 27, 92, 0.3);
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
}
|
|
102
91
|
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
.ns_table td {
|
|
93
|
+
text-align: left;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: start;
|
|
96
|
+
padding: 0;
|
|
97
|
+
margin: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ns_table th {
|
|
101
|
+
font-size: 16px;
|
|
102
|
+
font-weight: 300;
|
|
103
|
+
color: #ffffff;
|
|
104
|
+
margin: 0;
|
|
105
|
+
padding: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ns_table td::before {
|
|
109
|
+
content: attr(none);
|
|
110
|
+
float: left;
|
|
111
|
+
font-weight: bold;
|
|
112
|
+
text-transform: uppercase;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Button Group */
|
|
116
|
+
.ns_button_group {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
align-items: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media screen and (min-width: 990px) {
|
|
124
|
+
.ns_table {
|
|
125
|
+
padding: 0 48px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ns_table thead {
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ns_table tr {
|
|
133
|
+
font-size: 24px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Search Input */
|
|
137
|
+
.ns_search_input {
|
|
138
|
+
padding: 0 40px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Button Group */
|
|
142
|
+
.ns_button_group {
|
|
143
|
+
padding: 0 48px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
113
146
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import NSButtonGroup from './NSButtonGroup';
|
|
4
|
+
import { NSInputSearch } from './NSInputSearch';
|
|
5
|
+
import { NSPagination } from './NSPagination';
|
|
6
|
+
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
3
7
|
import Styles from './NSTable.module.css';
|
|
4
8
|
import { Component } from 'react';
|
|
5
9
|
|
|
@@ -16,6 +20,7 @@ export interface NSTableState<RowType>
|
|
|
16
20
|
{
|
|
17
21
|
columns: { [key: string]: string };
|
|
18
22
|
rows: RowType[];
|
|
23
|
+
modalState: boolean
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
export class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableState<RowType>>
|
|
@@ -23,7 +28,7 @@ export class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableSt
|
|
|
23
28
|
constructor(props: NSTableProps<RowType>)
|
|
24
29
|
{
|
|
25
30
|
super(props);
|
|
26
|
-
this.state = { columns: props.columns, rows: props.rows };
|
|
31
|
+
this.state = { columns: props.columns, rows: props.rows, modalState: false };
|
|
27
32
|
}
|
|
28
33
|
setColumns(columns: { [key: string]: string })
|
|
29
34
|
{
|
|
@@ -37,8 +42,12 @@ export class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableSt
|
|
|
37
42
|
{
|
|
38
43
|
let column_keys = Object.keys(this.state.columns);
|
|
39
44
|
return (
|
|
40
|
-
<div className={Styles.ns_project_list_container}>
|
|
41
|
-
<
|
|
45
|
+
<div className={`container ${Styles.ns_project_list_container}`}>
|
|
46
|
+
<section className={Styles.ns_search_input}>
|
|
47
|
+
<NSInputSearch />
|
|
48
|
+
</section>
|
|
49
|
+
<NSSpace size={NSSpaceSizeType.SMALL} />
|
|
50
|
+
<table className={Styles.ns_table} >
|
|
42
51
|
<thead className={Styles.ns_thead}>
|
|
43
52
|
<tr>
|
|
44
53
|
{column_keys.map(column_key => <th key={column_key} scope="col">{this.state.columns[column_key]}</th>)}
|
|
@@ -47,10 +56,10 @@ export class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableSt
|
|
|
47
56
|
<tbody className={Styles.ns_tbody}>
|
|
48
57
|
{
|
|
49
58
|
this.state.rows.map((row, rowIndex) =>
|
|
50
|
-
<tr key={this.props.getRowKey(row, rowIndex)}>
|
|
59
|
+
<tr key={this.props.getRowKey(row, rowIndex)} onClick={() => this.setState({ modalState: !this.state.modalState })}>
|
|
51
60
|
{
|
|
52
61
|
column_keys.map((column, columnIndex) => (
|
|
53
|
-
<td {...this.props.getColumnAttributes(column, columnIndex)}>
|
|
62
|
+
<td {...this.props.getColumnAttributes(column, columnIndex)} data-label={this.state.columns[column]}>
|
|
54
63
|
{this.props.getCell(row, column, rowIndex, columnIndex)}
|
|
55
64
|
</td>
|
|
56
65
|
))
|
|
@@ -59,10 +68,20 @@ export class NSTable<RowType> extends Component<NSTableProps<RowType>, NSTableSt
|
|
|
59
68
|
}
|
|
60
69
|
</tbody >
|
|
61
70
|
</table>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
71
|
+
<NSSpace size={NSSpaceSizeType.MICRO} />
|
|
72
|
+
<section className={Styles.ns_button_group}>
|
|
73
|
+
<NSPagination size={50} page={5} />
|
|
74
|
+
<NSSpace size={NSSpaceSizeType.SMALL} />
|
|
75
|
+
<NSButtonGroup />
|
|
76
|
+
</section>
|
|
77
|
+
<NSSpace size={NSSpaceSizeType.SMALL} />
|
|
78
|
+
<section onClick={() => this.setState({ modalState: !this.state.modalState })} className={Styles.ns_modal} style={{ display: this.state.modalState ? "block" : "none" }}>
|
|
79
|
+
<a><img src='/assets/images/close-vector.png' /></a>
|
|
80
|
+
<p>
|
|
81
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur vitae diam non enim vestibulum interdum. Duis condimentum augue id magna semper rutrum. Nullam sit amet magna in magna gravida vehicula. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. In laoreet, magna id viverra tincidunt, sem odio bibendum justo, vel imperdiet sapien wisi sed libero. Phasellus enim erat, vestibulum vel, aliquam a, posuere eu, velit. Morbi imperdiet, mauris ac auctor dictum, nisl ligula egestas nulla, et sollicitudin sem purus in lacus. Mauris dictum facilisis augue. Phasellus faucibus molestie nisl. Aliquam ante. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo.
|
|
82
|
+
In convallis. Phasellus rhoncus..
|
|
83
|
+
</p>
|
|
84
|
+
</section>
|
|
66
85
|
</div >
|
|
67
86
|
)
|
|
68
87
|
}
|
package/src/main.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSButtonBlue";
|
|
2
2
|
export * from "./components/NSButtonBlueVector";
|
|
3
3
|
export * from "./components/NSButtonGreen";
|
|
4
|
+
export * from "./components/NSButtonGroup";
|
|
4
5
|
export * from "./components/NSButtonRed";
|
|
5
6
|
export * from "./components/NSCard";
|
|
6
7
|
export * from "./components/NSEntityCardBackground";
|