@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.1.4 → 0.1.6
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/CHANGELOG.md +1 -1
- package/dist/index.d.ts +131 -131
- package/dist/index.esm.js +148 -148
- package/dist/index.js +148 -148
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/accessibility-demo.tsx +271 -0
- package/src/components/ui/advanced-component-architecture-demo.tsx +916 -0
- package/src/components/ui/advanced-transition-system-demo.tsx +670 -0
- package/src/components/ui/advanced-transition-system.tsx +395 -0
- package/src/components/ui/animation/animated-container.tsx +166 -0
- package/src/components/ui/animation/index.ts +19 -0
- package/src/components/ui/animation/staggered-container.tsx +68 -0
- package/src/components/ui/animation-demo.tsx +250 -0
- package/src/components/ui/badge.tsx +33 -0
- package/src/components/ui/battery-conscious-animation-demo.tsx +568 -0
- package/src/components/ui/border-radius-shadow-demo.tsx +187 -0
- package/src/components/ui/button.tsx +36 -0
- package/src/components/ui/card.tsx +207 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/color-preview.tsx +411 -0
- package/src/components/ui/data-display/chart.tsx +653 -0
- package/src/components/ui/data-display/data-grid-simple.tsx +76 -0
- package/src/components/ui/data-display/data-grid.tsx +680 -0
- package/src/components/ui/data-display/list.tsx +456 -0
- package/src/components/ui/data-display/table.tsx +482 -0
- package/src/components/ui/data-display/timeline.tsx +441 -0
- package/src/components/ui/data-display/tree.tsx +602 -0
- package/src/components/ui/data-display/types.ts +536 -0
- package/src/components/ui/enterprise-mobile-experience-demo.tsx +749 -0
- package/src/components/ui/enterprise-mobile-experience.tsx +464 -0
- package/src/components/ui/feedback/alert.tsx +157 -0
- package/src/components/ui/feedback/progress.tsx +292 -0
- package/src/components/ui/feedback/skeleton.tsx +185 -0
- package/src/components/ui/feedback/toast.tsx +280 -0
- package/src/components/ui/feedback/types.ts +125 -0
- package/src/components/ui/font-preview.tsx +288 -0
- package/src/components/ui/form-demo.tsx +553 -0
- package/src/components/ui/hardware-acceleration-demo.tsx +547 -0
- package/src/components/ui/input.tsx +35 -0
- package/src/components/ui/label.tsx +16 -0
- package/src/components/ui/layout-demo.tsx +367 -0
- package/src/components/ui/layouts/adaptive-layout.tsx +139 -0
- package/src/components/ui/layouts/desktop-layout.tsx +224 -0
- package/src/components/ui/layouts/index.ts +10 -0
- package/src/components/ui/layouts/mobile-layout.tsx +162 -0
- package/src/components/ui/layouts/tablet-layout.tsx +197 -0
- package/src/components/ui/mobile-form-validation.tsx +451 -0
- package/src/components/ui/mobile-input-demo.tsx +201 -0
- package/src/components/ui/mobile-input.tsx +281 -0
- package/src/components/ui/mobile-skeleton-loading-demo.tsx +638 -0
- package/src/components/ui/navigation/breadcrumb.tsx +158 -0
- package/src/components/ui/navigation/index.ts +36 -0
- package/src/components/ui/navigation/menu.tsx +374 -0
- package/src/components/ui/navigation/navigation-demo.tsx +324 -0
- package/src/components/ui/navigation/pagination.tsx +272 -0
- package/src/components/ui/navigation/sidebar.tsx +383 -0
- package/src/components/ui/navigation/stepper.tsx +303 -0
- package/src/components/ui/navigation/tabs.tsx +205 -0
- package/src/components/ui/navigation/types.ts +299 -0
- package/src/components/ui/overlay/backdrop.tsx +81 -0
- package/src/components/ui/overlay/focus-manager.tsx +143 -0
- package/src/components/ui/overlay/index.ts +36 -0
- package/src/components/ui/overlay/modal.tsx +270 -0
- package/src/components/ui/overlay/overlay-manager.tsx +110 -0
- package/src/components/ui/overlay/popover.tsx +462 -0
- package/src/components/ui/overlay/portal.tsx +79 -0
- package/src/components/ui/overlay/tooltip.tsx +303 -0
- package/src/components/ui/overlay/types.ts +196 -0
- package/src/components/ui/performance-demo.tsx +596 -0
- package/src/components/ui/semantic-input-system-demo.tsx +502 -0
- package/src/components/ui/semantic-input-system-demo.tsx.disabled +873 -0
- package/src/components/ui/tablet-layout.tsx +192 -0
- package/src/components/ui/theme-customizer.tsx +386 -0
- package/src/components/ui/theme-preview.tsx +310 -0
- package/src/components/ui/theme-switcher.tsx +264 -0
- package/src/components/ui/theme-toggle.tsx +38 -0
- package/src/components/ui/token-demo.tsx +195 -0
- package/src/components/ui/touch-demo.tsx +462 -0
- package/src/components/ui/touch-friendly-interface-demo.tsx +519 -0
- package/src/components/ui/touch-friendly-interface.tsx +296 -0
- package/src/hooks/index.ts +190 -0
- package/src/hooks/use-accessibility-support.ts +518 -0
- package/src/hooks/use-adaptive-layout.ts +289 -0
- package/src/hooks/use-advanced-patterns.ts +294 -0
- package/src/hooks/use-advanced-transition-system.ts +393 -0
- package/src/hooks/use-animation-profile.ts +288 -0
- package/src/hooks/use-battery-animations.ts +384 -0
- package/src/hooks/use-battery-conscious-loading.ts +475 -0
- package/src/hooks/use-battery-optimization.ts +330 -0
- package/src/hooks/use-battery-status.ts +299 -0
- package/src/hooks/use-component-performance.ts +344 -0
- package/src/hooks/use-device-loading-states.ts +459 -0
- package/src/hooks/use-device.tsx +110 -0
- package/src/hooks/use-enterprise-mobile-experience.ts +488 -0
- package/src/hooks/use-form-feedback.ts +403 -0
- package/src/hooks/use-form-performance.ts +513 -0
- package/src/hooks/use-frame-rate.ts +251 -0
- package/src/hooks/use-gestures.ts +338 -0
- package/src/hooks/use-hardware-acceleration.ts +341 -0
- package/src/hooks/use-input-accessibility.ts +455 -0
- package/src/hooks/use-input-performance.ts +506 -0
- package/src/hooks/use-layout-performance.ts +319 -0
- package/src/hooks/use-loading-accessibility.ts +535 -0
- package/src/hooks/use-loading-performance.ts +473 -0
- package/src/hooks/use-memory-usage.ts +287 -0
- package/src/hooks/use-mobile-form-layout.ts +464 -0
- package/src/hooks/use-mobile-form-validation.ts +518 -0
- package/src/hooks/use-mobile-keyboard-optimization.ts +472 -0
- package/src/hooks/use-mobile-layout.ts +302 -0
- package/src/hooks/use-mobile-optimization.ts +406 -0
- package/src/hooks/use-mobile-skeleton.ts +402 -0
- package/src/hooks/use-mobile-touch.ts +414 -0
- package/src/hooks/use-performance-throttling.ts +348 -0
- package/src/hooks/use-performance.ts +316 -0
- package/src/hooks/use-reusable-architecture.ts +414 -0
- package/src/hooks/use-semantic-input-types.ts +357 -0
- package/src/hooks/use-semantic-input.ts +565 -0
- package/src/hooks/use-tablet-layout.ts +384 -0
- package/src/hooks/use-touch-friendly-input.ts +524 -0
- package/src/hooks/use-touch-friendly-interface.ts +331 -0
- package/src/hooks/use-touch-optimization.ts +375 -0
- package/src/index.ts +279 -279
- package/src/lib/utils.ts +6 -0
- package/src/themes/README.md +272 -0
- package/src/themes/ThemeContext.tsx +31 -0
- package/src/themes/ThemeProvider.tsx +232 -0
- package/src/themes/accessibility/index.ts +27 -0
- package/src/themes/accessibility.ts +259 -0
- package/src/themes/aria-patterns.ts +420 -0
- package/src/themes/base-themes.ts +55 -0
- package/src/themes/colorManager.ts +380 -0
- package/src/themes/examples/dark-theme.ts +154 -0
- package/src/themes/examples/minimal-theme.ts +108 -0
- package/src/themes/focus-management.ts +701 -0
- package/src/themes/fontLoader.ts +201 -0
- package/src/themes/high-contrast.ts +621 -0
- package/src/themes/index.ts +19 -0
- package/src/themes/inheritance.ts +227 -0
- package/src/themes/keyboard-navigation.ts +550 -0
- package/src/themes/motion-reduction.ts +662 -0
- package/src/themes/navigation.ts +238 -0
- package/src/themes/screen-reader.ts +645 -0
- package/src/themes/systemThemeDetector.ts +182 -0
- package/src/themes/themeCSSUpdater.ts +262 -0
- package/src/themes/themePersistence.ts +238 -0
- package/src/themes/themes/default.ts +586 -0
- package/src/themes/themes/harvey.ts +554 -0
- package/src/themes/themes/stan-design.ts +683 -0
- package/src/themes/types.ts +460 -0
- package/src/themes/useSystemTheme.ts +48 -0
- package/src/themes/useTheme.ts +87 -0
- package/src/themes/validation.ts +462 -0
- package/src/tokens/index.ts +34 -0
- package/src/tokens/tokenExporter.ts +397 -0
- package/src/tokens/tokenGenerator.ts +276 -0
- package/src/tokens/tokenManager.ts +248 -0
- package/src/tokens/tokenValidator.ts +543 -0
- package/src/tokens/types.ts +78 -0
- package/src/utils/bundle-analyzer.ts +260 -0
- package/src/utils/bundle-splitting.ts +483 -0
- package/src/utils/lazy-loading.ts +441 -0
- package/src/utils/performance-monitor.ts +513 -0
- package/src/utils/tree-shaking.ts +274 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
// Data Display Components - Shared Types
|
|
2
|
+
// Comprehensive type definitions for all data display components
|
|
3
|
+
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// COMMON INTERFACES
|
|
8
|
+
// ============================================================================
|
|
9
|
+
|
|
10
|
+
export interface DataDisplayBaseProps {
|
|
11
|
+
className?: string;
|
|
12
|
+
theme?: 'stan-design' | 'enterprise' | 'harvey';
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
variant?: 'default' | 'bordered' | 'striped';
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
error?: string | null;
|
|
17
|
+
emptyMessage?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SortableColumn {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
sortable?: boolean;
|
|
24
|
+
width?: string | number;
|
|
25
|
+
align?: 'left' | 'center' | 'right';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface SortConfig {
|
|
29
|
+
key: string;
|
|
30
|
+
direction: 'asc' | 'desc';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface PaginationConfig {
|
|
34
|
+
currentPage: number;
|
|
35
|
+
pageSize: number;
|
|
36
|
+
totalItems: number;
|
|
37
|
+
pageSizeOptions?: number[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface FilterConfig {
|
|
41
|
+
key: string;
|
|
42
|
+
value: string | number | boolean;
|
|
43
|
+
operator: 'equals' | 'contains' | 'starts_with' | 'ends_with' | 'greater_than' | 'less_than';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ============================================================================
|
|
47
|
+
// TABLE COMPONENT
|
|
48
|
+
// ============================================================================
|
|
49
|
+
|
|
50
|
+
export interface TableProps extends DataDisplayBaseProps {
|
|
51
|
+
columns: SortableColumn[];
|
|
52
|
+
data: Record<string, any>[];
|
|
53
|
+
sortable?: boolean;
|
|
54
|
+
selectable?: boolean;
|
|
55
|
+
expandable?: boolean;
|
|
56
|
+
onSort?: (config: SortConfig) => void;
|
|
57
|
+
onSelectionChange?: (selectedKeys: string[]) => void;
|
|
58
|
+
onRowClick?: (row: Record<string, any>, index: number) => void;
|
|
59
|
+
onRowExpand?: (row: Record<string, any>, expanded: boolean) => void;
|
|
60
|
+
selectedKeys?: string[];
|
|
61
|
+
expandedKeys?: string[];
|
|
62
|
+
sortConfig?: SortConfig;
|
|
63
|
+
pagination?: PaginationConfig;
|
|
64
|
+
onPageChange?: (page: number) => void;
|
|
65
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
66
|
+
filters?: FilterConfig[];
|
|
67
|
+
onFiltersChange?: (filters: FilterConfig[]) => void;
|
|
68
|
+
searchable?: boolean;
|
|
69
|
+
searchValue?: string;
|
|
70
|
+
onSearchChange?: (value: string) => void;
|
|
71
|
+
rowKey?: string | ((row: Record<string, any>) => string);
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
error?: string | null;
|
|
74
|
+
emptyMessage?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TableRowProps {
|
|
78
|
+
row: Record<string, any>;
|
|
79
|
+
index: number;
|
|
80
|
+
columns: SortableColumn[];
|
|
81
|
+
selected: boolean;
|
|
82
|
+
expanded: boolean;
|
|
83
|
+
onSelect: (checked: boolean) => void;
|
|
84
|
+
onExpand: () => void;
|
|
85
|
+
onClick: () => void;
|
|
86
|
+
theme: 'stan-design' | 'enterprise' | 'harvey';
|
|
87
|
+
size: 'sm' | 'md' | 'lg';
|
|
88
|
+
variant: 'default' | 'bordered' | 'striped' | 'compact';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ============================================================================
|
|
92
|
+
// DATA GRID COMPONENT
|
|
93
|
+
// ============================================================================
|
|
94
|
+
|
|
95
|
+
export interface DataGridProps extends DataDisplayBaseProps {
|
|
96
|
+
columns: SortableColumn[];
|
|
97
|
+
data: Record<string, any>[];
|
|
98
|
+
sortable?: boolean;
|
|
99
|
+
filterable?: boolean;
|
|
100
|
+
groupable?: boolean;
|
|
101
|
+
resizable?: boolean;
|
|
102
|
+
reorderable?: boolean;
|
|
103
|
+
onSort?: (config: SortConfig) => void;
|
|
104
|
+
onFiltersChange?: (filters: FilterConfig[]) => void;
|
|
105
|
+
onGroupChange?: (groups: string[]) => void;
|
|
106
|
+
onColumnResize?: (columnKey: string, newWidth: number) => void;
|
|
107
|
+
onColumnReorder?: (fromIndex: number, toIndex: number) => void;
|
|
108
|
+
sortConfig?: SortConfig;
|
|
109
|
+
filters?: FilterConfig[];
|
|
110
|
+
groups?: string[];
|
|
111
|
+
columnWidths?: Record<string, number>;
|
|
112
|
+
columnOrder?: string[];
|
|
113
|
+
pagination?: PaginationConfig;
|
|
114
|
+
onPageChange?: (page: number) => void;
|
|
115
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
116
|
+
searchable?: boolean;
|
|
117
|
+
searchValue?: string;
|
|
118
|
+
onSearchChange?: (value: string) => void;
|
|
119
|
+
rowKey?: string | ((row: Record<string, any>) => string);
|
|
120
|
+
selectable?: boolean;
|
|
121
|
+
onSelectionChange?: (selectedKeys: string[]) => void;
|
|
122
|
+
selectedKeys?: string[];
|
|
123
|
+
loading?: boolean;
|
|
124
|
+
error?: string | null;
|
|
125
|
+
emptyMessage?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface DataGridColumnProps {
|
|
129
|
+
column: SortableColumn;
|
|
130
|
+
index: number;
|
|
131
|
+
onSort: () => void;
|
|
132
|
+
onResize: (width: number) => void;
|
|
133
|
+
sortConfig?: SortConfig;
|
|
134
|
+
theme: 'stan-design' | 'enterprise' | 'harvey';
|
|
135
|
+
size: 'sm' | 'md' | 'lg';
|
|
136
|
+
resizable: boolean;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// ============================================================================
|
|
140
|
+
// LIST COMPONENT
|
|
141
|
+
// ============================================================================
|
|
142
|
+
|
|
143
|
+
export interface ListProps extends DataDisplayBaseProps {
|
|
144
|
+
items: ListItem[];
|
|
145
|
+
selectable?: boolean;
|
|
146
|
+
multiSelect?: boolean;
|
|
147
|
+
onSelectionChange?: (selectedKeys: string[]) => void;
|
|
148
|
+
selectedKeys?: string[];
|
|
149
|
+
onClick?: (item: ListItem, index: number) => void;
|
|
150
|
+
onItemClick?: (item: ListItem, index: number) => void;
|
|
151
|
+
onItemAction?: (action: string, item: ListItem) => void;
|
|
152
|
+
actions?: ListAction[];
|
|
153
|
+
itemRenderer?: (item: ListItem, index: number) => React.ReactNode;
|
|
154
|
+
searchable?: boolean;
|
|
155
|
+
searchValue?: string;
|
|
156
|
+
onSearchChange?: (value: string) => void;
|
|
157
|
+
filterable?: boolean;
|
|
158
|
+
filters?: ListFilter[];
|
|
159
|
+
onFiltersChange?: (filters: ListFilter[]) => void;
|
|
160
|
+
sortable?: boolean;
|
|
161
|
+
sortConfig?: SortConfig;
|
|
162
|
+
onSort?: (config: SortConfig) => void;
|
|
163
|
+
pagination?: PaginationConfig;
|
|
164
|
+
onPageChange?: (page: number) => void;
|
|
165
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
166
|
+
showDividers?: boolean;
|
|
167
|
+
loading?: boolean;
|
|
168
|
+
error?: string | null;
|
|
169
|
+
emptyMessage?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface ListItem {
|
|
173
|
+
id: string;
|
|
174
|
+
key?: string;
|
|
175
|
+
title: string;
|
|
176
|
+
description?: string;
|
|
177
|
+
subtitle?: string;
|
|
178
|
+
avatar?: string | React.ReactNode;
|
|
179
|
+
icon?: React.ReactNode;
|
|
180
|
+
metadata?: {
|
|
181
|
+
timestamp?: string;
|
|
182
|
+
status?: 'active' | 'inactive' | 'warning' | 'error';
|
|
183
|
+
badge?: string;
|
|
184
|
+
[key: string]: any;
|
|
185
|
+
};
|
|
186
|
+
actions?: ListAction[];
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
selected?: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface ListAction {
|
|
192
|
+
key: string;
|
|
193
|
+
label: string;
|
|
194
|
+
icon?: React.ReactNode;
|
|
195
|
+
onClick: (item: ListItem) => void;
|
|
196
|
+
disabled?: boolean;
|
|
197
|
+
variant?: 'default' | 'primary' | 'secondary' | 'danger';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface ListFilter {
|
|
201
|
+
key: string;
|
|
202
|
+
label: string;
|
|
203
|
+
type: 'text' | 'select' | 'checkbox' | 'date';
|
|
204
|
+
options?: { value: string; label: string }[];
|
|
205
|
+
value?: any;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// ============================================================================
|
|
209
|
+
// TREE COMPONENT
|
|
210
|
+
// ============================================================================
|
|
211
|
+
|
|
212
|
+
export interface TreeProps extends DataDisplayBaseProps {
|
|
213
|
+
data: TreeNode[];
|
|
214
|
+
expandedKeys?: string[];
|
|
215
|
+
selectedKeys?: string[];
|
|
216
|
+
onExpandedKeysChange?: (expandedKeys: string[]) => void;
|
|
217
|
+
onSelectedKeysChange?: (selectedKeys: string[]) => void;
|
|
218
|
+
onNodeClick?: (node: TreeNode, event: React.MouseEvent) => void;
|
|
219
|
+
selectable?: boolean;
|
|
220
|
+
expandable?: boolean;
|
|
221
|
+
draggable?: boolean;
|
|
222
|
+
onDragStart?: (node: TreeNode, event: React.DragEvent) => void;
|
|
223
|
+
onDragEnd?: (node: TreeNode, event: React.DragEvent) => void;
|
|
224
|
+
onDrop?: (dragNode: TreeNode, dropNode: TreeNode, event: React.DragEvent) => void;
|
|
225
|
+
searchable?: boolean;
|
|
226
|
+
searchValue?: string;
|
|
227
|
+
onSearchChange?: (value: string) => void;
|
|
228
|
+
filterable?: boolean;
|
|
229
|
+
filters?: TreeFilter[];
|
|
230
|
+
onFiltersChange?: (filters: TreeFilter[]) => void;
|
|
231
|
+
showLines?: boolean;
|
|
232
|
+
showIcons?: boolean;
|
|
233
|
+
expandAll?: boolean;
|
|
234
|
+
collapseAll?: boolean;
|
|
235
|
+
loading?: boolean;
|
|
236
|
+
error?: string | null;
|
|
237
|
+
emptyMessage?: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface TreeNode {
|
|
241
|
+
id: string;
|
|
242
|
+
key?: string;
|
|
243
|
+
label: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
children?: TreeNode[];
|
|
246
|
+
icon?: React.ReactNode;
|
|
247
|
+
disabled?: boolean;
|
|
248
|
+
selectable?: boolean;
|
|
249
|
+
expandable?: boolean;
|
|
250
|
+
metadata?: {
|
|
251
|
+
count?: number;
|
|
252
|
+
status?: 'active' | 'inactive' | 'warning' | 'error';
|
|
253
|
+
[key: string]: any;
|
|
254
|
+
};
|
|
255
|
+
data?: Record<string, any>;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface TreeItemProps {
|
|
259
|
+
node: TreeNode;
|
|
260
|
+
level?: number;
|
|
261
|
+
expandedKeys: string[];
|
|
262
|
+
selectedKeys: string[];
|
|
263
|
+
selectable?: boolean;
|
|
264
|
+
expandable?: boolean;
|
|
265
|
+
onToggleExpand?: (nodeId: string, expanded: boolean) => void;
|
|
266
|
+
onSelectionChange?: (nodeId: string, selected: boolean) => void;
|
|
267
|
+
onClick?: (node: TreeNode, event: React.MouseEvent) => void;
|
|
268
|
+
theme: string;
|
|
269
|
+
size: 'sm' | 'md' | 'lg';
|
|
270
|
+
variant: 'default' | 'bordered' | 'striped';
|
|
271
|
+
draggable?: boolean;
|
|
272
|
+
onDragStart?: (node: TreeNode, event: React.DragEvent) => void;
|
|
273
|
+
onDragEnd?: (node: TreeNode, event: React.DragEvent) => void;
|
|
274
|
+
onDrop?: (dragNode: TreeNode, dropNode: TreeNode, event: React.DragEvent) => void;
|
|
275
|
+
showLines?: boolean;
|
|
276
|
+
showIcons?: boolean;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface TreeFilter {
|
|
280
|
+
key: string;
|
|
281
|
+
label: string;
|
|
282
|
+
type: 'text' | 'select' | 'checkbox' | 'date';
|
|
283
|
+
options?: { value: string; label: string }[];
|
|
284
|
+
value?: any;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// ============================================================================
|
|
288
|
+
// TIMELINE COMPONENT
|
|
289
|
+
// ============================================================================
|
|
290
|
+
|
|
291
|
+
export interface TimelineProps extends DataDisplayBaseProps {
|
|
292
|
+
items: TimelineItem[];
|
|
293
|
+
mode?: 'left' | 'right' | 'alternate';
|
|
294
|
+
reverse?: boolean;
|
|
295
|
+
actions?: TimelineAction[];
|
|
296
|
+
onItemClick?: (item: TimelineItem) => void;
|
|
297
|
+
searchable?: boolean;
|
|
298
|
+
searchValue?: string;
|
|
299
|
+
onSearchChange?: (value: string) => void;
|
|
300
|
+
filterable?: boolean;
|
|
301
|
+
filters?: TimelineFilter[];
|
|
302
|
+
onFiltersChange?: (filters: TimelineFilter[]) => void;
|
|
303
|
+
showConnector?: boolean;
|
|
304
|
+
loading?: boolean;
|
|
305
|
+
error?: string | null;
|
|
306
|
+
emptyMessage?: string;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface TimelineItem {
|
|
310
|
+
id: string;
|
|
311
|
+
title: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
timestamp: string;
|
|
314
|
+
type?: 'event' | 'task' | 'user' | 'system';
|
|
315
|
+
status?: 'success' | 'warning' | 'error' | 'info' | 'pending' | 'processing' | 'completed';
|
|
316
|
+
icon?: React.ReactNode;
|
|
317
|
+
content?: React.ReactNode;
|
|
318
|
+
metadata?: {
|
|
319
|
+
author?: string;
|
|
320
|
+
category?: string;
|
|
321
|
+
tags?: string[];
|
|
322
|
+
[key: string]: any;
|
|
323
|
+
};
|
|
324
|
+
actions?: TimelineAction[];
|
|
325
|
+
disabled?: boolean;
|
|
326
|
+
data?: Record<string, any>;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface TimelineAction {
|
|
330
|
+
key: string;
|
|
331
|
+
label: string;
|
|
332
|
+
icon?: React.ReactNode;
|
|
333
|
+
onClick: (item: TimelineItem) => void;
|
|
334
|
+
disabled?: boolean;
|
|
335
|
+
variant?: 'default' | 'primary' | 'secondary' | 'danger';
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface TimelineItemProps {
|
|
339
|
+
item: TimelineItem;
|
|
340
|
+
position: 'left' | 'right';
|
|
341
|
+
isLast: boolean;
|
|
342
|
+
mode: 'left' | 'right' | 'alternate';
|
|
343
|
+
actions: TimelineAction[];
|
|
344
|
+
onClick?: (item: TimelineItem) => void;
|
|
345
|
+
theme: string;
|
|
346
|
+
size: 'sm' | 'md' | 'lg';
|
|
347
|
+
variant: 'default' | 'bordered' | 'striped';
|
|
348
|
+
showConnector: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface TimelineFilter {
|
|
352
|
+
key: string;
|
|
353
|
+
label: string;
|
|
354
|
+
type: 'text' | 'select' | 'checkbox' | 'date';
|
|
355
|
+
options?: { value: string; label: string }[];
|
|
356
|
+
value?: any;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// ============================================================================
|
|
360
|
+
// CHART COMPONENT
|
|
361
|
+
// ============================================================================
|
|
362
|
+
|
|
363
|
+
export interface ChartProps extends DataDisplayBaseProps {
|
|
364
|
+
type?: 'line' | 'bar' | 'pie' | 'doughnut' | 'area';
|
|
365
|
+
data: ChartData;
|
|
366
|
+
options?: ChartOptions;
|
|
367
|
+
height?: number | string;
|
|
368
|
+
width?: number | string;
|
|
369
|
+
responsive?: boolean;
|
|
370
|
+
showLegend?: boolean;
|
|
371
|
+
showValues?: boolean;
|
|
372
|
+
showGrid?: boolean;
|
|
373
|
+
animate?: boolean;
|
|
374
|
+
onDataPointClick?: (point: ChartDataPoint, index: number) => void;
|
|
375
|
+
onLegendClick?: (legend: ChartLegend, index: number) => void;
|
|
376
|
+
loading?: boolean;
|
|
377
|
+
error?: string | null;
|
|
378
|
+
emptyMessage?: string;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface ChartData {
|
|
382
|
+
labels: string[];
|
|
383
|
+
datasets: ChartDataset[];
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export interface ChartDataset {
|
|
387
|
+
label: string;
|
|
388
|
+
data: (number | ChartDataPoint)[];
|
|
389
|
+
color?: string;
|
|
390
|
+
backgroundColor?: string | string[];
|
|
391
|
+
borderColor?: string | string[];
|
|
392
|
+
borderWidth?: number;
|
|
393
|
+
fill?: boolean;
|
|
394
|
+
tension?: number;
|
|
395
|
+
pointRadius?: number;
|
|
396
|
+
pointHoverRadius?: number;
|
|
397
|
+
pointBackgroundColor?: string | string[];
|
|
398
|
+
pointBorderColor?: string | string[];
|
|
399
|
+
pointBorderWidth?: number;
|
|
400
|
+
pointStyle?: string;
|
|
401
|
+
hidden?: boolean;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export interface ChartDataPoint {
|
|
405
|
+
label: string;
|
|
406
|
+
value: number;
|
|
407
|
+
datasetIndex: number;
|
|
408
|
+
index: number;
|
|
409
|
+
x: number;
|
|
410
|
+
y: number;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface ChartLegend {
|
|
414
|
+
text: string;
|
|
415
|
+
fillStyle: string;
|
|
416
|
+
strokeStyle: string;
|
|
417
|
+
lineWidth: number;
|
|
418
|
+
hidden: boolean;
|
|
419
|
+
index: number;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface ChartOptions {
|
|
423
|
+
title?: string;
|
|
424
|
+
subtitle?: string;
|
|
425
|
+
showPoints?: boolean;
|
|
426
|
+
showLabels?: boolean;
|
|
427
|
+
responsive?: boolean;
|
|
428
|
+
maintainAspectRatio?: boolean;
|
|
429
|
+
plugins?: {
|
|
430
|
+
title?: {
|
|
431
|
+
display?: boolean;
|
|
432
|
+
text?: string;
|
|
433
|
+
color?: string;
|
|
434
|
+
font?: {
|
|
435
|
+
family?: string;
|
|
436
|
+
size?: number;
|
|
437
|
+
weight?: string;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
legend?: {
|
|
441
|
+
display?: boolean;
|
|
442
|
+
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
443
|
+
labels?: {
|
|
444
|
+
color?: string;
|
|
445
|
+
font?: {
|
|
446
|
+
family?: string;
|
|
447
|
+
size?: number;
|
|
448
|
+
weight?: string;
|
|
449
|
+
};
|
|
450
|
+
usePointStyle?: boolean;
|
|
451
|
+
padding?: number;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
tooltip?: {
|
|
455
|
+
enabled?: boolean;
|
|
456
|
+
mode?: 'index' | 'dataset' | 'point' | 'nearest' | 'x' | 'y';
|
|
457
|
+
intersect?: boolean;
|
|
458
|
+
backgroundColor?: string;
|
|
459
|
+
titleColor?: string;
|
|
460
|
+
bodyColor?: string;
|
|
461
|
+
borderColor?: string;
|
|
462
|
+
borderWidth?: number;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
scales?: {
|
|
466
|
+
x?: {
|
|
467
|
+
display?: boolean;
|
|
468
|
+
title?: {
|
|
469
|
+
display?: boolean;
|
|
470
|
+
text?: string;
|
|
471
|
+
color?: string;
|
|
472
|
+
font?: {
|
|
473
|
+
family?: string;
|
|
474
|
+
size?: number;
|
|
475
|
+
weight?: string;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
grid?: {
|
|
479
|
+
display?: boolean;
|
|
480
|
+
color?: string;
|
|
481
|
+
borderColor?: string;
|
|
482
|
+
borderWidth?: number;
|
|
483
|
+
};
|
|
484
|
+
ticks?: {
|
|
485
|
+
color?: string;
|
|
486
|
+
font?: {
|
|
487
|
+
family?: string;
|
|
488
|
+
size?: number;
|
|
489
|
+
weight?: string;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
y?: {
|
|
494
|
+
display?: boolean;
|
|
495
|
+
title?: {
|
|
496
|
+
display?: boolean;
|
|
497
|
+
text?: string;
|
|
498
|
+
color?: string;
|
|
499
|
+
font?: {
|
|
500
|
+
family?: string;
|
|
501
|
+
size?: number;
|
|
502
|
+
weight?: string;
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
grid?: {
|
|
506
|
+
display?: boolean;
|
|
507
|
+
color?: string;
|
|
508
|
+
borderColor?: string;
|
|
509
|
+
borderWidth?: number;
|
|
510
|
+
};
|
|
511
|
+
ticks?: {
|
|
512
|
+
color?: string;
|
|
513
|
+
font?: {
|
|
514
|
+
family?: string;
|
|
515
|
+
size?: number;
|
|
516
|
+
weight?: string;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
animation?: {
|
|
522
|
+
duration?: number;
|
|
523
|
+
easing?: string;
|
|
524
|
+
};
|
|
525
|
+
interaction?: {
|
|
526
|
+
mode?: 'nearest' | 'index' | 'dataset' | 'point' | 'x' | 'y';
|
|
527
|
+
intersect?: boolean;
|
|
528
|
+
axis?: 'x' | 'y';
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// ============================================================================
|
|
533
|
+
// EXPORT ALL TYPES
|
|
534
|
+
// ============================================================================
|
|
535
|
+
|
|
536
|
+
// All interfaces are already exported above, no need for additional export type
|