@portnet/ui 3.1.2 → 3.1.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.
|
@@ -63,17 +63,34 @@ const TableCard = (0, _styles.styled)(_material.Box)(() => ({
|
|
|
63
63
|
borderRadius: '8px',
|
|
64
64
|
border: "1px solid ".concat(_apperance.palette.border.light),
|
|
65
65
|
boxShadow: _apperance.palette.shadow.card,
|
|
66
|
-
transition: 'all 0.
|
|
66
|
+
transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
67
|
+
position: 'relative',
|
|
68
|
+
cursor: 'pointer',
|
|
67
69
|
'&:hover': {
|
|
68
|
-
transform: 'translateY(-
|
|
70
|
+
transform: 'translateY(-2px)',
|
|
69
71
|
boxShadow: _apperance.palette.shadow.medium,
|
|
70
|
-
borderColor: "".concat(_apperance.palette.primary, "
|
|
72
|
+
borderColor: "".concat(_apperance.palette.primary, "40"),
|
|
73
|
+
backgroundColor: "".concat(_apperance.palette.primary, "02"),
|
|
74
|
+
// Afficher les actions de cette ligne spécifique au survol
|
|
75
|
+
'& .actions-section': {
|
|
76
|
+
opacity: 1,
|
|
77
|
+
transform: 'translateX(0)',
|
|
78
|
+
transitionDelay: '0.1s'
|
|
79
|
+
},
|
|
80
|
+
// Masquer l'indicateur de points au survol
|
|
81
|
+
'& .actions-section::before': {
|
|
82
|
+
opacity: 0
|
|
83
|
+
}
|
|
71
84
|
},
|
|
72
85
|
// Responsive
|
|
73
86
|
'@media (max-width: 768px)': {
|
|
74
87
|
flexDirection: 'column',
|
|
75
88
|
alignItems: 'stretch',
|
|
76
|
-
gap: '12px'
|
|
89
|
+
gap: '12px',
|
|
90
|
+
cursor: 'default',
|
|
91
|
+
'&:hover': {
|
|
92
|
+
transform: 'none' // Pas d'effet de survol sur mobile
|
|
93
|
+
}
|
|
77
94
|
}
|
|
78
95
|
}));
|
|
79
96
|
|
|
@@ -83,6 +100,11 @@ const DataSection = (0, _styles.styled)(_material.Box)(() => ({
|
|
|
83
100
|
alignItems: 'center',
|
|
84
101
|
gap: '24px',
|
|
85
102
|
flex: 1,
|
|
103
|
+
transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
104
|
+
// Indicateur subtil d'actions disponibles
|
|
105
|
+
'.MuiBox-root:hover &': {
|
|
106
|
+
opacity: 0.7
|
|
107
|
+
},
|
|
86
108
|
'@media (max-width: 768px)': {
|
|
87
109
|
flexDirection: 'column',
|
|
88
110
|
alignItems: 'stretch',
|
|
@@ -116,14 +138,48 @@ const ColumnValue = (0, _styles.styled)(_material.Typography)(() => ({
|
|
|
116
138
|
wordBreak: 'break-word'
|
|
117
139
|
}));
|
|
118
140
|
|
|
119
|
-
// Section des actions
|
|
141
|
+
// Section des actions avec effet de survol
|
|
120
142
|
const ActionsSection = (0, _styles.styled)(_material.Box)(() => ({
|
|
121
143
|
display: 'flex',
|
|
122
144
|
alignItems: 'center',
|
|
123
145
|
gap: '8px',
|
|
124
146
|
flexShrink: 0,
|
|
147
|
+
opacity: 0,
|
|
148
|
+
transform: 'translateX(10px)',
|
|
149
|
+
transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
150
|
+
position: 'relative',
|
|
151
|
+
// Afficher les actions uniquement au survol de la card parent directe
|
|
152
|
+
'&:hover': {
|
|
153
|
+
opacity: 1,
|
|
154
|
+
transform: 'translateX(0)',
|
|
155
|
+
transitionDelay: '0.1s' // Délai d'apparition pour un effet plus fluide
|
|
156
|
+
},
|
|
157
|
+
// Indicateur subtil d'actions disponibles (icône menu)
|
|
158
|
+
'&::before': {
|
|
159
|
+
content: '""',
|
|
160
|
+
position: 'absolute',
|
|
161
|
+
right: '8px',
|
|
162
|
+
top: '50%',
|
|
163
|
+
transform: 'translateY(-50%)',
|
|
164
|
+
width: '4px',
|
|
165
|
+
height: '4px',
|
|
166
|
+
borderRadius: '50%',
|
|
167
|
+
backgroundColor: _apperance.palette.gray[400],
|
|
168
|
+
opacity: 1,
|
|
169
|
+
transition: 'opacity 0.3s ease',
|
|
170
|
+
boxShadow: "\n 0 6px 0 ".concat(_apperance.palette.gray[400], ",\n 0 12px 0 ").concat(_apperance.palette.gray[400], "\n ")
|
|
171
|
+
},
|
|
172
|
+
'.MuiBox-root:hover &::before': {
|
|
173
|
+
opacity: 0
|
|
174
|
+
},
|
|
125
175
|
'@media (max-width: 768px)': {
|
|
126
|
-
justifyContent: 'center'
|
|
176
|
+
justifyContent: 'center',
|
|
177
|
+
opacity: 1,
|
|
178
|
+
// Toujours visible sur mobile
|
|
179
|
+
transform: 'translateX(0)',
|
|
180
|
+
'&::before': {
|
|
181
|
+
display: 'none' // Pas d'indicateur sur mobile
|
|
182
|
+
}
|
|
127
183
|
}
|
|
128
184
|
}));
|
|
129
185
|
|
|
@@ -213,8 +269,14 @@ const actionConfig = {
|
|
|
213
269
|
}
|
|
214
270
|
};
|
|
215
271
|
|
|
216
|
-
/**
|
|
217
|
-
* Composant de tableau moderne basé sur la maquette
|
|
272
|
+
/**
|
|
273
|
+
* Composant de tableau moderne basé sur la maquette
|
|
274
|
+
*
|
|
275
|
+
* Fonctionnalités :
|
|
276
|
+
* - Actions visibles uniquement au survol de la ligne
|
|
277
|
+
* - Indicateur visuel subtil (3 points) quand les actions sont cachées
|
|
278
|
+
* - Transitions fluides et animations modernes
|
|
279
|
+
* - Design responsive (actions toujours visibles sur mobile)
|
|
218
280
|
*/
|
|
219
281
|
const PuiModernTable = _ref => {
|
|
220
282
|
let {
|
|
@@ -357,22 +419,79 @@ const PuiModernTable = _ref => {
|
|
|
357
419
|
variant: "body1",
|
|
358
420
|
children: emptyMessage
|
|
359
421
|
})
|
|
360
|
-
}) :
|
|
361
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
422
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
423
|
+
children: [data.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(TableCard, {
|
|
424
|
+
sx: {
|
|
425
|
+
backgroundColor: "".concat(_apperance.palette.primary, "05"),
|
|
426
|
+
borderColor: "".concat(_apperance.palette.primary, "20"),
|
|
427
|
+
cursor: 'default',
|
|
428
|
+
'&:hover': {
|
|
429
|
+
transform: 'none',
|
|
430
|
+
boxShadow: _apperance.palette.shadow.card,
|
|
431
|
+
borderColor: "".concat(_apperance.palette.primary, "20"),
|
|
432
|
+
backgroundColor: "".concat(_apperance.palette.primary, "05")
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DataSection, {
|
|
436
|
+
children: columns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsxs)(DataColumn, {
|
|
437
|
+
style: {
|
|
438
|
+
flex: column.flex || 1
|
|
439
|
+
},
|
|
440
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ColumnLabel, {
|
|
441
|
+
sx: {
|
|
442
|
+
fontSize: '12px',
|
|
443
|
+
fontWeight: 700,
|
|
444
|
+
color: _apperance.palette.primary,
|
|
445
|
+
textTransform: 'uppercase',
|
|
446
|
+
letterSpacing: '0.8px'
|
|
447
|
+
},
|
|
448
|
+
children: column.label
|
|
449
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ColumnValue, {
|
|
450
|
+
sx: {
|
|
451
|
+
fontSize: '13px',
|
|
452
|
+
fontWeight: 600,
|
|
453
|
+
color: _apperance.palette.gray[600],
|
|
454
|
+
fontStyle: 'italic'
|
|
455
|
+
},
|
|
456
|
+
children: "En-t\xEAte"
|
|
457
|
+
})]
|
|
458
|
+
}, column.key))
|
|
459
|
+
}), actions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionsSection, {
|
|
460
|
+
className: "actions-section",
|
|
461
|
+
sx: {
|
|
462
|
+
opacity: 0.6,
|
|
463
|
+
'&::before': {
|
|
464
|
+
backgroundColor: _apperance.palette.primary,
|
|
465
|
+
boxShadow: "\n 0 6px 0 ".concat(_apperance.palette.primary, ",\n 0 12px 0 ").concat(_apperance.palette.primary, "\n ")
|
|
466
|
+
}
|
|
365
467
|
},
|
|
366
|
-
children:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
468
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
469
|
+
sx: {
|
|
470
|
+
fontSize: '11px',
|
|
471
|
+
fontWeight: 600,
|
|
472
|
+
color: _apperance.palette.primary,
|
|
473
|
+
textTransform: 'uppercase',
|
|
474
|
+
letterSpacing: '0.5px'
|
|
475
|
+
},
|
|
476
|
+
children: "Actions"
|
|
477
|
+
})
|
|
478
|
+
})]
|
|
479
|
+
}), data.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(TableCard, {
|
|
480
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DataSection, {
|
|
481
|
+
children: columns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsx)(DataColumn, {
|
|
482
|
+
style: {
|
|
483
|
+
flex: column.flex || 1
|
|
484
|
+
},
|
|
485
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ColumnValue, {
|
|
486
|
+
children: renderColumnValue(item, column)
|
|
487
|
+
})
|
|
488
|
+
}, column.key))
|
|
489
|
+
}), actions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionsSection, {
|
|
490
|
+
className: "actions-section",
|
|
491
|
+
children: renderActions(item)
|
|
492
|
+
})]
|
|
493
|
+
}, item.id || index))]
|
|
494
|
+
})
|
|
376
495
|
}), pagination && totalPages > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(TableFooter, {
|
|
377
496
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Pagination, {
|
|
378
497
|
count: totalPages,
|