@truedat/auth 8.14.4 → 8.14.5
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 +4 -4
- package/src/groups/components/GroupCard.js +2 -2
- package/src/groups/components/GroupCards.js +129 -37
- package/src/groups/components/GroupForm.js +13 -7
- package/src/groups/components/GroupFormModal.js +8 -7
- package/src/groups/components/GroupInfoModal.js +6 -6
- package/src/groups/components/GroupMemberPicker.js +2 -4
- package/src/groups/components/GroupRouteModal.js +15 -10
- package/src/groups/components/__tests__/GroupCards.spec.js +94 -0
- package/src/groups/components/__tests__/GroupForm.spec.js +2 -2
- package/src/groups/components/__tests__/GroupModals.spec.js +42 -16
- package/src/groups/components/__tests__/__snapshots__/GroupCards.spec.js.snap +14 -0
- package/src/styles/Groups.less +96 -131
- package/src/styles/UserCard.less +60 -226
- package/src/styles/UserModals.less +6 -1
- package/src/styles/Users.less +40 -7
- package/src/users/components/EditUserModal.js +3 -3
- package/src/users/components/UserAcls.js +61 -0
- package/src/users/components/UserCard.js +4 -1
- package/src/users/components/UserCards.js +35 -120
- package/src/users/components/UserInfoModal.js +22 -62
- package/src/users/components/__tests__/EditUser.spec.js +1 -1
- package/src/users/components/__tests__/UserAcls.spec.js +40 -1
- package/src/users/components/__tests__/UserCard.spec.js +1 -1
- package/src/users/components/__tests__/UserCards.spec.js +0 -45
- package/src/users/components/__tests__/UserModals.spec.js +54 -7
- package/src/users/components/__tests__/__snapshots__/UserCard.spec.js.snap +2 -0
- package/src/users/components/__tests__/__snapshots__/UserCards.spec.js.snap +20 -69
package/src/styles/UserCard.less
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
.td-card--user {
|
|
2
2
|
--uc-bottom-right-radius: 1.5rem;
|
|
3
3
|
--uc-bottom-left-radius: 0.25rem;
|
|
4
|
-
--uc-top-left-radius:
|
|
4
|
+
--uc-top-left-radius: 0;
|
|
5
5
|
--uc-top-right-radius: 0.5rem;
|
|
6
|
-
--uc-motion-duration: 300ms;
|
|
7
|
-
--uc-color-motion-duration: 140ms;
|
|
8
|
-
--uc-highlight-motion-duration: 180ms;
|
|
9
|
-
--uc-actions-motion-duration: 420ms;
|
|
10
|
-
--uc-actions-hide-delay: 160ms;
|
|
11
|
-
--uc-motion-easing: cubic-bezier(0.22, 1, 0.36, 1);
|
|
12
6
|
width: 330px;
|
|
13
7
|
|
|
14
8
|
@media (max-width: 767px) {
|
|
@@ -17,53 +11,14 @@
|
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
13
|
|
|
20
|
-
.td-card--user::before {
|
|
21
|
-
content: "";
|
|
22
|
-
position: absolute;
|
|
23
|
-
inset: 0;
|
|
24
|
-
border-left: 8px solid var(--card-accent-color);
|
|
25
|
-
border-radius: inherit;
|
|
26
|
-
opacity: 0;
|
|
27
|
-
pointer-events: none;
|
|
28
|
-
transform: translateX(-8px);
|
|
29
|
-
transition:
|
|
30
|
-
opacity var(--uc-motion-duration) var(--uc-motion-easing),
|
|
31
|
-
transform var(--uc-motion-duration) var(--uc-motion-easing);
|
|
32
|
-
z-index: 1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.td-card--user:hover::before,
|
|
36
|
-
.td-card--user:focus-within::before {
|
|
37
|
-
opacity: 1;
|
|
38
|
-
transform: translateX(0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
14
|
.ui.card.td-card-base.td-card--user {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
|
|
45
|
-
|
|
46
|
-
&::after {
|
|
47
|
-
content: "";
|
|
48
|
-
position: absolute;
|
|
49
|
-
inset: 0;
|
|
50
|
-
width: auto;
|
|
51
|
-
height: auto;
|
|
52
|
-
border-radius: inherit;
|
|
53
|
-
background: linear-gradient(270deg, var(--uc-action-tint), transparent 75%);
|
|
54
|
-
opacity: 0;
|
|
55
|
-
pointer-events: none;
|
|
56
|
-
transition: opacity var(--uc-highlight-motion-duration) ease;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:hover,
|
|
60
|
-
&:focus-within {
|
|
61
|
-
box-shadow: 0 5px 14px rgba(15, 23, 42, 0.18);
|
|
15
|
+
min-height: 152px;
|
|
16
|
+
}
|
|
62
17
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
18
|
+
.td-card--user:hover .uc-avatar,
|
|
19
|
+
.td-card--user:focus-within .uc-avatar {
|
|
20
|
+
background: @primaryColor;
|
|
21
|
+
color: #fff;
|
|
67
22
|
}
|
|
68
23
|
|
|
69
24
|
.td-card--user .uc-card-link::after {
|
|
@@ -87,34 +42,13 @@
|
|
|
87
42
|
flex-direction: column;
|
|
88
43
|
align-items: flex-end;
|
|
89
44
|
gap: 0.25rem;
|
|
90
|
-
opacity: 0;
|
|
91
|
-
transform: translateX(0.45rem);
|
|
92
45
|
visibility: hidden;
|
|
93
|
-
transition:
|
|
94
|
-
opacity var(--uc-actions-motion-duration) var(--uc-motion-easing)
|
|
95
|
-
var(--uc-actions-hide-delay),
|
|
96
|
-
transform var(--uc-actions-motion-duration) var(--uc-motion-easing)
|
|
97
|
-
var(--uc-actions-hide-delay),
|
|
98
|
-
visibility 0ms linear
|
|
99
|
-
calc(var(--uc-actions-motion-duration) + var(--uc-actions-hide-delay));
|
|
100
46
|
z-index: 12;
|
|
101
|
-
pointer-events: none;
|
|
102
47
|
}
|
|
103
48
|
|
|
104
49
|
.td-card--user:hover .uc-actions,
|
|
105
|
-
.td-card--user:focus-within .uc-actions
|
|
106
|
-
.td-card--user .uc-actions:hover,
|
|
107
|
-
.td-card--user .uc-actions:focus-within {
|
|
108
|
-
opacity: 1;
|
|
109
|
-
transform: translateX(0);
|
|
50
|
+
.td-card--user:focus-within .uc-actions {
|
|
110
51
|
visibility: visible;
|
|
111
|
-
pointer-events: auto;
|
|
112
|
-
transition-delay: 0ms, 0ms, 0ms;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.td-card--user .uc-actions:hover,
|
|
116
|
-
.td-card--user .uc-actions:focus-within {
|
|
117
|
-
--uc-action-color: #64748b;
|
|
118
52
|
}
|
|
119
53
|
|
|
120
54
|
.td-card--user .uc-action-btn {
|
|
@@ -125,36 +59,41 @@
|
|
|
125
59
|
max-width: 1.75rem;
|
|
126
60
|
height: 1.75rem;
|
|
127
61
|
padding: 0;
|
|
128
|
-
background: #
|
|
62
|
+
background: #fff;
|
|
129
63
|
border: 1px solid #64748b;
|
|
64
|
+
border-right: 0;
|
|
130
65
|
border-radius: 0.5rem 0 0 0.5rem;
|
|
131
|
-
|
|
132
|
-
box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
|
|
133
|
-
color: var(--uc-action-color, #9ca3af);
|
|
134
|
-
backface-visibility: hidden;
|
|
135
|
-
transition:
|
|
136
|
-
max-width var(--uc-actions-motion-duration) var(--uc-motion-easing),
|
|
137
|
-
padding var(--uc-actions-motion-duration) var(--uc-motion-easing),
|
|
138
|
-
color var(--uc-color-motion-duration) ease 0ms,
|
|
139
|
-
background-color var(--uc-color-motion-duration) ease 0ms,
|
|
140
|
-
border-color var(--uc-color-motion-duration) ease 0ms,
|
|
141
|
-
box-shadow var(--uc-color-motion-duration) ease 0ms;
|
|
66
|
+
color: #64748b;
|
|
142
67
|
cursor: pointer;
|
|
143
68
|
overflow: hidden;
|
|
144
69
|
white-space: nowrap;
|
|
70
|
+
transition:
|
|
71
|
+
max-width 420ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
72
|
+
padding 420ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
145
73
|
|
|
146
74
|
&:hover,
|
|
147
75
|
&:focus-visible {
|
|
148
76
|
max-width: 14rem;
|
|
149
77
|
padding: 0 1rem 0 0.08rem;
|
|
150
|
-
|
|
78
|
+
.uc-action-label {
|
|
79
|
+
max-width: 11rem;
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
background: var(--card-accent-color);
|
|
83
|
+
border-color: var(--card-accent-color);
|
|
84
|
+
color: #fff;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:focus-visible {
|
|
88
|
+
outline: 2px solid currentColor;
|
|
89
|
+
outline-offset: -3px;
|
|
151
90
|
}
|
|
152
91
|
|
|
153
92
|
i.icon {
|
|
154
93
|
flex: 0 0 1.75rem;
|
|
155
|
-
margin: 0;
|
|
156
94
|
width: 1.75rem;
|
|
157
|
-
|
|
95
|
+
margin: 0;
|
|
96
|
+
font-size: 1rem;
|
|
158
97
|
line-height: 1;
|
|
159
98
|
}
|
|
160
99
|
}
|
|
@@ -167,62 +106,20 @@
|
|
|
167
106
|
font-weight: 800;
|
|
168
107
|
line-height: 1;
|
|
169
108
|
transition:
|
|
170
|
-
max-width
|
|
171
|
-
opacity
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.td-card--user .uc-action-btn:hover .uc-action-label,
|
|
175
|
-
.td-card--user .uc-action-btn:focus-visible .uc-action-label {
|
|
176
|
-
max-width: 11rem;
|
|
177
|
-
opacity: 1;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.td-card--user .uc-action-btn--key:hover,
|
|
181
|
-
.td-card--user .uc-action-btn--key:focus-visible {
|
|
182
|
-
color: #7c2d12;
|
|
183
|
-
background-color: #fef3c7;
|
|
184
|
-
border-color: rgba(251, 146, 60, 0.72);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.ui.card.td-card-base.td-card--user:has(.uc-action-btn--key:hover),
|
|
188
|
-
.ui.card.td-card-base.td-card--user:has(.uc-action-btn--key:focus-visible) {
|
|
189
|
-
border-color: rgba(217, 119, 6, 0.7);
|
|
190
|
-
--uc-action-tint: rgba(217, 119, 6, 0.09);
|
|
191
|
-
transition:
|
|
192
|
-
border-color var(--uc-color-motion-duration) ease,
|
|
193
|
-
box-shadow var(--uc-color-motion-duration) ease;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.td-card--user .uc-action-btn:not(.uc-action-btn--key):hover,
|
|
197
|
-
.td-card--user .uc-action-btn:not(.uc-action-btn--key):focus-visible {
|
|
198
|
-
color: #1d4ed8;
|
|
199
|
-
background-color: #e8f1ff;
|
|
200
|
-
border-color: rgba(37, 99, 235, 0.62);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.ui.card.td-card-base.td-card--user:has(
|
|
204
|
-
.uc-action-btn:not(.uc-action-btn--key):hover
|
|
205
|
-
),
|
|
206
|
-
.ui.card.td-card-base.td-card--user:has(
|
|
207
|
-
.uc-action-btn:not(.uc-action-btn--key):focus-visible
|
|
208
|
-
) {
|
|
209
|
-
border-color: rgba(37, 99, 235, 0.7);
|
|
210
|
-
--uc-action-tint: rgba(37, 99, 235, 0.09);
|
|
211
|
-
transition:
|
|
212
|
-
border-color var(--uc-color-motion-duration) ease,
|
|
213
|
-
box-shadow var(--uc-color-motion-duration) ease;
|
|
109
|
+
max-width 420ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
110
|
+
opacity 420ms ease;
|
|
214
111
|
}
|
|
215
112
|
|
|
216
113
|
.td-card--user > .content {
|
|
217
|
-
padding-top: 1.
|
|
218
|
-
padding-bottom:
|
|
114
|
+
padding-top: 1.25em !important;
|
|
115
|
+
padding-bottom: 1em !important;
|
|
219
116
|
}
|
|
220
117
|
|
|
221
118
|
.td-card--user .uc-summary {
|
|
222
119
|
position: relative;
|
|
223
120
|
display: flex;
|
|
224
121
|
align-items: center;
|
|
225
|
-
gap: 0.
|
|
122
|
+
gap: 0.625rem;
|
|
226
123
|
padding-left: 0.35rem;
|
|
227
124
|
padding-right: 3rem;
|
|
228
125
|
min-height: 3rem;
|
|
@@ -230,21 +127,6 @@
|
|
|
230
127
|
margin-bottom: 0.3rem;
|
|
231
128
|
}
|
|
232
129
|
|
|
233
|
-
.td-card--user .uc-summary::before {
|
|
234
|
-
content: "";
|
|
235
|
-
position: absolute;
|
|
236
|
-
left: 0.35rem;
|
|
237
|
-
top: 50%;
|
|
238
|
-
width: 2.75rem;
|
|
239
|
-
height: 2.75rem;
|
|
240
|
-
border-radius: 50%;
|
|
241
|
-
background: var(--card-accent-color);
|
|
242
|
-
transform: translateY(-50%);
|
|
243
|
-
opacity: 0;
|
|
244
|
-
pointer-events: none;
|
|
245
|
-
transition: opacity var(--uc-motion-duration) var(--uc-motion-easing);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
130
|
.td-card--user .uc-avatar {
|
|
249
131
|
position: relative;
|
|
250
132
|
width: 2.75rem;
|
|
@@ -260,21 +142,8 @@
|
|
|
260
142
|
font-size: 0.95rem;
|
|
261
143
|
text-transform: uppercase;
|
|
262
144
|
transition:
|
|
263
|
-
background
|
|
264
|
-
color
|
|
265
|
-
transform var(--uc-motion-duration) var(--uc-motion-easing);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.td-card--user:hover .uc-summary::before,
|
|
269
|
-
.td-card--user:focus-within .uc-summary::before {
|
|
270
|
-
opacity: 1;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.td-card--user:hover .uc-avatar,
|
|
274
|
-
.td-card--user:focus-within .uc-avatar {
|
|
275
|
-
background: var(--card-secondary-color);
|
|
276
|
-
color: #ffffff;
|
|
277
|
-
transform: translate(0.3rem, -0.2rem);
|
|
145
|
+
background-color 200ms ease,
|
|
146
|
+
color 200ms ease;
|
|
278
147
|
}
|
|
279
148
|
|
|
280
149
|
.td-card--user .uc-name {
|
|
@@ -287,35 +156,26 @@
|
|
|
287
156
|
overflow-wrap: anywhere;
|
|
288
157
|
word-break: normal;
|
|
289
158
|
margin: 0;
|
|
290
|
-
transition:
|
|
291
|
-
color var(--uc-motion-duration) var(--uc-motion-easing),
|
|
292
|
-
transform var(--uc-motion-duration) var(--uc-motion-easing);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.td-card--user:hover .uc-name,
|
|
296
|
-
.td-card--user:focus-within .uc-name {
|
|
297
|
-
color: var(--card-secondary-color);
|
|
298
|
-
transform: translate(0.3rem, -0.2rem);
|
|
299
159
|
}
|
|
300
160
|
|
|
301
161
|
.td-card--user .uc-meta-grid {
|
|
302
162
|
position: relative;
|
|
303
163
|
display: grid;
|
|
304
|
-
grid-template-columns:
|
|
164
|
+
grid-template-columns: 1rem minmax(0, 1fr);
|
|
305
165
|
grid-auto-rows: minmax(1rem, auto);
|
|
306
166
|
align-items: center;
|
|
307
167
|
column-gap: 0.4rem;
|
|
308
168
|
row-gap: 0.25rem;
|
|
309
169
|
padding-left: 0.85rem;
|
|
310
170
|
padding-right: 2.75rem;
|
|
311
|
-
margin-top: 1.
|
|
171
|
+
margin-top: 1.25rem;
|
|
312
172
|
min-height: 2.2rem;
|
|
313
173
|
}
|
|
314
174
|
|
|
315
175
|
.td-card--user .uc-meta-grid:not(:empty)::before {
|
|
316
176
|
content: "";
|
|
317
177
|
position: absolute;
|
|
318
|
-
top: -0.
|
|
178
|
+
top: -0.6rem;
|
|
319
179
|
left: 0.35rem;
|
|
320
180
|
right: 2.75rem;
|
|
321
181
|
border-top: 1px solid #e2e8f0;
|
|
@@ -324,16 +184,16 @@
|
|
|
324
184
|
|
|
325
185
|
.td-card--user .uc-meta-grid > i.icon {
|
|
326
186
|
margin: 0;
|
|
327
|
-
width:
|
|
187
|
+
width: 1rem;
|
|
328
188
|
color: #64748b;
|
|
329
|
-
font-size: 0.
|
|
189
|
+
font-size: 0.875rem;
|
|
330
190
|
line-height: 1;
|
|
331
191
|
}
|
|
332
192
|
|
|
333
193
|
.td-card--user .uc-username {
|
|
334
194
|
display: block;
|
|
335
195
|
min-width: 0;
|
|
336
|
-
font-size:
|
|
196
|
+
font-size: 12px;
|
|
337
197
|
color: #475569;
|
|
338
198
|
font-weight: 600;
|
|
339
199
|
line-height: 1.2;
|
|
@@ -342,14 +202,13 @@
|
|
|
342
202
|
text-overflow: ellipsis;
|
|
343
203
|
margin: 0;
|
|
344
204
|
overflow-wrap: anywhere;
|
|
345
|
-
transition: color var(--uc-motion-duration) var(--uc-motion-easing);
|
|
346
205
|
}
|
|
347
206
|
|
|
348
207
|
.td-card--user .uc-email,
|
|
349
208
|
.td-card--user .uc-external-id {
|
|
350
209
|
display: block;
|
|
351
210
|
min-width: 0;
|
|
352
|
-
font-size:
|
|
211
|
+
font-size: 12px;
|
|
353
212
|
color: #64748b;
|
|
354
213
|
font-weight: 500;
|
|
355
214
|
line-height: 1.2;
|
|
@@ -358,7 +217,6 @@
|
|
|
358
217
|
overflow: hidden;
|
|
359
218
|
text-overflow: ellipsis;
|
|
360
219
|
overflow-wrap: anywhere;
|
|
361
|
-
transition: color var(--uc-motion-duration) var(--uc-motion-easing);
|
|
362
220
|
}
|
|
363
221
|
|
|
364
222
|
.td-card--user .uc-external-id {
|
|
@@ -420,24 +278,15 @@
|
|
|
420
278
|
white-space: nowrap;
|
|
421
279
|
pointer-events: auto;
|
|
422
280
|
cursor: pointer;
|
|
423
|
-
transition:
|
|
424
|
-
background-color var(--uc-motion-duration) var(--uc-motion-easing),
|
|
425
|
-
color var(--uc-motion-duration) var(--uc-motion-easing);
|
|
426
281
|
z-index: 18;
|
|
427
282
|
}
|
|
428
283
|
|
|
429
284
|
.td-card--user > .ui.label.overlapping.groups-badge > i.icon {
|
|
430
285
|
margin: 0;
|
|
431
|
-
font-size:
|
|
286
|
+
font-size: 1rem;
|
|
432
287
|
line-height: 1;
|
|
433
288
|
}
|
|
434
289
|
|
|
435
|
-
.td-card--user:hover > .ui.label.overlapping.groups-badge,
|
|
436
|
-
.td-card--user:focus-within > .ui.label.overlapping.groups-badge {
|
|
437
|
-
background: var(--card-accent-color) !important;
|
|
438
|
-
color: #ffffff !important;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
290
|
.td-card--user > .ui.label.overlapping.groups-badge::before,
|
|
442
291
|
.td-card--user > .ui.label.overlapping.groups-badge::after {
|
|
443
292
|
display: none;
|
|
@@ -448,31 +297,18 @@
|
|
|
448
297
|
overflow: visible;
|
|
449
298
|
border: 1px solid var(--card-groups-popup-border-color);
|
|
450
299
|
border-radius: 1rem;
|
|
451
|
-
box-shadow:
|
|
300
|
+
box-shadow: none;
|
|
301
|
+
animation: none;
|
|
302
|
+
transition: none;
|
|
452
303
|
background: var(--card-groups-popup-background);
|
|
453
304
|
color: var(--card-groups-popup-text-color);
|
|
454
|
-
transform-origin: top center;
|
|
455
305
|
}
|
|
456
306
|
|
|
457
307
|
.ui.popup.uc-groups-popover::before {
|
|
458
308
|
background: var(--card-groups-popup-background);
|
|
459
|
-
box-shadow:
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
.ui.popup.uc-groups-popover.visible {
|
|
463
|
-
animation: uc-groups-popover-in 180ms var(--uc-motion-easing) both;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
@keyframes uc-groups-popover-in {
|
|
467
|
-
from {
|
|
468
|
-
opacity: 0;
|
|
469
|
-
transform: translateY(-4px) scale(0.97);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
to {
|
|
473
|
-
opacity: 1;
|
|
474
|
-
transform: translateY(0) scale(1);
|
|
475
|
-
}
|
|
309
|
+
box-shadow: none;
|
|
310
|
+
border-left: 1px solid var(--card-groups-popup-border-color);
|
|
311
|
+
border-top: 1px solid var(--card-groups-popup-border-color);
|
|
476
312
|
}
|
|
477
313
|
|
|
478
314
|
.uc-groups-popup {
|
|
@@ -500,7 +336,7 @@
|
|
|
500
336
|
|
|
501
337
|
.uc-groups-popup__header > i.icon {
|
|
502
338
|
margin: 0;
|
|
503
|
-
font-size:
|
|
339
|
+
font-size: 1.0625rem;
|
|
504
340
|
line-height: 1;
|
|
505
341
|
}
|
|
506
342
|
|
|
@@ -552,10 +388,7 @@
|
|
|
552
388
|
|
|
553
389
|
@media (hover: none), (pointer: coarse) {
|
|
554
390
|
.td-card--user .uc-actions {
|
|
555
|
-
opacity: 1;
|
|
556
391
|
visibility: visible;
|
|
557
|
-
pointer-events: auto;
|
|
558
|
-
transform: none;
|
|
559
392
|
}
|
|
560
393
|
.td-card--user .uc-action-btn {
|
|
561
394
|
min-width: 2.75rem;
|
|
@@ -568,15 +401,16 @@
|
|
|
568
401
|
}
|
|
569
402
|
}
|
|
570
403
|
@media (prefers-reduced-motion: reduce) {
|
|
571
|
-
.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
--uc-actions-motion-duration: 0ms;
|
|
576
|
-
--uc-actions-hide-delay: 0ms;
|
|
577
|
-
--card-motion-duration: 0ms;
|
|
404
|
+
.td-card--user .uc-avatar,
|
|
405
|
+
.td-card--user .uc-action-btn,
|
|
406
|
+
.td-card--user .uc-action-label {
|
|
407
|
+
transition: none;
|
|
578
408
|
}
|
|
579
|
-
.ui.
|
|
580
|
-
|
|
409
|
+
.ui.card.td-card-base.td-card--user,
|
|
410
|
+
.ui.card.td-card-base.td-card--user:hover,
|
|
411
|
+
.ui.card.td-card-base.td-card--user:focus-within,
|
|
412
|
+
.ui.card.td-card-base.td-card--user:active {
|
|
413
|
+
transition: none;
|
|
414
|
+
transform: none;
|
|
581
415
|
}
|
|
582
416
|
}
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.ui.modal.true-modal.user-modal {
|
|
6
|
+
> .content i.icon,
|
|
7
|
+
> .actions .button > i.icon {
|
|
8
|
+
font-size: 1.125em;
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
.um-user-type-selector {
|
|
7
12
|
display: grid;
|
|
8
13
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -597,7 +602,7 @@
|
|
|
597
602
|
|
|
598
603
|
.ui.modal.true-modal.user-modal--create {
|
|
599
604
|
> .header:not(.ui) {
|
|
600
|
-
background: var(--td-modal-create-header-background,
|
|
605
|
+
background: var(--td-modal-create-header-background, @primaryColor);
|
|
601
606
|
}
|
|
602
607
|
.um-section--password > .um-form-grid {
|
|
603
608
|
padding-bottom: 0;
|
package/src/styles/Users.less
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
border: 0;
|
|
4
4
|
border-radius: 0;
|
|
5
5
|
box-shadow: none;
|
|
6
|
-
margin-top: 0
|
|
6
|
+
margin-top: 0;
|
|
7
7
|
background: transparent;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.users-role-accordion.ui.styled.accordion .title.users-role-title {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.75rem;
|
|
11
14
|
margin-bottom: 0.28rem;
|
|
12
15
|
border: 0;
|
|
13
16
|
border-bottom: 1px solid #d1d5db;
|
|
@@ -19,6 +22,8 @@
|
|
|
19
22
|
|
|
20
23
|
.users-role-toggle {
|
|
21
24
|
display: block;
|
|
25
|
+
flex: 1;
|
|
26
|
+
min-width: 0;
|
|
22
27
|
width: 100%;
|
|
23
28
|
margin: 0;
|
|
24
29
|
padding: 0;
|
|
@@ -64,7 +69,7 @@
|
|
|
64
69
|
.users-role-accordion.ui.styled.accordion
|
|
65
70
|
.users-role-title-header.ui.header
|
|
66
71
|
.content {
|
|
67
|
-
padding:
|
|
72
|
+
padding: 0.625rem 0 !important;
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
.users-role-count.ui.circular.label {
|
|
@@ -151,7 +156,7 @@
|
|
|
151
156
|
flex-wrap: wrap;
|
|
152
157
|
align-items: center;
|
|
153
158
|
gap: 0.75rem;
|
|
154
|
-
margin-bottom: 0.
|
|
159
|
+
margin-bottom: 0.5rem;
|
|
155
160
|
|
|
156
161
|
> .ui.input {
|
|
157
162
|
flex: 1 1 12rem;
|
|
@@ -175,16 +180,39 @@
|
|
|
175
180
|
flex-wrap: wrap;
|
|
176
181
|
align-items: center;
|
|
177
182
|
gap: 0.75rem;
|
|
178
|
-
margin-bottom: 0.
|
|
183
|
+
margin-bottom: 0.5rem;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
|
-
.users-toolbar-actions
|
|
182
|
-
.users-view-buttons {
|
|
186
|
+
.users-toolbar-actions {
|
|
183
187
|
display: flex;
|
|
184
188
|
align-items: center;
|
|
185
189
|
gap: 0.75rem;
|
|
186
190
|
}
|
|
187
191
|
|
|
192
|
+
.ui.buttons.users-view-buttons {
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
|
|
195
|
+
> .ui.button {
|
|
196
|
+
margin: 0;
|
|
197
|
+
border-radius: 0;
|
|
198
|
+
|
|
199
|
+
&:first-child {
|
|
200
|
+
border-radius: 4px 0 0 4px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&:last-child {
|
|
204
|
+
border-radius: 0 4px 4px 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:focus-visible {
|
|
208
|
+
position: relative;
|
|
209
|
+
z-index: 1;
|
|
210
|
+
outline: 2px solid @primaryColor;
|
|
211
|
+
outline-offset: 2px;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
188
216
|
.users-toolbar-actions {
|
|
189
217
|
margin-left: auto;
|
|
190
218
|
flex-wrap: wrap;
|
|
@@ -193,7 +221,7 @@
|
|
|
193
221
|
.users-results {
|
|
194
222
|
display: flex;
|
|
195
223
|
justify-content: flex-end;
|
|
196
|
-
margin-bottom: 0.
|
|
224
|
+
margin-bottom: 0.25rem;
|
|
197
225
|
|
|
198
226
|
> .ui.label {
|
|
199
227
|
margin: 0;
|
|
@@ -201,6 +229,11 @@
|
|
|
201
229
|
}
|
|
202
230
|
}
|
|
203
231
|
|
|
232
|
+
.users-role-title > .users-results {
|
|
233
|
+
flex-shrink: 0;
|
|
234
|
+
margin: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
204
237
|
.users-table-scroll {
|
|
205
238
|
max-width: 100%;
|
|
206
239
|
overflow-x: auto;
|
|
@@ -83,7 +83,7 @@ export const EditUserModal = ({ user, groups, onClose }) => {
|
|
|
83
83
|
key: "delete",
|
|
84
84
|
content: formatMessage({
|
|
85
85
|
id: "user.actions.delete.confirmation.header",
|
|
86
|
-
defaultMessage: "
|
|
86
|
+
defaultMessage: "Delete user",
|
|
87
87
|
}),
|
|
88
88
|
icon: "trash alternate",
|
|
89
89
|
basic: true,
|
|
@@ -94,14 +94,14 @@ export const EditUserModal = ({ user, groups, onClose }) => {
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
key: "cancel",
|
|
97
|
-
content: formatMessage({ id: "actions.
|
|
97
|
+
content: formatMessage({ id: "actions.close" }),
|
|
98
98
|
secondary: true,
|
|
99
99
|
onClick: closeModal,
|
|
100
100
|
disabled: isSubmitting,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
key: "save",
|
|
104
|
-
content: formatMessage({ id: "
|
|
104
|
+
content: formatMessage({ id: "actions.edit" }),
|
|
105
105
|
primary: true,
|
|
106
106
|
type: "submit",
|
|
107
107
|
form: "edit-user-form",
|
|
@@ -6,6 +6,67 @@ import { useIntl } from "react-intl";
|
|
|
6
6
|
import { DomainTooltip } from "@truedat/bg/taxonomy/components/DomainPath";
|
|
7
7
|
import { getUserAcls } from "../selectors";
|
|
8
8
|
import UserAclRow from "./UserAclRow";
|
|
9
|
+
import UserGroupLink from "./UserGroupLink";
|
|
10
|
+
|
|
11
|
+
export const UnifiedAcls = ({ acls, groupBy }) => {
|
|
12
|
+
const { formatMessage } = useIntl();
|
|
13
|
+
const grouped = Object.values(
|
|
14
|
+
_.groupBy((acl) =>
|
|
15
|
+
groupBy === "role"
|
|
16
|
+
? acl.role
|
|
17
|
+
: JSON.stringify(
|
|
18
|
+
acl.groupId != null
|
|
19
|
+
? ["group", acl.groupId]
|
|
20
|
+
: ["name", acl.group ?? null],
|
|
21
|
+
),
|
|
22
|
+
)(acls),
|
|
23
|
+
).sort(([left], [right]) =>
|
|
24
|
+
(groupBy === "role" ? left.role : left.group || "").localeCompare(
|
|
25
|
+
groupBy === "role" ? right.role : right.group || "",
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
return _.isEmpty(acls) ? null : (
|
|
29
|
+
<Table>
|
|
30
|
+
<Table.Header>
|
|
31
|
+
<Table.Row>
|
|
32
|
+
{["role", "domain", "group"].map((column) => (
|
|
33
|
+
<Table.HeaderCell key={column}>
|
|
34
|
+
{formatMessage({ id: `user.acl.${column}` })}
|
|
35
|
+
</Table.HeaderCell>
|
|
36
|
+
))}
|
|
37
|
+
</Table.Row>
|
|
38
|
+
</Table.Header>
|
|
39
|
+
<Table.Body>
|
|
40
|
+
{grouped.flatMap((entries, groupIndex) =>
|
|
41
|
+
_.sortBy(["role", "resource.name"])(entries).map((acl, index) => (
|
|
42
|
+
<Table.Row key={`${groupIndex}:${index}`}>
|
|
43
|
+
{(groupBy !== "role" || index === 0) && (
|
|
44
|
+
<Table.Cell rowSpan={groupBy === "role" ? entries.length : 1}>
|
|
45
|
+
{acl.role}
|
|
46
|
+
</Table.Cell>
|
|
47
|
+
)}
|
|
48
|
+
<Table.Cell>
|
|
49
|
+
<DomainTooltip domain={acl.resource} />
|
|
50
|
+
</Table.Cell>
|
|
51
|
+
{(groupBy !== "group" || index === 0) && (
|
|
52
|
+
<Table.Cell rowSpan={groupBy === "group" ? entries.length : 1}>
|
|
53
|
+
{acl.group && (
|
|
54
|
+
<UserGroupLink id={acl.groupId} name={acl.group} />
|
|
55
|
+
)}
|
|
56
|
+
</Table.Cell>
|
|
57
|
+
)}
|
|
58
|
+
</Table.Row>
|
|
59
|
+
)),
|
|
60
|
+
)}
|
|
61
|
+
</Table.Body>
|
|
62
|
+
</Table>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
UnifiedAcls.propTypes = {
|
|
67
|
+
acls: PropTypes.array.isRequired,
|
|
68
|
+
groupBy: PropTypes.oneOf(["role", "group"]).isRequired,
|
|
69
|
+
};
|
|
9
70
|
|
|
10
71
|
export const UserAcls = ({ acls, groupBy }) => {
|
|
11
72
|
const { formatMessage } = useIntl();
|