@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,106 +1,106 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './CounterListBox.css';
|
|
3
|
-
|
|
4
|
-
export type CounterListBoxProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
title?: string;
|
|
8
|
-
titleColor?: string;
|
|
9
|
-
data?: (string | [string, string])[];
|
|
10
|
-
badgeColor?: string;
|
|
11
|
-
badgeColors?: { [index: number]: string };
|
|
12
|
-
badgePadding?: string;
|
|
13
|
-
badgeWidth?: string;
|
|
14
|
-
itemBg?: string;
|
|
15
|
-
lineClasses?: { [index: number]: string };
|
|
16
|
-
colGap?: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const CounterListBox: React.FC<CounterListBoxProps> = ({
|
|
20
|
-
className = '',
|
|
21
|
-
style = {},
|
|
22
|
-
title,
|
|
23
|
-
titleColor,
|
|
24
|
-
data = [],
|
|
25
|
-
badgeColor = '#0ea5e9',
|
|
26
|
-
badgeColors = {},
|
|
27
|
-
badgePadding = '8px 16px',
|
|
28
|
-
badgeWidth,
|
|
29
|
-
itemBg,
|
|
30
|
-
lineClasses = {},
|
|
31
|
-
colGap = '1rem',
|
|
32
|
-
}) => {
|
|
33
|
-
const has2D = data.some((r) => Array.isArray(r));
|
|
34
|
-
const gridStyle: React.CSSProperties | undefined = colGap
|
|
35
|
-
? ({ ['--col-gap' as any]: colGap } as React.CSSProperties)
|
|
36
|
-
: undefined;
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div className={`clb-root ${className}`} style={{ ...style }}>
|
|
40
|
-
{title && (
|
|
41
|
-
<div className='clb-title' style={titleColor ? { color: titleColor } : undefined}>
|
|
42
|
-
{title}
|
|
43
|
-
</div>
|
|
44
|
-
)}
|
|
45
|
-
|
|
46
|
-
<div className='clb-grid' style={gridStyle}>
|
|
47
|
-
{(data as (string | [string, string])[]).map((row, idx) => {
|
|
48
|
-
const lineClass = lineClasses[idx] || '';
|
|
49
|
-
|
|
50
|
-
if (Array.isArray(row)) {
|
|
51
|
-
const [left, right] = row;
|
|
52
|
-
const currentBadgeColor = badgeColors[idx] || badgeColor;
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<div
|
|
56
|
-
key={idx}
|
|
57
|
-
className={`clb-row ${lineClass}`}
|
|
58
|
-
style={{ background: itemBg ?? undefined }}
|
|
59
|
-
>
|
|
60
|
-
<div className='clb-badge-col'>
|
|
61
|
-
<div
|
|
62
|
-
className='counter-badge'
|
|
63
|
-
style={{
|
|
64
|
-
background: currentBadgeColor,
|
|
65
|
-
padding: badgePadding,
|
|
66
|
-
width: badgeWidth,
|
|
67
|
-
minWidth: badgeWidth,
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
{left}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div className='clb-text'>{right}</div>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (!has2D) {
|
|
80
|
-
return (
|
|
81
|
-
<div
|
|
82
|
-
key={idx}
|
|
83
|
-
className={`clb-fullrow ${lineClass}`}
|
|
84
|
-
style={{ background: itemBg ?? undefined }}
|
|
85
|
-
>
|
|
86
|
-
<span>{row as string}</span>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 1D in mixed mode: empty badge + text
|
|
92
|
-
return (
|
|
93
|
-
<div
|
|
94
|
-
key={idx}
|
|
95
|
-
className={`clb-row ${lineClass}`}
|
|
96
|
-
style={{ background: itemBg ?? undefined }}
|
|
97
|
-
>
|
|
98
|
-
<div className='clb-badge-col clb-empty-badge' />
|
|
99
|
-
<div className='clb-text'>{row as string}</div>
|
|
100
|
-
</div>
|
|
101
|
-
);
|
|
102
|
-
})}
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './CounterListBox.css';
|
|
3
|
+
|
|
4
|
+
export type CounterListBoxProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
title?: string;
|
|
8
|
+
titleColor?: string;
|
|
9
|
+
data?: (string | [string, string])[];
|
|
10
|
+
badgeColor?: string;
|
|
11
|
+
badgeColors?: { [index: number]: string };
|
|
12
|
+
badgePadding?: string;
|
|
13
|
+
badgeWidth?: string;
|
|
14
|
+
itemBg?: string;
|
|
15
|
+
lineClasses?: { [index: number]: string };
|
|
16
|
+
colGap?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const CounterListBox: React.FC<CounterListBoxProps> = ({
|
|
20
|
+
className = '',
|
|
21
|
+
style = {},
|
|
22
|
+
title,
|
|
23
|
+
titleColor,
|
|
24
|
+
data = [],
|
|
25
|
+
badgeColor = '#0ea5e9',
|
|
26
|
+
badgeColors = {},
|
|
27
|
+
badgePadding = '8px 16px',
|
|
28
|
+
badgeWidth,
|
|
29
|
+
itemBg,
|
|
30
|
+
lineClasses = {},
|
|
31
|
+
colGap = '1rem',
|
|
32
|
+
}) => {
|
|
33
|
+
const has2D = data.some((r) => Array.isArray(r));
|
|
34
|
+
const gridStyle: React.CSSProperties | undefined = colGap
|
|
35
|
+
? ({ ['--col-gap' as any]: colGap } as React.CSSProperties)
|
|
36
|
+
: undefined;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div className={`clb-root ${className}`} style={{ ...style }}>
|
|
40
|
+
{title && (
|
|
41
|
+
<div className='clb-title' style={titleColor ? { color: titleColor } : undefined}>
|
|
42
|
+
{title}
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
|
|
46
|
+
<div className='clb-grid' style={gridStyle}>
|
|
47
|
+
{(data as (string | [string, string])[]).map((row, idx) => {
|
|
48
|
+
const lineClass = lineClasses[idx] || '';
|
|
49
|
+
|
|
50
|
+
if (Array.isArray(row)) {
|
|
51
|
+
const [left, right] = row;
|
|
52
|
+
const currentBadgeColor = badgeColors[idx] || badgeColor;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
key={idx}
|
|
57
|
+
className={`clb-row ${lineClass}`}
|
|
58
|
+
style={{ background: itemBg ?? undefined }}
|
|
59
|
+
>
|
|
60
|
+
<div className='clb-badge-col'>
|
|
61
|
+
<div
|
|
62
|
+
className='counter-badge'
|
|
63
|
+
style={{
|
|
64
|
+
background: currentBadgeColor,
|
|
65
|
+
padding: badgePadding,
|
|
66
|
+
width: badgeWidth,
|
|
67
|
+
minWidth: badgeWidth,
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{left}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div className='clb-text'>{right}</div>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!has2D) {
|
|
80
|
+
return (
|
|
81
|
+
<div
|
|
82
|
+
key={idx}
|
|
83
|
+
className={`clb-fullrow ${lineClass}`}
|
|
84
|
+
style={{ background: itemBg ?? undefined }}
|
|
85
|
+
>
|
|
86
|
+
<span>{row as string}</span>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// 1D in mixed mode: empty badge + text
|
|
92
|
+
return (
|
|
93
|
+
<div
|
|
94
|
+
key={idx}
|
|
95
|
+
className={`clb-row ${lineClass}`}
|
|
96
|
+
style={{ background: itemBg ?? undefined }}
|
|
97
|
+
>
|
|
98
|
+
<div className='clb-badge-col clb-empty-badge' />
|
|
99
|
+
<div className='clb-text'>{row as string}</div>
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
})}
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
.slb-root {
|
|
2
|
-
padding: 0.125rem;
|
|
3
|
-
}
|
|
4
|
-
.slb-title {
|
|
5
|
-
font-weight: var(--font-bold);
|
|
6
|
-
padding: 0.0625rem 0.125rem;
|
|
7
|
-
border-radius: 0.03125rem;
|
|
8
|
-
margin-bottom: 0.0625rem;
|
|
9
|
-
}
|
|
10
|
-
.slb-list {
|
|
11
|
-
list-style: none;
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 0;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 0.03125rem;
|
|
17
|
-
}
|
|
18
|
-
.slb-item {
|
|
19
|
-
padding: 0.0625rem 0.125rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.slb-grid {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
gap: 0.03125rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.slb-row {
|
|
29
|
-
display: grid;
|
|
30
|
-
grid-template-columns: minmax(max-content, 1fr) minmax(max-content, 1fr);
|
|
31
|
-
gap: var(--col-gap, 0.125rem);
|
|
32
|
-
align-items: center;
|
|
33
|
-
padding: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.slb-grid-left {
|
|
37
|
-
padding: 0.0625rem 0.125rem;
|
|
38
|
-
min-width: 0;
|
|
39
|
-
justify-self: start;
|
|
40
|
-
overflow-wrap: break-word;
|
|
41
|
-
word-wrap: break-word;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.slb-grid-right {
|
|
45
|
-
padding: 0.0625rem 0.125rem;
|
|
46
|
-
min-width: 0;
|
|
47
|
-
justify-self: start;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.slb-empty {
|
|
51
|
-
color: #666;
|
|
52
|
-
padding: 0.125rem 0.125rem;
|
|
53
|
-
text-align: center;
|
|
54
|
-
}
|
|
55
|
-
.slb-empty-cell {
|
|
56
|
-
opacity: 0.5;
|
|
57
|
-
}
|
|
1
|
+
.slb-root {
|
|
2
|
+
padding: 0.125rem;
|
|
3
|
+
}
|
|
4
|
+
.slb-title {
|
|
5
|
+
font-weight: var(--font-bold);
|
|
6
|
+
padding: 0.0625rem 0.125rem;
|
|
7
|
+
border-radius: 0.03125rem;
|
|
8
|
+
margin-bottom: 0.0625rem;
|
|
9
|
+
}
|
|
10
|
+
.slb-list {
|
|
11
|
+
list-style: none;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 0.03125rem;
|
|
17
|
+
}
|
|
18
|
+
.slb-item {
|
|
19
|
+
padding: 0.0625rem 0.125rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.slb-grid {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 0.03125rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.slb-row {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: minmax(max-content, 1fr) minmax(max-content, 1fr);
|
|
31
|
+
gap: var(--col-gap, 0.125rem);
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.slb-grid-left {
|
|
37
|
+
padding: 0.0625rem 0.125rem;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
justify-self: start;
|
|
40
|
+
overflow-wrap: break-word;
|
|
41
|
+
word-wrap: break-word;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slb-grid-right {
|
|
45
|
+
padding: 0.0625rem 0.125rem;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
justify-self: start;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.slb-empty {
|
|
51
|
+
color: #666;
|
|
52
|
+
padding: 0.125rem 0.125rem;
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
55
|
+
.slb-empty-cell {
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|