@tsiky/components-r19 1.1.0 → 1.3.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/package.json +1 -1
- package/src/components/AnnouncementPanel/FlexRowContainer.css +17 -17
- package/src/components/AnnouncementPanel/FlexRowContainer.stories.tsx +329 -329
- package/src/components/AnnouncementPanel/FlexRowContainer.tsx +24 -24
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.css +56 -56
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.stories.tsx +292 -292
- package/src/components/AnnouncementPanel/ListBox/CounterListBox.tsx +106 -106
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.css +57 -57
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.stories.tsx +189 -189
- package/src/components/AnnouncementPanel/ListBox/SimpleListBox.tsx +138 -138
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.css +61 -61
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.stories.tsx +257 -257
- package/src/components/AnnouncementPanel/ListBox/TrendListBox.tsx +90 -90
- package/src/components/AnnouncementPanel/ListBox/index.ts +3 -3
- package/src/components/AnnouncementPanel/ListContentContainer.css +23 -23
- package/src/components/AnnouncementPanel/ListContentContainer.stories.tsx +212 -212
- package/src/components/AnnouncementPanel/ListContentContainer.tsx +33 -33
- package/src/components/AnnouncementPanel/index.ts +3 -3
- package/src/components/Charts/area-chart-admission/AreaChartAdmission.tsx +7 -1
- package/src/components/Charts/bar-chart/BarChart.tsx +6 -2
- package/src/components/Charts/boxplot-chart/BoxPlotChart.tsx +114 -114
- package/src/components/Charts/mixed-chart/MixedChart.tsx +1 -1
- package/src/components/Charts/sankey-adaptation/sankey.tsx +70 -70
- package/src/components/DraggableSwitcher/DraggableSwitcherButton.tsx +58 -58
- package/src/components/DraggableSwitcher/context/useDraggableSwitcher.tsx +45 -45
- package/src/components/DraggableSwitcher/index.ts +2 -2
- package/src/components/DynamicInput/DynamicInput.module.css +125 -126
- package/src/components/DynamicInput/input/SelectInput.tsx +75 -75
- package/src/components/DynamicInput/input/assets/SelectInput.module.css +95 -95
- 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/TableCell.tsx +38 -30
- package/src/components/DynamicTable/TableHeader.tsx +39 -34
- package/src/components/DynamicTable/TableauDynamique.module.css +77 -70
- package/src/components/DynamicTable/TableauDynamique.tsx +154 -154
- package/src/components/DynamicTable/filters/SelectFilter.tsx +69 -69
- package/src/components/DynamicTable/tools/tableTypes.ts +63 -63
- package/src/components/EntryControl/EntryControl.tsx +117 -117
- package/src/components/Grid/grid.css +285 -285
- package/src/components/MetricsPanel/MetricsPanel.tsx +37 -37
- package/src/components/MetricsPanel/renderers/CompactRenderer.tsx +1 -1
- package/src/components/NavItem/NavItem.tsx +58 -58
- package/src/components/PeriodRange/PeriodRange.module.css +158 -158
- package/src/components/PeriodRange/PeriodRange.tsx +130 -130
- package/src/components/PeriodSelect/PeriodSelect.module.css +64 -65
- package/src/components/PeriodSelect/PeriodSelect.tsx +48 -42
- package/src/components/SearchBar/SearchBar.css +40 -40
- package/src/components/TranslationKey/TranslationKey.css +272 -272
- package/src/components/TranslationKey/TranslationKey.tsx +8 -7
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './NavItem.css';
|
|
3
|
-
import { useNavigation } from '../NavBar';
|
|
4
|
-
|
|
5
|
-
export type NavItemType = {
|
|
6
|
-
id: string;
|
|
7
|
-
label: string;
|
|
8
|
-
isActive?: boolean;
|
|
9
|
-
onClick?: (id: string) => void;
|
|
10
|
-
href?: string;
|
|
11
|
-
highlightColor?: string;
|
|
12
|
-
moduleKey?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const NavItem: React.FC<NavItemType> = ({
|
|
16
|
-
id,
|
|
17
|
-
label,
|
|
18
|
-
isActive = false,
|
|
19
|
-
onClick,
|
|
20
|
-
href,
|
|
21
|
-
highlightColor = '#008CBA',
|
|
22
|
-
moduleKey = '',
|
|
23
|
-
...props
|
|
24
|
-
}) => {
|
|
25
|
-
// Determine which element to render
|
|
26
|
-
const { setActiveNav } = useNavigation();
|
|
27
|
-
const handleClick = () => {
|
|
28
|
-
setActiveNav(id); // ✅ met à jour la nav active
|
|
29
|
-
onClick?.(id); // ✅ appelle le callback externe si défini
|
|
30
|
-
};
|
|
31
|
-
if (href) {
|
|
32
|
-
// Render as anchor tag if href is provided and no onClick handler
|
|
33
|
-
return (
|
|
34
|
-
<a
|
|
35
|
-
href={href}
|
|
36
|
-
className={`nav-item ${isActive ? 'active' : ''}`}
|
|
37
|
-
style={isActive ? { backgroundColor: highlightColor, color: '#fff' } : {}}
|
|
38
|
-
onClick={handleClick}
|
|
39
|
-
{...props}
|
|
40
|
-
>
|
|
41
|
-
{label}
|
|
42
|
-
</a>
|
|
43
|
-
);
|
|
44
|
-
} else {
|
|
45
|
-
return (
|
|
46
|
-
<div
|
|
47
|
-
className={`nav-item ${isActive ? 'active' : ''}`}
|
|
48
|
-
style={isActive ? { backgroundColor: highlightColor, color: '#fff' } : {}}
|
|
49
|
-
onClick={handleClick}
|
|
50
|
-
role={onClick ? 'button' : 'presentation'}
|
|
51
|
-
tabIndex={onClick ? 0 : -1}
|
|
52
|
-
{...props}
|
|
53
|
-
>
|
|
54
|
-
{label}
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './NavItem.css';
|
|
3
|
+
import { useNavigation } from '../NavBar';
|
|
4
|
+
|
|
5
|
+
export type NavItemType = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
onClick?: (id: string) => void;
|
|
10
|
+
href?: string;
|
|
11
|
+
highlightColor?: string;
|
|
12
|
+
moduleKey?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const NavItem: React.FC<NavItemType> = ({
|
|
16
|
+
id,
|
|
17
|
+
label,
|
|
18
|
+
isActive = false,
|
|
19
|
+
onClick,
|
|
20
|
+
href,
|
|
21
|
+
highlightColor = '#008CBA',
|
|
22
|
+
moduleKey = '',
|
|
23
|
+
...props
|
|
24
|
+
}) => {
|
|
25
|
+
// Determine which element to render
|
|
26
|
+
const { setActiveNav } = useNavigation();
|
|
27
|
+
const handleClick = () => {
|
|
28
|
+
setActiveNav(id); // ✅ met à jour la nav active
|
|
29
|
+
onClick?.(id); // ✅ appelle le callback externe si défini
|
|
30
|
+
};
|
|
31
|
+
if (href) {
|
|
32
|
+
// Render as anchor tag if href is provided and no onClick handler
|
|
33
|
+
return (
|
|
34
|
+
<a
|
|
35
|
+
href={href}
|
|
36
|
+
className={`nav-item ${isActive ? 'active' : ''}`}
|
|
37
|
+
style={isActive ? { backgroundColor: highlightColor, color: '#fff' } : {}}
|
|
38
|
+
onClick={handleClick}
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
41
|
+
{label}
|
|
42
|
+
</a>
|
|
43
|
+
);
|
|
44
|
+
} else {
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
className={`nav-item ${isActive ? 'active' : ''}`}
|
|
48
|
+
style={isActive ? { backgroundColor: highlightColor, color: '#fff' } : {}}
|
|
49
|
+
onClick={handleClick}
|
|
50
|
+
role={onClick ? 'button' : 'presentation'}
|
|
51
|
+
tabIndex={onClick ? 0 : -1}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
{label}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: 12px;
|
|
6
|
-
padding: 10px 16px;
|
|
7
|
-
background: var(--color-card-background);
|
|
8
|
-
border-radius: 10px;
|
|
9
|
-
border: 1px solid rgba(16, 24, 40, 0.06);
|
|
10
|
-
box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
|
|
11
|
-
width: 100%;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.label {
|
|
15
|
-
display: inline-flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: 8px;
|
|
18
|
-
color: var(--color-text);
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
flex: 0 0 auto;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.labelText {
|
|
24
|
-
display: inline-block;
|
|
25
|
-
color: var(--color-text);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.calendarIcon {
|
|
29
|
-
opacity: 0.75;
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.rangeRow {
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
gap: 10px;
|
|
37
|
-
width: 100%;
|
|
38
|
-
flex-wrap: nowrap;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.dateWrap {
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
gap: 6px;
|
|
45
|
-
min-width: 0;
|
|
46
|
-
flex: 1 1 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.innerLabel {
|
|
50
|
-
font-size: 12px;
|
|
51
|
-
color: #6b7280;
|
|
52
|
-
display: block;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dateInput {
|
|
56
|
-
-webkit-appearance: none;
|
|
57
|
-
appearance: none;
|
|
58
|
-
border: 1px solid;
|
|
59
|
-
padding: 8px 10px;
|
|
60
|
-
border-radius: 8px;
|
|
61
|
-
border-color: var(--color-border);
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
background: transparent;
|
|
64
|
-
width: 100%;
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
color: var(--color-text);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.sepWrap {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
padding: 0 6px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.separator {
|
|
77
|
-
color: #9ca3af;
|
|
78
|
-
font-weight: 600;
|
|
79
|
-
user-select: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.samplingWrap {
|
|
83
|
-
display: flex;
|
|
84
|
-
/* position: absolute; */
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
gap: 6px;
|
|
87
|
-
min-width: 160px;
|
|
88
|
-
flex: 0 0 auto;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.samplingLabel {
|
|
92
|
-
font-size: 12px;
|
|
93
|
-
color: #374151;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.samplingSelect {
|
|
97
|
-
padding: 8px 10px;
|
|
98
|
-
border-radius: 8px;
|
|
99
|
-
border: 1px solid rgba(16, 24, 40, 0.06);
|
|
100
|
-
background: var(--color-background);
|
|
101
|
-
font-size: 14px;
|
|
102
|
-
box-sizing: border-box;
|
|
103
|
-
width: 100%;
|
|
104
|
-
border-color: var(--color-border);
|
|
105
|
-
color: var(--color-text);
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* Responsive: stack on smaller screens */
|
|
110
|
-
@media (max-width: 720px) {
|
|
111
|
-
.wrapper {
|
|
112
|
-
padding: 10px;
|
|
113
|
-
}
|
|
114
|
-
.rangeRow {
|
|
115
|
-
gap: 8px;
|
|
116
|
-
}
|
|
117
|
-
.label {
|
|
118
|
-
font-size: 13px;
|
|
119
|
-
}
|
|
120
|
-
.samplingWrap {
|
|
121
|
-
min-width: 140px;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@media (max-width: 520px) {
|
|
126
|
-
.wrapper {
|
|
127
|
-
flex-direction: column;
|
|
128
|
-
align-items: stretch;
|
|
129
|
-
gap: 10px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.label {
|
|
133
|
-
order: 0;
|
|
134
|
-
}
|
|
135
|
-
.rangeRow {
|
|
136
|
-
flex-direction: row;
|
|
137
|
-
flex-wrap: wrap;
|
|
138
|
-
align-items: flex-start;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.dateWrap {
|
|
142
|
-
flex: 1 1 48%;
|
|
143
|
-
}
|
|
144
|
-
.sepWrap {
|
|
145
|
-
display: none;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.samplingWrap {
|
|
149
|
-
flex: 1 1 100%;
|
|
150
|
-
min-width: 0;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
@media (max-width: 360px) {
|
|
155
|
-
.dateWrap {
|
|
156
|
-
flex: 1 1 100%;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
1
|
+
.wrapper {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
padding: 10px 16px;
|
|
7
|
+
background: var(--color-card-background);
|
|
8
|
+
border-radius: 10px;
|
|
9
|
+
border: 1px solid rgba(16, 24, 40, 0.06);
|
|
10
|
+
box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.label {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
color: var(--color-text);
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
flex: 0 0 auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.labelText {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
color: var(--color-text);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.calendarIcon {
|
|
29
|
+
opacity: 0.75;
|
|
30
|
+
display: block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.rangeRow {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 10px;
|
|
37
|
+
width: 100%;
|
|
38
|
+
flex-wrap: nowrap;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dateWrap {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 6px;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
flex: 1 1 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.innerLabel {
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
color: #6b7280;
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dateInput {
|
|
56
|
+
-webkit-appearance: none;
|
|
57
|
+
appearance: none;
|
|
58
|
+
border: 1px solid;
|
|
59
|
+
padding: 8px 10px;
|
|
60
|
+
border-radius: 8px;
|
|
61
|
+
border-color: var(--color-border);
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
background: transparent;
|
|
64
|
+
width: 100%;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
color: var(--color-text);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.sepWrap {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
padding: 0 6px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.separator {
|
|
77
|
+
color: #9ca3af;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
user-select: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.samplingWrap {
|
|
83
|
+
display: flex;
|
|
84
|
+
/* position: absolute; */
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: 6px;
|
|
87
|
+
min-width: 160px;
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.samplingLabel {
|
|
92
|
+
font-size: 12px;
|
|
93
|
+
color: #374151;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.samplingSelect {
|
|
97
|
+
padding: 8px 10px;
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
border: 1px solid rgba(16, 24, 40, 0.06);
|
|
100
|
+
background: var(--color-background);
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
width: 100%;
|
|
104
|
+
border-color: var(--color-border);
|
|
105
|
+
color: var(--color-text);
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Responsive: stack on smaller screens */
|
|
110
|
+
@media (max-width: 720px) {
|
|
111
|
+
.wrapper {
|
|
112
|
+
padding: 10px;
|
|
113
|
+
}
|
|
114
|
+
.rangeRow {
|
|
115
|
+
gap: 8px;
|
|
116
|
+
}
|
|
117
|
+
.label {
|
|
118
|
+
font-size: 13px;
|
|
119
|
+
}
|
|
120
|
+
.samplingWrap {
|
|
121
|
+
min-width: 140px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (max-width: 520px) {
|
|
126
|
+
.wrapper {
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
align-items: stretch;
|
|
129
|
+
gap: 10px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.label {
|
|
133
|
+
order: 0;
|
|
134
|
+
}
|
|
135
|
+
.rangeRow {
|
|
136
|
+
flex-direction: row;
|
|
137
|
+
flex-wrap: wrap;
|
|
138
|
+
align-items: flex-start;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dateWrap {
|
|
142
|
+
flex: 1 1 48%;
|
|
143
|
+
}
|
|
144
|
+
.sepWrap {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.samplingWrap {
|
|
149
|
+
flex: 1 1 100%;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (max-width: 360px) {
|
|
155
|
+
.dateWrap {
|
|
156
|
+
flex: 1 1 100%;
|
|
157
|
+
}
|
|
158
|
+
}
|