@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,90 +1,90 @@
1
- import React from 'react';
2
- import './TrendListBox.css';
3
-
4
- export type TrendBoxItem = {
5
- label: string;
6
- value: string;
7
- delta?: number;
8
- deltaLabel?: string;
9
- icon?: React.ReactNode;
10
- className?: string;
11
- };
12
-
13
- export type TrendListBoxProps = {
14
- className?: string;
15
- style?: React.CSSProperties;
16
- title?: string;
17
- items?: TrendBoxItem[];
18
- titleBg?: string;
19
- titleColor?: string;
20
- itemBg?: string;
21
- lineClasses?: { [index: number]: string };
22
- renderTrendIcon?: (it: TrendBoxItem) => React.ReactNode;
23
- colGap?: string;
24
- };
25
-
26
- export const TrendListBox: React.FC<TrendListBoxProps> = ({
27
- className = '',
28
- style = {},
29
- title,
30
- items = [],
31
- titleBg,
32
- titleColor,
33
- itemBg,
34
- lineClasses = {},
35
- renderTrendIcon,
36
- colGap = '1rem',
37
- }) => {
38
- const gridStyle: React.CSSProperties | undefined = colGap
39
- ? ({ ['--col-gap' as any]: colGap } as React.CSSProperties)
40
- : undefined;
41
-
42
- return (
43
- <div className={`tlb-root ${className}`} style={{ ...style, background: itemBg ?? undefined }}>
44
- {title && (
45
- <div
46
- className='tlb-title'
47
- style={{
48
- background: titleBg ?? undefined,
49
- color: titleColor ?? undefined,
50
- }}
51
- >
52
- {title}
53
- </div>
54
- )}
55
-
56
- <div className='tlb-grid' style={gridStyle}>
57
- {items.map((it, idx) => {
58
- const lineClass = lineClasses[idx] || '';
59
-
60
- return (
61
- <div
62
- key={idx}
63
- className={`tlb-row ${lineClass}`}
64
- style={{ background: itemBg ?? undefined }}
65
- >
66
- <div className='tlb-label'>{it.label}</div>
67
-
68
- <div className='tlb-value-group'>
69
- <div className='tlb-icon-col'>
70
- {renderTrendIcon ? renderTrendIcon(it) : (it.icon ?? null)}
71
- </div>
72
-
73
- <div className='tlb-value-wrap'>
74
- <div className='tlb-value'>{it.value}</div>
75
- {typeof it.delta !== 'undefined' && (
76
- <div
77
- className={`tlb-delta ${it.delta > 0 ? 'positive' : it.delta < 0 ? 'negative' : 'neutral'}`}
78
- >
79
- {it.deltaLabel ?? String(it.delta)}
80
- </div>
81
- )}
82
- </div>
83
- </div>
84
- </div>
85
- );
86
- })}
87
- </div>
88
- </div>
89
- );
90
- };
1
+ import React from 'react';
2
+ import './TrendListBox.css';
3
+
4
+ export type TrendBoxItem = {
5
+ label: string;
6
+ value: string;
7
+ delta?: number;
8
+ deltaLabel?: string;
9
+ icon?: React.ReactNode;
10
+ className?: string;
11
+ };
12
+
13
+ export type TrendListBoxProps = {
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ title?: string;
17
+ items?: TrendBoxItem[];
18
+ titleBg?: string;
19
+ titleColor?: string;
20
+ itemBg?: string;
21
+ lineClasses?: { [index: number]: string };
22
+ renderTrendIcon?: (it: TrendBoxItem) => React.ReactNode;
23
+ colGap?: string;
24
+ };
25
+
26
+ export const TrendListBox: React.FC<TrendListBoxProps> = ({
27
+ className = '',
28
+ style = {},
29
+ title,
30
+ items = [],
31
+ titleBg,
32
+ titleColor,
33
+ itemBg,
34
+ lineClasses = {},
35
+ renderTrendIcon,
36
+ colGap = '1rem',
37
+ }) => {
38
+ const gridStyle: React.CSSProperties | undefined = colGap
39
+ ? ({ ['--col-gap' as any]: colGap } as React.CSSProperties)
40
+ : undefined;
41
+
42
+ return (
43
+ <div className={`tlb-root ${className}`} style={{ ...style, background: itemBg ?? undefined }}>
44
+ {title && (
45
+ <div
46
+ className='tlb-title'
47
+ style={{
48
+ background: titleBg ?? undefined,
49
+ color: titleColor ?? undefined,
50
+ }}
51
+ >
52
+ {title}
53
+ </div>
54
+ )}
55
+
56
+ <div className='tlb-grid' style={gridStyle}>
57
+ {items.map((it, idx) => {
58
+ const lineClass = lineClasses[idx] || '';
59
+
60
+ return (
61
+ <div
62
+ key={idx}
63
+ className={`tlb-row ${lineClass}`}
64
+ style={{ background: itemBg ?? undefined }}
65
+ >
66
+ <div className='tlb-label'>{it.label}</div>
67
+
68
+ <div className='tlb-value-group'>
69
+ <div className='tlb-icon-col'>
70
+ {renderTrendIcon ? renderTrendIcon(it) : (it.icon ?? null)}
71
+ </div>
72
+
73
+ <div className='tlb-value-wrap'>
74
+ <div className='tlb-value'>{it.value}</div>
75
+ {typeof it.delta !== 'undefined' && (
76
+ <div
77
+ className={`tlb-delta ${it.delta > 0 ? 'positive' : it.delta < 0 ? 'negative' : 'neutral'}`}
78
+ >
79
+ {it.deltaLabel ?? String(it.delta)}
80
+ </div>
81
+ )}
82
+ </div>
83
+ </div>
84
+ </div>
85
+ );
86
+ })}
87
+ </div>
88
+ </div>
89
+ );
90
+ };
@@ -1,3 +1,3 @@
1
- export * from './SimpleListBox';
2
- export * from './CounterListBox';
3
- export * from './TrendListBox';
1
+ export * from './SimpleListBox';
2
+ export * from './CounterListBox';
3
+ export * from './TrendListBox';
@@ -1,23 +1,23 @@
1
- .lcc-root {
2
- display: flex;
3
- flex-wrap: wrap;
4
- align-items: flex-start;
5
- justify-content: space-between;
6
- border-radius: 8px;
7
- padding: 0.5rem;
8
- box-shadow: 0 2px 4px #0000001a;
9
- box-sizing: border-box;
10
- width: 100%;
11
- }
12
-
13
- .lcc-cell {
14
- display: flex;
15
- align-items: flex-start;
16
- margin-left: auto;
17
- margin-right: auto;
18
- }
19
-
20
- .lcc-cell > * {
21
- width: 100%;
22
- box-sizing: border-box;
23
- }
1
+ .lcc-root {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ align-items: flex-start;
5
+ justify-content: space-between;
6
+ border-radius: 8px;
7
+ padding: 0.5rem;
8
+ box-shadow: 0 2px 4px #0000001a;
9
+ box-sizing: border-box;
10
+ width: 100%;
11
+ }
12
+
13
+ .lcc-cell {
14
+ display: flex;
15
+ align-items: flex-start;
16
+ margin-left: auto;
17
+ margin-right: auto;
18
+ }
19
+
20
+ .lcc-cell > * {
21
+ width: 100%;
22
+ box-sizing: border-box;
23
+ }
@@ -1,212 +1,212 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { ArrowUp, ArrowDown, TrendingUp, Users, Star } from 'lucide-react';
3
- import { ListContentContainer } from './ListContentContainer';
4
- import { SimpleListBox } from './ListBox/SimpleListBox';
5
- import { CounterListBox } from './ListBox/CounterListBox';
6
- import { TrendListBox } from './ListBox/TrendListBox';
7
-
8
- const meta: Meta<typeof ListContentContainer> = {
9
- title: 'Components/ListContentContainer',
10
- component: ListContentContainer,
11
- parameters: {
12
- layout: 'centered',
13
- docs: {
14
- description: {
15
- component:
16
- 'A horizontal container for grouping list components with consistent spacing and background.',
17
- },
18
- },
19
- },
20
- tags: ['autodocs'],
21
- argTypes: {
22
- gap: {
23
- control: { type: 'text' },
24
- description: 'Space between items (e.g., "1rem", "10px")',
25
- },
26
- background: {
27
- control: { type: 'color' },
28
- description: 'Background color of the container',
29
- },
30
- },
31
- };
32
-
33
- export default meta;
34
- type Story = StoryObj<typeof meta>;
35
-
36
- export const Default: Story = {
37
- args: {
38
- gap: '1rem',
39
- background: '#008FBB',
40
- },
41
- render: (args) => (
42
- <ListContentContainer {...args} style={{ width: 520 }}>
43
- <SimpleListBox title='Admissions' data={['63 Patients']} />
44
- <CounterListBox title='Summary' data={[['63', 'Patients']]} badgeColor='#06b6d4' />
45
- <TrendListBox
46
- title='Trend'
47
- items={[
48
- { label: 'MED', value: '+3', delta: 3, icon: <ArrowUp size={16} /> },
49
- { label: 'SURG', value: '-2', delta: -2, icon: <ArrowDown size={16} /> },
50
- ]}
51
- />
52
- </ListContentContainer>
53
- ),
54
- };
55
-
56
- export const HealthcareDashboard: Story = {
57
- name: 'Healthcare Dashboard',
58
- args: {
59
- background: '#0369a1',
60
- gap: '0.8rem',
61
- },
62
- render: (args) => (
63
- <ListContentContainer {...args} style={{ width: 600 }}>
64
- <SimpleListBox title='Operating Rooms' data={['4 Occupied', '2 Available']} />
65
- <CounterListBox title='Patients' data={[['128', 'Hospitalized']]} badgeColor='#dc2626' />
66
- <TrendListBox
67
- title='Admissions'
68
- items={[
69
- { label: 'Emergency', value: '+8', delta: 8, icon: <ArrowUp size={16} /> },
70
- { label: 'Scheduled', value: '+3', delta: 3, icon: <ArrowUp size={16} /> },
71
- ]}
72
- />
73
- <SimpleListBox title='Staff' data={['18 Doctors', '32 Nurses']} />
74
- </ListContentContainer>
75
- ),
76
- };
77
-
78
- export const BusinessMetrics: Story = {
79
- name: 'Business Metrics',
80
- args: {
81
- background: '#059669',
82
- gap: '1rem',
83
- },
84
- render: (args) => (
85
- <ListContentContainer {...args} style={{ width: 650 }}>
86
- <TrendListBox
87
- title='Performance'
88
- items={[
89
- { label: 'Revenue', value: '€12.5K', delta: 12, icon: <TrendingUp size={16} /> },
90
- { label: 'Users', value: '+42', delta: 8, icon: <Users size={16} /> },
91
- { label: 'Growth', value: '+8.1%', delta: 8.1, icon: <ArrowUp size={16} /> },
92
- ]}
93
- />
94
- <CounterListBox
95
- title='Monthly Summary'
96
- data={[
97
- ['156', 'Orders Completed'],
98
- ['€2.4K', 'Revenue Generated'],
99
- ['24', 'Pending Orders'],
100
- ]}
101
- badgeColor='#f59e0b'
102
- />
103
- <SimpleListBox
104
- title='Quick Stats'
105
- data={[
106
- ['Conversion Rate', '3.2%'],
107
- ['Customer Satisfaction', '4.8/5'],
108
- ]}
109
- />
110
- </ListContentContainer>
111
- ),
112
- };
113
-
114
- export const RatingSystem: Story = {
115
- name: 'Rating System',
116
- args: {
117
- background: '#7c3aed',
118
- gap: '1.2rem',
119
- },
120
- render: (args) => (
121
- <ListContentContainer {...args} style={{ width: 580 }}>
122
- <TrendListBox
123
- title='Quality Ratings'
124
- items={[
125
- {
126
- label: 'Service',
127
- value: '4.8/5',
128
- delta: 0.2,
129
- icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
130
- },
131
- {
132
- label: 'Response',
133
- value: '4.5/5',
134
- delta: -0.1,
135
- icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
136
- },
137
- {
138
- label: 'Support',
139
- value: '4.9/5',
140
- delta: 0.3,
141
- icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
142
- },
143
- ]}
144
- />
145
- <CounterListBox
146
- title='Review Summary'
147
- data={[
148
- ['156', '5-Star Reviews'],
149
- ['24', '4-Star Reviews'],
150
- ['8', '3-Star Reviews'],
151
- ]}
152
- badgeColor='#ec4899'
153
- />
154
- </ListContentContainer>
155
- ),
156
- };
157
-
158
- export const SystemMonitoring: Story = {
159
- name: 'System Monitoring',
160
- args: {
161
- background: '#dc2626',
162
- gap: '0.8rem',
163
- },
164
- render: (args) => (
165
- <ListContentContainer {...args} style={{ width: 550 }}>
166
- <TrendListBox
167
- title='System Metrics'
168
- items={[
169
- { label: 'CPU', value: '68%', delta: 2, icon: <ArrowUp size={16} /> },
170
- { label: 'Memory', value: '45%', delta: -5, icon: <ArrowDown size={16} /> },
171
- { label: 'Disk', value: '82%', delta: 1, icon: <ArrowUp size={16} /> },
172
- ]}
173
- />
174
- <CounterListBox
175
- title='Alerts'
176
- data={[
177
- ['3', 'Critical'],
178
- ['7', 'Warning'],
179
- ['12', 'Info'],
180
- ]}
181
- badgeColor='#ef4444'
182
- />
183
- <SimpleListBox title='Status' data={['All systems operational', 'Last updated: 2 min ago']} />
184
- </ListContentContainer>
185
- ),
186
- };
187
-
188
- export const CustomGap: Story = {
189
- name: 'Custom Gap Sizes',
190
- args: {
191
- background: '#f59e0b',
192
- },
193
- render: (args) => (
194
- <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
195
- <div>
196
- <h4 style={{ marginBottom: '0.5rem' }}>Small Gap (0.5rem)</h4>
197
- <ListContentContainer {...args} gap='0.5rem' style={{ width: 500 }}>
198
- <SimpleListBox title='Compact' data={['Item 1', 'Item 2']} />
199
- <CounterListBox title='Counters' data={[['1', 'First']]} badgeColor='#3b82f6' />
200
- </ListContentContainer>
201
- </div>
202
-
203
- <div>
204
- <h4 style={{ marginBottom: '0.5rem' }}>Large Gap (2rem)</h4>
205
- <ListContentContainer {...args} gap='2rem' style={{ width: 500 }}>
206
- <SimpleListBox title='Spacious' data={['Item 1', 'Item 2']} />
207
- <CounterListBox title='Counters' data={[['1', 'First']]} badgeColor='#3b82f6' />
208
- </ListContentContainer>
209
- </div>
210
- </div>
211
- ),
212
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ArrowUp, ArrowDown, TrendingUp, Users, Star } from 'lucide-react';
3
+ import { ListContentContainer } from './ListContentContainer';
4
+ import { SimpleListBox } from './ListBox/SimpleListBox';
5
+ import { CounterListBox } from './ListBox/CounterListBox';
6
+ import { TrendListBox } from './ListBox/TrendListBox';
7
+
8
+ const meta: Meta<typeof ListContentContainer> = {
9
+ title: 'Components/ListContentContainer',
10
+ component: ListContentContainer,
11
+ parameters: {
12
+ layout: 'centered',
13
+ docs: {
14
+ description: {
15
+ component:
16
+ 'A horizontal container for grouping list components with consistent spacing and background.',
17
+ },
18
+ },
19
+ },
20
+ tags: ['autodocs'],
21
+ argTypes: {
22
+ gap: {
23
+ control: { type: 'text' },
24
+ description: 'Space between items (e.g., "1rem", "10px")',
25
+ },
26
+ background: {
27
+ control: { type: 'color' },
28
+ description: 'Background color of the container',
29
+ },
30
+ },
31
+ };
32
+
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+
36
+ export const Default: Story = {
37
+ args: {
38
+ gap: '1rem',
39
+ background: '#008FBB',
40
+ },
41
+ render: (args) => (
42
+ <ListContentContainer {...args} style={{ width: 520 }}>
43
+ <SimpleListBox title='Admissions' data={['63 Patients']} />
44
+ <CounterListBox title='Summary' data={[['63', 'Patients']]} badgeColor='#06b6d4' />
45
+ <TrendListBox
46
+ title='Trend'
47
+ items={[
48
+ { label: 'MED', value: '+3', delta: 3, icon: <ArrowUp size={16} /> },
49
+ { label: 'SURG', value: '-2', delta: -2, icon: <ArrowDown size={16} /> },
50
+ ]}
51
+ />
52
+ </ListContentContainer>
53
+ ),
54
+ };
55
+
56
+ export const HealthcareDashboard: Story = {
57
+ name: 'Healthcare Dashboard',
58
+ args: {
59
+ background: '#0369a1',
60
+ gap: '0.8rem',
61
+ },
62
+ render: (args) => (
63
+ <ListContentContainer {...args} style={{ width: 600 }}>
64
+ <SimpleListBox title='Operating Rooms' data={['4 Occupied', '2 Available']} />
65
+ <CounterListBox title='Patients' data={[['128', 'Hospitalized']]} badgeColor='#dc2626' />
66
+ <TrendListBox
67
+ title='Admissions'
68
+ items={[
69
+ { label: 'Emergency', value: '+8', delta: 8, icon: <ArrowUp size={16} /> },
70
+ { label: 'Scheduled', value: '+3', delta: 3, icon: <ArrowUp size={16} /> },
71
+ ]}
72
+ />
73
+ <SimpleListBox title='Staff' data={['18 Doctors', '32 Nurses']} />
74
+ </ListContentContainer>
75
+ ),
76
+ };
77
+
78
+ export const BusinessMetrics: Story = {
79
+ name: 'Business Metrics',
80
+ args: {
81
+ background: '#059669',
82
+ gap: '1rem',
83
+ },
84
+ render: (args) => (
85
+ <ListContentContainer {...args} style={{ width: 650 }}>
86
+ <TrendListBox
87
+ title='Performance'
88
+ items={[
89
+ { label: 'Revenue', value: '€12.5K', delta: 12, icon: <TrendingUp size={16} /> },
90
+ { label: 'Users', value: '+42', delta: 8, icon: <Users size={16} /> },
91
+ { label: 'Growth', value: '+8.1%', delta: 8.1, icon: <ArrowUp size={16} /> },
92
+ ]}
93
+ />
94
+ <CounterListBox
95
+ title='Monthly Summary'
96
+ data={[
97
+ ['156', 'Orders Completed'],
98
+ ['€2.4K', 'Revenue Generated'],
99
+ ['24', 'Pending Orders'],
100
+ ]}
101
+ badgeColor='#f59e0b'
102
+ />
103
+ <SimpleListBox
104
+ title='Quick Stats'
105
+ data={[
106
+ ['Conversion Rate', '3.2%'],
107
+ ['Customer Satisfaction', '4.8/5'],
108
+ ]}
109
+ />
110
+ </ListContentContainer>
111
+ ),
112
+ };
113
+
114
+ export const RatingSystem: Story = {
115
+ name: 'Rating System',
116
+ args: {
117
+ background: '#7c3aed',
118
+ gap: '1.2rem',
119
+ },
120
+ render: (args) => (
121
+ <ListContentContainer {...args} style={{ width: 580 }}>
122
+ <TrendListBox
123
+ title='Quality Ratings'
124
+ items={[
125
+ {
126
+ label: 'Service',
127
+ value: '4.8/5',
128
+ delta: 0.2,
129
+ icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
130
+ },
131
+ {
132
+ label: 'Response',
133
+ value: '4.5/5',
134
+ delta: -0.1,
135
+ icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
136
+ },
137
+ {
138
+ label: 'Support',
139
+ value: '4.9/5',
140
+ delta: 0.3,
141
+ icon: <Star size={16} color='#f59e0b' fill='#f59e0b' />,
142
+ },
143
+ ]}
144
+ />
145
+ <CounterListBox
146
+ title='Review Summary'
147
+ data={[
148
+ ['156', '5-Star Reviews'],
149
+ ['24', '4-Star Reviews'],
150
+ ['8', '3-Star Reviews'],
151
+ ]}
152
+ badgeColor='#ec4899'
153
+ />
154
+ </ListContentContainer>
155
+ ),
156
+ };
157
+
158
+ export const SystemMonitoring: Story = {
159
+ name: 'System Monitoring',
160
+ args: {
161
+ background: '#dc2626',
162
+ gap: '0.8rem',
163
+ },
164
+ render: (args) => (
165
+ <ListContentContainer {...args} style={{ width: 550 }}>
166
+ <TrendListBox
167
+ title='System Metrics'
168
+ items={[
169
+ { label: 'CPU', value: '68%', delta: 2, icon: <ArrowUp size={16} /> },
170
+ { label: 'Memory', value: '45%', delta: -5, icon: <ArrowDown size={16} /> },
171
+ { label: 'Disk', value: '82%', delta: 1, icon: <ArrowUp size={16} /> },
172
+ ]}
173
+ />
174
+ <CounterListBox
175
+ title='Alerts'
176
+ data={[
177
+ ['3', 'Critical'],
178
+ ['7', 'Warning'],
179
+ ['12', 'Info'],
180
+ ]}
181
+ badgeColor='#ef4444'
182
+ />
183
+ <SimpleListBox title='Status' data={['All systems operational', 'Last updated: 2 min ago']} />
184
+ </ListContentContainer>
185
+ ),
186
+ };
187
+
188
+ export const CustomGap: Story = {
189
+ name: 'Custom Gap Sizes',
190
+ args: {
191
+ background: '#f59e0b',
192
+ },
193
+ render: (args) => (
194
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
195
+ <div>
196
+ <h4 style={{ marginBottom: '0.5rem' }}>Small Gap (0.5rem)</h4>
197
+ <ListContentContainer {...args} gap='0.5rem' style={{ width: 500 }}>
198
+ <SimpleListBox title='Compact' data={['Item 1', 'Item 2']} />
199
+ <CounterListBox title='Counters' data={[['1', 'First']]} badgeColor='#3b82f6' />
200
+ </ListContentContainer>
201
+ </div>
202
+
203
+ <div>
204
+ <h4 style={{ marginBottom: '0.5rem' }}>Large Gap (2rem)</h4>
205
+ <ListContentContainer {...args} gap='2rem' style={{ width: 500 }}>
206
+ <SimpleListBox title='Spacious' data={['Item 1', 'Item 2']} />
207
+ <CounterListBox title='Counters' data={[['1', 'First']]} badgeColor='#3b82f6' />
208
+ </ListContentContainer>
209
+ </div>
210
+ </div>
211
+ ),
212
+ };