l-min-components 1.0.601 → 1.0.607

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/components/AdminRolesPermission/assets/images/avatar.png +0 -0
  3. package/src/components/AdminRolesPermission/assets/images/roles_img.png +0 -0
  4. package/src/components/AdminRolesPermission/assets/images/shield_big.png +0 -0
  5. package/src/components/AdminRolesPermission/assets/svg/backArrow.jsx +30 -0
  6. package/src/components/AdminRolesPermission/assets/svg/close-red.jsx +18 -0
  7. package/src/components/AdminRolesPermission/assets/svg/close.jsx +25 -0
  8. package/src/components/AdminRolesPermission/assets/svg/englishFlag.jsx +37 -0
  9. package/src/components/AdminRolesPermission/assets/svg/frenchFlag.jsx +40 -0
  10. package/src/components/AdminRolesPermission/assets/svg/germanFlag.jsx +31 -0
  11. package/src/components/AdminRolesPermission/assets/svg/list.jsx +30 -0
  12. package/src/components/AdminRolesPermission/assets/svg/pencil.jsx +25 -0
  13. package/src/components/AdminRolesPermission/assets/svg/portugalFlag.jsx +40 -0
  14. package/src/components/AdminRolesPermission/create/admins.jsx +125 -0
  15. package/src/components/AdminRolesPermission/create/data.js +304 -0
  16. package/src/components/AdminRolesPermission/create/index.jsx +42 -0
  17. package/src/components/AdminRolesPermission/create/index.styled.js +415 -0
  18. package/src/components/AdminRolesPermission/create/permissions.jsx +165 -0
  19. package/src/components/AdminRolesPermission/create/role-name.jsx +92 -0
  20. package/src/components/AdminRolesPermission/index.jsx +165 -0
  21. package/src/components/AdminRolesPermission/index.styled.js +268 -0
  22. package/src/components/AdminRolesPermission/main.jsx +11 -0
  23. package/src/components/AdminRolesPermission/modals/index.styled.js +126 -0
  24. package/src/components/AdminRolesPermission/modals/preview-modal.jsx +89 -0
  25. package/src/components/AdminRolesPermission/preview-panels/admins-panel.jsx +50 -0
  26. package/src/components/AdminRolesPermission/preview-panels/assignees-panel.jsx +62 -0
  27. package/src/components/AdminRolesPermission/preview-panels/index.styled.js +320 -0
  28. package/src/components/AdminRolesPermission/preview-panels/unassigned.jsx +37 -0
  29. package/src/components/AdminSecuritySettings/2fa/index.styled.js +0 -1
  30. package/src/components/AdminSecuritySettings/index.styled.js +1 -0
  31. package/src/components/AdminSecuritySettings/modals/otp-password-modal.jsx +0 -1
  32. package/src/components/AdminSecuritySettings/password/change-password.jsx +1 -0
