@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.
Files changed (50) hide show
  1. package/package.json +1 -1
  2. package/src/components/AnnouncementPanel/FlexRowContainer.css +17 -17
  3. package/src/components/AnnouncementPanel/FlexRowContainer.stories.tsx +329 -329
  4. package/src/components/AnnouncementPanel/FlexRowContainer.tsx +24 -24
  5. package/src/components/AnnouncementPanel/ListBox/CounterListBox.css +56 -56
  6. package/src/components/AnnouncementPanel/ListBox/CounterListBox.stories.tsx +292 -292
  7. package/src/components/AnnouncementPanel/ListBox/CounterListBox.tsx +106 -106
  8. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.css +57 -57
  9. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.stories.tsx +189 -189
  10. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.tsx +138 -138
  11. package/src/components/AnnouncementPanel/ListBox/TrendListBox.css +61 -61
  12. package/src/components/AnnouncementPanel/ListBox/TrendListBox.stories.tsx +257 -257
  13. package/src/components/AnnouncementPanel/ListBox/TrendListBox.tsx +90 -90
  14. package/src/components/AnnouncementPanel/ListBox/index.ts +3 -3
  15. package/src/components/AnnouncementPanel/ListContentContainer.css +23 -23
  16. package/src/components/AnnouncementPanel/ListContentContainer.stories.tsx +212 -212
  17. package/src/components/AnnouncementPanel/ListContentContainer.tsx +33 -33
  18. package/src/components/AnnouncementPanel/index.ts +3 -3
  19. package/src/components/Charts/area-chart-admission/AreaChartAdmission.tsx +7 -1
  20. package/src/components/Charts/bar-chart/BarChart.tsx +6 -2
  21. package/src/components/Charts/boxplot-chart/BoxPlotChart.tsx +114 -114
  22. package/src/components/Charts/mixed-chart/MixedChart.tsx +1 -1
  23. package/src/components/Charts/sankey-adaptation/sankey.tsx +70 -70
  24. package/src/components/DraggableSwitcher/DraggableSwitcherButton.tsx +58 -58
  25. package/src/components/DraggableSwitcher/context/useDraggableSwitcher.tsx +45 -45
  26. package/src/components/DraggableSwitcher/index.ts +2 -2
  27. package/src/components/DynamicInput/DynamicInput.module.css +125 -126
  28. package/src/components/DynamicInput/input/SelectInput.tsx +75 -75
  29. package/src/components/DynamicInput/input/assets/SelectInput.module.css +95 -95
  30. package/src/components/DynamicTable/AdvancedFilters.tsx +196 -196
  31. package/src/components/DynamicTable/ColumnSorter.tsx +185 -185
  32. package/src/components/DynamicTable/Pagination.tsx +115 -115
  33. package/src/components/DynamicTable/TableCell.tsx +38 -30
  34. package/src/components/DynamicTable/TableHeader.tsx +39 -34
  35. package/src/components/DynamicTable/TableauDynamique.module.css +77 -70
  36. package/src/components/DynamicTable/TableauDynamique.tsx +154 -154
  37. package/src/components/DynamicTable/filters/SelectFilter.tsx +69 -69
  38. package/src/components/DynamicTable/tools/tableTypes.ts +63 -63
  39. package/src/components/EntryControl/EntryControl.tsx +117 -117
  40. package/src/components/Grid/grid.css +285 -285
  41. package/src/components/MetricsPanel/MetricsPanel.tsx +37 -37
  42. package/src/components/MetricsPanel/renderers/CompactRenderer.tsx +1 -1
  43. package/src/components/NavItem/NavItem.tsx +58 -58
  44. package/src/components/PeriodRange/PeriodRange.module.css +158 -158
  45. package/src/components/PeriodRange/PeriodRange.tsx +130 -130
  46. package/src/components/PeriodSelect/PeriodSelect.module.css +64 -65
  47. package/src/components/PeriodSelect/PeriodSelect.tsx +48 -42
  48. package/src/components/SearchBar/SearchBar.css +40 -40
  49. package/src/components/TranslationKey/TranslationKey.css +272 -272
  50. package/src/components/TranslationKey/TranslationKey.tsx +8 -7
