allaw-ui 4.1.3 → 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.
Files changed (31) hide show
  1. package/dist/assets/allaw-font.eot +0 -0
  2. package/dist/assets/allaw-font.svg +3 -2
  3. package/dist/assets/allaw-font.ttf +0 -0
  4. package/dist/assets/allaw-font.woff +0 -0
  5. package/dist/components/atoms/inputs/SearchBar.css +28 -2
  6. package/dist/components/atoms/inputs/SearchBar.d.ts +1 -0
  7. package/dist/components/atoms/inputs/SearchBar.js +11 -3
  8. package/dist/components/atoms/inputs/SearchBar.stories.d.ts +8 -0
  9. package/dist/components/atoms/inputs/SearchBar.stories.js +14 -1
  10. package/dist/components/molecules/proSwitch/AvatarBubble.d.ts +16 -0
  11. package/dist/components/molecules/proSwitch/AvatarBubble.js +72 -0
  12. package/dist/components/molecules/proSwitch/AvatarBubble.stories.d.ts +93 -0
  13. package/dist/components/molecules/proSwitch/AvatarBubble.stories.js +215 -0
  14. package/dist/components/molecules/proSwitch/AvatarToggleGroup.d.ts +21 -0
  15. package/dist/components/molecules/proSwitch/AvatarToggleGroup.js +150 -0
  16. package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.d.ts +75 -0
  17. package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.js +276 -0
  18. package/dist/components/molecules/proSwitch/ProSwitch.d.ts +16 -0
  19. package/dist/components/molecules/proSwitch/ProSwitch.js +86 -0
  20. package/dist/components/molecules/proSwitch/ProSwitch.stories.d.ts +9 -0
  21. package/dist/components/molecules/proSwitch/ProSwitch.stories.js +144 -0
  22. package/dist/components/molecules/proSwitch/ProSwitchModal.d.ts +21 -0
  23. package/dist/components/molecules/proSwitch/ProSwitchModal.js +285 -0
  24. package/dist/components/molecules/proSwitch/ProSwitchModal.stories.d.ts +60 -0
  25. package/dist/components/molecules/proSwitch/ProSwitchModal.stories.js +194 -0
  26. package/dist/components/molecules/proSwitch/avatarBubble.module.css +116 -0
  27. package/dist/components/molecules/proSwitch/avatarToggleGroup.module.css +183 -0
  28. package/dist/components/molecules/proSwitch/proSwitch.module.css +32 -0
  29. package/dist/components/molecules/proSwitch/proSwitchModal.module.css +370 -0
  30. package/dist/styles/icons.css +3 -0
  31. package/package.json +4 -1
