allaw-ui 4.1.2 → 4.1.4
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/assets/allaw-font.eot +0 -0
- package/dist/assets/allaw-font.svg +3 -2
- package/dist/assets/allaw-font.ttf +0 -0
- package/dist/assets/allaw-font.woff +0 -0
- package/dist/components/atoms/inputs/SearchBar.css +28 -2
- package/dist/components/atoms/inputs/SearchBar.d.ts +1 -0
- package/dist/components/atoms/inputs/SearchBar.js +11 -3
- package/dist/components/atoms/inputs/SearchBar.stories.d.ts +8 -0
- package/dist/components/atoms/inputs/SearchBar.stories.js +14 -1
- package/dist/components/molecules/contactCard/contactCard.module.css +0 -1
- package/dist/components/molecules/proSwitch/AvatarBubble.d.ts +16 -0
- package/dist/components/molecules/proSwitch/AvatarBubble.js +72 -0
- package/dist/components/molecules/proSwitch/AvatarBubble.stories.d.ts +93 -0
- package/dist/components/molecules/proSwitch/AvatarBubble.stories.js +215 -0
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.d.ts +21 -0
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.js +150 -0
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.d.ts +75 -0
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.js +276 -0
- package/dist/components/molecules/proSwitch/ProSwitch.d.ts +16 -0
- package/dist/components/molecules/proSwitch/ProSwitch.js +86 -0
- package/dist/components/molecules/proSwitch/ProSwitch.stories.d.ts +9 -0
- package/dist/components/molecules/proSwitch/ProSwitch.stories.js +144 -0
- package/dist/components/molecules/proSwitch/ProSwitchModal.d.ts +21 -0
- package/dist/components/molecules/proSwitch/ProSwitchModal.js +285 -0
- package/dist/components/molecules/proSwitch/ProSwitchModal.stories.d.ts +60 -0
- package/dist/components/molecules/proSwitch/ProSwitchModal.stories.js +194 -0
- package/dist/components/molecules/proSwitch/avatarBubble.module.css +116 -0
- package/dist/components/molecules/proSwitch/avatarToggleGroup.module.css +183 -0
- package/dist/components/molecules/proSwitch/proSwitch.module.css +32 -0
- package/dist/components/molecules/proSwitch/proSwitchModal.module.css +370 -0
- package/dist/styles/icons.css +3 -0
- package/package.json +4 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import React, { useState } from "react";
|
|
22
|
+
import { action } from "@storybook/addon-actions";
|
|
23
|
+
import ProSwitchModal from "./ProSwitchModal";
|
|
24
|
+
import "../../../styles/global.css";
|
|
25
|
+
export default {
|
|
26
|
+
title: "Components/Molecules/ProSwitch/ProSwitchModal",
|
|
27
|
+
component: ProSwitchModal,
|
|
28
|
+
tags: ["autodocs"],
|
|
29
|
+
argTypes: {
|
|
30
|
+
open: { control: false },
|
|
31
|
+
pros: { control: false },
|
|
32
|
+
selected: { control: false },
|
|
33
|
+
mode: { control: { type: "select", options: ["single", "multiple"] } },
|
|
34
|
+
onClosePortal: { action: "close" },
|
|
35
|
+
onOpenPortal: { action: "open" },
|
|
36
|
+
onOrderChange: { action: "orderChange" },
|
|
37
|
+
onSelect: { action: "select" },
|
|
38
|
+
},
|
|
39
|
+
parameters: {
|
|
40
|
+
backgrounds: {
|
|
41
|
+
default: "light",
|
|
42
|
+
values: [
|
|
43
|
+
{ name: "light", value: "#ffffff" },
|
|
44
|
+
{ name: "grey", value: "#728ea7" },
|
|
45
|
+
{ name: "figma", value: "#404040" },
|
|
46
|
+
{ name: "dark", value: "#171e25" },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
var samplePros = [
|
|
52
|
+
{
|
|
53
|
+
token: "t1",
|
|
54
|
+
proUserId: "1",
|
|
55
|
+
name: "Dupont",
|
|
56
|
+
firstName: "Jean",
|
|
57
|
+
profilePictureLink: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face",
|
|
58
|
+
profession: "AVOCAT",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
token: "t2",
|
|
62
|
+
proUserId: "2",
|
|
63
|
+
name: "Martin",
|
|
64
|
+
firstName: "Marie",
|
|
65
|
+
profilePictureLink: "",
|
|
66
|
+
profession: "NOTAIRE",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
token: "t3",
|
|
70
|
+
proUserId: "3",
|
|
71
|
+
name: "Durand",
|
|
72
|
+
firstName: "Pierre",
|
|
73
|
+
profilePictureLink: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face",
|
|
74
|
+
profession: "AVOCAT",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
token: "t4",
|
|
78
|
+
proUserId: "4",
|
|
79
|
+
name: "Bernard",
|
|
80
|
+
firstName: "Sophie",
|
|
81
|
+
profilePictureLink: "",
|
|
82
|
+
profession: "COMMISSAIRE",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
token: "t5",
|
|
86
|
+
proUserId: "5",
|
|
87
|
+
name: "Petit",
|
|
88
|
+
firstName: "Lucas",
|
|
89
|
+
profilePictureLink: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=150&h=150&fit=crop&crop=face",
|
|
90
|
+
profession: "AVOCAT",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
token: "t6",
|
|
94
|
+
proUserId: "6",
|
|
95
|
+
name: "Rousseau",
|
|
96
|
+
firstName: "Emma",
|
|
97
|
+
profilePictureLink: "",
|
|
98
|
+
profession: "NOTAIRE",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
token: "t7",
|
|
102
|
+
proUserId: "7",
|
|
103
|
+
name: "Leroy",
|
|
104
|
+
firstName: "François",
|
|
105
|
+
profilePictureLink: "https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=150&h=150&fit=crop&crop=face",
|
|
106
|
+
profession: "AVOCAT",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
token: "t8",
|
|
110
|
+
proUserId: "8",
|
|
111
|
+
name: "Moreau",
|
|
112
|
+
firstName: "Alice",
|
|
113
|
+
profilePictureLink: "",
|
|
114
|
+
profession: "COMMISSAIRE",
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
var Template = function (args) {
|
|
118
|
+
var _a = useState(true), open = _a[0], setOpen = _a[1];
|
|
119
|
+
var initialPros = args.pros || samplePros;
|
|
120
|
+
var _b = useState(args.selected && args.selected.length > 0
|
|
121
|
+
? args.selected
|
|
122
|
+
: initialPros.slice(0, 2).map(function (p) { return p.proUserId; })), selected = _b[0], setSelected = _b[1];
|
|
123
|
+
var _c = useState(initialPros.map(function (p) { return p.proUserId; })), order = _c[0], setOrder = _c[1];
|
|
124
|
+
var handleOrderChange = function (newOrderPros) {
|
|
125
|
+
setOrder(newOrderPros.map(function (p) { return p.proUserId; }));
|
|
126
|
+
action("onOrderChange")(newOrderPros);
|
|
127
|
+
};
|
|
128
|
+
var handleSelect = function (selectedPros) {
|
|
129
|
+
setSelected(selectedPros.map(function (p) { return p.proUserId; }));
|
|
130
|
+
action("onSelect")(selectedPros);
|
|
131
|
+
};
|
|
132
|
+
return (React.createElement("div", null,
|
|
133
|
+
React.createElement("button", { onClick: function () { return setOpen(true); }, style: { marginBottom: 16 } }, "Ouvrir la modal"),
|
|
134
|
+
React.createElement(ProSwitchModal, __assign({}, args, { open: open, pros: initialPros.filter(function (p) { return order.includes(p.proUserId); }), selected: selected, onOrderChange: handleOrderChange, onSelect: handleSelect, onClosePortal: function () { return setOpen(false); }, onOpenPortal: action("onOpenPortal") }))));
|
|
135
|
+
};
|
|
136
|
+
export var Default = Template.bind({});
|
|
137
|
+
Default.args = {
|
|
138
|
+
mode: "multiple",
|
|
139
|
+
};
|
|
140
|
+
export var Single = Template.bind({});
|
|
141
|
+
Single.args = {
|
|
142
|
+
mode: "single",
|
|
143
|
+
};
|
|
144
|
+
export var Reorder = Template.bind({});
|
|
145
|
+
Reorder.args = {
|
|
146
|
+
mode: "multiple",
|
|
147
|
+
};
|
|
148
|
+
export var Scroll = Template.bind({});
|
|
149
|
+
Scroll.args = {
|
|
150
|
+
mode: "multiple",
|
|
151
|
+
pros: __spreadArray(__spreadArray(__spreadArray([], samplePros, true), samplePros.map(function (p, i) { return (__assign(__assign({}, p), { proUserId: "x" + (i + 1) })); }), true), samplePros.map(function (p, i) { return (__assign(__assign({}, p), { proUserId: "y" + (i + 1) })); }), true),
|
|
152
|
+
};
|
|
153
|
+
export var FallbackInitiales = Template.bind({});
|
|
154
|
+
FallbackInitiales.args = {
|
|
155
|
+
mode: "multiple",
|
|
156
|
+
pros: samplePros.map(function (p) { return (__assign(__assign({}, p), { profilePictureLink: "" })); }),
|
|
157
|
+
};
|
|
158
|
+
export var Responsive = Template.bind({});
|
|
159
|
+
Responsive.args = {
|
|
160
|
+
mode: "multiple",
|
|
161
|
+
pros: samplePros,
|
|
162
|
+
};
|
|
163
|
+
export var ResponsiveMobile = Template.bind({});
|
|
164
|
+
ResponsiveMobile.args = {
|
|
165
|
+
mode: "multiple",
|
|
166
|
+
};
|
|
167
|
+
ResponsiveMobile.parameters = {
|
|
168
|
+
viewport: {
|
|
169
|
+
defaultViewport: "mobile1",
|
|
170
|
+
},
|
|
171
|
+
layout: "fullscreen",
|
|
172
|
+
};
|
|
173
|
+
export var FewProfiles = Template.bind({});
|
|
174
|
+
FewProfiles.args = {
|
|
175
|
+
mode: "multiple",
|
|
176
|
+
pros: [
|
|
177
|
+
{
|
|
178
|
+
token: "t1",
|
|
179
|
+
proUserId: "1",
|
|
180
|
+
name: "Dupont",
|
|
181
|
+
firstName: "Jean",
|
|
182
|
+
profilePictureLink: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face",
|
|
183
|
+
profession: "AVOCAT",
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
token: "t2",
|
|
187
|
+
proUserId: "2",
|
|
188
|
+
name: "Martin",
|
|
189
|
+
firstName: "Marie",
|
|
190
|
+
profilePictureLink: "",
|
|
191
|
+
profession: "NOTAIRE",
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.avatarBubble {
|
|
2
|
+
position: relative;
|
|
3
|
+
border-radius: 50%;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
transition: all 0.2s ease;
|
|
6
|
+
background-color: var(--tag-light-grey, #e6edf5);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
user-select: none;
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.avatarBubble:hover {
|
|
15
|
+
transform: translateY(-5px);
|
|
16
|
+
z-index: 10;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.avatarBubble:focus-visible {
|
|
20
|
+
outline: 2px solid var(--bleu-allaw, #25beeb);
|
|
21
|
+
outline-offset: 2px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* État désactivé */
|
|
25
|
+
.avatarBubble[data-disabled="true"] {
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
filter: grayscale(100%);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.avatarBubble[data-disabled="true"]:hover {
|
|
32
|
+
transform: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.avatarBubble[data-disabled="true"]:focus-visible {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Désactiver l'animation au hover */
|
|
40
|
+
.avatarBubble.noHoverAnimation:hover,
|
|
41
|
+
.avatarBubble[data-disable-hover-animation="true"]:hover {
|
|
42
|
+
transform: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.avatarBubble.noHoverAnimation[data-selected="true"]:hover,
|
|
46
|
+
.avatarBubble[data-disable-hover-animation="true"][data-selected="true"]:hover {
|
|
47
|
+
transform: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Conteneur d'image */
|
|
51
|
+
.imageContainer {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.image {
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
object-fit: cover;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Initiales */
|
|
69
|
+
.initials {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
color: var(--noir, #171e25);
|
|
77
|
+
font-family: var(--font-open-sans, "Open Sans");
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
text-align: center;
|
|
81
|
+
line-height: 1;
|
|
82
|
+
user-select: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Responsive breakpoints */
|
|
86
|
+
@media (max-width: 640px) {
|
|
87
|
+
.avatarBubble {
|
|
88
|
+
/* Styles spécifiques mobile si nécessaire */
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (min-width: 1024px) {
|
|
93
|
+
.avatarBubble {
|
|
94
|
+
/* Styles spécifiques desktop si nécessaire */
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.thin {
|
|
99
|
+
border: 2px solid var(--tag-light-grey, #e6edf5);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.thick {
|
|
103
|
+
border: 4px solid var(--tag-light-grey, #e6edf5);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.selectedThin {
|
|
107
|
+
border: 2px solid var(--bleu-allaw, #25beeb);
|
|
108
|
+
box-shadow: 0px 0px 4px rgba(37, 190, 235, 0.5);
|
|
109
|
+
z-index: 5;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.selectedThick {
|
|
113
|
+
border: 4px solid var(--bleu-allaw, #25beeb);
|
|
114
|
+
box-shadow: 0px 0px 4px rgba(37, 190, 235, 0.5);
|
|
115
|
+
z-index: 5;
|
|
116
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
.proSwitch {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding-left: 12px;
|
|
6
|
+
padding-top: 8px;
|
|
7
|
+
padding-bottom: 8px;
|
|
8
|
+
height: 61px; /* 45 + 8*2 */
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
overflow: visible;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.proSwitch[data-disabled="true"] {
|
|
16
|
+
opacity: 0.5;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.proSwitch[data-disabled="true"] .avatarStack,
|
|
21
|
+
.proSwitch[data-disabled="true"] .moreButton {
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Stack d'avatars avec chevauchement */
|
|
26
|
+
.avatarStack {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
flex: 1;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
overflow: visible;
|
|
33
|
+
padding-top: 0;
|
|
34
|
+
padding-bottom: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.avatarWrapper {
|
|
38
|
+
position: relative;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
transition: transform 0.2s ease;
|
|
43
|
+
/* z-index dynamique dans le style inline du composant */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.avatarWrapper:hover {
|
|
47
|
+
transform: translateY(-2px);
|
|
48
|
+
z-index: 101;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Supprime le ring focus sur le wrapper, laisse le ring bleu uniquement sur l'avatar sélectionné */
|
|
52
|
+
.avatarWrapper:focus-within {
|
|
53
|
+
outline: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Bouton +X pour les pros cachés */
|
|
57
|
+
.moreButton {
|
|
58
|
+
width: 42.5px;
|
|
59
|
+
height: 42.5px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
background-color: var(--dark-grey, #456073);
|
|
62
|
+
color: white;
|
|
63
|
+
border: 3px solid var(--tag-light-grey, #e6edf5);
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
font-family: var(--font-open-sans, "Open Sans");
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
transition: all 0.2s ease;
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
margin-left: -8px;
|
|
74
|
+
z-index: 5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.moreButton:hover {
|
|
78
|
+
background-color: var(--mid-grey, #728ea7);
|
|
79
|
+
transform: translateY(-2px);
|
|
80
|
+
z-index: 15;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.moreButton:focus-visible {
|
|
84
|
+
outline: 2px solid var(--bleu-allaw, #25beeb);
|
|
85
|
+
outline-offset: 2px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.moreButton:active {
|
|
89
|
+
transform: translateY(0);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.moreButton:disabled {
|
|
93
|
+
opacity: 0.5;
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
transform: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* État focus pour la navigation clavier */
|
|
99
|
+
.focused {
|
|
100
|
+
outline: 2px solid var(--bleu-allaw, #25beeb);
|
|
101
|
+
outline-offset: 2px;
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Responsive breakpoints */
|
|
106
|
+
@media (max-width: 640px) {
|
|
107
|
+
.proSwitch {
|
|
108
|
+
height: 40px;
|
|
109
|
+
padding-left: 8px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.moreButton {
|
|
113
|
+
width: 32px;
|
|
114
|
+
height: 32px;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
margin-left: -6px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Ajuster la taille des avatars en mobile */
|
|
120
|
+
.avatarWrapper .avatarBubble {
|
|
121
|
+
width: 32px !important;
|
|
122
|
+
height: 32px !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (min-width: 1024px) {
|
|
127
|
+
.proSwitch {
|
|
128
|
+
height: 50px;
|
|
129
|
+
padding-left: 16px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.moreButton {
|
|
133
|
+
width: 56px;
|
|
134
|
+
height: 56px;
|
|
135
|
+
font-size: 16px;
|
|
136
|
+
margin-left: -10px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Ajuster la taille des avatars en desktop */
|
|
140
|
+
.avatarWrapper .avatarBubble {
|
|
141
|
+
width: 56px !important;
|
|
142
|
+
height: 56px !important;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Animation pour les transitions d'état */
|
|
147
|
+
.avatarWrapper,
|
|
148
|
+
.moreButton {
|
|
149
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Support pour les lecteurs d'écran */
|
|
153
|
+
.proSwitch[role="group"] {
|
|
154
|
+
/* Assure que le groupe est bien annoncé */
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Amélioration de l'accessibilité pour le focus */
|
|
158
|
+
.proSwitch:focus-within {
|
|
159
|
+
/* Le focus est géré au niveau des éléments enfants */
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* États spéciaux pour les interactions tactiles */
|
|
163
|
+
@media (hover: none) and (pointer: coarse) {
|
|
164
|
+
.avatarWrapper:hover,
|
|
165
|
+
.moreButton:hover {
|
|
166
|
+
transform: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.avatarWrapper:active,
|
|
170
|
+
.moreButton:active {
|
|
171
|
+
transform: scale(0.95);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Optimisation pour les écrans haute densité */
|
|
176
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
177
|
+
.avatarWrapper,
|
|
178
|
+
.moreButton {
|
|
179
|
+
/* Assure une netteté optimale sur les écrans Retina */
|
|
180
|
+
image-rendering: -webkit-optimize-contrast;
|
|
181
|
+
image-rendering: crisp-edges;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.proSwitchContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
padding: 8px 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.avatarToggleGroup {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.proSwitchEmpty {
|
|
15
|
+
width: 100%;
|
|
16
|
+
text-align: center;
|
|
17
|
+
color: #728ea7;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
padding: 24px 0;
|
|
20
|
+
font-family: var(--font-open-sans, "Open Sans");
|
|
21
|
+
background: #f8fafc;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (max-width: 640px) {
|
|
25
|
+
.proSwitchContainer {
|
|
26
|
+
padding: 8px 0;
|
|
27
|
+
}
|
|
28
|
+
.proSwitchEmpty {
|
|
29
|
+
font-size: 15px;
|
|
30
|
+
padding: 20px 0;
|
|
31
|
+
}
|
|
32
|
+
}
|