proje-react-panel 1.0.0 → 1.0.2
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/.idea/modules.xml +1 -1
- package/.idea/vcs.xml +3 -1
- package/dist/bundle.css +128 -0
- package/dist/{list → components/list}/List.d.ts +2 -3
- package/dist/index.cjs.js +12 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.esm.js +12 -1
- package/dist/screens/ControllerCreate.d.ts +0 -1
- package/dist/{getFields.d.ts → utils/getFields.d.ts} +1 -1
- package/dist/{storeData.d.ts → utils/storeData.d.ts} +1 -1
- package/package.json +9 -5
- package/src/api/crudApi.ts +16 -0
- package/src/components/Panel.tsx +13 -0
- package/src/components/layout/Layout.tsx +18 -0
- package/src/components/layout/SideBar.tsx +23 -0
- package/src/components/list/List.tsx +75 -0
- package/src/declerations/Cell.ts +37 -0
- package/src/declerations/Crud.ts +20 -0
- package/src/index.ts +6 -0
- package/src/screens/ControllerCreate.tsx +13 -0
- package/src/screens/ControllerDetails.tsx +34 -0
- package/src/screens/ControllerEdit.tsx +31 -0
- package/src/screens/ControllerList.tsx +40 -0
- package/src/screens/Form.tsx +67 -0
- package/src/styles/form.scss +58 -0
- package/src/styles/index.scss +4 -0
- package/src/styles/layout.scss +13 -0
- package/src/styles/list.scss +39 -0
- package/src/styles/sidebar.scss +76 -0
- package/src/types/Screen.ts +4 -0
- package/src/types/ScreenCreatorData.ts +9 -0
- package/src/utils/createScreens.ts +5 -0
- package/src/utils/getFields.ts +21 -0
- package/src/utils/getScreenForRoutes.tsx +44 -0
- package/src/utils/storeData.ts +7 -0
- /package/.idea/{react-panel.iml → proje-react-panel.iml} +0 -0
- /package/dist/{Panel.d.ts → components/Panel.d.ts} +0 -0
- /package/dist/{createScreens.d.ts → utils/createScreens.d.ts} +0 -0
- /package/dist/{getScreenForRoutes.d.ts → utils/getScreenForRoutes.d.ts} +0 -0
package/.idea/modules.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ProjectModuleManager">
|
4
4
|
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/react-panel.iml" filepath="$PROJECT_DIR$/.idea/react-panel.iml" />
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/proje-react-panel.iml" filepath="$PROJECT_DIR$/.idea/proje-react-panel.iml" />
|
6
6
|
</modules>
|
7
7
|
</component>
|
8
8
|
</project>
|
package/.idea/vcs.xml
CHANGED
package/dist/bundle.css
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
.sidebar {
|
2
|
+
position: relative;
|
3
|
+
background-color: #f5f5f5;
|
4
|
+
height: 100vh;
|
5
|
+
transition: width 0.3s ease;
|
6
|
+
border-right: 1px solid #e0e0e0; }
|
7
|
+
.sidebar.open {
|
8
|
+
width: 250px; }
|
9
|
+
.sidebar.closed {
|
10
|
+
width: 60px; }
|
11
|
+
.sidebar.closed .nav-links a span {
|
12
|
+
display: none; }
|
13
|
+
.sidebar .toggle-button {
|
14
|
+
position: absolute;
|
15
|
+
top: 10px;
|
16
|
+
right: -12px;
|
17
|
+
width: 24px;
|
18
|
+
height: 24px;
|
19
|
+
border-radius: 50%;
|
20
|
+
background-color: #ffffff;
|
21
|
+
border: 1px solid #e0e0e0;
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
justify-content: center;
|
25
|
+
cursor: pointer;
|
26
|
+
z-index: 10; }
|
27
|
+
.sidebar .toggle-button:hover {
|
28
|
+
background-color: #f0f0f0; }
|
29
|
+
.sidebar .nav-links {
|
30
|
+
display: flex;
|
31
|
+
flex-direction: column;
|
32
|
+
padding: 2rem 1rem;
|
33
|
+
height: 100%; }
|
34
|
+
.sidebar .nav-links a {
|
35
|
+
padding: 0.75rem 1rem;
|
36
|
+
margin-bottom: 0.5rem;
|
37
|
+
color: #333;
|
38
|
+
text-decoration: none;
|
39
|
+
border-radius: 4px;
|
40
|
+
font-weight: 500; }
|
41
|
+
.sidebar .nav-links a:hover {
|
42
|
+
background-color: rgba(0, 0, 0, 0.05); }
|
43
|
+
.sidebar .nav-links a.active {
|
44
|
+
background-color: rgba(0, 0, 0, 0.1); }
|
45
|
+
.sidebar .nav-links .bottom-link {
|
46
|
+
margin-top: auto; }
|
47
|
+
.sidebar .nav-links .bottom-link a {
|
48
|
+
color: #666;
|
49
|
+
font-weight: 400; }
|
50
|
+
|
51
|
+
.form-wrapper {
|
52
|
+
max-width: 400px;
|
53
|
+
padding: 20px;
|
54
|
+
background-color: #f9f9f9;
|
55
|
+
border-radius: 10px;
|
56
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
|
57
|
+
.form-wrapper form {
|
58
|
+
display: flex;
|
59
|
+
flex-direction: column; }
|
60
|
+
.form-wrapper .form-field {
|
61
|
+
margin-bottom: 16px; }
|
62
|
+
.form-wrapper .form-field label {
|
63
|
+
font-weight: bold;
|
64
|
+
margin-bottom: 6px;
|
65
|
+
display: block;
|
66
|
+
color: #333; }
|
67
|
+
.form-wrapper .form-field input[type='text'] {
|
68
|
+
padding: 10px;
|
69
|
+
font-size: 16px;
|
70
|
+
border: 1px solid #ccc;
|
71
|
+
border-radius: 5px;
|
72
|
+
width: 100%;
|
73
|
+
transition: border-color 0.2s; }
|
74
|
+
.form-wrapper .form-field input[type='text']:focus {
|
75
|
+
border-color: #007bff;
|
76
|
+
outline: none; }
|
77
|
+
.form-wrapper .form-field .error-message {
|
78
|
+
margin-top: 4px;
|
79
|
+
font-size: 14px;
|
80
|
+
color: #ff4d4f; }
|
81
|
+
.form-wrapper .submit-button {
|
82
|
+
padding: 12px;
|
83
|
+
font-size: 18px;
|
84
|
+
background-color: #007bff;
|
85
|
+
color: white;
|
86
|
+
border: none;
|
87
|
+
border-radius: 5px;
|
88
|
+
cursor: pointer;
|
89
|
+
transition: background-color 0.2s; }
|
90
|
+
.form-wrapper .submit-button:hover {
|
91
|
+
background-color: #0056b3; }
|
92
|
+
|
93
|
+
.layout {
|
94
|
+
display: flex;
|
95
|
+
min-height: 100vh;
|
96
|
+
width: 100%; }
|
97
|
+
.layout .content {
|
98
|
+
flex: 1;
|
99
|
+
padding: 1rem;
|
100
|
+
overflow-y: auto;
|
101
|
+
transition: margin-left 0.3s ease; }
|
102
|
+
|
103
|
+
.list-wrapper {
|
104
|
+
width: 100%;
|
105
|
+
padding: 16px;
|
106
|
+
background-color: #ffffff;
|
107
|
+
border-radius: 8px;
|
108
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); }
|
109
|
+
.list-wrapper .header {
|
110
|
+
font-size: 24px;
|
111
|
+
font-weight: bold;
|
112
|
+
text-align: center;
|
113
|
+
margin-bottom: 20px; }
|
114
|
+
.list-wrapper .list-table {
|
115
|
+
width: 100%;
|
116
|
+
border-collapse: collapse; }
|
117
|
+
.list-wrapper .list-table th,
|
118
|
+
.list-wrapper .list-table td {
|
119
|
+
padding: 12px 16px;
|
120
|
+
text-align: left;
|
121
|
+
border-bottom: 1px solid #ddd; }
|
122
|
+
.list-wrapper .list-table th {
|
123
|
+
background-color: #007bff;
|
124
|
+
color: white; }
|
125
|
+
.list-wrapper .list-table tr:nth-child(even) {
|
126
|
+
background-color: #f9f9f9; }
|
127
|
+
.list-wrapper .list-table tr:hover {
|
128
|
+
background-color: #e8f4ff; }
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import '
|
3
|
-
import {
|
4
|
-
import { Screen } from '../types/Screen';
|
2
|
+
import { CellOptions } from '../../declerations/Cell';
|
3
|
+
import { Screen } from '../../types/Screen';
|
5
4
|
interface ListProps<T> {
|
6
5
|
data: T[];
|
7
6
|
cells: CellOptions<T>[];
|