@centreon/ui 26.11.3 → 26.11.5

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.11.3",
3
+ "version": "26.11.5",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -378,7 +378,7 @@ const Chart = ({
378
378
  )}
379
379
  {additionalLines?.map((additionalLine) => (
380
380
  <AdditionalLine
381
- key={additionalLine.yValue}
381
+ key={JSON.stringify(additionalLine)}
382
382
  {...additionalLine}
383
383
  graphWidth={graphWidth}
384
384
  yScale={yScalesPerUnit[additionalLine.unit]}
@@ -1,11 +1,11 @@
1
1
  import type { ScaleLinear } from 'd3-scale';
2
- import { useMemo } from 'react';
2
+ import { ReactElement, useMemo } from 'react';
3
3
 
4
4
  import type { AdditionalLineProps } from '../models';
5
5
 
6
6
  interface Props extends AdditionalLineProps {
7
7
  graphWidth: number;
8
- yScale: ScaleLinear<number, number>;
8
+ yScale?: ScaleLinear<number, number>;
9
9
  }
10
10
 
11
11
  const AdditionalLine = ({
@@ -14,8 +14,12 @@ const AdditionalLine = ({
14
14
  text,
15
15
  graphWidth,
16
16
  yScale
17
- }: Props): JSX.Element => {
18
- const positionY = useMemo(() => yScale(yValue), [yValue, yScale]);
17
+ }: Props): ReactElement | null => {
18
+ const positionY = useMemo(() => yScale?.(yValue), [yValue, yScale]);
19
+
20
+ if (positionY === undefined) {
21
+ return null;
22
+ }
19
23
 
20
24
  return (
21
25
  <g>
@@ -53,6 +53,12 @@
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;
@@ -105,6 +111,9 @@
105
111
  --color-secondary-light: #e5a5f0;
106
112
  --color-secondary-dark: #ac28c1;
107
113
 
114
+ /* Section title color */
115
+ --color-section-title: #131d5a;
116
+
108
117
  /* Status colors */
109
118
  --color-status-background-error: #ff6e6e;
110
119
  --color-status-background-none: --alpha(#2e68aa / 10%);
@@ -199,6 +208,7 @@
199
208
  --color-primary-dark: #4974a5;
200
209
  --color-primary-contrastText: #000;
201
210
  --color-secondary-main: #7c1fa2;
211
+ --color-section-title: #ffffff;
202
212
  --color-status-background-error: #ff4a4a;
203
213
  --color-status-background-none: --alpha(#2e68aa / 10%);
204
214
  --color-status-background-pending: #1ebeb3;