@@ -1,30 +1,38 @@
1
- 'use client';
2
-
3
- import type { RendererProps } from './tools/tableTypes';
4
- import { tableConfig } from './tools/tableConfig';
5
- import styles from './TableauDynamique.module.css';
6
-
7
- const TableCell = <T,>({ value, row, column }: RendererProps<T>) => {
8
- const getRenderer = () => {
9
- if (column.component) {
10
- const CustomComponent = column.component;
11
- return <CustomComponent value={value} row={row} column={column} />;
12
- }
13
-
14
- if (column.render) {
15
- return column.render(value, row, column);
16
- }
17
-
18
- const rendererKey = column.type || 'text';
19
- const Renderer = tableConfig.renderers[rendererKey] || tableConfig.renderers.text;
20
- return <Renderer value={value} row={row} column={column} />;
21
- };
22
-
23
- return (
24
- <td className={styles.tableCell} style={{ textAlign: column.align || 'left' }}>
25
- {getRenderer()}
26
- </td>
27
- );
28
- };
29
-
30
- export default TableCell;
1
+ 'use client';
2
+
3
+ import React from 'react';
4
+ import type { TableColumn } from './tools/tableTypes';
5
+ import styles from './TableauDynamique.module.css';
6
+
7
+ interface TableCellProps<T = unknown> {
8
+ value: any;
9
+ row: T;
10
+ column: TableColumn<T>;
11
+ }
12
+
13
+ const TableCell = <T,>({ value, row, column }: TableCellProps<T>) => {
14
+ const alignClass =
15
+ column.align === 'right'
16
+ ? styles.alignRight
17
+ : column.align === 'left'
18
+ ? styles.alignLeft
19
+ : styles.alignCenter;
20
+
21
+ const content =
22
+ typeof (column as any).render === 'function'
23
+ ? (column as any).render(value, row)
24
+ : value === null || value === undefined
25
+ ? ''
26
+ : String(value);
27
+
28
+ return (
29
+ <td
30
+ className={`${styles.tableCell} ${alignClass}`}
31
+ style={{ width: column.width ?? undefined }}
32
+ >
33
+ <div className={styles.cellContent}>{content}</div>
34
+ </td>
35
+ );
36
+ };
37
+
38
+ export default TableCell;
@@ -1,34 +1,39 @@
1
- 'use client';
2
-
3
- import type { TableColumn } from './tools/tableTypes';
4
- import styles from './TableauDynamique.module.css';
5
-
6
- interface TableHeaderProps<T = unknown> {
7
- columns: TableColumn<T>[];
8
- }
9
-
10
- const TableHeader = <T,>({ columns }: TableHeaderProps<T>) => {
11
- return (
12
- <thead className={styles.tableHeader}>
13
- <tr>
14
- {columns.map((column) => (
15
- <th
16
- key={column.id}
17
- className={styles.headerCell}
18
- style={{
19
- width: column.width,
20
- textAlign: column.align,
21
- padding: '1rem',
22
- }}
23
- >
24
- <div className={styles.headerContent}>
25
- <span>{column.label}</span>
26
- </div>
27
- </th>
28
- ))}
29
- </tr>
30
- </thead>
31
- );
32
- };
33
-
34
- export default TableHeader;
1
+ 'use client';
2
+
3
+ import type { TableColumn } from './tools/tableTypes';
4
+ import styles from './TableauDynamique.module.css';
5
+
6
+ interface TableHeaderProps<T = unknown> {
7
+ columns: TableColumn<T>[];
8
+ }
9
+
10
+ const TableHeader = <T,>({ columns }: TableHeaderProps<T>) => {
11
+ return (
12
+ <thead className={styles.tableHeader}>
13
+ <tr>
14
+ {columns.map((column) => {
15
+ const alignClass =
16
+ column.align === 'right'
17
+ ? styles.alignRight
18
+ : column.align === 'left'
19
+ ? styles.alignLeft
20
+ : styles.alignCenter;
21
+
22
+ return (
23
+ <th
24
+ key={column.id}
25
+ className={`${styles.headerCell} ${alignClass}`}
26
+ style={{ width: column.width ?? undefined }}
27
+ >
28
+ <div className={styles.headerContent}>
29
+ <span>{column.label}</span>
30
+ </div>
31
+ </th>
32
+ );
33
+ })}
34
+ </tr>
35
+ </thead>
36
+ );
37
+ };
38
+
39
+ export default TableHeader;
@@ -79,16 +79,13 @@
79
79
  .headerCell {
80
80
  padding: 12px 14px;
81
81
  cursor: pointer;
82
- text-align: left;
83
82
  letter-spacing: 0.2px;
84
83
  white-space: nowrap;
85
84
  font-size: 13px;
86
- font-weight: 600;
87
85
  vertical-align: middle;
88
- }
89
- .headerContent {
90
- font-size: 13px;
91
- font-weight: 900;
86
+ background: transparent;
87
+ border-bottom: 1px solid rgba(230, 233, 239, 0.6);
88
+ text-align: center;
92
89
  }
