@portnet/ui 3.1.2 → 3.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/components/table/PuiModernTable.js +137 -36
- package/dist/config/apperance.js +55 -45
- package/package.json +1 -1
|
@@ -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',
|
|
@@ -101,11 +123,12 @@ const DataColumn = (0, _styles.styled)(_material.Box)(() => ({
|
|
|
101
123
|
|
|
102
124
|
// Label de colonne
|
|
103
125
|
const ColumnLabel = (0, _styles.styled)(_material.Typography)(() => ({
|
|
104
|
-
fontSize: '
|
|
126
|
+
fontSize: '12px',
|
|
105
127
|
fontWeight: 600,
|
|
106
|
-
color:
|
|
107
|
-
|
|
108
|
-
|
|
128
|
+
color: "#293854",
|
|
129
|
+
// Couleur bleu marine pour les en-têtes
|
|
130
|
+
textTransform: 'none',
|
|
131
|
+
letterSpacing: '0.3px'
|
|
109
132
|
}));
|
|
110
133
|
|
|
111
134
|
// Valeur de colonne
|
|
@@ -116,14 +139,45 @@ const ColumnValue = (0, _styles.styled)(_material.Typography)(() => ({
|
|
|
116
139
|
wordBreak: 'break-word'
|
|
117
140
|
}));
|
|
118
141
|
|
|
119
|
-
// Section des actions
|
|
142
|
+
// Section des actions avec effet de survol
|
|
120
143
|
const ActionsSection = (0, _styles.styled)(_material.Box)(() => ({
|
|
121
144
|
display: 'flex',
|
|
122
145
|
alignItems: 'center',
|
|
123
146
|
gap: '8px',
|
|
124
147
|
flexShrink: 0,
|
|
148
|
+
opacity: 0,
|
|
149
|
+
transform: 'translateX(10px)',
|
|
150
|
+
transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
151
|
+
position: 'relative',
|
|
152
|
+
// Les actions restent toujours cachées, même au hover direct
|
|
153
|
+
// Elles ne s'affichent que via le hover de la card parent
|
|
154
|
+
|
|
155
|
+
// Indicateur subtil d'actions disponibles (icône menu)
|
|
156
|
+
'&::before': {
|
|
157
|
+
content: '""',
|
|
158
|
+
position: 'absolute',
|
|
159
|
+
right: '8px',
|
|
160
|
+
top: '50%',
|
|
161
|
+
transform: 'translateY(-50%)',
|
|
162
|
+
width: '4px',
|
|
163
|
+
height: '4px',
|
|
164
|
+
borderRadius: '50%',
|
|
165
|
+
backgroundColor: _apperance.palette.gray[400],
|
|
166
|
+
opacity: 1,
|
|
167
|
+
transition: 'opacity 0.3s ease',
|
|
168
|
+
boxShadow: "\n 0 6px 0 ".concat(_apperance.palette.gray[400], ",\n 0 12px 0 ").concat(_apperance.palette.gray[400], "\n ")
|
|
169
|
+
},
|
|
170
|
+
'.MuiBox-root:hover &::before': {
|
|
171
|
+
opacity: 0
|
|
172
|
+
},
|
|
125
173
|
'@media (max-width: 768px)': {
|
|
126
|
-
justifyContent: 'center'
|
|
174
|
+
justifyContent: 'center',
|
|
175
|
+
opacity: 0,
|
|
176
|
+
// Reste caché même sur mobile
|
|
177
|
+
transform: 'translateX(10px)',
|
|
178
|
+
'&::before': {
|
|
179
|
+
display: 'none' // Pas d'indicateur sur mobile
|
|
180
|
+
}
|
|
127
181
|
}
|
|
128
182
|
}));
|
|
129
183
|
|
|
@@ -213,8 +267,14 @@ const actionConfig = {
|
|
|
213
267
|
}
|
|
214
268
|
};
|
|
215
269
|
|
|
216
|
-
/**
|
|
217
|
-
* Composant de tableau moderne basé sur la maquette
|
|
270
|
+
/**
|
|
271
|
+
* Composant de tableau moderne basé sur la maquette
|
|
272
|
+
*
|
|
273
|
+
* Fonctionnalités :
|
|
274
|
+
* - Actions visibles uniquement au survol de la ligne
|
|
275
|
+
* - Indicateur visuel subtil (3 points) quand les actions sont cachées
|
|
276
|
+
* - Transitions fluides et animations modernes
|
|
277
|
+
* - Design responsive (actions toujours visibles sur mobile)
|
|
218
278
|
*/
|
|
219
279
|
const PuiModernTable = _ref => {
|
|
220
280
|
let {
|
|
@@ -274,12 +334,16 @@ const PuiModernTable = _ref => {
|
|
|
274
334
|
const config = actionConfig[action.type] || actionConfig.validate;
|
|
275
335
|
const IconComponent = action.icon || config.icon;
|
|
276
336
|
const isDisabled = (_action$disabled = action.disabled) === null || _action$disabled === void 0 ? void 0 : _action$disabled.call(action, item);
|
|
337
|
+
|
|
338
|
+
// Couleur unique basée sur le hover (couleur primaire avec transparence)
|
|
339
|
+
const hoverColor = "".concat(_apperance.palette.primary, "dd"); // Couleur du hover comme couleur unique
|
|
340
|
+
|
|
277
341
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
278
342
|
color: "primary",
|
|
279
343
|
size: "small",
|
|
280
344
|
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
281
345
|
sx: {
|
|
282
|
-
fontSize: '
|
|
346
|
+
fontSize: '12px'
|
|
283
347
|
}
|
|
284
348
|
}),
|
|
285
349
|
onClick: () => {
|
|
@@ -289,20 +353,21 @@ const PuiModernTable = _ref => {
|
|
|
289
353
|
disabled: isDisabled,
|
|
290
354
|
sx: {
|
|
291
355
|
minWidth: 'auto',
|
|
292
|
-
padding: '
|
|
356
|
+
padding: '4px 8px',
|
|
293
357
|
fontSize: '11px',
|
|
294
358
|
fontWeight: 500,
|
|
295
|
-
backgroundColor: isDisabled ? _apperance.palette.gray[300] :
|
|
296
|
-
color: isDisabled ? _apperance.palette.gray[500] :
|
|
359
|
+
backgroundColor: isDisabled ? _apperance.palette.gray[300] : hoverColor,
|
|
360
|
+
color: isDisabled ? _apperance.palette.gray[500] : _apperance.palette.white,
|
|
297
361
|
border: 'none',
|
|
298
|
-
borderRadius: '
|
|
362
|
+
borderRadius: '4px',
|
|
299
363
|
textTransform: 'none',
|
|
364
|
+
boxShadow: 'none',
|
|
300
365
|
'&:hover': {
|
|
301
|
-
backgroundColor: isDisabled ? _apperance.palette.gray[300] :
|
|
302
|
-
transform:
|
|
366
|
+
backgroundColor: isDisabled ? _apperance.palette.gray[300] : hoverColor,
|
|
367
|
+
transform: 'none'
|
|
303
368
|
},
|
|
304
369
|
'&:active': {
|
|
305
|
-
transform:
|
|
370
|
+
transform: 'none'
|
|
306
371
|
}
|
|
307
372
|
},
|
|
308
373
|
children: action.label || config.label
|
|
@@ -357,22 +422,58 @@ const PuiModernTable = _ref => {
|
|
|
357
422
|
variant: "body1",
|
|
358
423
|
children: emptyMessage
|
|
359
424
|
})
|
|
360
|
-
}) :
|
|
361
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
425
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
426
|
+
children: [data.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(TableCard, {
|
|
427
|
+
sx: {
|
|
428
|
+
backgroundColor: _apperance.palette.gray[50],
|
|
429
|
+
// Fond gris très clair comme dans l'image
|
|
430
|
+
borderColor: _apperance.palette.border.light,
|
|
431
|
+
cursor: 'default',
|
|
432
|
+
// Pas d'effet de hover pour l'en-tête
|
|
433
|
+
'&:hover': {
|
|
434
|
+
backgroundColor: _apperance.palette.gray[50],
|
|
435
|
+
// Garde le même fond au survol
|
|
436
|
+
borderColor: _apperance.palette.border.light,
|
|
437
|
+
transform: 'none',
|
|
438
|
+
boxShadow: 'none'
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DataSection, {
|
|
442
|
+
children: columns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsx)(DataColumn, {
|
|
443
|
+
style: {
|
|
444
|
+
flex: column.flex || 1
|
|
445
|
+
},
|
|
446
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
447
|
+
sx: {
|
|
448
|
+
fontSize: '12px',
|
|
449
|
+
fontWeight: 600,
|
|
450
|
+
color: "#029cfd !important",
|
|
451
|
+
textTransform: 'none',
|
|
452
|
+
letterSpacing: '0.3px',
|
|
453
|
+
'& *': {
|
|
454
|
+
color: "#2C3E5F !important"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
children: column.label
|
|
458
|
+
})
|
|
459
|
+
}, column.key))
|
|
460
|
+
})
|
|
461
|
+
}), data.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(TableCard, {
|
|
462
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DataSection, {
|
|
463
|
+
children: columns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsx)(DataColumn, {
|
|
464
|
+
style: {
|
|
465
|
+
flex: column.flex || 1
|
|
466
|
+
},
|
|
467
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ColumnValue, {
|
|
468
|
+
children: renderColumnValue(item, column)
|
|
469
|
+
})
|
|
470
|
+
}, column.key))
|
|
471
|
+
}), actions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionsSection, {
|
|
472
|
+
className: "actions-section",
|
|
473
|
+
children: renderActions(item)
|
|
474
|
+
})]
|
|
475
|
+
}, item.id || index))]
|
|
476
|
+
})
|
|
376
477
|
}), pagination && totalPages > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(TableFooter, {
|
|
377
478
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Pagination, {
|
|
378
479
|
count: totalPages,
|
package/dist/config/apperance.js
CHANGED
|
@@ -6,36 +6,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.palette = void 0;
|
|
7
7
|
const palette = exports.palette = {
|
|
8
8
|
inherit: "inherit",
|
|
9
|
-
// Couleurs principales
|
|
10
|
-
primary: "#
|
|
11
|
-
// Bleu
|
|
9
|
+
// Couleurs principales basées sur l'image "1 - Listing 1.png"
|
|
10
|
+
primary: "#007BFF",
|
|
11
|
+
// Bleu vif utilisé pour les éléments actifs
|
|
12
12
|
secondary: "#F5F5F5",
|
|
13
13
|
// Gris très clair pour les backgrounds
|
|
14
|
-
tertiary: "#
|
|
14
|
+
tertiary: "#637381",
|
|
15
15
|
// Gris moyen pour les textes secondaires
|
|
16
16
|
|
|
17
|
-
// Status colors
|
|
18
|
-
error: "#
|
|
19
|
-
// Rouge
|
|
20
|
-
warning: "#
|
|
21
|
-
// Orange
|
|
22
|
-
success: "#
|
|
23
|
-
// Vert
|
|
24
|
-
info: "#
|
|
25
|
-
// Bleu
|
|
17
|
+
// Status colors basées sur l'image
|
|
18
|
+
error: "#DC3545",
|
|
19
|
+
// Rouge "Expiré" de l'image
|
|
20
|
+
warning: "#FFC107",
|
|
21
|
+
// Orange "Renouveler" de l'image
|
|
22
|
+
success: "#28A745",
|
|
23
|
+
// Vert "Validé" de l'image
|
|
24
|
+
info: "#007BFF",
|
|
25
|
+
// Bleu "En cours" de l'image
|
|
26
26
|
|
|
27
|
-
// Colors neutres
|
|
27
|
+
// Colors neutres basées sur l'image
|
|
28
28
|
white: "#FFFFFF",
|
|
29
|
-
dark: "#
|
|
29
|
+
dark: "#212B36",
|
|
30
|
+
// Bleu très foncé de la barre d'en-tête
|
|
31
|
+
navy: "#293854",
|
|
32
|
+
// Bleu marine pour la navigation
|
|
30
33
|
black: "#000000",
|
|
31
|
-
// Palette complète basée sur l'analyse
|
|
32
|
-
accent: "#
|
|
33
|
-
//
|
|
34
|
+
// Palette complète basée sur l'analyse de l'image
|
|
35
|
+
accent: "#007BFF",
|
|
36
|
+
// Bleu accent principal
|
|
34
37
|
blue: {
|
|
35
38
|
light: "#E3F2FD",
|
|
36
|
-
main: "#
|
|
37
|
-
// Bleu principal
|
|
38
|
-
dark: "#
|
|
39
|
+
main: "#007BFF",
|
|
40
|
+
// Bleu principal de l'image
|
|
41
|
+
dark: "#293854",
|
|
42
|
+
// Bleu marine du header
|
|
39
43
|
darker: "#0D47A1"
|
|
40
44
|
},
|
|
41
45
|
gray: {
|
|
@@ -43,19 +47,25 @@ const palette = exports.palette = {
|
|
|
43
47
|
100: "#F5F5F5",
|
|
44
48
|
200: "#EEEEEE",
|
|
45
49
|
300: "#E0E0E0",
|
|
50
|
+
// Gris clair pour "Souscrit"
|
|
46
51
|
400: "#BDBDBD",
|
|
47
52
|
500: "#9E9E9E",
|
|
48
|
-
600: "#
|
|
49
|
-
|
|
53
|
+
600: "#637381",
|
|
54
|
+
// Gris moyen pour les onglets inactifs
|
|
55
|
+
700: "#454F5B",
|
|
56
|
+
// Gris foncé pour le texte principal
|
|
50
57
|
800: "#424242",
|
|
51
|
-
900: "#
|
|
58
|
+
900: "#212B36" // Bleu très foncé
|
|
52
59
|
},
|
|
53
60
|
background: {
|
|
54
|
-
default: "#
|
|
55
|
-
//
|
|
61
|
+
default: "#FFFFFF",
|
|
62
|
+
// Fond principal blanc de l'image
|
|
56
63
|
paper: "#FFFFFF",
|
|
64
|
+
// Cartes blanches
|
|
57
65
|
card: "#FFFFFF",
|
|
58
|
-
|
|
66
|
+
// Cartes du tableau
|
|
67
|
+
sidebar: "#FFFFFF",
|
|
68
|
+
// Barre latérale blanche
|
|
59
69
|
required: "#FFF3E0",
|
|
60
70
|
// Orange très clair
|
|
61
71
|
error: "#FFEBEE",
|
|
@@ -67,11 +77,11 @@ const palette = exports.palette = {
|
|
|
67
77
|
info: "#E3F2FD" // Bleu très clair
|
|
68
78
|
},
|
|
69
79
|
border: {
|
|
70
|
-
light: "#
|
|
71
|
-
// Bordures claires des
|
|
80
|
+
light: "#DFE3E8",
|
|
81
|
+
// Bordures claires des cartes de l'image
|
|
72
82
|
main: "#BDBDBD",
|
|
73
|
-
// Bordures moyennes
|
|
74
|
-
dark: "#
|
|
83
|
+
// Bordures moyennes
|
|
84
|
+
dark: "#454F5B" // Bordures foncées
|
|
75
85
|
},
|
|
76
86
|
shadow: {
|
|
77
87
|
light: "0px 1px 3px rgba(0, 0, 0, 0.1)",
|
|
@@ -79,20 +89,20 @@ const palette = exports.palette = {
|
|
|
79
89
|
strong: "0px 10px 25px rgba(0, 0, 0, 0.15)",
|
|
80
90
|
card: "0px 2px 8px rgba(0, 0, 0, 0.08)"
|
|
81
91
|
},
|
|
82
|
-
// Couleurs spécifiques des boutons d'actions
|
|
92
|
+
// Couleurs spécifiques des boutons d'actions basées sur l'image
|
|
83
93
|
actions: {
|
|
84
|
-
validate: "#
|
|
85
|
-
// Vert "Validé"
|
|
86
|
-
expire: "#
|
|
87
|
-
// Rouge "Expiré"
|
|
88
|
-
renew: "#
|
|
89
|
-
// Orange "Renouveler"
|
|
90
|
-
download: "#
|
|
91
|
-
// Bleu "Télécharger"
|
|
92
|
-
processing: "#
|
|
93
|
-
//
|
|
94
|
-
souscrit: "#
|
|
95
|
-
// Gris
|
|
96
|
-
default: "#
|
|
94
|
+
validate: "#28A745",
|
|
95
|
+
// Vert "Validé" de l'image
|
|
96
|
+
expire: "#DC3545",
|
|
97
|
+
// Rouge "Expiré" de l'image
|
|
98
|
+
renew: "#FFC107",
|
|
99
|
+
// Orange "Renouveler" de l'image
|
|
100
|
+
download: "#007BFF",
|
|
101
|
+
// Bleu "Télécharger" de l'image
|
|
102
|
+
processing: "#007BFF",
|
|
103
|
+
// Bleu "En cours" de l'image
|
|
104
|
+
souscrit: "#E0E0E0",
|
|
105
|
+
// Gris clair "Souscrit" de l'image
|
|
106
|
+
default: "#637381" // Gris moyen par défaut
|
|
97
107
|
}
|
|
98
108
|
};
|