@tsiky/components-r19 1.0.0 → 1.2.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 (61) hide show
  1. package/index.ts +35 -33
  2. package/package.json +1 -1
  3. package/src/components/AnnouncementPanel/FlexRowContainer.css +17 -17
  4. package/src/components/AnnouncementPanel/FlexRowContainer.stories.tsx +329 -329
  5. package/src/components/AnnouncementPanel/FlexRowContainer.tsx +24 -24
  6. package/src/components/AnnouncementPanel/ListBox/CounterListBox.css +56 -56
  7. package/src/components/AnnouncementPanel/ListBox/CounterListBox.stories.tsx +292 -292
  8. package/src/components/AnnouncementPanel/ListBox/CounterListBox.tsx +106 -106
  9. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.css +57 -57
  10. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.stories.tsx +189 -189
  11. package/src/components/AnnouncementPanel/ListBox/SimpleListBox.tsx +138 -138
  12. package/src/components/AnnouncementPanel/ListBox/TrendListBox.css +61 -61
  13. package/src/components/AnnouncementPanel/ListBox/TrendListBox.stories.tsx +257 -257
  14. package/src/components/AnnouncementPanel/ListBox/TrendListBox.tsx +90 -90
  15. package/src/components/AnnouncementPanel/ListBox/index.ts +3 -3
  16. package/src/components/AnnouncementPanel/ListContentContainer.css +23 -23
  17. package/src/components/AnnouncementPanel/ListContentContainer.stories.tsx +212 -212
  18. package/src/components/AnnouncementPanel/ListContentContainer.tsx +33 -33
  19. package/src/components/AnnouncementPanel/index.ts +3 -3
  20. package/src/components/Charts/area-chart-admission/AreaChartAdmission.tsx +129 -89
  21. package/src/components/Charts/bar-chart/BarChart.tsx +171 -132
  22. package/src/components/Charts/boxplot-chart/BoxPlotChart.tsx +114 -114
  23. package/src/components/Charts/mixed-chart/MixedChart.tsx +65 -9
  24. package/src/components/Charts/sankey-adaptation/sankey.tsx +70 -70
  25. package/src/components/Charts/sankey-chart/SankeyChart.tsx +183 -155
  26. package/src/components/Confirmationpopup/ConfirmationPopup.module.css +88 -0
  27. package/src/components/Confirmationpopup/ConfirmationPopup.stories.tsx +94 -0
  28. package/src/components/Confirmationpopup/ConfirmationPopup.tsx +47 -0
  29. package/src/components/Confirmationpopup/index.ts +6 -0
  30. package/src/components/Confirmationpopup/useConfirmationPopup.ts +48 -0
  31. package/src/components/DayStatCard/DayStatCard.tsx +96 -69
  32. package/src/components/DraggableSwitcher/DraggableSwitcherButton.tsx +58 -58
  33. package/src/components/DraggableSwitcher/context/useDraggableSwitcher.tsx +45 -45
  34. package/src/components/DraggableSwitcher/index.ts +2 -2
  35. package/src/components/DynamicInput/input/SelectInput.tsx +75 -75
  36. package/src/components/DynamicInput/input/assets/SelectInput.module.css +95 -95
  37. package/src/components/DynamicTable/TableCell.tsx +38 -30
  38. package/src/components/DynamicTable/TableHeader.tsx +39 -34
  39. package/src/components/DynamicTable/TableauDynamique.module.css +1333 -1287
  40. package/src/components/DynamicTable/TableauDynamique.tsx +154 -154
  41. package/src/components/DynamicTable/tools/tableTypes.ts +63 -63
  42. package/src/components/Grid/Grid.tsx +5 -0
  43. package/src/components/Grid/grid.css +285 -285
  44. package/src/components/Header/Header.tsx +4 -2
  45. package/src/components/Header/header.css +61 -31
  46. package/src/components/MetricsPanel/MetricsPanel.module.css +688 -636
  47. package/src/components/MetricsPanel/MetricsPanel.tsx +220 -282
  48. package/src/components/MetricsPanel/renderers/CompactRenderer.tsx +148 -125
  49. package/src/components/NavBar/NavBar.tsx +1 -1
  50. package/src/components/NavItem/NavItem.tsx +58 -58
  51. package/src/components/PeriodRange/PeriodRange.module.css +158 -158
  52. package/src/components/PeriodRange/PeriodRange.tsx +130 -130
  53. package/src/components/SearchBar/SearchBar.css +40 -40
  54. package/src/components/SelectFilter/SelectFilter.module.css +249 -0
  55. package/src/components/SelectFilter/SelectFilter.stories.tsx +321 -0
  56. package/src/components/SelectFilter/SelectFilter.tsx +219 -0
  57. package/src/components/SelectFilter/index.ts +2 -0
  58. package/src/components/SelectFilter/types.ts +19 -0
  59. package/src/components/TranslationKey/TranslationKey.css +272 -272
  60. package/src/components/TranslationKey/TranslationKey.tsx +266 -245
  61. package/src/components/TrendList/TrendList.tsx +72 -45