93
90
  .table tbody td {
94
91
  padding: 10px 14px;
@@ -157,7 +154,6 @@
157
154
  border: 1px solid #e5e7eb;
158
155
  border-radius: 999px;
159
156
  font-size: var(--small-font);
160
- font-weight: 600;
161
157
  cursor: pointer;
162
158
  transition: all 0.12s ease-in-out;
163
159
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
@@ -193,7 +189,6 @@
193
189
  /* ---------- NOUVELLES RÈGLES POUR LES LABELS DE TRI ---------- */
194
190
  .sortItemLabel {
195
191
  font-size: 13px;
196
- font-weight: 600;
197
192
  color: #111827;
198
193
  white-space: nowrap;
199
194
  overflow: hidden;
@@ -207,7 +202,6 @@
207
202
  .uppercaseSmall {
208
203
  font-size: 11px;
209
204
  letter-spacing: 0.4px;
210
- font-weight: 700;
211
205
  line-height: 1;
212
206
  }
213
207
 
@@ -321,7 +315,6 @@
321
315
  }
322
316
  .filterLabel {
323
317
  font-size: var(--xsmall-font);
324
- font-weight: 600;
325
318
  color: #111827;
326
319
  }
327
320
  .filterInput,
@@ -347,7 +340,6 @@
347
340
  align-items: center;
348
341
  gap: 8px;
349
342
  font-size: 12px;
350
- font-weight: 600;
351
343
  color: #374151;
352
344
  background: #f1f5f9;
353
345
  border-radius: 18px;
@@ -366,7 +358,6 @@
366
358
  border: none;
367
359
  padding: 10px 14px;
368
360
  border-radius: 10px;
369
- font-weight: 700;
370
361
  cursor: pointer;
371
362
  font-size: 13px;
372
363
  }
@@ -378,7 +369,6 @@
378
369
  border-radius: 10px;
379
370
  cursor: pointer;
380
371
  font-size: var(--xsmall-font);
381
- font-weight: 600;
382
372
  }
383
373
 
384
374
  @media (max-width: 680px) {
@@ -426,7 +416,6 @@
426
416
  justify-content: space-between;
427
417
  align-items: center;
428
418
  padding: 12px 16px;
429
- font-weight: 700;
430
419
  font-size: var(--xsmall-font);
431
420
  color: #374151;
432
421
  }
@@ -473,7 +462,6 @@
473
462
  display: block;
474
463
  line-height: 1;
475
464
  font-size: 13px;
476
- font-weight: 400;
477
465
  color: #111827;
478
466
  max-width: 100%;
479
467
  }
@@ -503,7 +491,6 @@
503
491
 
504
492
  .sortItemLabel {
505
493
  font-size: 13px;
506
- font-weight: 600;
507
494
  color: #111827;
508
495
  white-space: nowrap;
509
496
  overflow: hidden;
@@ -613,7 +600,6 @@
613
600
  }
614
601
  }
615
602
  .sortDropdownHeader {
616
- font-weight: 700;
617
603
  font-size: var(--xsmall-font);
618
604
  color: #374151;
619
605
  margin-bottom: 8px;
@@ -702,7 +688,6 @@
702
688
  align-items: center;
703
689
  }
