allaw-ui 5.2.1 → 5.2.3
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.
|
@@ -193,6 +193,13 @@ var ProSwitchModal = function (_a) {
|
|
|
193
193
|
var newSelected;
|
|
194
194
|
if (mode === "single") {
|
|
195
195
|
newSelected = [pro.proUserId];
|
|
196
|
+
var selectedPros_1 = pros.filter(function (p) {
|
|
197
|
+
return newSelected.includes(p.proUserId);
|
|
198
|
+
});
|
|
199
|
+
onSelect(selectedPros_1);
|
|
200
|
+
// Fermer la modal automatiquement en mode single
|
|
201
|
+
onClosePortal();
|
|
202
|
+
return;
|
|
196
203
|
}
|
|
197
204
|
else {
|
|
198
205
|
if (selected.includes(pro.proUserId)) {
|
|
@@ -210,6 +217,10 @@ var ProSwitchModal = function (_a) {
|
|
|
210
217
|
var selectedPros = pros.filter(function (p) { return newSelected.includes(p.proUserId); });
|
|
211
218
|
onSelect(selectedPros);
|
|
212
219
|
};
|
|
220
|
+
// Validation en mode multiple
|
|
221
|
+
var handleValidateSelection = function () {
|
|
222
|
+
onClosePortal();
|
|
223
|
+
};
|
|
213
224
|
// Détermination dynamique du max-width selon le nombre de profils
|
|
214
225
|
var modalMaxWidth = 580;
|
|
215
226
|
if (pros.length <= 2)
|
|
@@ -282,10 +293,15 @@ var ProSwitchModal = function (_a) {
|
|
|
282
293
|
activeDragPro.firstName,
|
|
283
294
|
" ",
|
|
284
295
|
activeDragPro.name)) : ("".concat(activeDragPro.firstName, " ").concat(activeDragPro.name))))) : null)),
|
|
285
|
-
isReorder ? (React.createElement(TinyInfo, { variant: "medium14", text: "D\u00E9placez les profils pour modifier leur ordre", startIcon: "allaw-icon-info", color: "mid-grey", className: styles.reorderInfo })) : (React.createElement("div", { className: styles.
|
|
286
|
-
"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
296
|
+
isReorder ? (React.createElement(TinyInfo, { variant: "medium14", text: "D\u00E9placez les profils pour modifier leur ordre", startIcon: "allaw-icon-info", color: "mid-grey", className: styles.reorderInfo })) : (React.createElement("div", { className: styles.selectionFooter },
|
|
297
|
+
React.createElement("div", { className: styles.selectionInfo },
|
|
298
|
+
React.createElement("div", { className: styles.selectionMode }, mode === "single"
|
|
299
|
+
? "Sélection unique"
|
|
300
|
+
: "Sélection multiple"),
|
|
301
|
+
React.createElement("div", { className: styles.selectionCount },
|
|
302
|
+
pros.length,
|
|
303
|
+
" \u00E9l\u00E9ment",
|
|
304
|
+
pros.length > 1 ? "s" : "")),
|
|
305
|
+
mode === "multiple" && (React.createElement("button", { className: styles.validateBtn, onClick: handleValidateSelection, type: "button" }, "Valider"))))))), document.body);
|
|
290
306
|
};
|
|
291
307
|
export default ProSwitchModal;
|
|
@@ -126,12 +126,12 @@
|
|
|
126
126
|
padding-left: 16px;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.moreButton {
|
|
129
|
+
/* .moreButton {
|
|
130
130
|
width: 56px;
|
|
131
131
|
height: 56px;
|
|
132
132
|
font-size: 16px;
|
|
133
133
|
margin-left: -10px;
|
|
134
|
-
}
|
|
134
|
+
} */
|
|
135
135
|
|
|
136
136
|
/* Ajuster la taille des avatars en desktop */
|
|
137
137
|
.avatarWrapper .avatarBubble {
|
|
@@ -290,17 +290,37 @@
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
.selectionFooter {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: row;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: space-between;
|
|
298
|
+
padding: 28px 24px 29px 16px;
|
|
299
|
+
position: sticky;
|
|
300
|
+
bottom: 0;
|
|
301
|
+
background: #f8fafc;
|
|
302
|
+
z-index: 1;
|
|
303
|
+
}
|
|
304
|
+
|
|
293
305
|
.selectionInfo {
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: column;
|
|
308
|
+
gap: 4px;
|
|
294
309
|
text-align: left;
|
|
295
310
|
color: #728ea7;
|
|
296
|
-
font-size: 15px;
|
|
297
|
-
padding: 28px 0 29px 16px;
|
|
298
311
|
font-family: var(--font-open-sans, "Open Sans");
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.selectionMode {
|
|
315
|
+
font-size: 15px;
|
|
316
|
+
font-weight: 600;
|
|
317
|
+
color: #171e25;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.selectionCount {
|
|
321
|
+
font-size: 14px;
|
|
299
322
|
font-weight: 500;
|
|
300
|
-
|
|
301
|
-
bottom: 0;
|
|
302
|
-
background: #f8fafc;
|
|
303
|
-
z-index: 1;
|
|
323
|
+
color: #728ea7;
|
|
304
324
|
}
|
|
305
325
|
|
|
306
326
|
.reorderInfo {
|