@@ -0,0 +1,415 @@
1
+ import styled from "styled-components";
2
+
3
+ export const AdminRolesCreateContainer = styled.div`
4
+ .hr_line {
5
+ border-radius: 31px;
6
+ background: #d9d9d9;
7
+ height: 100vh;
8
+ width: 1px;
9
+ }
10
+
11
+ .arp_header {
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: space-between;
15
+ margin-bottom: 20px;
16
+
17
+ .arp_title {
18
+ color: #1c2434;
19
+ font-size: 18px;
20
+ font-weight: 700;
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 10px;
24
+ span {
25
+ display: flex;
26
+ align-items: center;
27
+ }
28
+ }
29
+
30
+ .arp_ref {
31
+ color: #64748b;
32
+ font-size: 16px;
33
+ font-weight: 600;
34
+ line-height: normal;
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 8px;
38
+
39
+ span {
40
+ color: #3c50e0;
41
+ }
42
+
43
+ .slash {
44
+ color: #64748b;
45
+ }
46
+ }
47
+ }
48
+
49
+ .arp_create_row {
50
+ display: flex;
51
+ width: 100%;
52
+
53
+ .arp_detail_one {
54
+ width: 40%;
55
+ }
56
+
57
+ .arp_role_list {
58
+ width: 58%;
59
+ }
60
+ }
61
+ `;
62
+
63
+ export const RoleNameContainer = styled.div`
64
+ padding-right: 31px;
65
+
66
+ .rl_title {
67
+ color: #c6cccc;
68
+ font-size: 40px;
69
+ font-weight: 700;
70
+ margin-bottom: 20px;
71
+ }
72
+
73
+ .rl_perm_txt {
74
+ color: #4a4d4d;
75
+ font-size: 20px;
76
+ font-weight: 600;
77
+ letter-spacing: 0.4px;
78
+ margin-bottom: 6px;
79
+ }
80
+ .rl_perm_subtxt {
81
+ color: #adb2b2;
82
+ font-size: 16px;
83
+ font-weight: 400;
84
+ letter-spacing: 0.32px;
85
+ margin-bottom: 16px;
86
+ }
87
+ .role_list_row {
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 10px;
91
+ margin-bottom: 16px;
92
+
93
+ .rlr_col {
94
+ padding: 8px;
95
+ height: 28px;
96
+ border-radius: 44px;
97
+ border: 1px solid #099;
98
+ background: rgba(0, 194, 194, 0.1);
99
+ display: flex;
100
+ gap: 10px;
101
+ align-items: center;
102
+ color: #099;
103
+ font-size: 12px;
104
+ font-weight: 500;
105
+ letter-spacing: 0.24px;
106
+
107
+ span {
108
+ border-radius: 100%;
109
+ background: #00c2c2;
110
+ width: 16px;
111
+ height: 16px;
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: center;
115
+ color: #fff;
116
+ font-size: 12px;
117
+ font-weight: 500;
118
+ letter-spacing: 0.24px;
119
+ }
120
+ }
121
+
122
+ .rlr_others {
123
+ margin-left: 6px;
124
+ color: #099;
125
+ font-size: 15px;
126
+ font-weight: 700;
127
+ display: flex;
128
+ align-items: center;
129
+ }
130
+ }
131
+
132
+ .admins_row {
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 6px;
136
+ margin-bottom: 16px;
137
+
138
+ .adm_others {
139
+ margin-left: 6px;
140
+ color: #00c2c2;
141
+ font-size: 16px;
142
+ font-weight: 600;
143
+ display: flex;
144
+ align-items: center;
145
+ }
146
+
147
+ .adm_img_group {
148
+ position: relative;
149
+ display: flex;
150
+ align-items: center;
151
+ max-width: 90px;
152
+ width: 100%;
153
+
154
+ .adr_img {
155
+ width: 38px;
156
+ height: 38px;
157
+ border-radius: 100%;
158
+ border: 1px solid #c6cccc;
159
+ background: #c6cccc;
160
+
161
+ &:nth-child(2) {
162
+ position: absolute;
163
+ left: 26px;
164
+ }
165
+ &:nth-child(3) {
166
+ position: absolute;
167
+ left: 53px;
168
+ }
169
+ img {
170
+ width: 100%;
171
+ border-radius: 100%;
172
+ }
173
+ }
174
+ }
175
+ }
176
+ `;
177
+
178
+ export const PermissionsContainer = styled.div`
179
+ padding-left: 25px;
180
+
181
+ .pm_header {
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: space-between;
185
+ gap: 24px;
186
+ margin-bottom: 26px;
187
+
188
+ .pm_title {
189
+ color: #4a4d4d;
190
+ font-size: 24px;
191
+ font-weight: 700;
192
+ line-height: normal;
193
+ }
194
+ }
195
+ `;
196
+
197
+ export const PermissionsAccordion = styled.div`
198
+ border-radius: 12px;
199
+ background: #f5f7f7;
200
+ padding: 12px;
201
+ margin-bottom: 20px;
202
+ transition: 0.3 all;
203
+
204
+ .rc-accordion-toggle {
205
+ position: relative;
206
+ display: flex;
207
+ justify-content: space-between;
208
+ color: #636666;
209
+ align-items: center;
210
+ font-size: 16px;
211
+ font-weight: 700;
212
+
213
+ span {
214
+ display: flex;
215
+ align-items: center;
216
+ justify-content: center;
217
+ }
218
+
219
+ .rc_sl {
220
+ display: flex;
221
+ gap: 8px;
222
+ align-items: center;
223
+ .adm_check > span {
224
+ border-radius: 8px;
225
+ }
226
+
227
+ .rc-accordion-icon {
228
+ margin-left: 12px;
229
+ }
230
+ }
231
+ }
232
+
233
+ .rc-collapse {
234
+ position: relative;
235
+ height: 0;
236
+ overflow: hidden;
237
+ transition: height 0.35s ease;
238
+
239
+ .rc_body_main {
240
+ border-bottom: 1px solid #d9d9d9;
241
+ padding: 10px 0;
242
+
243
+ .rcb_header {
244
+ color: #616161;
245
+ font-size: 16px;
246
+ font-weight: 400;
247
+ line-height: normal;
248
+ display: flex;
249
+ align-items: center;
250
+ gap: 16px;
251
+ justify-content: space-between;
252
+ margin-bottom: 12px;
253
+ }
254
+
255
+ .rcb_body {
256
+ display: flex;
257
+ gap: 20px;
258
+ justify-content: space-between;
259
+
260
+ .rcb_lang_list {
261
+ display: flex;
262
+ align-items: center;
263
+ flex-wrap: wrap;
264
+ gap: 8px;
265
+
266
+ .rcb_lang_box {
267
+ border-radius: 48px;
268
+ background: #dfe5e5;
269
+ padding: 6px;
270
+ height: 31px;
271
+ display: flex;
272
+ align-items: center;
273
+ gap: 6px;
274
+ }
275
+ }
276
+ .sel_lang_dropdown {
277
+ width: 230px;
278
+ height: 44px;
279
+ display: flex;
280
+ align-items: center;
281
+ justify-content: space-between;
282
+ padding: 10px 20px;
283
+ color: #adb2b2;
284
+ font-size: 16px;
285
+ font-weight: 400;
286
+ letter-spacing: 0.32px;
287
+ border-radius: 12px;
288
+ border: 1px solid #c6cccc;
289
+ background: #fff;
290
+ }
291
+ }
292
+ }
293
+ }
294
+ .rc-collapse.show {
295
+ height: auto;
296
+ }
297
+
298
+ .rc-accordion-toggle.active .rc-accordion-icon {
299
+ transform: rotate(180deg);
300
+ }
301
+ `;
302
+
303
+ export const AdminsContainer = styled.div`
304
+ padding-left: 25px;
305
+
306
+ .ad_header {
307
+ display: flex;
308
+ align-items: center;
309
+ justify-content: space-between;
310
+ gap: 24px;
311
+ margin-bottom: 26px;
312
+
313
+ .ad_title {
314
+ color: #4a4d4d;
315
+ font-size: 24px;
316
+ font-weight: 700;
317
+ line-height: normal;
318
+ }
319
+ }
320
+
321
+ .ad_filter_row {
322
+ display: flex;
323
+ align-items: center;
324
+ gap: 11px;
325
+ width: 100%;
326
+ justify-content: space-between;
327
+
328
+ .ad_drop_filter {
329
+ position: relative;
330
+ }
331
+
332
+ .ad_filter_box {
333
+ border-radius: 12px;
334
+ border: 1px solid #c6cccc;
335
+ background: #fff;
336
+ min-width: 170px;
337
+ height: 44px;
338
+ padding: 10px 20px;
339
+ display: flex;
340
+ gap: 10px;
341
+ align-items: center;
342
+ color: #636666;
343
+ font-size: 14px;
344
+ font-weight: 600;
345
+ }
346
+
347
+ .ad_filter_body {
348
+ position: absolute;
349
+ top: 50px;
350
+ left: 0;
351
+ min-width: 170px;
352
+ border-radius: 8px;
353
+ background: #fff;
354
+ box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.1);
355
+ height: 236px;
356
+ padding: 8px;
357
+ .afb_item {
358
+ padding: 8px;
359
+ color: #1c1c1c;
360
+ font-family: "Inter";
361
+ font-size: 14px;
362
+ font-weight: 400;
363
+ }
364
+ }
365
+ }
366
+
367
+ .ad_body {
368
+ .ad_list_row {
369
+ display: flex;
370
+ padding: 14px 0;
371
+ align-items: center;
372
+ border-bottom: 1px solid #dfe5e5;
373
+
374
+ .adl_box {
375
+ margin-right: 16px;
376
+ .adm_check > span {
377
+ border-radius: 8px;
378
+ }
379
+ }
380
+
381
+ .adl_wrapper {
382
+ display: flex;
383
+ gap: 8px;
384
+ align-items: center;
385
+ .adl_img {
386
+ width: 38px;
387
+ height: 38px;
388
+ background: #c6cccc;
389
+ border-radius: 100%;
390
+ img {
391
+ width: 100%;
392
+ border-radius: 100%;
393
+ }
394
+ }
395
+
396
+ .adl_title {
397
+ color: #03091d;
398
+ font-size: 16px;
399
+ font-weight: 600;
400
+ margin-bottom: 2px;
401
+ }
402
+
403
+ .adl_stat {
404
+ padding: 1px 6px;
405
+ border-radius: 37px;
406
+ background: #f5f7f7;
407
+ color: #949999;
408
+ font-size: 12px;
409
+ font-weight: 600;
410
+ cursor: pointer;
411
+ }
412
+ }
413
+ }
414
+ }
415
+ `;
@@ -0,0 +1,165 @@
1
+ import React, { useState, useRef } from "react";
2
+ import { PermissionsAccordion, PermissionsContainer } from "./index.styled";
3
+ import ButtonComponent from "../../button";
4
+ import { permissionsData } from "./data";
5
+ import { IoChevronDown } from "react-icons/io5";
6
+ import Checkbox from "../../checkBoxes/checkbox/index2";
7
+ import { EnglishFlag } from "../assets/svg/englishFlag";
8
+ import { CloseRedIcon } from "../assets/svg/close-red";
9
+ import { PortugalFlag } from "../assets/svg/portugalFlag";
10
+ import { FrenchFlag } from "../assets/svg/frenchFlag";
11
+ import { GermanFlag } from "../assets/svg/germanFlag";
12
+ import ToggleButtonComponent from "../../toggle button";
13
+ import { FaChevronDown } from "react-icons/fa";
14
+ import PreviewModal from "../modals/preview-modal";
15
+
16
+ const Permissions = () => {
17
+ const contentEl = useRef();
18
+ const [active, setActive] = useState(null);
19
+ const [toggleValue, setToggleValue] = useState(false);
20
+ const [addModal, setAddModal] = useState(false);
21
+
22
+ const handleToggle = (index) => {
23
+ if (active === index) {
24
+ setActive(null);
25
+ } else {
26
+ setActive(index);
27
+ }
28
+ };
29
+ return (
30
+ <PermissionsContainer>
31
+ <div className="pm_header">
32
+ <p className="pm_title">Permissions</p>
33
+ <ButtonComponent
34
+ text={"Save & Add"}
35
+ styles={{ width: "120px", padding: 10, height: 40 }}
36
+ onClick={(e) => {
37
+ e.preventDefault();
38
+ setAddModal(true)
39
+ }}
40
+ />
41
+ </div>
42
+
43
+ <div className="pm_body">
44
+ {permissionsData?.map((item, idx) => (
45
+ <PermissionsAccordion key={idx}>
46
+ <div
47
+ className={`rc-accordion-toggle ${
48
+ active === idx ? "active" : ""
49
+ }`}
50
+ onClick={() => handleToggle(idx)}
51
+ >
52
+ {item?.title}
53
+
54
+ <div className="rc_sl" >
55
+ {active === idx && (
56
+ <span onClick={(e) => {
57
+ e.stopPropagation();
58
+ }}>
59
+ <Checkbox
60
+ label=""
61
+ color="#ff9900"
62
+ defaultValue={false}
63
+ // onChange={handleChange}
64
+ className="adm_check"
65
+ />
66
+ All Permissions
67
+ </span>
68
+ )}
69
+
70
+ <span className="rc-accordion-icon">
71
+ <IoChevronDown />
72
+ </span>
73
+ </div>
74
+ </div>
75
+
76
+ <div
77
+ ref={contentEl}
78
+ className={`rc-collapse ${active === idx ? "show" : ""}`}
79
+ style={active === idx ? { height: "auto" } : { height: "0px" }}
80
+ >
81
+ <div className="rc_body_main">
82
+ <div className="rcb_header">
83
+ Permission to create content in any base language
84
+ <div className="rc_toggle">
85
+ <ToggleButtonComponent
86
+ value={toggleValue}
87
+ // onClick={() => setToggleValue(!toggleValue)}
88
+ />
89
+ </div>
90
+ </div>
91
+
92
+ <div className="rcb_body">
93
+ <div className="rcb_lang_list">
94
+ <div className="rcb_lang_box">
95
+ <EnglishFlag /> English US <CloseRedIcon />
96
+ </div>
97
+ <div className="rcb_lang_box">
98
+ <PortugalFlag />
99
+ Portugese
100
+ <CloseRedIcon />
101
+ </div>
102
+ <div className="rcb_lang_box">
103
+ <FrenchFlag /> French <CloseRedIcon />
104
+ </div>
105
+ <div className="rcb_lang_box">
106
+ <GermanFlag /> German
107
+ <CloseRedIcon />
108
+ </div>
109
+ </div>
110
+
111
+ <div className="sel_lang_dropdown">
112
+ Select Language <FaChevronDown />{" "}
113
+ </div>
114
+ </div>
115
+ </div>
116
+ <div className="rc_body_main">
117
+ <div className="rcb_header">
118
+ Permission to review versions of a base language’s content -
119
+ level 1 
120
+ <div className="rc_toggle">
121
+ <ToggleButtonComponent />
122
+ </div>
123
+ </div>
124
+
125
+ <div className="rcb_body">
126
+ <div className="rcb_lang_list">
127
+ <div className="rcb_lang_box">
128
+ <EnglishFlag /> English US <CloseRedIcon />
129
+ </div>
130
+ <div className="rcb_lang_box">
131
+ <PortugalFlag />
132
+ Portugese
133
+ <CloseRedIcon />
134
+ </div>
135
+ <div className="rcb_lang_box">
136
+ <FrenchFlag /> French <CloseRedIcon />
137
+ </div>
138
+ <div className="rcb_lang_box">
139
+ <GermanFlag /> German
140
+ <CloseRedIcon />
141
+ </div>
142
+ </div>
143
+
144
+ <div className="sel_lang_dropdown">
145
+ Select Language <FaChevronDown />{" "}
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </PermissionsAccordion>
151
+ ))}
152
+ </div>
153
+
154
+ <PreviewModal
155
+ isOpen={addModal}
156
+ onRequestClose={() => setAddModal(false)}
157
+ title={"Are you sure you want to add these permissions to this role?"}
158
+ secondaryButtonText={"No, Cancel"}
159
+ primaryButtonText={"Yes, Add"}
160
+ />
161
+ </PermissionsContainer>
162
+ );
163
+ };
164
+
165
+ export default Permissions;
@@ -0,0 +1,92 @@
1
+ import React from "react";
2
+ import { RoleNameContainer } from "./index.styled";
3
+ import ButtonComponent from "../../button";
4
+ import { roleList } from "./data";
5
+ import avatar from "../assets/images/avatar.png"
6
+
7
+ const RoleName = () => {
8
+ return (
9
+ <RoleNameContainer>
10
+ <p className="rl_title">Enter role name</p>
11
+
12
+ <p className="rl_perm_txt">Permissions</p>
13
+ <p className="rl_perm_subtxt">
14
+ Permissions allow admins to access specific functions and perform
15
+ actions.
16
+ </p>
17
+ <div className="role_list_row">
18
+ {roleList?.slice(0, 4)?.map((item, idx) => (
19
+ <div className="rlr_col" key={idx}>
20
+ {item?.name} <span>{item?.level}</span>
21
+ </div>
22
+ ))}
23
+ {roleList?.slice(0, 4)?.length > 0 && (
24
+ <p className="rlr_others">
25
+ {`+ ${roleList?.slice(0, 4)?.length} Others`}
26
+ </p>
27
+ )}
28
+ </div>
29
+ <ButtonComponent
30
+ text={"Add Permissions(s)"}
31
+ type="secondary"
32
+ styles={{
33
+ width: "260px",
34
+ padding: 10,
35
+ height: 40,
36
+ backgroundColor: "transparent",
37
+ marginBottom: "24px",
38
+ }}
39
+ icon={{ left: true }}
40
+ onClick={(e) => {
41
+ e.preventDefault();
42
+ }}
43
+ />
44
+ <p className="rl_perm_txt">Admins</p>
45
+ <p className="rl_perm_subtxt">
46
+ Add admins to this role and have them access specific permissions.{" "}
47
+ </p>
48
+
49
+ <div className="admins_row">
50
+ <div className="adm_img_group">
51
+ <div className="adr_img">
52
+ <img src={avatar} alt="" />
53
+ </div>
54
+ <div className="adr_img">
55
+ <img src={avatar} alt="" />
56
+ </div>
57
+ <div className="adr_img">
58
+ <img src={avatar} alt="" />
59
+ </div>
60
+ </div>
61
+
62
+ <div className="adm_others">+24 Others</div>
63
+ </div>
64
+ <ButtonComponent
65
+ text={"Add Admins"}
66
+ type="secondary"
67
+ styles={{
68
+ width: "260px",
69
+ padding: 10,
70
+ height: 40,
71
+ backgroundColor: "transparent",
72
+ marginBottom: "24px",
73
+ }}
74
+ icon={{ left: true }}
75
+ onClick={(e) => {
76
+ e.preventDefault();
77
+ }}
78
+ />
79
+
80
+ <ButtonComponent
81
+ text={"Create Role"}
82
+ styles={{ width: "100%", padding: 10, height: 40, marginTop: "60px" }}
83
+ icon={{ left: true }}
84
+ onClick={(e) => {
85
+ e.preventDefault();
86
+ }}
87
+ />
88
+ </RoleNameContainer>
89
+ );
90
+ };
91
+
92
+ export default RoleName;