sbx-crm-menu-ui 1.0.0 → 2.0.1-beta.0
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/components/contentMenuComponent/LanguageDropdown.d.ts +9 -2
- package/dist/components/dropdown/Dropdown.d.ts +3 -1
- package/dist/components/menu/TopNavBarComponent/TopNavBarComponent.d.ts +12 -1
- package/dist/components/menu/sidebar/Sidebar.d.ts +11 -1
- package/dist/components/menu/sidebar/subMenuComponent/SubMenuComponent.d.ts +12 -13
- package/dist/index.css +50 -63
- package/dist/index.d.ts +2 -1
- package/dist/index.js +122 -131
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +123 -134
- package/dist/index.modern.js.map +1 -1
- package/dist/types/Common.d.ts +4 -2
- package/dist/utils/utils.d.ts +28 -0
- package/package.json +7 -20
- package/dist/index.test.d.ts +0 -1
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Language {
|
|
3
|
+
code: string;
|
|
4
|
+
label: string;
|
|
5
|
+
flag: string;
|
|
6
|
+
}
|
|
7
|
+
export default function LanguageDropdown(props: {
|
|
8
|
+
languages: Language[];
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { Language } from '../../contentMenuComponent/LanguageDropdown';
|
|
3
|
+
interface Props {
|
|
4
|
+
languages: Language[];
|
|
5
|
+
onChooseLanguage?: (language: Language) => void;
|
|
6
|
+
user: {
|
|
7
|
+
name: string;
|
|
8
|
+
email: string;
|
|
9
|
+
};
|
|
10
|
+
logoSrc?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function TopNavBarComponent(props: Props): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { Route } from '../../../types/Common';
|
|
1
3
|
import React from 'react';
|
|
2
|
-
|
|
4
|
+
interface RoutesData {
|
|
5
|
+
label: string;
|
|
6
|
+
icon: IconDefinition;
|
|
7
|
+
subRoutes: Route[];
|
|
8
|
+
}
|
|
9
|
+
declare const SidebarComponent: (props: {
|
|
10
|
+
routesData: RoutesData[];
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}) => React.JSX.Element;
|
|
3
13
|
export default SidebarComponent;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Route } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
|
|
13
|
-
export { subMenuDataHome, subMenuData, subMenuDataComunications, subMenuDataConfig, subMenuDataDataProviders, subMenuDataForm, subMenuDataReports, subMenuDataMarketing, subMenuDataAnalytics, subMenuDataProcess, };
|
|
1
|
+
import { Route } from '../../../../types/Common';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
interface View {
|
|
4
|
+
path: string;
|
|
5
|
+
name: string;
|
|
6
|
+
root: string;
|
|
7
|
+
permission: string;
|
|
8
|
+
views?: View[];
|
|
9
|
+
}
|
|
10
|
+
export declare const generateSubMenuData: (labels: View[]) => Route[];
|
|
11
|
+
export declare const icons: Record<string, IconDefinition>;
|
|
12
|
+
export {};
|
package/dist/index.css
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
.crm-class-sidebar {
|
|
2
|
-
width: 250px;
|
|
3
|
-
height: 100%;
|
|
4
|
-
color: white;
|
|
5
|
-
position: fixed;
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
overflow-x: hidden;
|
|
9
|
-
padding-top: 20px;
|
|
10
|
-
transition: 0.5s;
|
|
11
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
1
|
*,
|
|
15
2
|
::after,
|
|
16
3
|
::before {
|
|
@@ -19,33 +6,35 @@
|
|
|
19
6
|
|
|
20
7
|
.crm-class-sidebar {
|
|
21
8
|
width: 320px;
|
|
22
|
-
height:
|
|
9
|
+
height: 100vh;
|
|
23
10
|
color: white;
|
|
24
|
-
position: fixed;
|
|
25
|
-
top: 0;
|
|
26
|
-
left: 0;
|
|
27
11
|
overflow-x: hidden;
|
|
28
|
-
padding-top: 20px;
|
|
29
12
|
transition: 0.5s;
|
|
30
13
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
31
14
|
}
|
|
32
15
|
|
|
16
|
+
.crm-class-sidebar-content {
|
|
17
|
+
padding: 100px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
33
20
|
.crm-class-sidebar-list {
|
|
34
21
|
list-style-type: none;
|
|
35
|
-
padding:
|
|
22
|
+
padding: 100px 20px;
|
|
36
23
|
margin: 0;
|
|
37
24
|
color: #555;
|
|
38
25
|
position: relative;
|
|
39
26
|
}
|
|
40
|
-
.crm-class-sidebar-list .
|
|
27
|
+
.crm-class-sidebar-list .crm-class-title {
|
|
28
|
+
text-align: left;
|
|
41
29
|
font-weight: bold;
|
|
42
30
|
margin-bottom: 10px;
|
|
43
31
|
display: block;
|
|
44
32
|
color: #3f6ad8;
|
|
33
|
+
font-size: 10.8px;
|
|
45
34
|
}
|
|
46
35
|
.crm-class-sidebar-list .crm-class-sidebar-li {
|
|
47
36
|
padding: 10px 15px;
|
|
48
|
-
font-size:
|
|
37
|
+
font-size: 13px;
|
|
49
38
|
transition: 0.3s;
|
|
50
39
|
cursor: pointer;
|
|
51
40
|
display: flex;
|
|
@@ -59,14 +48,11 @@
|
|
|
59
48
|
-o-border-radius: 4px;
|
|
60
49
|
}
|
|
61
50
|
|
|
62
|
-
.
|
|
63
|
-
padding
|
|
64
|
-
padding-bottom: 0.5rem;
|
|
65
|
-
padding-left: 0.6rem;
|
|
66
|
-
padding-right: 0.4rem;
|
|
51
|
+
.crm-class-content-sub-menu-items {
|
|
52
|
+
padding: 0.5rem 0.4rem 0.5rem 0.6rem;
|
|
67
53
|
cursor: pointer;
|
|
68
54
|
}
|
|
69
|
-
.
|
|
55
|
+
.crm-class-content-sub-menu-items:hover {
|
|
70
56
|
background-color: #e0f3ff;
|
|
71
57
|
border-radius: 4px;
|
|
72
58
|
-webkit-border-radius: 4px;
|
|
@@ -95,7 +81,7 @@
|
|
|
95
81
|
border-radius: 15px;
|
|
96
82
|
}
|
|
97
83
|
|
|
98
|
-
.
|
|
84
|
+
.crm-class-top-nav-bar {
|
|
99
85
|
background-color: white;
|
|
100
86
|
display: flex;
|
|
101
87
|
align-items: center;
|
|
@@ -104,18 +90,19 @@
|
|
|
104
90
|
padding: 0 1.5rem;
|
|
105
91
|
height: 80px;
|
|
106
92
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
107
|
-
position:
|
|
93
|
+
position: fixed;
|
|
94
|
+
width: 100%;
|
|
108
95
|
z-index: 20;
|
|
109
96
|
}
|
|
110
97
|
|
|
111
|
-
.
|
|
98
|
+
.crm-class-flex-container {
|
|
112
99
|
display: flex;
|
|
113
100
|
align-items: center;
|
|
114
101
|
}
|
|
115
102
|
|
|
116
|
-
.
|
|
117
|
-
width:
|
|
118
|
-
height:
|
|
103
|
+
.crm-class-icon-container {
|
|
104
|
+
width: 40px;
|
|
105
|
+
height: 40px;
|
|
119
106
|
border: none;
|
|
120
107
|
padding: 0;
|
|
121
108
|
outline: none;
|
|
@@ -129,7 +116,7 @@
|
|
|
129
116
|
justify-content: center;
|
|
130
117
|
}
|
|
131
118
|
|
|
132
|
-
.
|
|
119
|
+
.crm-class-top-nav-bar-avatar {
|
|
133
120
|
width: 40px;
|
|
134
121
|
height: 40px;
|
|
135
122
|
border: none;
|
|
@@ -146,78 +133,78 @@
|
|
|
146
133
|
color: white;
|
|
147
134
|
}
|
|
148
135
|
|
|
149
|
-
.
|
|
136
|
+
.crm-class-top-nav-bar-options {
|
|
150
137
|
display: flex;
|
|
151
138
|
margin-left: auto;
|
|
152
139
|
}
|
|
153
140
|
|
|
154
|
-
.
|
|
141
|
+
.crm-class-dropdown {
|
|
155
142
|
position: relative;
|
|
156
143
|
display: inline-flex;
|
|
157
144
|
align-items: center;
|
|
158
145
|
}
|
|
159
146
|
|
|
160
|
-
.
|
|
147
|
+
.crm-class-top-nav-bar-info-user {
|
|
161
148
|
display: flex;
|
|
162
149
|
flex-direction: column;
|
|
163
150
|
}
|
|
164
151
|
|
|
165
|
-
.
|
|
152
|
+
.crm-class-dropdown-content {
|
|
166
153
|
display: none;
|
|
167
154
|
position: absolute;
|
|
168
155
|
background-color: #f9f9f9;
|
|
169
156
|
min-width: 160px;
|
|
170
|
-
box-shadow:
|
|
157
|
+
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
|
171
158
|
padding: 12px 16px;
|
|
172
159
|
z-index: 1;
|
|
173
160
|
}
|
|
174
161
|
|
|
175
|
-
.
|
|
162
|
+
.crm-class-cursor-pointer {
|
|
176
163
|
cursor: pointer;
|
|
177
164
|
}
|
|
178
165
|
|
|
179
|
-
.
|
|
166
|
+
.crm-class-font-10 {
|
|
180
167
|
font-size: 10px;
|
|
181
168
|
}
|
|
182
169
|
|
|
183
|
-
.
|
|
170
|
+
.crm-class-slate-gray {
|
|
184
171
|
color: #495057;
|
|
185
172
|
}
|
|
186
173
|
|
|
187
|
-
.
|
|
174
|
+
.crm-class-ml-20 {
|
|
188
175
|
margin-left: 20px;
|
|
189
176
|
}
|
|
190
177
|
|
|
191
|
-
.
|
|
178
|
+
.crm-class-mr-10 {
|
|
192
179
|
margin-right: 10px;
|
|
193
180
|
}
|
|
194
181
|
|
|
195
|
-
.
|
|
182
|
+
.crm-class-color-icon {
|
|
196
183
|
color: #495057;
|
|
197
184
|
}
|
|
198
185
|
|
|
199
|
-
.
|
|
186
|
+
.crm-class-ml-auto {
|
|
200
187
|
margin-left: auto;
|
|
201
188
|
}
|
|
202
189
|
|
|
203
|
-
.
|
|
190
|
+
.crm-class-list-none {
|
|
204
191
|
list-style-type: none;
|
|
205
192
|
}
|
|
206
193
|
|
|
207
|
-
.
|
|
194
|
+
.crm-class-font-bold {
|
|
208
195
|
font-weight: 900;
|
|
209
196
|
}
|
|
210
197
|
|
|
211
|
-
.
|
|
198
|
+
.crm-class-mt-70 {
|
|
212
199
|
margin-top: 70px;
|
|
213
200
|
}
|
|
214
201
|
|
|
215
|
-
.
|
|
202
|
+
.crm-class-mr-20 {
|
|
216
203
|
margin-right: 20px;
|
|
217
204
|
}
|
|
218
205
|
|
|
219
206
|
/*/*/
|
|
220
|
-
.
|
|
207
|
+
.crm-class-content-flag {
|
|
221
208
|
width: 55px;
|
|
222
209
|
height: 55px;
|
|
223
210
|
border: none;
|
|
@@ -233,35 +220,35 @@
|
|
|
233
220
|
justify-content: center;
|
|
234
221
|
}
|
|
235
222
|
|
|
236
|
-
.
|
|
223
|
+
.crm-class-flag {
|
|
237
224
|
display: inline-block;
|
|
238
225
|
width: 20px;
|
|
239
226
|
height: 15px;
|
|
240
227
|
background-size: cover;
|
|
241
228
|
}
|
|
242
229
|
|
|
243
|
-
.
|
|
230
|
+
.crm-class-flag.large {
|
|
244
231
|
width: 30px;
|
|
245
232
|
height: 20px;
|
|
246
233
|
}
|
|
247
234
|
|
|
248
|
-
.
|
|
235
|
+
.crm-class-flag.US {
|
|
249
236
|
background-image: url("https://flagcdn.com/w20/us.png");
|
|
250
237
|
}
|
|
251
238
|
|
|
252
|
-
.
|
|
239
|
+
.crm-class-flag.ES {
|
|
253
240
|
background-image: url("https://flagcdn.com/w20/es.png");
|
|
254
241
|
}
|
|
255
242
|
|
|
256
|
-
.
|
|
243
|
+
.crm-class-flag.NL {
|
|
257
244
|
background-image: url("https://flagcdn.com/w20/nl.png");
|
|
258
245
|
}
|
|
259
246
|
|
|
260
|
-
.
|
|
247
|
+
.crm-class-dropdown-flag {
|
|
261
248
|
position: relative;
|
|
262
249
|
}
|
|
263
250
|
|
|
264
|
-
.
|
|
251
|
+
.crm-class-dropdown-toggle {
|
|
265
252
|
background: none;
|
|
266
253
|
border: none;
|
|
267
254
|
cursor: pointer;
|
|
@@ -269,7 +256,7 @@
|
|
|
269
256
|
padding: 10px;
|
|
270
257
|
}
|
|
271
258
|
|
|
272
|
-
.
|
|
259
|
+
.crm-class-dropdown-menu {
|
|
273
260
|
display: none;
|
|
274
261
|
position: absolute;
|
|
275
262
|
background-color: white;
|
|
@@ -279,16 +266,16 @@
|
|
|
279
266
|
min-width: 200px;
|
|
280
267
|
}
|
|
281
268
|
|
|
282
|
-
.
|
|
269
|
+
.crm-class-dropdown-menu .crm-class-dropdown-header {
|
|
283
270
|
font-weight: bold;
|
|
284
271
|
margin-bottom: 8px;
|
|
285
272
|
}
|
|
286
273
|
|
|
287
|
-
.
|
|
274
|
+
.crm-class-dropdown-flag:hover .crm-class-dropdown-menu {
|
|
288
275
|
display: block;
|
|
289
276
|
}
|
|
290
277
|
|
|
291
|
-
.
|
|
278
|
+
.crm-class-dropdown-item {
|
|
292
279
|
background: none;
|
|
293
280
|
border: none;
|
|
294
281
|
cursor: pointer;
|
|
@@ -299,7 +286,7 @@
|
|
|
299
286
|
text-align: left;
|
|
300
287
|
}
|
|
301
288
|
|
|
302
|
-
.
|
|
289
|
+
.crm-class-selected-language {
|
|
303
290
|
display: flex;
|
|
304
291
|
align-items: center;
|
|
305
292
|
justify-items: center;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import TopNavBarComponent from './components/menu/TopNavBarComponent/TopNavBarComponent';
|
|
2
2
|
import SidebarComponent from './components/menu/sidebar/Sidebar';
|
|
3
3
|
import './styles.module.scss';
|
|
4
|
-
|
|
4
|
+
import { generateSubMenuData, icons } from './components/menu/sidebar/subMenuComponent/SubMenuComponent';
|
|
5
|
+
export { TopNavBarComponent, SidebarComponent, generateSubMenuData, icons };
|