@centreon/ui 26.10.1 → 26.10.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "26.10.1",
3
+ "version": "26.10.2",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -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-white items-center'
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-white p-0">
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-white'
85
+ icon: 'text-text-primary'
86
86
  }}
87
- className="text-white"
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-white opacity-0 hover:opacity-100 focus:opacity-100`}
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-white"
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-white"
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-white" />
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: '#666666',
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: '#255891',
279
- light: '#cde7fc',
280
- main: '#2E68AA'
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: '#FF6666',
291
+ error: '#FF6E6E',
290
292
  none: alpha('#2E68AA', 0.1),
291
293
  pending: '#1EBEB3',
292
- success: '#88B922',
294
+ success: '#9FC74E',
293
295
  unknown: '#E3E3E3',
294
- warning: '#FD9B27'
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: '#FC7E00',
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
- main: '#D60101'
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: '#118077'
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: '#D60101',
442
+ error: '#FF4A4A',
437
443
  none: alpha('#2E68AA', 0.1),
438
- pending: '#118077',
439
- success: '#5F8118',
444
+ pending: '#1EBEB3',
445
+ success: '#88B922',
440
446
  unknown: '#666666',
441
- warning: '#C55400'
447
+ warning: '#FD9B27'
442
448
  },
443
449
  success: {
444
450
  contrastText: '#fff',
445
- main: '#5F8118'
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
- main: '#C55400'
467
+ dark: '#B16C1B',
468
+ light: '#FCC481',
469
+ main: '#FD9B27'
460
470
  }
461
471
  };
462
472
 
@@ -46,7 +46,7 @@
46
46
 
47
47
  /* Background colors */
48
48
  --color-background-default: #f4f4f4;
49
- --color-background-listing-header: #666666;
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;
@@ -63,6 +63,8 @@
63
63
  /* Utility colors */
64
64
  --color-divider: #e3e3e3;
65
65
  --color-error-main: #ff4a4a;
66
+ --color-error-light: #ff6e6e;
67
+ --color-error-dark: #b23333;
66
68
 
67
69
  /* Header colors */
68
70
  --color-header-page-action-background-active: #1975d10f;
@@ -95,22 +97,24 @@
95
97
  --color-pending-main: #1ebeb3;
96
98
 
97
99
  /* Primary & Secondary colors */
98
- --color-primary-main: #2e68aa;
99
- --color-primary-light: #cde7fc;
100
- --color-primary-dark: #255891;
100
+ --color-primary-main: #131d5a;
101
+ --color-primary-light: #d8dce9;
102
+ --color-primary-dark: #2a3575;
101
103
  --color-primary-contrastText: #fff;
102
104
  --color-secondary-main: #c772d6;
103
105
  --color-secondary-light: #e5a5f0;
104
106
  --color-secondary-dark: #ac28c1;
105
107
 
106
108
  /* Status colors */
107
- --color-status-background-error: #ff6666;
109
+ --color-status-background-error: #ff6e6e;
108
110
  --color-status-background-none: --alpha(#2e68aa / 10%);
109
111
  --color-status-background-pending: #1ebeb3;
110
- --color-status-background-success: #88b922;
112
+ --color-status-background-success: #9fc74e;
111
113
  --color-stauts-background-unknown: #e3e3e3;
112
- --color-status-background-warning: #fd9b27;
114
+ --color-status-background-warning: #fcc481;
113
115
  --color-success-main: #88b922;
116
+ --color-success-light: #9fc74e;
117
+ --color-success-dark: #5f8117;
114
118
 
115
119
  /* Tile container colors */
116
120
  --color-tile-background: #ffffff;
@@ -123,7 +127,7 @@
123
127
  --color-text-secondary: #666666;
124
128
  --color-warning-main: #fd9b27;
125
129
  --color-warning-light: #fcc481;
126
- --color-warning-dark: #fc7e00;
130
+ --color-warning-dark: #b16c1b;
127
131
 
128
132
  /* Base colors */
129
133
  --color-white: #ffffff;
@@ -161,7 +165,9 @@
161
165
  --color-chip-success: #5f8118;
162
166
  --color-chip-warning: #c55400;
163
167
  --color-divider: #666666;
164
- --color-error-main: #d60101;
168
+ --color-error-main: #ff4a4a;
169
+ --color-error-light: #ff6e6e;
170
+ --color-error-dark: #b23333;
165
171
  --color-header-page-action-background-active: #1975d10f;
166
172
  --color-header-page-action-background-default: #ffffff00;
167
173
  --color-header-page-action-color-active: #1976d2;
@@ -187,26 +193,30 @@
187
193
  --color-header-menu-item-color-active: #3e85d5;
188
194
  --color-header-menu-item-color-default: #f9fafb;
189
195
  --color-header-menu-item-color-hover: #ffffff;
190
- --color-pending-main: #118077;
196
+ --color-pending-main: #1ebeb3;
191
197
  --color-primary-main: #6eaff8;
192
198
  --color-primary-light: #8bbff9;
193
199
  --color-primary-dark: #4974a5;
194
200
  --color-primary-contrastText: #000;
195
201
  --color-secondary-main: #7c1fa2;
196
- --color-status-background-error: #d60101;
202
+ --color-status-background-error: #ff4a4a;
197
203
  --color-status-background-none: --alpha(#2e68aa / 10%);
198
- --color-status-background-pending: #118077;
199
- --color-status-background-success: #5f8118;
204
+ --color-status-background-pending: #1ebeb3;
205
+ --color-status-background-success: #88b922;
200
206
  --color-stauts-background-unknown: #666666;
201
- --color-status-background-warning: #c55400;
202
- --color-success-main: #5f8118;
207
+ --color-status-background-warning: #fd9b27;
208
+ --color-success-main: #88b922;
209
+ --color-success-light: #9fc74e;
210
+ --color-success-dark: #5f8117;
203
211
  --color-tile-background: #2e2e2e;
204
212
  --color-tile-border: #4a4a4a;
205
213
  --color-tile-border-hover: #6d6d6d;
206
214
  --color-text-disabled: #666666;
207
215
  --color-text-primary: #ffffff;
208
216
  --color-text-secondary: #cccccc;
209
- --color-warning-main: #c55400;
217
+ --color-warning-main: #fd9b27;
218
+ --color-warning-light: #fcc481;
219
+ --color-warning-dark: #b16c1b;
210
220
  }
211
221
  }
212
222
 
@@ -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.common.white,
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',
@@ -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: palette.error.contrastText
37
+ color: chipTextColor
32
38
  },
33
39
  [SeverityCode.Medium]: {
34
40
  backgroundColor: theme.palette.statusBackground.warning,
35
- color: palette.warning.contrastText
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: palette.text.primary
49
+ color: chipTextColor
44
50
  },
45
51
  [SeverityCode.OK]: {
46
52
  backgroundColor: theme.palette.statusBackground.success,
47
- color: palette.text.primary
53
+ color: chipTextColor
48
54
  },
49
55
  [SeverityCode.None]: {
50
56
  backgroundColor: theme.palette.statusBackground.none,