704
690
  .pageSizeLabel {
705
- font-weight: 600;
706
691
  color: var(--muted);
707
692
  font-size: 13px;
708
693
  }
@@ -757,7 +742,6 @@
757
742
  .activeButton {
758
743
  background: var(--color-primary);
759
744
  color: #fff;
760
- font-weight: 700;
761
745
  }
762
746
  .disabledButton {
763
747
  opacity: 0.45;
@@ -815,10 +799,8 @@
815
799
  display: flex;
816
800
  align-items: center;
817
801
  gap: 6px;
818
- font-weight: 700;
819
802
  }
820
803
  .rangeSeparator {
821
- font-weight: 600;
822
804
  color: var(--muted);
823
805
  }
824
806
 
@@ -1053,18 +1035,18 @@
1053
1035
 
1054
1036
  @media (max-width: 480px) {
1055
1037
  .tableControls {
1056
- justify-content: center !important;
1038
+ justify-content: center;
1057
1039
  }
1058
1040
 
1059
1041
  .controlsRight {
1060
- justify-content: center !important;
1042
+ justify-content: center;
1061
1043
  width: auto;
1062
1044
  gap: 8px;
1063
1045
  }
1064
1046
 
1065
1047
  .toggleFiltersButton,
1066
1048
  .toggleSortButton {
1067
- flex: 0 0 auto !important;
1049
+ flex: 0 0 auto;
1068
1050
  min-width: 0;
1069
1051
  margin: 0 6px;
1070
1052
  }
@@ -1079,20 +1061,20 @@
1079
1061
 
1080
1062
  @media (max-width: 360px) {
1081
1063
  .tableControls {
1082
- justify-content: center !important;
1064
+ justify-content: center;
1083
1065
  padding-left: 6px;
1084
1066
  padding-right: 6px;
1085
1067
  }
1086
1068
 
1087
1069
  .controlsRight {
1088
1070
  width: 100%;
1089
- justify-content: center !important;
1071
+ justify-content: center;
1090
1072
  gap: 6px;
1091
1073
  }
1092
1074
 
1093
1075
  .toggleFiltersButton,
1094
1076
  .toggleSortButton {
1095
- flex: 0 0 auto !important;
1077
+ flex: 0 0 auto;
1096
1078
  padding: 6px 10px;
1097
1079
  font-size: 11px;
1098
1080
  }
@@ -1137,36 +1119,16 @@
1137
1119
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.12);
1138
1120
  }
1139
1121
 
1140
- .table thead,
1141
- .headerCell {
1142
- font-weight: 400 !important;
1143
- }
1144
-
1145
- .table tbody td {
1146
- font-weight: 400 !important;
1147
- }
1148
-
1149
- .tableRow,
1150
- .tableRow td,
1151
- .headerCell,
1152
- .pageSizeLabel,
1153
- .pageSizeSuffix,
1154
- .paginationInfo {
1155
- font-weight: 400 !important;
1156
- }
1157
-
1158
1122
  .toggleSortButton,
1159
1123
  .toggleFiltersButton,
1160
1124
  .buttonTextCompact {
1161
1125
  font-size: var(--controls-text-size);
1162
- font-weight: 400;
1163
1126
  }
1164
1127
 
1165
1128
  .sortDropdownHeader,
1166
1129
  .sortItemLabel,
1167
1130
  .sortDropdownHeader span {
1168
1131
  font-size: var(--controls-text-size);
1169
- font-weight: 400;
1170
1132
  color: #374151;
1171
1133
  }
1172
1134
 
@@ -1179,17 +1141,12 @@
1179
1141
  vertical-align: middle;
1180
1142
  }
1181
1143
 
1182
- .closeButton {
1183
- font-weight: 400;
1184
- }
1185
-
1186
1144
  .filterLabel,
1187
1145
  .buttonTextCompact,
1188
1146
  .countCompact,
1189
1147
  .resultCountCompact,
1190
1148
  .activeLabelCompact {
1191
1149
  font-size: var(--controls-text-size);
1192
- font-weight: 400;
1193
1150
  }
1194
1151
 
1195
1152
  .filtersPanel,
@@ -1203,22 +1160,9 @@
1203
1160
  font-size: var(--controls-text-size);
