@centreon/ui 26.11.2 → 26.11.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/package.json +1 -1
- package/src/Form/CollapsibleGroup.tsx +1 -1
- package/src/Listing/Header/Cell/ListingHeaderCell.tsx +4 -4
- package/src/Listing/Header/Cell/SelectActionListingHeaderCell.tsx +3 -3
- package/src/ThemeProvider/palettes.ts +26 -16
- package/src/ThemeProvider/tailwindcss.css +36 -16
- package/src/components/CopyCommand/CopyCommand.styles.tsx +1 -1
- package/src/utils/statuses.ts +10 -4
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ const CollapsibleGroup = ({
|
|
|
95
95
|
<ContainerComponent>
|
|
96
96
|
<div
|
|
97
97
|
className={
|
|
98
|
-
'snap-y flex flex-row justify-between w-full pl-3 pr-1 text-
|
|
98
|
+
'snap-y flex flex-row justify-between w-full pl-3 pr-1 text-text-primary items-center'
|
|
99
99
|
}
|
|
100
100
|
data-testid={`${group?.name}-header`}
|
|
101
101
|
>
|
|
@@ -76,15 +76,15 @@ const ListingHeaderCell = ({
|
|
|
76
76
|
height: dataStyle.header.height
|
|
77
77
|
}}
|
|
78
78
|
>
|
|
79
|
-
<div className="flex items-center h-full justify-between text-
|
|
79
|
+
<div className="flex items-center h-full justify-between text-text-primary p-0">
|
|
80
80
|
{column.sortable ? (
|
|
81
81
|
<TableSortLabel
|
|
82
82
|
active={sortField === columnSortField}
|
|
83
83
|
aria-label={`Column ${column.label}`}
|
|
84
84
|
classes={{
|
|
85
|
-
icon: 'text-
|
|
85
|
+
icon: 'text-text-primary'
|
|
86
86
|
}}
|
|
87
|
-
className="text-
|
|
87
|
+
className="text-text-primary"
|
|
88
88
|
direction={sortOrder || 'desc'}
|
|
89
89
|
onClick={sort}
|
|
90
90
|
>
|
|
@@ -99,7 +99,7 @@ const ListingHeaderCell = ({
|
|
|
99
99
|
{columnConfiguration?.sortable && areColumnsEditable && (
|
|
100
100
|
<DraggableIconButton
|
|
101
101
|
{...props}
|
|
102
|
-
className={`p-0 ${isDragging ? 'cursor-grabbing' : 'cursor-grab'} text-
|
|
102
|
+
className={`p-0 ${isDragging ? 'cursor-grabbing' : 'cursor-grab'} text-text-primary opacity-0 hover:opacity-100 focus:opacity-100`}
|
|
103
103
|
columnLabel={columnLabel}
|
|
104
104
|
/>
|
|
105
105
|
)}
|
|
@@ -35,7 +35,7 @@ const SelectActionListingHeaderCell = ({
|
|
|
35
35
|
>
|
|
36
36
|
<Checkbox
|
|
37
37
|
checked={hasRows && selectedRowCount === rowCount}
|
|
38
|
-
className="text-
|
|
38
|
+
className="text-text-primary"
|
|
39
39
|
indeterminate={
|
|
40
40
|
hasRows && selectedRowCount > 0 && selectedRowCount < rowCount
|
|
41
41
|
}
|
|
@@ -44,7 +44,7 @@ const SelectActionListingHeaderCell = ({
|
|
|
44
44
|
/>
|
|
45
45
|
{not(isEmpty(predefinedRowsSelection)) ? (
|
|
46
46
|
<PopoverMenu
|
|
47
|
-
className="text-
|
|
47
|
+
className="text-text-primary"
|
|
48
48
|
icon={<ArrowDropDownIcon />}
|
|
49
49
|
title={labelPredefinedRowsSelectionMenu}
|
|
50
50
|
>
|
|
@@ -57,7 +57,7 @@ const SelectActionListingHeaderCell = ({
|
|
|
57
57
|
)}
|
|
58
58
|
</PopoverMenu>
|
|
59
59
|
) : (
|
|
60
|
-
<div className="text-
|
|
60
|
+
<div className="text-text-primary" />
|
|
61
61
|
)}
|
|
62
62
|
</TableCell>
|
|
63
63
|
);
|
|
@@ -187,7 +187,7 @@ export const lightPalette: PaletteOptions = {
|
|
|
187
187
|
},
|
|
188
188
|
background: {
|
|
189
189
|
default: '#F4F4F4',
|
|
190
|
-
listingHeader: '#
|
|
190
|
+
listingHeader: '#D9D9D9',
|
|
191
191
|
panel: '#EDEDED',
|
|
192
192
|
panelGroups: '#F5F5F5',
|
|
193
193
|
paper: '#FFFFFF',
|
|
@@ -206,6 +206,8 @@ export const lightPalette: PaletteOptions = {
|
|
|
206
206
|
divider: '#E3E3E3',
|
|
207
207
|
error: {
|
|
208
208
|
contrastText: '#000',
|
|
209
|
+
dark: '#B23333',
|
|
210
|
+
light: '#FF6E6E',
|
|
209
211
|
main: '#FF4A4A'
|
|
210
212
|
},
|
|
211
213
|
header: {
|
|
@@ -275,9 +277,9 @@ export const lightPalette: PaletteOptions = {
|
|
|
275
277
|
},
|
|
276
278
|
primary: {
|
|
277
279
|
contrastText: '#fff',
|
|
278
|
-
dark: '#
|
|
279
|
-
light: '#
|
|
280
|
-
main: '#
|
|
280
|
+
dark: '#2A3575',
|
|
281
|
+
light: '#D8DCE9',
|
|
282
|
+
main: '#131D5A'
|
|
281
283
|
},
|
|
282
284
|
secondary: {
|
|
283
285
|
contrastText: '#fff',
|
|
@@ -286,15 +288,17 @@ export const lightPalette: PaletteOptions = {
|
|
|
286
288
|
main: '#C772D6'
|
|
287
289
|
},
|
|
288
290
|
statusBackground: {
|
|
289
|
-
error: '#
|
|
291
|
+
error: '#FF6E6E',
|
|
290
292
|
none: alpha('#2E68AA', 0.1),
|
|
291
293
|
pending: '#1EBEB3',
|
|
292
|
-
success: '#
|
|
294
|
+
success: '#9FC74E',
|
|
293
295
|
unknown: '#E3E3E3',
|
|
294
|
-
warning: '#
|
|
296
|
+
warning: '#FCC481'
|
|
295
297
|
},
|
|
296
298
|
success: {
|
|
297
299
|
contrastText: '#000',
|
|
300
|
+
dark: '#5F8117',
|
|
301
|
+
light: '#9FC74E',
|
|
298
302
|
main: '#88B922'
|
|
299
303
|
},
|
|
300
304
|
text: {
|
|
@@ -309,7 +313,7 @@ export const lightPalette: PaletteOptions = {
|
|
|
309
313
|
},
|
|
310
314
|
warning: {
|
|
311
315
|
contrastText: '#000',
|
|
312
|
-
dark: '#
|
|
316
|
+
dark: '#B16C1B',
|
|
313
317
|
light: '#FCC481',
|
|
314
318
|
main: '#FD9B27'
|
|
315
319
|
}
|
|
@@ -355,7 +359,9 @@ export const darkPalette: PaletteOptions = {
|
|
|
355
359
|
divider: '#666666',
|
|
356
360
|
error: {
|
|
357
361
|
contrastText: '#fff',
|
|
358
|
-
|
|
362
|
+
dark: '#B23333',
|
|
363
|
+
light: '#FF6E6E',
|
|
364
|
+
main: '#FF4A4A'
|
|
359
365
|
},
|
|
360
366
|
header: {
|
|
361
367
|
page: {
|
|
@@ -420,7 +426,7 @@ export const darkPalette: PaletteOptions = {
|
|
|
420
426
|
mode: ThemeMode.dark,
|
|
421
427
|
pending: {
|
|
422
428
|
contrastText: '#fff',
|
|
423
|
-
main: '#
|
|
429
|
+
main: '#1EBEB3'
|
|
424
430
|
},
|
|
425
431
|
primary: {
|
|
426
432
|
contrastText: '#000',
|
|
@@ -433,16 +439,18 @@ export const darkPalette: PaletteOptions = {
|
|
|
433
439
|
main: '#7C1FA2'
|
|
434
440
|
},
|
|
435
441
|
statusBackground: {
|
|
436
|
-
error: '#
|
|
442
|
+
error: '#FF4A4A',
|
|
437
443
|
none: alpha('#2E68AA', 0.1),
|
|
438
|
-
pending: '#
|
|
439
|
-
success: '#
|
|
444
|
+
pending: '#1EBEB3',
|
|
445
|
+
success: '#88B922',
|
|
440
446
|
unknown: '#666666',
|
|
441
|
-
warning: '#
|
|
447
|
+
warning: '#FD9B27'
|
|
442
448
|
},
|
|
443
449
|
success: {
|
|
444
450
|
contrastText: '#fff',
|
|
445
|
-
|
|
451
|
+
dark: '#5F8117',
|
|
452
|
+
light: '#9FC74E',
|
|
453
|
+
main: '#88B922'
|
|
446
454
|
},
|
|
447
455
|
text: {
|
|
448
456
|
disabled: '#666666',
|
|
@@ -456,7 +464,9 @@ export const darkPalette: PaletteOptions = {
|
|
|
456
464
|
},
|
|
457
465
|
warning: {
|
|
458
466
|
contrastText: '#fff',
|
|
459
|
-
|
|
467
|
+
dark: '#B16C1B',
|
|
468
|
+
light: '#FCC481',
|
|
469
|
+
main: '#FD9B27'
|
|
460
470
|
}
|
|
461
471
|
};
|
|
462
472
|
|
|
@@ -46,13 +46,19 @@
|
|
|
46
46
|
|
|
47
47
|
/* Background colors */
|
|
48
48
|
--color-background-default: #f4f4f4;
|
|
49
|
-
--color-background-listing-header: #
|
|
49
|
+
--color-background-listing-header: #d9d9d9;
|
|
50
50
|
--color-background-panel: #ededed;
|
|
51
51
|
--color-background-panel-groups: #f5f5f5;
|
|
52
52
|
--color-background-paper: #ffffff;
|
|
53
53
|
--color-background-tooltip: #434e58;
|
|
54
54
|
--color-background-widget: #f8f8f8;
|
|
55
55
|
|
|
56
|
+
/* Brand colors. Deliberately not overridden in the dark variant: they paint
|
|
57
|
+
brand surfaces that stay the same in both themes. */
|
|
58
|
+
--color-brand-navy: #131d5a;
|
|
59
|
+
--color-brand-navy-action: #cde7fc;
|
|
60
|
+
--color-brand-navy-action-text: #2e68aa;
|
|
61
|
+
|
|
56
62
|
/* Chip colors */
|
|
57
63
|
--color-chip-error: #ff6666;
|
|
58
64
|
--color-chip-info: #1588d1;
|
|
@@ -63,6 +69,8 @@
|
|
|
63
69
|
/* Utility colors */
|
|
64
70
|
--color-divider: #e3e3e3;
|
|
65
71
|
--color-error-main: #ff4a4a;
|
|
72
|
+
--color-error-light: #ff6e6e;
|
|
73
|
+
--color-error-dark: #b23333;
|
|
66
74
|
|
|
67
75
|
/* Header colors */
|
|
68
76
|
--color-header-page-action-background-active: #1975d10f;
|
|
@@ -95,22 +103,27 @@
|
|
|
95
103
|
--color-pending-main: #1ebeb3;
|
|
96
104
|
|
|
97
105
|
/* Primary & Secondary colors */
|
|
98
|
-
--color-primary-main: #
|
|
99
|
-
--color-primary-light: #
|
|
100
|
-
--color-primary-dark: #
|
|
106
|
+
--color-primary-main: #131d5a;
|
|
107
|
+
--color-primary-light: #d8dce9;
|
|
108
|
+
--color-primary-dark: #2a3575;
|
|
101
109
|
--color-primary-contrastText: #fff;
|
|
102
110
|
--color-secondary-main: #c772d6;
|
|
103
111
|
--color-secondary-light: #e5a5f0;
|
|
104
112
|
--color-secondary-dark: #ac28c1;
|
|
105
113
|
|
|
114
|
+
/* Section title color */
|
|
115
|
+
--color-section-title: #131d5a;
|
|
116
|
+
|
|
106
117
|
/* Status colors */
|
|
107
|
-
--color-status-background-error: #
|
|
118
|
+
--color-status-background-error: #ff6e6e;
|
|
108
119
|
--color-status-background-none: --alpha(#2e68aa / 10%);
|
|
109
120
|
--color-status-background-pending: #1ebeb3;
|
|
110
|
-
--color-status-background-success: #
|
|
121
|
+
--color-status-background-success: #9fc74e;
|
|
111
122
|
--color-stauts-background-unknown: #e3e3e3;
|
|
112
|
-
--color-status-background-warning: #
|
|
123
|
+
--color-status-background-warning: #fcc481;
|
|
113
124
|
--color-success-main: #88b922;
|
|
125
|
+
--color-success-light: #9fc74e;
|
|
126
|
+
--color-success-dark: #5f8117;
|
|
114
127
|
|
|
115
128
|
/* Tile container colors */
|
|
116
129
|
--color-tile-background: #ffffff;
|
|
@@ -123,7 +136,7 @@
|
|
|
123
136
|
--color-text-secondary: #666666;
|
|
124
137
|
--color-warning-main: #fd9b27;
|
|
125
138
|
--color-warning-light: #fcc481;
|
|
126
|
-
--color-warning-dark: #
|
|
139
|
+
--color-warning-dark: #b16c1b;
|
|
127
140
|
|
|
128
141
|
/* Base colors */
|
|
129
142
|
--color-white: #ffffff;
|
|
@@ -161,7 +174,9 @@
|
|
|
161
174
|
--color-chip-success: #5f8118;
|
|
162
175
|
--color-chip-warning: #c55400;
|
|
163
176
|
--color-divider: #666666;
|
|
164
|
-
--color-error-main: #
|
|
177
|
+
--color-error-main: #ff4a4a;
|
|
178
|
+
--color-error-light: #ff6e6e;
|
|
179
|
+
--color-error-dark: #b23333;
|
|
165
180
|
--color-header-page-action-background-active: #1975d10f;
|
|
166
181
|
--color-header-page-action-background-default: #ffffff00;
|
|
167
182
|
--color-header-page-action-color-active: #1976d2;
|
|
@@ -187,26 +202,31 @@
|
|
|
187
202
|
--color-header-menu-item-color-active: #3e85d5;
|
|
188
203
|
--color-header-menu-item-color-default: #f9fafb;
|
|
189
204
|
--color-header-menu-item-color-hover: #ffffff;
|
|
190
|
-
--color-pending-main: #
|
|
205
|
+
--color-pending-main: #1ebeb3;
|
|
191
206
|
--color-primary-main: #6eaff8;
|
|
192
207
|
--color-primary-light: #8bbff9;
|
|
193
208
|
--color-primary-dark: #4974a5;
|
|
194
209
|
--color-primary-contrastText: #000;
|
|
195
210
|
--color-secondary-main: #7c1fa2;
|
|
196
|
-
--color-
|
|
211
|
+
--color-section-title: #ffffff;
|
|
212
|
+
--color-status-background-error: #ff4a4a;
|
|
197
213
|
--color-status-background-none: --alpha(#2e68aa / 10%);
|
|
198
|
-
--color-status-background-pending: #
|
|
199
|
-
--color-status-background-success: #
|
|
214
|
+
--color-status-background-pending: #1ebeb3;
|
|
215
|
+
--color-status-background-success: #88b922;
|
|
200
216
|
--color-stauts-background-unknown: #666666;
|
|
201
|
-
--color-status-background-warning: #
|
|
202
|
-
--color-success-main: #
|
|
217
|
+
--color-status-background-warning: #fd9b27;
|
|
218
|
+
--color-success-main: #88b922;
|
|
219
|
+
--color-success-light: #9fc74e;
|
|
220
|
+
--color-success-dark: #5f8117;
|
|
203
221
|
--color-tile-background: #2e2e2e;
|
|
204
222
|
--color-tile-border: #4a4a4a;
|
|
205
223
|
--color-tile-border-hover: #6d6d6d;
|
|
206
224
|
--color-text-disabled: #666666;
|
|
207
225
|
--color-text-primary: #ffffff;
|
|
208
226
|
--color-text-secondary: #cccccc;
|
|
209
|
-
--color-warning-main: #
|
|
227
|
+
--color-warning-main: #fd9b27;
|
|
228
|
+
--color-warning-light: #fcc481;
|
|
229
|
+
--color-warning-dark: #b16c1b;
|
|
210
230
|
}
|
|
211
231
|
}
|
|
212
232
|
|
|
@@ -85,7 +85,7 @@ export const useCopyCommandStyle = makeStyles()((theme) => ({
|
|
|
85
85
|
languageChip: {
|
|
86
86
|
background: theme.palette.background.listingHeader,
|
|
87
87
|
borderRadius: `0px ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
|
|
88
|
-
color: theme.palette.
|
|
88
|
+
color: theme.palette.text.primary,
|
|
89
89
|
fontSize: theme.typography.body2.fontSize,
|
|
90
90
|
padding: `0px ${theme.spacing(0.5)}`,
|
|
91
91
|
position: 'absolute',
|
package/src/utils/statuses.ts
CHANGED
|
@@ -25,14 +25,20 @@ export const getStatusColors = ({
|
|
|
25
25
|
}: StatusColorProps): Colors => {
|
|
26
26
|
const { palette } = theme;
|
|
27
27
|
|
|
28
|
+
// Typography color for status chips: text action primary (#000000) in light
|
|
29
|
+
// mode, paper (#212121) in dark mode, so it stays readable on the bright
|
|
30
|
+
// status backgrounds in both modes.
|
|
31
|
+
const chipTextColor =
|
|
32
|
+
palette.mode === 'dark' ? palette.background.paper : palette.text.primary;
|
|
33
|
+
|
|
28
34
|
const colorMapping = {
|
|
29
35
|
[SeverityCode.High]: {
|
|
30
36
|
backgroundColor: theme.palette.statusBackground.error,
|
|
31
|
-
color:
|
|
37
|
+
color: chipTextColor
|
|
32
38
|
},
|
|
33
39
|
[SeverityCode.Medium]: {
|
|
34
40
|
backgroundColor: theme.palette.statusBackground.warning,
|
|
35
|
-
color:
|
|
41
|
+
color: chipTextColor
|
|
36
42
|
},
|
|
37
43
|
[SeverityCode.Low]: {
|
|
38
44
|
backgroundColor: theme.palette.statusBackground.unknown,
|
|
@@ -40,11 +46,11 @@ export const getStatusColors = ({
|
|
|
40
46
|
},
|
|
41
47
|
[SeverityCode.Pending]: {
|
|
42
48
|
backgroundColor: theme.palette.statusBackground.pending,
|
|
43
|
-
color:
|
|
49
|
+
color: chipTextColor
|
|
44
50
|
},
|
|
45
51
|
[SeverityCode.OK]: {
|
|
46
52
|
backgroundColor: theme.palette.statusBackground.success,
|
|
47
|
-
color:
|
|
53
|
+
color: chipTextColor
|
|
48
54
|
},
|
|
49
55
|
[SeverityCode.None]: {
|
|
50
56
|
backgroundColor: theme.palette.statusBackground.none,
|