@@ -0,0 +1,370 @@
1
+ .overlay {
2
+ position: fixed;
3
+ inset: 0;
4
+ background: rgba(23, 30, 37, 0.45);
5
+ z-index: 3000;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ }
10
+
11
+ .modal {
12
+ background: #fff;
13
+ border-radius: 18px;
14
+ box-shadow: 0 8px 32px rgba(23, 30, 37, 0.18);
15
+ width: 96vw;
16
+ max-height: 90vh;
17
+ display: flex;
18
+ flex-direction: column;
19
+ position: relative;
20
+ overflow: hidden;
21
+ }
22
+
23
+ .header {
24
+ display: flex;
25
+ flex-direction: row;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ gap: 12px;
29
+ padding: 20px 24px 12px 24px;
30
+ border-bottom: 1px solid #e6edf5;
31
+ background: #fff;
32
+ position: sticky;
33
+ top: 0;
34
+ z-index: 2;
35
+ }
36
+
37
+ .searchContainer {
38
+ flex: 1 1 0;
39
+ display: flex;
40
+ flex-direction: row;
41
+ align-items: center;
42
+ min-width: 0;
43
+ }
44
+
45
+ .buttonContainer {
46
+ display: flex;
47
+ flex-direction: row;
48
+ align-items: center;
49
+ min-width: 85px;
50
+ gap: 0;
51
+ }
52
+
53
+ .reorderContainer,
54
+ .closeContainer {
55
+ display: flex;
56
+ flex-direction: row;
57
+ align-items: center;
58
+ }
59
+
60
+ .reorderBtn,
61
+ .closeBtn {
62
+ width: 32px;
63
+ height: 32px;
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: center;
67
+ font-size: 1.2rem;
68
+ color: #728ea7;
69
+ background: transparent;
70
+ border: none;
71
+ padding: 0;
72
+ border-radius: 50%;
73
+ z-index: 2;
74
+ pointer-events: auto;
75
+ transition: background 0.15s;
76
+ }
77
+
78
+ .reorderBtn {
79
+ margin-right: 8px;
80
+ }
81
+
82
+ .reorderBtn[aria-pressed="true"] {
83
+ color: #000;
84
+ /* background-color: #d1dce8; */
85
+ border: 1px solid #25beeb;
86
+ }
87
+
88
+ .reorderBtn:hover,
89
+ .closeBtn:hover {
90
+ background: #e6edf5;
91
+ color: #171e25;
92
+ }
93
+
94
+ .reorderBtn:hover {
95
+ /* border: 1px solid #25beeb; */
96
+ cursor: pointer;
97
+ }
98
+
99
+ .reorderBtn i,
100
+ .closeBtn i {
101
+ display: block;
102
+ width: 1em;
103
+ height: 1em;
104
+ font-size: inherit;
105
+ color: inherit;
106
+ }
107
+
108
+ .closeBtn i {
109
+ font-size: 0.9rem;
110
+ }
111
+
112
+ .body {
113
+ flex: 1;
114
+ overflow-y: auto;
115
+ padding: 24px;
116
+ background: #f8fafc;
117
+ }
118
+
119
+ .grid {
120
+ display: grid;
121
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
122
+ gap: 8px 16px;
123
+ align-items: flex-start;
124
+ justify-items: center;
125
+ width: 100%;
126
+ }
127
+
128
+ .gridItem {
129
+ display: flex;
130
+ flex-direction: column;
131
+ align-items: center;
132
+ justify-content: flex-start;
133
+ gap: 4px;
134
+ width: 120px;
135
+ height: 132px;
136
+ flex-shrink: 0;
137
+ border-radius: 8px;
138
+ cursor: pointer;
139
+ position: relative;
140
+ background-color: transparent;
141
+ padding: 8px;
142
+ box-sizing: border-box;
143
+ border: 1px solid transparent;
144
+ }
145
+
146
+ .gridItem:hover:not(.dragging) {
147
+ background-color: var(--color-grey-50, #f8fafc);
148
+ }
149
+
150
+ /* Hover spécifique en mode reorder */
151
+ .reorderMode .gridItem:hover:not(.dragging) {
152
+ background: #fff;
153
+ border: 1px solid #25beeb;
154
+ }
155
+
156
+ .gridItem.dragging {
157
+ opacity: 0.5;
158
+ z-index: 1000;
159
+ cursor: grabbing;
160
+ }
161
+
162
+ /* Animation wiggle désactivée temporairement */
163
+ .gridItem.wiggle {
164
+ /* animation: wiggle 0.6s ease-in-out infinite alternate; */
165
+ }
166
+
167
+ .gridItemContainer {
168
+ position: relative;
169
+ width: 120px;
170
+ height: 132px;
171
+ }
172
+
173
+ .dropSlot {
174
+ position: absolute;
175
+ top: 0;
176
+ left: 0;
177
+ width: 120px;
178
+ height: 132px;
179
+ border: 2px dashed #25beeb;
180
+ border-radius: 12px;
181
+ background: rgba(37, 190, 235, 0.05);
182
+ box-sizing: border-box;
183
+ pointer-events: none;
184
+ z-index: 10;
185
+ }
186
+
187
+ /* Keyframes wiggle désactivées temporairement */
188
+ @keyframes wiggle {
189
+ 0% {
190
+ transform: scale(1);
191
+ }
192
+ 100% {
193
+ transform: scale(1.02);
194
+ }
195
+ }
196
+
197
+ .avatarWrapper {
198
+ position: relative;
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: center;
202
+ }
203
+
204
+ .name {
205
+ margin-top: 10px;
206
+ font-size: 15px;
207
+ font-family: var(--font-open-sans, "Open Sans");
208
+ color: #171e25;
209
+ text-align: center;
210
+ width: 100%;
211
+ padding: 0 8px;
212
+ box-sizing: border-box;
213
+ display: -webkit-box;
214
+ -webkit-box-orient: vertical;
215
+ -webkit-line-clamp: 2;
216
+ overflow: hidden;
217
+ white-space: normal;
218
+ }
219
+
220
+ .footer {
221
+ display: flex;
222
+ justify-content: flex-end;
223
+ gap: 16px;
224
+ padding: 16px 24px;
225
+ border-top: 1px solid #e6edf5;
226
+ background: #fff;
227
+ position: sticky;
228
+ bottom: 0;
229
+ z-index: 2;
230
+ }
231
+
232
+ .cancelBtn,
233
+ .validateBtn {
234
+ padding: 8px 24px;
235
+ border-radius: 8px;
236
+ font-size: 15px;
237
+ font-family: var(--font-open-sans, "Open Sans");
238
+ font-weight: 600;
239
+ border: none;
240
+ cursor: pointer;
241
+ transition: background 0.15s;
242
+ }
243
+
244
+ .cancelBtn {
245
+ background: #f6fcfe;
246
+ color: #728ea7;
247
+ }
248
+
249
+ .cancelBtn:hover {
250
+ background: #e6edf5;
251
+ }
252
+
253
+ .validateBtn {
254
+ background: var(--bleu-allaw, #25beeb);
255
+ color: #fff;
256
+ }
257
+
258
+ .validateBtn:hover {
259
+ background: #1ca6d6;
260
+ }
261
+
262
+ /* Scrollbar custom */
263
+ .body::-webkit-scrollbar {
264
+ width: 8px;
265
+ }
266
+ .body::-webkit-scrollbar-thumb {
267
+ background: #e6edf5;
268
+ border-radius: 4px;
269
+ }
270
+ .body::-webkit-scrollbar-track {
271
+ background: #f8fafc;
272
+ }
273
+
274
+ /* Responsive */
275
+ @media (max-width: 600px) {
276
+ .modal {
277
+ max-width: 98vw;
278
+ padding: 0;
279
+ }
280
+ .header,
281
+ .footer {
282
+ padding-left: 10px;
283
+ padding-right: 10px;
284
+ }
285
+ .body {
286
+ padding: 12px;
287
+ }
288
+ .grid {
289
+ gap: 16px 8px;
290
+ }
291
+ }
292
+
293
+ .selectionInfo {
294
+ text-align: left;
295
+ color: #728ea7;
296
+ font-size: 15px;
297
+ padding: 28px 0 29px 16px;
298
+ font-family: var(--font-open-sans, "Open Sans");
299
+ font-weight: 500;
300
+ position: sticky;
301
+ bottom: 0;
302
+ background: #f8fafc;
303
+ z-index: 1;
304
+ }
305
+
306
+ .reorderInfo {
307
+ display: flex;
308
+ align-items: center;
309
+ justify-content: center;
310
+ padding: 8px 12px;
311
+ background: #fff;
312
+ border: 1px solid #25beeb;
313
+ border-radius: 8px;
314
+ gap: 8px;
315
+ font-size: 14px;
316
+ color: #171e25;
317
+ margin: 20px auto;
318
+ width: fit-content;
319
+ }
320
+
321
+ @media (max-width: 834px) {
322
+ .overlay {
323
+ align-items: flex-end;
324
+ justify-content: center;
325
+ }
326
+ .modal {
327
+ max-width: 100vw;
328
+ width: 100vw;
329
+ left: 0;
330
+ right: 0;
331
+ bottom: 0;
332
+ top: auto;
333
+ border-radius: 18px 18px 0 0;
334
+ padding-bottom: env(safe-area-inset-bottom, 0);
335
+ }
336
+ }
337
+
338
+ /* DragOverlay styles */
339
+ .dragOverlay {
340
+ width: 120px;
341
+ height: 132px;
342
+ display: flex;
343
+ flex-direction: column;
344
+ align-items: center;
345
+ justify-content: flex-start;
346
+ gap: 8px;
347
+ border-radius: 8px;
348
+ background-color: #fff;
349
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
350
+ transform: rotate(3deg) scale(1.05);
351
+ pointer-events: none;
352
+ z-index: 9999;
353
+ padding: 8px;
354
+ box-sizing: border-box;
355
+ }
356
+
357
+ .headerReorderActions {
358
+ display: flex;
359
+ gap: 8px;
360
+ flex: 1;
361
+ justify-content: flex-end;
362
+ align-items: center;
363
+ margin: 4px auto;
364
+ padding-bottom: 1px;
365
+ }
366
+
367
+ .headerReorderLabel {
368
+ min-height: 0;
369
+ margin: 0;
370
+ }
@@ -384,3 +384,6 @@ li {
384
384
  .allaw-icon-x-small:before {
385
385
  content: "\e97c";
386
386
  }
387
+ .allaw-icon-drag:before {
388
+ content: "\e97e";
389
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -40,6 +40,9 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
+ "@dnd-kit/core": "^6.3.1",
44
+ "@dnd-kit/modifiers": "^9.0.0",
45
+ "@dnd-kit/sortable": "^10.0.0",
43
46
  "allaw-ui": "^3.5.5",
44
47
  "date-fns": "^4.1.0",
45
48
  "next": "14.2.5",