@visns-studio/visns-components 5.6.8 → 5.6.10
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/package.json +1 -1
- package/src/components/cms/sorting/Item.jsx +24 -18
- package/src/components/cms/sorting/List.jsx +3 -1
- package/src/components/cms/sorting/styles/Item.module.scss +38 -0
- package/src/components/cms/sorting/styles/List.module.scss +74 -0
- package/src/components/crm/TableFilter.jsx +287 -102
- package/src/components/crm/auth/TwoFactorAuth.jsx +7 -9
- package/src/components/crm/auth/styles/TwoFactorAuth.module.scss +154 -25
- package/src/components/crm/examples/FilterExample.jsx +207 -0
- package/src/components/crm/examples/README.md +113 -0
- package/src/components/crm/generic/GenericFormBuilder.jsx +21 -3
- package/src/components/crm/generic/GenericIndex.jsx +244 -87
- package/src/components/crm/generic/styles/GenericFormBuilder.module.scss +57 -29
- package/src/components/crm/generic/styles/GenericSort.module.scss +34 -12
- package/src/components/crm/generic/styles/ReportForm.module.scss +150 -0
- package/src/components/crm/sorting/Item.jsx +22 -18
- package/src/components/crm/sorting/styles/Item.module.scss +31 -10
- package/src/components/crm/sorting/styles/List.module.scss +21 -9
- package/src/components/crm/styles/TableFilter.module.scss +121 -23
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* Report Form Styles */
|
|
2
|
+
|
|
3
|
+
.reportFormContainer {
|
|
4
|
+
width: 100%;
|
|
5
|
+
background: var(--item-color, white);
|
|
6
|
+
border-radius: var(--br, 8px);
|
|
7
|
+
padding: 24px;
|
|
8
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.reportForm {
|
|
12
|
+
width: 100%;
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
15
|
+
gap: 20px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.formTitle {
|
|
19
|
+
grid-column: 1 / -1;
|
|
20
|
+
font-size: 1.25rem;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
color: var(--heading-color, #1f2937);
|
|
23
|
+
margin-bottom: 16px;
|
|
24
|
+
padding-bottom: 8px;
|
|
25
|
+
border-bottom: 1px solid var(--border-color, #e5e7eb);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.formDescription {
|
|
29
|
+
grid-column: 1 / -1;
|
|
30
|
+
font-size: 0.95rem;
|
|
31
|
+
color: var(--muted-color, #6b7280);
|
|
32
|
+
margin-bottom: 20px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.formField {
|
|
36
|
+
width: 100%;
|
|
37
|
+
position: relative;
|
|
38
|
+
margin-bottom: 8px;
|
|
39
|
+
|
|
40
|
+
/* Style improvements for form fields */
|
|
41
|
+
:global(.fi__label) {
|
|
42
|
+
margin-bottom: 6px;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
color: var(--heading-color, #374151);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:global(.react-select__control) {
|
|
48
|
+
border-color: var(--border-color, #d1d5db);
|
|
49
|
+
box-shadow: none;
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
border-color: var(--primary-color, #2563eb);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus-within {
|
|
56
|
+
border-color: var(--primary-color, #2563eb);
|
|
57
|
+
box-shadow: 0 0 0 1px var(--primary-color, #2563eb);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
input,
|
|
62
|
+
select,
|
|
63
|
+
textarea {
|
|
64
|
+
border-radius: var(--br, 6px);
|
|
65
|
+
border: 1px solid var(--border-color, #d1d5db);
|
|
66
|
+
padding: 10px 12px;
|
|
67
|
+
width: 100%;
|
|
68
|
+
font-size: 0.95rem;
|
|
69
|
+
|
|
70
|
+
&:focus {
|
|
71
|
+
outline: none;
|
|
72
|
+
border-color: var(--primary-color, #2563eb);
|
|
73
|
+
box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.fullWidthField {
|
|
79
|
+
grid-column: 1 / -1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.formActions {
|
|
83
|
+
grid-column: 1 / -1;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: flex-end;
|
|
86
|
+
margin-top: 16px;
|
|
87
|
+
padding-top: 16px;
|
|
88
|
+
border-top: 1px solid var(--border-color, #e5e7eb);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.exportButton {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
padding: 12px 28px;
|
|
96
|
+
background-color: var(--primary-color, #2563eb);
|
|
97
|
+
color: white;
|
|
98
|
+
border: none;
|
|
99
|
+
border-radius: var(--br, 6px);
|
|
100
|
+
font-size: 1rem;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
transition: all 0.2s ease;
|
|
104
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
105
|
+
min-width: 140px;
|
|
106
|
+
|
|
107
|
+
svg {
|
|
108
|
+
transition: transform 0.2s ease;
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
position: relative;
|
|
111
|
+
top: -1px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:hover {
|
|
115
|
+
background-color: var(
|
|
116
|
+
--primary-hover-color,
|
|
117
|
+
#1d4ed8
|
|
118
|
+
); /* Darker shade of primary */
|
|
119
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
120
|
+
|
|
121
|
+
svg {
|
|
122
|
+
transform: translateY(-1px);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:focus {
|
|
127
|
+
outline: none;
|
|
128
|
+
box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), 0.3);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:active {
|
|
132
|
+
transform: translateY(1px);
|
|
133
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Responsive adjustments */
|
|
138
|
+
@media (max-width: 768px) {
|
|
139
|
+
.reportForm {
|
|
140
|
+
grid-template-columns: 1fr;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.reportFormContainer {
|
|
144
|
+
padding: 16px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.formActions {
|
|
148
|
+
justify-content: center;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -65,9 +65,9 @@ const SortableItem = ({
|
|
|
65
65
|
|
|
66
66
|
const EditButton = () => (
|
|
67
67
|
<Pencil
|
|
68
|
-
className={styles
|
|
69
|
-
strokeWidth={
|
|
70
|
-
size={
|
|
68
|
+
className={styles.edit}
|
|
69
|
+
strokeWidth={2}
|
|
70
|
+
size={24}
|
|
71
71
|
onClick={(e) => {
|
|
72
72
|
e.preventDefault();
|
|
73
73
|
e.stopPropagation();
|
|
@@ -93,22 +93,26 @@ const SortableItem = ({
|
|
|
93
93
|
|
|
94
94
|
{renderImage(value)}
|
|
95
95
|
|
|
96
|
-
{
|
|
96
|
+
{(handleEdit || handleDelete) && (
|
|
97
|
+
<div className={styles.actionIcons}>
|
|
98
|
+
{renderEditButton()}
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
{handleDelete && (
|
|
101
|
+
<TrashCan
|
|
102
|
+
className={styles.delete}
|
|
103
|
+
strokeWidth={2}
|
|
104
|
+
size={24}
|
|
105
|
+
onClick={(e) => {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
e.stopPropagation();
|
|
108
|
+
handleDelete(
|
|
109
|
+
value.id || containerIndex,
|
|
110
|
+
value.label || value.file_name
|
|
111
|
+
);
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
112
116
|
)}
|
|
113
117
|
</li>
|
|
114
118
|
);
|
|
@@ -1,15 +1,36 @@
|
|
|
1
|
-
.
|
|
2
|
-
width: 100%;
|
|
3
|
-
max-width: 16px;
|
|
1
|
+
.actionIcons {
|
|
4
2
|
position: absolute;
|
|
5
|
-
|
|
6
|
-
top:
|
|
3
|
+
right: 10px;
|
|
4
|
+
top: 50%;
|
|
5
|
+
transform: translateY(-50%);
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 12px;
|
|
8
|
+
align-items: center;
|
|
9
|
+
z-index: 10;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.edit {
|
|
13
|
+
width: 22px;
|
|
14
|
+
height: 22px;
|
|
15
|
+
color: var(--primary-color);
|
|
16
|
+
transition: color 0.2s ease;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
display: block;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
color: var(--secondary-color);
|
|
22
|
+
}
|
|
7
23
|
}
|
|
8
24
|
|
|
9
25
|
.delete {
|
|
10
|
-
width:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
26
|
+
width: 22px;
|
|
27
|
+
height: 22px;
|
|
28
|
+
color: var(--primary-color);
|
|
29
|
+
transition: color 0.2s ease;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: block;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
color: #d32f2f;
|
|
35
|
+
}
|
|
15
36
|
}
|
|
@@ -10,22 +10,26 @@
|
|
|
10
10
|
list-style: none;
|
|
11
11
|
|
|
12
12
|
@media (min-width: 576px) {
|
|
13
|
-
grid-template-columns: repeat(
|
|
13
|
+
grid-template-columns: repeat(1, 1fr);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@media (min-width: 992px) {
|
|
17
|
-
grid-template-columns: repeat(
|
|
17
|
+
grid-template-columns: repeat(1, 1fr);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
li {
|
|
21
21
|
display: flex;
|
|
22
|
-
justify-content:
|
|
22
|
+
justify-content: flex-start;
|
|
23
23
|
align-items: center;
|
|
24
24
|
flex-wrap: wrap;
|
|
25
|
-
border-radius:
|
|
25
|
+
border-radius: 6px;
|
|
26
26
|
border: 1px solid rgba(var(--primary-rgb), 0.2);
|
|
27
27
|
box-shadow: 0px 0px 10px rgba(var(--primary-rgb), 0.1);
|
|
28
|
-
padding: 0.
|
|
28
|
+
padding: 0.8rem 5rem 0.8rem 2rem;
|
|
29
|
+
margin-bottom: 0.5rem;
|
|
30
|
+
font-size: 0.9rem;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
transition: all 0.2s ease;
|
|
29
33
|
|
|
30
34
|
box-sizing: border-box;
|
|
31
35
|
cursor: pointer;
|
|
@@ -34,12 +38,20 @@
|
|
|
34
38
|
color: var(--paragraph-color);
|
|
35
39
|
user-select: none;
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
&:hover {
|
|
42
|
+
border-color: rgba(var(--primary-rgb), 0.4);
|
|
43
|
+
box-shadow: 0px 0px 12px rgba(var(--primary-rgb), 0.2);
|
|
44
|
+
transform: translateY(-1px);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> svg:first-child {
|
|
38
48
|
width: 100%;
|
|
39
|
-
max-width:
|
|
49
|
+
max-width: 18px;
|
|
40
50
|
position: absolute;
|
|
41
|
-
left:
|
|
42
|
-
top:
|
|
51
|
+
left: 6px;
|
|
52
|
+
top: 50%;
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
color: var(--primary-color);
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
57
|
|
|
@@ -2,61 +2,143 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|
|
5
|
+
margin-bottom: 20px;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
.tableFilter {
|
|
8
9
|
list-style: none;
|
|
9
10
|
padding: 0;
|
|
10
11
|
margin: 0;
|
|
11
|
-
font-size:
|
|
12
|
+
font-size: 0.9rem;
|
|
12
13
|
width: 100%;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Parent category styling */
|
|
20
|
+
.parentItem {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.parentItem:last-child {
|
|
25
|
+
border-bottom: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.parentLink {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding: 8px 16px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
font-size: 0.9rem;
|
|
35
|
+
background-color: #000;
|
|
36
|
+
color: #fff;
|
|
37
|
+
transition: all 0.2s ease;
|
|
38
|
+
position: relative;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.parentLink:hover {
|
|
43
|
+
background-color: #222 !important;
|
|
44
|
+
color: #fff !important;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Arrow indicator for parent categories */
|
|
49
|
+
.arrow {
|
|
50
|
+
font-size: 7px;
|
|
51
|
+
transition: transform 0.3s ease;
|
|
52
|
+
margin-left: 8px;
|
|
53
|
+
color: rgba(255, 255, 255, 0.8);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.arrowDown {
|
|
57
|
+
transform: rotate(90deg);
|
|
13
58
|
}
|
|
14
59
|
|
|
60
|
+
/* Child menu styling */
|
|
15
61
|
.collapsibleMenu {
|
|
16
62
|
max-height: 0;
|
|
17
63
|
overflow: hidden;
|
|
18
64
|
transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
|
|
19
65
|
opacity: 0;
|
|
66
|
+
background-color: #f5f5f5;
|
|
20
67
|
}
|
|
21
68
|
|
|
22
69
|
.visibleMenu {
|
|
23
|
-
max-height: 2000px; /* Adjust
|
|
70
|
+
max-height: 2000px; /* Adjust based on expected height */
|
|
24
71
|
opacity: 1;
|
|
25
72
|
}
|
|
26
73
|
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
74
|
+
.childItem {
|
|
75
|
+
margin: 0;
|
|
76
|
+
position: relative;
|
|
77
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.03);
|
|
31
78
|
}
|
|
32
79
|
|
|
33
|
-
.
|
|
34
|
-
|
|
80
|
+
.childItem:last-child {
|
|
81
|
+
border-bottom: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.childLink {
|
|
85
|
+
padding: 6px 16px 6px 26px;
|
|
86
|
+
background-color: #f5f5f5;
|
|
87
|
+
color: #333;
|
|
88
|
+
font-weight: normal;
|
|
89
|
+
font-size: 0.85rem;
|
|
90
|
+
display: block;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.childLink:hover {
|
|
95
|
+
background-color: #e8e8e8 !important;
|
|
96
|
+
color: #000 !important;
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.childIndicator {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
margin-right: 8px;
|
|
103
|
+
font-size: 8px;
|
|
104
|
+
color: #999;
|
|
35
105
|
}
|
|
36
106
|
|
|
37
|
-
|
|
38
|
-
|
|
107
|
+
/* Active states */
|
|
108
|
+
.subactive {
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
background: #000 !important;
|
|
111
|
+
color: #fff !important;
|
|
39
112
|
}
|
|
40
113
|
|
|
114
|
+
.subactivechildren {
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
background-color: #f0f0f0 !important;
|
|
117
|
+
color: #000 !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Base link styling */
|
|
41
121
|
.link {
|
|
42
122
|
display: block;
|
|
43
|
-
padding:
|
|
123
|
+
padding: 6px 16px;
|
|
44
124
|
text-decoration: none;
|
|
45
|
-
background:
|
|
46
|
-
color:
|
|
47
|
-
|
|
48
|
-
transition:
|
|
125
|
+
background: #f5f5f5;
|
|
126
|
+
color: #333;
|
|
127
|
+
font-size: 0.85rem;
|
|
128
|
+
transition: all 0.2s ease;
|
|
129
|
+
cursor: pointer;
|
|
49
130
|
}
|
|
50
131
|
|
|
51
132
|
.link:hover {
|
|
52
|
-
background:
|
|
53
|
-
color:
|
|
133
|
+
background: #e8e8e8 !important;
|
|
134
|
+
color: #000 !important;
|
|
135
|
+
text-decoration: none;
|
|
54
136
|
}
|
|
55
137
|
|
|
56
138
|
.activetab button {
|
|
57
139
|
font-weight: bold;
|
|
58
|
-
background:
|
|
59
|
-
color:
|
|
140
|
+
background: #e0e0e0 !important;
|
|
141
|
+
color: #333 !important;
|
|
60
142
|
}
|
|
61
143
|
|
|
62
144
|
/* Mobile menu toggle button */
|
|
@@ -65,9 +147,9 @@
|
|
|
65
147
|
align-items: center;
|
|
66
148
|
justify-content: space-between;
|
|
67
149
|
padding: 12px 15px;
|
|
68
|
-
background:
|
|
150
|
+
background: #000;
|
|
69
151
|
color: white;
|
|
70
|
-
border-radius:
|
|
152
|
+
border-radius: 8px;
|
|
71
153
|
cursor: pointer;
|
|
72
154
|
margin-bottom: 10px;
|
|
73
155
|
border: none;
|
|
@@ -128,11 +210,27 @@
|
|
|
128
210
|
max-height: 1000px;
|
|
129
211
|
overflow-y: auto;
|
|
130
212
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
131
|
-
border-radius:
|
|
213
|
+
border-radius: 8px;
|
|
132
214
|
margin-bottom: 10px;
|
|
215
|
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.parentLink {
|
|
219
|
+
padding: 10px 16px; /* Slightly larger touch targets for mobile */
|
|
220
|
+
font-size: 0.9rem;
|
|
133
221
|
}
|
|
134
222
|
|
|
135
223
|
.link {
|
|
136
|
-
padding:
|
|
224
|
+
padding: 10px 16px; /* Slightly larger touch targets for mobile */
|
|
225
|
+
font-size: 0.85rem;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.childLink {
|
|
229
|
+
padding: 8px 16px 8px 26px;
|
|
230
|
+
font-size: 0.85rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.collapsibleMenu {
|
|
234
|
+
border-left: none;
|
|
137
235
|
}
|
|
138
236
|
}
|