@@ -1,95 +1,95 @@
1
- .wrapper {
2
- position: relative;
3
- width: 100%;
4
- border: 1px solid #d3d6db;
5
- border-radius: 10px;
6
- padding: 12px 44px 12px 14px;
7
- box-sizing: border-box;
8
- cursor: pointer;
9
- transition:
10
- border-color 0.15s ease,
11
- box-shadow 0.15s ease;
12
- }
13
-
14
- .wrapper:focus-within {
15
- border-color: #2684ff;
16
- }
17
-
18
- .wrapperInvalid {
19
- border-color: #dc3545;
20
- }
21
-
22
- .nativeSelect {
23
- position: absolute;
24
- inset: 0;
25
- width: 100%;
26
- height: 100%;
27
- opacity: 0;
28
- border: none;
29
- background: transparent;
30
- cursor: pointer;
31
- }
32
-
33
- .display {
34
- display: flex;
35
- flex-direction: column;
36
- pointer-events: none;
37
- user-select: none;
38
- }
39
-
40
- .topLabel {
41
- font-size: 0.8rem;
42
- color: #8b9094;
43
- font-weight: 500;
44
- line-height: 1;
45
- margin-bottom: 6px;
46
- }
47
-
48
- .valueLine {
49
- font-size: 1rem;
50
- line-height: 1.1;
51
- white-space: nowrap;
52
- overflow: hidden;
53
- text-overflow: ellipsis;
54
- }
55
-
56
- .valuePlaceholder {
57
- color: #99a0a6;
58
- }
59
-
60
- .valueActive {
61
- color: var(--color-text, #222);
62
- }
63
-
64
- .caret {
65
- position: absolute;
66
- right: 12px;
67
- top: 50%;
68
- transform: translateY(-50%);
69
- width: 16px;
70
- height: 16px;
71
- pointer-events: none;
72
- background-image: url("data:image/svg+xml;utf8,<svg fill='%23888' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
73
- background-repeat: no-repeat;
74
- background-position: center;
75
- background-size: 16px;
76
- }
77
-
78
- .error {
79
- display: block;
80
- margin-top: 8px;
81
- font-size: 0.85rem;
82
- color: #dc3545;
83
- }
84
-
85
- @media (prefers-reduced-motion: reduce) {
86
- .wrapper,
87
- .wrapper:focus-within {
88
- transition: none;
89
- }
90
- }
91
-
92
- .optionStyle {
93
- background-color: var(--color-card-background);
94
- color: var(--color-text);
95
- }
1
+ .wrapper {
2
+ position: relative;
3
+ width: 100%;
4
+ border: 1px solid #d3d6db;
5
+ border-radius: 10px;
6
+ padding: 12px 44px 12px 14px;
7
+ box-sizing: border-box;
8
+ cursor: pointer;
9
+ transition:
10
+ border-color 0.15s ease,
11
+ box-shadow 0.15s ease;
12
+ }
13
+
14
+ .wrapper:focus-within {
15
+ border-color: #2684ff;
16
+ }
17
+
18
+ .wrapperInvalid {
19
+ border-color: #dc3545;
20
+ }
21
+
22
+ .nativeSelect {
23
+ position: absolute;
24
+ inset: 0;
25
+ width: 100%;
26
+ height: 100%;
27
+ opacity: 0;
28
+ border: none;
29
+ background: transparent;
30
+ cursor: pointer;
31
+ }
32
+
33
+ .display {
34
+ display: flex;
35
+ flex-direction: column;
36
+ pointer-events: none;
37
+ user-select: none;
38
+ }
39
+
40
+ .topLabel {
41
+ font-size: 0.8rem;
42
+ color: #8b9094;
43
+ font-weight: 500;
44
+ line-height: 1;
45
+ margin-bottom: 6px;
46
+ }
47
+
48
+ .valueLine {
49
+ font-size: 1rem;
50
+ line-height: 1.1;
51
+ white-space: nowrap;
52
+ overflow: hidden;
53
+ text-overflow: ellipsis;
54
+ }
55
+
56
+ .valuePlaceholder {
57
+ color: #99a0a6;
58
+ }
59
+
60
+ .valueActive {
61
+ color: var(--color-text, #222);
62
+ }
63
+
64
+ .caret {
65
+ position: absolute;
66
+ right: 12px;
67
+ top: 50%;
68
+ transform: translateY(-50%);
69
+ width: 16px;
70
+ height: 16px;
71
+ pointer-events: none;
72
+ background-image: url("data:image/svg+xml;utf8,<svg fill='%23888' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
73
+ background-repeat: no-repeat;
74
+ background-position: center;
75
+ background-size: 16px;
76
+ }
77
+
78
+ .error {
79
+ display: block;
80
+ margin-top: 8px;
81
+ font-size: 0.85rem;
82
+ color: #dc3545;
83
+ }
84
+
85
+ @media (prefers-reduced-motion: reduce) {
86
+ .wrapper,
87
+ .wrapper:focus-within {
88
+ transition: none;
89
+ }
90
+ }
91
+
92
+ .optionStyle {
93
+ background-color: var(--color-card-background);
94
+ color: var(--color-text);
95
+ }
@@ -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;