1204
1161
  }
1205
1162
 
1206
- .activeFilterTag {
1207
- font-weight: 400;
1208
- }
1209
-
1210
1163
  .applyButton,
1211
1164
  .cancelButton {
1212
1165
  font-size: var(--controls-text-size);
1213
- font-weight: 400;
1214
- }
1215
-
1216
- .uppercaseSmall,
1217
- .sortDropdownHeader,
1218
- .operatorFilterContainer,
1219
- .rangeSeparator,
1220
- .pageSizeLabel {
1221
- font-weight: 400 !important;
1222
1166
  }
1223
1167
 
1224
1168
  @media (max-width: 480px) {
@@ -1242,14 +1186,12 @@
1242
1186
  .sortDropdownItem {
1243
1187
  min-width: 0;
1244
1188
  font-size: var(--small-font);
1245
- font-weight: 400;
1246
1189
  }
1247
1190
 
1248
1191
  .sortDropdownHeader,
1249
1192
  .sortItemLabel,
1250
1193
  .sortDropdownItem .sortItemLabel {
1251
1194
  font-size: var(--small-font);
1252
- font-weight: 400;
1253
1195
  }
1254
1196
 
1255
1197
  .columnSorterLabel {
@@ -1262,13 +1204,11 @@
1262
1204
  max-width: 180px;
1263
1205
  line-height: 1;
1264
1206
  font-size: var(--xsmall-font);
1265
- font-weight: 600;
1266
1207
  text-transform: none;
1267
1208
  }
1268
1209
 
1269
1210
  .uppercaseSmall {
1270
1211
  font-size: var(--xsmall-font);
1271
- font-weight: 400;
1272
1212
  letter-spacing: 0.4px;
1273
1213
  text-transform: uppercase;
1274
1214
  line-height: 1;
@@ -1282,6 +1222,73 @@
1282
1222
  .sortItemLabel,
1283
1223
  .uppercaseSmall {
1284
1224
  font-size: var(--xsmall-font);
1285
- font-weight: 400;
1286
1225
  }
1287
1226
  }
1227
+
1228
+ .headerCell {
1229
+ padding: 12px 14px;
1230
+ cursor: pointer;
1231
+ letter-spacing: 0.2px;
1232
+ white-space: nowrap;
1233
+ font-size: 13px;
1234
+ vertical-align: middle;
1235
+ background: transparent;
1236
+ border-bottom: 1px solid rgba(230, 233, 239, 0.6);
1237
+ }
1238
+
1239
+ .headerContent {
1240
+ display: flex;
1241
+ align-items: center;
1242
+ justify-content: center;
1243
+ gap: 6px;
1244
+ font-size: 13px;
1245
+ line-height: 1;
1246
+ }
1247
+
1248
+ .tableCell {
1249
+ padding: 10px 14px;
1250
+ background: transparent;
1251
+ vertical-align: middle;
1252
+ font-size: 13px;
1253
+ min-width: 0;
1254
+ overflow: hidden;
1255
+ text-overflow: ellipsis;
1256
+ white-space: nowrap;
1257
+ }
1258
+
1259
+ .cellContent {
1260
+ display: flex;
1261
+ align-items: center;
1262
+ justify-content: center;
1263
+ min-height: 20px;
1264
+ gap: 6px;
1265
+ width: 100%;
1266
+ box-sizing: border-box;
1267
+ }
1268
+
1269
+ .alignLeft {
1270
+ text-align: left;
1271
+ }
1272
+ .alignCenter {
1273
+ text-align: center;
1274
+ }
1275
+ .alignRight {
1276
+ text-align: right;
1277
+ }
1278
+
1279
+ .tableCell.alignRight .cellContent,
1280
+ .headerCell.alignRight .headerContent {
1281
+ justify-content: flex-end;
1282
+ }
1283
+
1284
+ .tableCell.alignLeft .cellContent,
1285
+ .headerCell.alignLeft .headerContent {
1286
+ justify-content: flex-start;
1287
+ }
1288
+
1289
+ .emptyRow {
1290
+ text-align: center;
1291
+ padding: 24px;
1292
+ color: var(--muted);
1293
+ font-size: 13px;
1294
+ }