@tsiky/components-r19 1.0.0 → 1.1.0
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/index.ts +35 -33
- package/package.json +1 -1
- package/src/components/Charts/area-chart-admission/AreaChartAdmission.tsx +123 -89
- package/src/components/Charts/bar-chart/BarChart.tsx +167 -132
- package/src/components/Charts/mixed-chart/MixedChart.tsx +65 -9
- package/src/components/Charts/sankey-chart/SankeyChart.tsx +183 -155
- package/src/components/Confirmationpopup/ConfirmationPopup.module.css +88 -0
- package/src/components/Confirmationpopup/ConfirmationPopup.stories.tsx +94 -0
- package/src/components/Confirmationpopup/ConfirmationPopup.tsx +47 -0
- package/src/components/Confirmationpopup/index.ts +6 -0
- package/src/components/Confirmationpopup/useConfirmationPopup.ts +48 -0
- package/src/components/DayStatCard/DayStatCard.tsx +96 -69
- package/src/components/DynamicTable/AdvancedFilters.tsx +196 -196
- package/src/components/DynamicTable/ColumnSorter.tsx +185 -185
- package/src/components/DynamicTable/Pagination.tsx +115 -115
- package/src/components/DynamicTable/TableauDynamique.module.css +1287 -1287
- package/src/components/DynamicTable/filters/SelectFilter.tsx +69 -69
- package/src/components/EntryControl/EntryControl.tsx +117 -117
- package/src/components/Grid/Grid.tsx +5 -0
- package/src/components/Header/Header.tsx +4 -2
- package/src/components/Header/header.css +61 -31
- package/src/components/MetricsPanel/MetricsPanel.module.css +688 -636
- package/src/components/MetricsPanel/MetricsPanel.tsx +220 -282
- package/src/components/MetricsPanel/renderers/CompactRenderer.tsx +148 -125
- package/src/components/NavBar/NavBar.tsx +1 -1
- package/src/components/SelectFilter/SelectFilter.module.css +249 -0
- package/src/components/SelectFilter/SelectFilter.stories.tsx +321 -0
- package/src/components/SelectFilter/SelectFilter.tsx +219 -0
- package/src/components/SelectFilter/index.ts +2 -0
- package/src/components/SelectFilter/types.ts +19 -0
- package/src/components/TranslationKey/TranslationKey.tsx +265 -245
- package/src/components/TrendList/TrendList.tsx +72 -45
package/index.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
export * from './src/components/Button';
|
|
2
|
-
export * from './src/components/CircularProgress';
|
|
3
|
-
export * from './src/components/DayStatCard';
|
|
4
|
-
export * from './src/components/DropdownMenu';
|
|
5
|
-
export * from './src/components/Grid';
|
|
6
|
-
export * from './src/components/Header';
|
|
7
|
-
export * from './src/components/IconText';
|
|
8
|
-
export * from './src/components/Logo';
|
|
9
|
-
export * from './src/components/NavBar';
|
|
10
|
-
export * from './src/components/NavItem';
|
|
11
|
-
export * from './src/components/ScrollableHorizontale';
|
|
12
|
-
export * from './src/components/SubNavBar';
|
|
13
|
-
export * from './src/components/TrendItem';
|
|
14
|
-
export * from './src/components/TrendList';
|
|
15
|
-
export * from './src/components/theme';
|
|
16
|
-
export * from './src/components/DynamicForm';
|
|
17
|
-
export * from './src/components/DynamicInput';
|
|
18
|
-
export * from './src/components/DynamicTable';
|
|
19
|
-
export * from './src/components/MetricsPanel';
|
|
20
|
-
export * from './src/components/ChartContainer';
|
|
21
|
-
export * from './src/components/Switcher';
|
|
22
|
-
export * from './src/components/Alert';
|
|
23
|
-
export * from './src/components/PeriodSelect';
|
|
24
|
-
export * from './src/components/SideComponent';
|
|
25
|
-
export * from './src/components/Title';
|
|
26
|
-
export * from './src/components/ModuleHeader';
|
|
27
|
-
export * from './src/components/ModuleSideBar';
|
|
28
|
-
export * from './src/components/SearchBar';
|
|
29
|
-
export * from './src/components/TranslationKey';
|
|
30
|
-
export * from './src/components/EntryControl';
|
|
31
|
-
export * from './src/components/AddItemModal';
|
|
32
|
-
export * from './src/components/DraggableSwitcher';
|
|
33
|
-
export * from './src/components/AnnouncementPanel';
|
|
1
|
+
export * from './src/components/Button';
|
|
2
|
+
export * from './src/components/CircularProgress';
|
|
3
|
+
export * from './src/components/DayStatCard';
|
|
4
|
+
export * from './src/components/DropdownMenu';
|
|
5
|
+
export * from './src/components/Grid';
|
|
6
|
+
export * from './src/components/Header';
|
|
7
|
+
export * from './src/components/IconText';
|
|
8
|
+
export * from './src/components/Logo';
|
|
9
|
+
export * from './src/components/NavBar';
|
|
10
|
+
export * from './src/components/NavItem';
|
|
11
|
+
export * from './src/components/ScrollableHorizontale';
|
|
12
|
+
export * from './src/components/SubNavBar';
|
|
13
|
+
export * from './src/components/TrendItem';
|
|
14
|
+
export * from './src/components/TrendList';
|
|
15
|
+
export * from './src/components/theme';
|
|
16
|
+
export * from './src/components/DynamicForm';
|
|
17
|
+
export * from './src/components/DynamicInput';
|
|
18
|
+
export * from './src/components/DynamicTable';
|
|
19
|
+
export * from './src/components/MetricsPanel';
|
|
20
|
+
export * from './src/components/ChartContainer';
|
|
21
|
+
export * from './src/components/Switcher';
|
|
22
|
+
export * from './src/components/Alert';
|
|
23
|
+
export * from './src/components/PeriodSelect';
|
|
24
|
+
export * from './src/components/SideComponent';
|
|
25
|
+
export * from './src/components/Title';
|
|
26
|
+
export * from './src/components/ModuleHeader';
|
|
27
|
+
export * from './src/components/ModuleSideBar';
|
|
28
|
+
export * from './src/components/SearchBar';
|
|
29
|
+
export * from './src/components/TranslationKey';
|
|
30
|
+
export * from './src/components/EntryControl';
|
|
31
|
+
export * from './src/components/AddItemModal';
|
|
32
|
+
export * from './src/components/DraggableSwitcher';
|
|
33
|
+
export * from './src/components/AnnouncementPanel';
|
|
34
|
+
export * from './src/components/Confirmationpopup';
|
|
35
|
+
export * from './src/components/SelectFilter';
|
package/package.json
CHANGED
|
@@ -1,89 +1,123 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Chart from 'react-apexcharts';
|
|
3
|
-
import type { ApexOptions } from 'apexcharts';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Chart from 'react-apexcharts';
|
|
3
|
+
import type { ApexOptions } from 'apexcharts';
|
|
4
|
+
import { Move } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
export type SeriesItem = { name: string; data: number[] };
|
|
7
|
+
|
|
8
|
+
interface ChartProps {
|
|
9
|
+
categories: string[];
|
|
10
|
+
series: SeriesItem[];
|
|
11
|
+
height?: number;
|
|
12
|
+
title?: string;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const defaultColors = ['#e24b33', '#e2b23a', '#6feff0', '#2f5be8'];
|
|
17
|
+
|
|
18
|
+
const Area: React.FC<ChartProps> = ({ categories, series, height = 350, title = 'Admissions', draggable = false }) => {
|
|
19
|
+
const maxStack = Math.max(
|
|
20
|
+
...categories.map((_, i) => series.reduce((s, ser) => s + (ser.data[i] ?? 0), 0))
|
|
21
|
+
);
|
|
22
|
+
const yMax = Math.max(100, Math.ceil(maxStack / 50) * 50);
|
|
23
|
+
|
|
24
|
+
const apexOptions: ApexOptions = {
|
|
25
|
+
chart: {
|
|
26
|
+
foreColor: 'var(--color-text)',
|
|
27
|
+
type: 'area',
|
|
28
|
+
stacked: true,
|
|
29
|
+
stackType: 'normal',
|
|
30
|
+
toolbar: { show: false },
|
|
31
|
+
zoom: { enabled: false },
|
|
32
|
+
animations: { enabled: true },
|
|
33
|
+
fontFamily: "Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial",
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
text: title,
|
|
37
|
+
align: 'center',
|
|
38
|
+
style: { fontSize: '36px', fontWeight: 700, color: '#555' },
|
|
39
|
+
},
|
|
40
|
+
colors: defaultColors,
|
|
41
|
+
dataLabels: { enabled: false },
|
|
42
|
+
stroke: { curve: 'smooth', width: 1.5 },
|
|
43
|
+
fill: { type: 'solid', opacity: 0.95 },
|
|
44
|
+
markers: { size: 0 },
|
|
45
|
+
legend: {
|
|
46
|
+
show: true,
|
|
47
|
+
position: 'top',
|
|
48
|
+
horizontalAlign: 'center',
|
|
49
|
+
itemMargin: { horizontal: 8, vertical: 0 },
|
|
50
|
+
},
|
|
51
|
+
xaxis: {
|
|
52
|
+
categories,
|
|
53
|
+
labels: { rotate: -45, rotateAlways: true, style: { fontSize: '12px' } },
|
|
54
|
+
tickPlacement: 'on',
|
|
55
|
+
},
|
|
56
|
+
yaxis: {
|
|
57
|
+
min: 0,
|
|
58
|
+
max: yMax,
|
|
59
|
+
tickAmount: 7,
|
|
60
|
+
labels: { formatter: (val) => String(Math.round(Number(val))) },
|
|
61
|
+
},
|
|
62
|
+
grid: { borderColor: '#e9e9e9', strokeDashArray: 0 },
|
|
63
|
+
tooltip: {
|
|
64
|
+
shared: true,
|
|
65
|
+
intersect: false,
|
|
66
|
+
y: { formatter: (val: number) => String(val) },
|
|
67
|
+
},
|
|
68
|
+
responsive: [
|
|
69
|
+
{
|
|
70
|
+
breakpoint: 768,
|
|
71
|
+
options: {
|
|
72
|
+
chart: { height: Math.max(240, Math.round(height * 0.7)) },
|
|
73
|
+
legend: { position: 'top' },
|
|
74
|
+
xaxis: { labels: { rotate: -45 } },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const apexSeries = series.map((s) => ({
|
|
81
|
+
name: s.name,
|
|
82
|
+
type: 'area' as const,
|
|
83
|
+
data: s.data,
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
style={{
|
|
89
|
+
position: 'relative',
|
|
90
|
+
height,
|
|
91
|
+
width: '100%',
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
{/* Chart visible ou masqué */}
|
|
96
|
+
<div style={{ opacity: draggable ? 0 : 1, transition: 'opacity 0.2s ease-in-out' }}>
|
|
97
|
+
<Chart options={apexOptions} series={apexSeries} type='area' height={height} width='100%' />
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
{/* Overlay Move */}
|
|
101
|
+
{draggable && (
|
|
102
|
+
<div
|
|
103
|
+
style={{
|
|
104
|
+
position: 'absolute',
|
|
105
|
+
inset: 0,
|
|
106
|
+
display: 'flex',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
justifyContent: 'center',
|
|
109
|
+
background: 'rgba(255, 255, 255, 0.6)',
|
|
110
|
+
borderRadius: 12,
|
|
111
|
+
backdropFilter: 'blur(3px)',
|
|
112
|
+
pointerEvents: 'none',
|
|
113
|
+
transition: 'opacity 0.2s ease-in-out',
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
<Move size={38} strokeWidth={1.5} style={{ opacity: 0.85 }} />
|
|
117
|
+
</div>
|
|
118
|
+
)}
|
|
119
|
+
</div>
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export default Area;
|
|
@@ -1,132 +1,167 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Chart from 'react-apexcharts';
|
|
3
|
-
import type { ApexOptions } from 'apexcharts';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
// },
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
// },
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Chart from 'react-apexcharts';
|
|
3
|
+
import type { ApexOptions } from 'apexcharts';
|
|
4
|
+
import { Move } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
export interface HorizontalBarData {
|
|
7
|
+
labels: string[];
|
|
8
|
+
values: number[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface HorizontalBarConfig {
|
|
12
|
+
color?: string;
|
|
13
|
+
sort?: 'desc' | 'asc' | null;
|
|
14
|
+
height?: number;
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
showLegend?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Props {
|
|
20
|
+
data: HorizontalBarData;
|
|
21
|
+
config?: HorizontalBarConfig;
|
|
22
|
+
draggable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Default (local) config */
|
|
26
|
+
const defaultConfig: HorizontalBarConfig = {
|
|
27
|
+
color: '#4f9db5',
|
|
28
|
+
sort: 'desc',
|
|
29
|
+
height: 520,
|
|
30
|
+
showGrid: true,
|
|
31
|
+
showLegend: false,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** Série locale (évite d'importer ApexAxisChartSeries) */
|
|
35
|
+
type HBarSeries = ReadonlyArray<{
|
|
36
|
+
name: string;
|
|
37
|
+
data: ReadonlyArray<number>;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
const HorizontalBarChart: React.FC<Props> = ({ data, config = defaultConfig, draggable = false }) => {
|
|
41
|
+
const cfg: HorizontalBarConfig = { ...defaultConfig, ...config };
|
|
42
|
+
|
|
43
|
+
const labels = data.labels ?? [];
|
|
44
|
+
const values = data.values ?? [];
|
|
45
|
+
|
|
46
|
+
// normalize lengths
|
|
47
|
+
const len = Math.min(labels.length, values.length);
|
|
48
|
+
const pairs: { label: string; value: number }[] = [];
|
|
49
|
+
for (let i = 0; i < len; i++) pairs.push({ label: labels[i], value: values[i] });
|
|
50
|
+
|
|
51
|
+
// optional sorting
|
|
52
|
+
if (cfg.sort === 'desc') pairs.sort((a, b) => b.value - a.value);
|
|
53
|
+
else if (cfg.sort === 'asc') pairs.sort((a, b) => a.value - b.value);
|
|
54
|
+
|
|
55
|
+
const labelsSorted = pairs.map((p) => p.label);
|
|
56
|
+
const valuesSorted = pairs.map((p) => p.value);
|
|
57
|
+
|
|
58
|
+
const series: HBarSeries = [
|
|
59
|
+
{
|
|
60
|
+
name: 'Valeur',
|
|
61
|
+
data: valuesSorted,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
const options: ApexOptions = {
|
|
66
|
+
chart: {
|
|
67
|
+
foreColor: 'var(--color-text)',
|
|
68
|
+
type: 'bar',
|
|
69
|
+
toolbar: { show: false },
|
|
70
|
+
height: cfg.height,
|
|
71
|
+
},
|
|
72
|
+
plotOptions: {
|
|
73
|
+
bar: {
|
|
74
|
+
horizontal: true,
|
|
75
|
+
barHeight: '60%',
|
|
76
|
+
distributed: false,
|
|
77
|
+
borderRadius: 6,
|
|
78
|
+
borderRadiusApplication: 'end',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
dataLabels: {
|
|
82
|
+
enabled: false,
|
|
83
|
+
formatter: (val: number) => String(val),
|
|
84
|
+
style: { fontSize: '12px' },
|
|
85
|
+
offsetX: 0,
|
|
86
|
+
},
|
|
87
|
+
yaxis: {
|
|
88
|
+
labels: { style: { fontSize: '12px' } },
|
|
89
|
+
},
|
|
90
|
+
grid: {
|
|
91
|
+
show: !!cfg.showGrid,
|
|
92
|
+
borderColor: '#e6e6e6',
|
|
93
|
+
},
|
|
94
|
+
tooltip: {
|
|
95
|
+
shared: false,
|
|
96
|
+
y: { formatter: (val: number) => String(val) },
|
|
97
|
+
},
|
|
98
|
+
legend: { show: !!cfg.showLegend },
|
|
99
|
+
colors: [cfg.color],
|
|
100
|
+
xaxis: {
|
|
101
|
+
min: 0,
|
|
102
|
+
tickAmount: 5,
|
|
103
|
+
categories: labelsSorted,
|
|
104
|
+
labels: { formatter: (v: string | number) => String(v) },
|
|
105
|
+
},
|
|
106
|
+
responsive: [
|
|
107
|
+
// {
|
|
108
|
+
// breakpoint: 1024,
|
|
109
|
+
// options: {
|
|
110
|
+
// plotOptions: { bar: { barHeight: '52%' } },
|
|
111
|
+
// chart: { height: Math.max(300, Math.round((cfg.height ?? 520) * 0.75)), width: 520 },
|
|
112
|
+
// },
|
|
113
|
+
// },
|
|
114
|
+
// {
|
|
115
|
+
// breakpoint: 768,
|
|
116
|
+
// options: {
|
|
117
|
+
// plotOptions: { bar: { barHeight: '48%' } },
|
|
118
|
+
// chart: { height: Math.max(260, Math.round((cfg.height ?? 520) * 0.6)), width: 360 },
|
|
119
|
+
// },
|
|
120
|
+
// },
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<div
|
|
126
|
+
style={{
|
|
127
|
+
position: 'relative',
|
|
128
|
+
height: cfg.height,
|
|
129
|
+
width: '100%',
|
|
130
|
+
overflow: 'hidden',
|
|
131
|
+
}}
|
|
132
|
+
>
|
|
133
|
+
{/* Chart affiché normalement */}
|
|
134
|
+
<div style={{ opacity: draggable ? 0 : 1, transition: 'opacity 0.15s ease-in-out' }}>
|
|
135
|
+
<Chart
|
|
136
|
+
options={options}
|
|
137
|
+
series={series as unknown as ApexOptions['series']}
|
|
138
|
+
type='bar'
|
|
139
|
+
height={cfg.height}
|
|
140
|
+
width="100%"
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
{/* Overlay Move */}
|
|
145
|
+
{draggable && (
|
|
146
|
+
<div
|
|
147
|
+
style={{
|
|
148
|
+
position: 'absolute',
|
|
149
|
+
inset: 0,
|
|
150
|
+
display: 'flex',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
background: 'rgba(255,255,255,0.5)',
|
|
154
|
+
borderRadius: 12,
|
|
155
|
+
backdropFilter: 'blur(3px)',
|
|
156
|
+
pointerEvents: 'none',
|
|
157
|
+
transition: 'opacity 0.15s ease-in-out',
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<Move size={36} strokeWidth={1.5} style={{ opacity: 0.85 }} />
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export default HorizontalBarChart;
|