@trinityui/design-system 1.0.2 → 1.0.4
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 +37 -1
- package/MIGRATION.md +8 -8
- package/README.md +8 -8
- package/dist/Legend.js +1455 -0
- package/dist/accessibility.d.ts +119 -0
- package/dist/accessibility.d.ts.map +1 -0
- package/dist/assets/index.d.ts +234 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/components/AI/AIActions.d.ts +104 -0
- package/dist/components/AI/AIActions.d.ts.map +1 -0
- package/dist/components/AI/AIAvatar.d.ts +32 -0
- package/dist/components/AI/AIAvatar.d.ts.map +1 -0
- package/dist/components/AI/AIChat.d.ts +142 -0
- package/dist/components/AI/AIChat.d.ts.map +1 -0
- package/dist/components/AI/AIContainer.d.ts +97 -0
- package/dist/components/AI/AIContainer.d.ts.map +1 -0
- package/dist/components/AI/AIExplainability.d.ts +46 -0
- package/dist/components/AI/AIExplainability.d.ts.map +1 -0
- package/dist/components/AI/AILabel.d.ts +43 -0
- package/dist/components/AI/AILabel.d.ts.map +1 -0
- package/dist/components/AI/AIMessage.d.ts +93 -0
- package/dist/components/AI/AIMessage.d.ts.map +1 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts +53 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -0
- package/dist/components/AI/AIResponseRenderer.d.ts +50 -0
- package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -0
- package/dist/components/AI/AISources.d.ts +66 -0
- package/dist/components/AI/AISources.d.ts.map +1 -0
- package/dist/components/AI/AISourcesPanel.d.ts +84 -0
- package/dist/components/AI/AISourcesPanel.d.ts.map +1 -0
- package/dist/components/AI/AITextBlock.d.ts +56 -0
- package/dist/components/AI/AITextBlock.d.ts.map +1 -0
- package/dist/components/AI/AIVisuals.d.ts +104 -0
- package/dist/components/AI/AIVisuals.d.ts.map +1 -0
- package/dist/components/AI/AIVoiceInput.d.ts +66 -0
- package/dist/components/AI/AIVoiceInput.d.ts.map +1 -0
- package/dist/components/AI/ChatHeader.d.ts +52 -0
- package/dist/components/AI/ChatHeader.d.ts.map +1 -0
- package/dist/components/AI/ChatHistoryList.d.ts +80 -0
- package/dist/components/AI/ChatHistoryList.d.ts.map +1 -0
- package/dist/components/AI/ChatThread.d.ts +74 -0
- package/dist/components/AI/ChatThread.d.ts.map +1 -0
- package/dist/components/AI/InsightEngine.d.ts +147 -0
- package/dist/components/AI/InsightEngine.d.ts.map +1 -0
- package/dist/components/AI/InsightEngineInput.d.ts +94 -0
- package/dist/components/AI/InsightEngineInput.d.ts.map +1 -0
- package/dist/components/AI/QueryInput.d.ts +114 -0
- package/dist/components/AI/QueryInput.d.ts.map +1 -0
- package/dist/components/AI/UserAvatar.d.ts +24 -0
- package/dist/components/AI/UserAvatar.d.ts.map +1 -0
- package/dist/components/AI/UserMessage.d.ts +26 -0
- package/dist/components/AI/UserMessage.d.ts.map +1 -0
- package/dist/components/AI/index.d.ts +39 -0
- package/dist/components/AI/index.d.ts.map +1 -0
- package/dist/components/AI/tokens.d.ts +132 -0
- package/dist/components/AI/tokens.d.ts.map +1 -0
- package/dist/components/AI/types/index.d.ts +6 -0
- package/dist/components/AI/types/index.d.ts.map +1 -0
- package/dist/components/AI/types/response.d.ts +312 -0
- package/dist/components/AI/types/response.d.ts.map +1 -0
- package/dist/components/AppLayout/AIFab.d.ts +50 -0
- package/dist/components/AppLayout/AIFab.d.ts.map +1 -0
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts +32 -0
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -0
- package/dist/components/AppLayout/AppLayout.d.ts +154 -0
- package/dist/components/AppLayout/AppLayout.d.ts.map +1 -0
- package/dist/components/AppLayout/InsightEnginePanel.d.ts +141 -0
- package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -0
- package/dist/components/AppLayout/ResizablePanel.d.ts +52 -0
- package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +53 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -0
- package/dist/components/AppLayout/index.d.ts +27 -0
- package/dist/components/AppLayout/index.d.ts.map +1 -0
- package/dist/components/Charts/AreaChart.d.ts +38 -0
- package/dist/components/Charts/AreaChart.d.ts.map +1 -0
- package/dist/components/Charts/BarChart.d.ts +47 -0
- package/dist/components/Charts/BarChart.d.ts.map +1 -0
- package/dist/components/Charts/ChartWrapper.d.ts +48 -0
- package/dist/components/Charts/ChartWrapper.d.ts.map +1 -0
- package/dist/components/Charts/ComposedChart.d.ts +34 -0
- package/dist/components/Charts/ComposedChart.d.ts.map +1 -0
- package/dist/components/Charts/CustomLegend.d.ts +69 -0
- package/dist/components/Charts/CustomLegend.d.ts.map +1 -0
- package/dist/components/Charts/CustomTooltip.d.ts +55 -0
- package/dist/components/Charts/CustomTooltip.d.ts.map +1 -0
- package/dist/components/Charts/LineChart.d.ts +36 -0
- package/dist/components/Charts/LineChart.d.ts.map +1 -0
- package/dist/components/Charts/PieChart.d.ts +52 -0
- package/dist/components/Charts/PieChart.d.ts.map +1 -0
- package/dist/components/Charts/RadialChart.d.ts +51 -0
- package/dist/components/Charts/RadialChart.d.ts.map +1 -0
- package/dist/components/Charts/ScatterChart.d.ts +55 -0
- package/dist/components/Charts/ScatterChart.d.ts.map +1 -0
- package/dist/components/Charts/Sparkline.d.ts +44 -0
- package/dist/components/Charts/Sparkline.d.ts.map +1 -0
- package/dist/components/Charts/index.d.ts +48 -0
- package/dist/components/Charts/index.d.ts.map +1 -0
- package/dist/components/Charts/tokens.d.ts +200 -0
- package/dist/components/Charts/tokens.d.ts.map +1 -0
- package/dist/components/Charts/types.d.ts +595 -0
- package/dist/components/Charts/types.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +99 -0
- package/dist/components/Combobox/Combobox.d.ts.map +1 -0
- package/dist/components/Combobox/index.d.ts +3 -0
- package/dist/components/Combobox/index.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +76 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/CommandPalette/index.d.ts.map +1 -0
- package/dist/components/DataCard/DataCard.d.ts +60 -0
- package/dist/components/DataCard/DataCard.d.ts.map +1 -0
- package/dist/components/DataCard/index.d.ts +2 -0
- package/dist/components/DataCard/index.d.ts.map +1 -0
- package/dist/components/DataTable/CellRenderers.d.ts +78 -0
- package/dist/components/DataTable/CellRenderers.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +36 -0
- package/dist/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable/InlineAddRow.d.ts +27 -0
- package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -0
- package/dist/components/DataTable/index.d.ts +6 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/DataTable/tokens.d.ts +132 -0
- package/dist/components/DataTable/tokens.d.ts.map +1 -0
- package/dist/components/DataTable/types.d.ts +334 -0
- package/dist/components/DataTable/types.d.ts.map +1 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +63 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -0
- package/dist/components/DiffViewer/index.d.ts +3 -0
- package/dist/components/DiffViewer/index.d.ts.map +1 -0
- package/dist/components/DockLayout/DockLayout.d.ts +78 -0
- package/dist/components/DockLayout/DockLayout.d.ts.map +1 -0
- package/dist/components/DockLayout/index.d.ts +3 -0
- package/dist/components/DockLayout/index.d.ts.map +1 -0
- package/dist/components/FileUpload/FileUpload.d.ts +93 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.d.ts.map +1 -0
- package/dist/components/FilterBar/FilterBar.d.ts +76 -0
- package/dist/components/FilterBar/FilterBar.d.ts.map +1 -0
- package/dist/components/FilterBar/index.d.ts +2 -0
- package/dist/components/FilterBar/index.d.ts.map +1 -0
- package/dist/components/Footer.d.ts +30 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +67 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/IllustratedMessage.d.ts +99 -0
- package/dist/components/IllustratedMessage.d.ts.map +1 -0
- package/dist/components/LandingPage/FeatureCard.d.ts +89 -0
- package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -0
- package/dist/components/LandingPage/LandingPage.d.ts +126 -0
- package/dist/components/LandingPage/LandingPage.d.ts.map +1 -0
- package/dist/components/LandingPage/index.d.ts +11 -0
- package/dist/components/LandingPage/index.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +181 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +91 -0
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +52 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/dist/components/RichTextEditor/index.d.ts +3 -0
- package/dist/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +66 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchInput/index.d.ts.map +1 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts +93 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -0
- package/dist/components/SimpleTable/index.d.ts +3 -0
- package/dist/components/SimpleTable/index.d.ts.map +1 -0
- package/dist/components/SplitPane/SplitPane.d.ts +52 -0
- package/dist/components/SplitPane/SplitPane.d.ts.map +1 -0
- package/dist/components/SplitPane/index.d.ts +3 -0
- package/dist/components/SplitPane/index.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Badge.d.ts +71 -0
- package/dist/components/StatusIndicator/Badge.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Chip.d.ts +64 -0
- package/dist/components/StatusIndicator/Chip.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Indicators.d.ts +81 -0
- package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Legend.d.ts +42 -0
- package/dist/components/StatusIndicator/Legend.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Shapes.d.ts +32 -0
- package/dist/components/StatusIndicator/Shapes.d.ts.map +1 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +183 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/dist/components/StatusIndicator/index.d.ts +55 -0
- package/dist/components/StatusIndicator/index.d.ts.map +1 -0
- package/dist/components/StatusIndicator/types.d.ts +37 -0
- package/dist/components/StatusIndicator/types.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +89 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Timeline/index.d.ts.map +1 -0
- package/dist/components/Toast/Toast.d.ts +124 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/TopNavHeader.d.ts +55 -0
- package/dist/components/TopNavHeader.d.ts.map +1 -0
- package/dist/components/TopNavWithSidebar.d.ts +64 -0
- package/dist/components/TopNavWithSidebar.d.ts.map +1 -0
- package/dist/components/TransferList/TransferList.d.ts +62 -0
- package/dist/components/TransferList/TransferList.d.ts.map +1 -0
- package/dist/components/TransferList/index.d.ts +3 -0
- package/dist/components/TransferList/index.d.ts.map +1 -0
- package/dist/components/TreeView/TreeView.d.ts +89 -0
- package/dist/components/TreeView/TreeView.d.ts.map +1 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/TreeView/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +119 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/internal/index.d.ts +27 -0
- package/dist/components/internal/index.d.ts.map +1 -0
- package/dist/components/navigation/components.d.ts +85 -0
- package/dist/components/navigation/components.d.ts.map +1 -0
- package/dist/components/navigation/hooks.d.ts +65 -0
- package/dist/components/navigation/hooks.d.ts.map +1 -0
- package/dist/components/navigation/index.d.ts +28 -0
- package/dist/components/navigation/index.d.ts.map +1 -0
- package/dist/components/navigation/styled.d.ts +13 -0
- package/dist/components/navigation/styled.d.ts.map +1 -0
- package/dist/components/navigation/types.d.ts +58 -0
- package/dist/components/navigation/types.d.ts.map +1 -0
- package/dist/components/shared/TrinityLogoSvg.d.ts +29 -0
- package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -0
- package/dist/components/shared.d.ts +92 -0
- package/dist/components/shared.d.ts.map +1 -0
- package/dist/components/templates/Dashboard/DashboardTemplate.d.ts +66 -0
- package/dist/components/templates/Dashboard/DashboardTemplate.d.ts.map +1 -0
- package/dist/components/templates/Dashboard/index.d.ts +2 -0
- package/dist/components/templates/Dashboard/index.d.ts.map +1 -0
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +88 -0
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -0
- package/dist/components/templates/ListDetail/index.d.ts +2 -0
- package/dist/components/templates/ListDetail/index.d.ts.map +1 -0
- package/dist/components/templates/Settings/SettingsTemplate.d.ts +78 -0
- package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -0
- package/dist/components/templates/Settings/index.d.ts +2 -0
- package/dist/components/templates/Settings/index.d.ts.map +1 -0
- package/dist/components/templates/index.d.ts +5 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/essentials.d.ts +49 -0
- package/dist/essentials.d.ts.map +1 -0
- package/dist/essentials.js +256 -0
- package/dist/form.d.ts +212 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/hierarchy.d.ts +371 -0
- package/dist/hierarchy.d.ts.map +1 -0
- package/dist/hooks/useTrinityPalette.d.ts +54 -0
- package/dist/hooks/useTrinityPalette.d.ts.map +1 -0
- package/dist/hooks.d.ts +217 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2293 -3731
- package/dist/presets/analytics.d.ts +197 -0
- package/dist/presets/analytics.d.ts.map +1 -0
- package/dist/presets/crm.d.ts +67 -0
- package/dist/presets/crm.d.ts.map +1 -0
- package/dist/presets/index.d.ts +21 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/portal.d.ts +67 -0
- package/dist/presets/portal.d.ts.map +1 -0
- package/dist/theme.d.ts +221 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/tokens.d.ts +4760 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/trinity.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview InsightEnginePanel component.
|
|
3
|
+
* @module components/AppLayout/InsightEnginePanel
|
|
4
|
+
* InsightEnginePanel Component
|
|
5
|
+
* AI-powered chat panel - COMPOSITION LAYER ONLY
|
|
6
|
+
*
|
|
7
|
+
* Architecture:
|
|
8
|
+
* - AI components = primitives (no layout control)
|
|
9
|
+
* - InsightEnginePanel = composition layer
|
|
10
|
+
* - MUI = structural glue (Stack, Box, Card, Divider)
|
|
11
|
+
* - Semantic tokens = spacing system
|
|
12
|
+
*
|
|
13
|
+
* Section Hierarchy:
|
|
14
|
+
* 1. Header (title, controls)
|
|
15
|
+
* 2. Messages Area (scrollable)
|
|
16
|
+
* - Empty State
|
|
17
|
+
* - Message List (response → evidence → actions)
|
|
18
|
+
* 3. Input Area (text input → toolbar → voice overlay)
|
|
19
|
+
*
|
|
20
|
+
* Uses Trinity AI components:
|
|
21
|
+
* - AIChatMessage, AITypingIndicator, AIAvatar
|
|
22
|
+
* - AISourcesPanel, AIRelatedQuestions
|
|
23
|
+
* - AIVoiceOverlay, AIListeningIndicator
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { InsightEnginePanel } from '@trinityui/design-system';
|
|
27
|
+
*
|
|
28
|
+
* <InsightEnginePanel />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import React from 'react';
|
|
32
|
+
import { type AISourceCategory } from '../AI';
|
|
33
|
+
import { type ThreadGroup } from './ThreadHistorySidebar';
|
|
34
|
+
export interface ChatMessage {
|
|
35
|
+
id: string;
|
|
36
|
+
role: 'user' | 'assistant';
|
|
37
|
+
content: string;
|
|
38
|
+
timestamp: Date;
|
|
39
|
+
sources?: AISourceCategory[];
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
relatedQuestions?: string[];
|
|
42
|
+
}
|
|
43
|
+
export type { AISourceCategory };
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use AISourceCategory from '@trinityui/design-system' instead.
|
|
46
|
+
* Kept for backwards compatibility only.
|
|
47
|
+
*/
|
|
48
|
+
export interface SourceCategory {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
count: number;
|
|
52
|
+
items?: SourceItem[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use AISourceItem from '@trinityui/design-system' instead.
|
|
56
|
+
* Kept for backwards compatibility only.
|
|
57
|
+
*/
|
|
58
|
+
export interface SourceItem {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
details?: Record<string, string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Use AISourceItem from '@trinityui/design-system' instead.
|
|
65
|
+
* Kept for backwards compatibility only.
|
|
66
|
+
*/
|
|
67
|
+
export interface SourceReference {
|
|
68
|
+
number: number;
|
|
69
|
+
title: string;
|
|
70
|
+
url?: string;
|
|
71
|
+
domain?: string;
|
|
72
|
+
favicon?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Props for InsightEnginePanel component.
|
|
76
|
+
*/
|
|
77
|
+
export interface InsightEnginePanelProps {
|
|
78
|
+
/** Initial messages to display (uncontrolled mode) */
|
|
79
|
+
initialMessages?: ChatMessage[];
|
|
80
|
+
/** Controlled messages - when provided, component uses external state */
|
|
81
|
+
messages?: ChatMessage[];
|
|
82
|
+
/** Callback when messages change - required for controlled mode */
|
|
83
|
+
onMessagesChange?: (messages: ChatMessage[]) => void;
|
|
84
|
+
/** Placeholder text for input */
|
|
85
|
+
placeholder?: string;
|
|
86
|
+
/** Title for the panel */
|
|
87
|
+
title?: string;
|
|
88
|
+
/** Subtitle for the panel */
|
|
89
|
+
subtitle?: string;
|
|
90
|
+
/** Callback when user sends a message */
|
|
91
|
+
onSendMessage?: (message: string, options?: {
|
|
92
|
+
proSearch?: boolean;
|
|
93
|
+
focus?: string;
|
|
94
|
+
}) => void;
|
|
95
|
+
/** Show typing indicator */
|
|
96
|
+
isTyping?: boolean;
|
|
97
|
+
/** Custom AI avatar */
|
|
98
|
+
aiAvatar?: React.ReactNode;
|
|
99
|
+
/** Callback when close button is clicked */
|
|
100
|
+
onClose?: () => void;
|
|
101
|
+
/** Whether fullscreen mode is active */
|
|
102
|
+
isFullscreen?: boolean;
|
|
103
|
+
/** Callback when fullscreen button is clicked */
|
|
104
|
+
onFullscreenToggle?: () => void;
|
|
105
|
+
/** Show the panel controls (close, fullscreen) */
|
|
106
|
+
showControls?: boolean;
|
|
107
|
+
/** Enable demo mode with fake responses */
|
|
108
|
+
demoMode?: boolean;
|
|
109
|
+
/** Callback when new thread is created */
|
|
110
|
+
onNewThread?: () => void;
|
|
111
|
+
/** Theme mode - defaults to MUI theme */
|
|
112
|
+
themeMode?: 'light' | 'dark';
|
|
113
|
+
/** Whether to use boxed layout (centered content with max-width) in fullscreen */
|
|
114
|
+
boxedLayout?: boolean;
|
|
115
|
+
/** Callback when boxed layout toggle is clicked */
|
|
116
|
+
onBoxedLayoutToggle?: () => void;
|
|
117
|
+
/** User initials to display in avatar */
|
|
118
|
+
userInitials?: string;
|
|
119
|
+
/** Whether to show the history sidebar */
|
|
120
|
+
showHistory?: boolean;
|
|
121
|
+
/** Callback when history visibility is toggled */
|
|
122
|
+
onHistoryToggle?: () => void;
|
|
123
|
+
/** Thread history groups for the sidebar */
|
|
124
|
+
threadGroups?: ThreadGroup[];
|
|
125
|
+
/** Currently selected thread ID */
|
|
126
|
+
selectedThreadId?: string;
|
|
127
|
+
/** Callback when a thread is selected */
|
|
128
|
+
onThreadSelect?: (threadId: string) => void;
|
|
129
|
+
/** Callback when thread is deleted */
|
|
130
|
+
onThreadDelete?: (threadId: string) => void;
|
|
131
|
+
/** Callback when thread is renamed */
|
|
132
|
+
onThreadRename?: (threadId: string, newTitle: string) => void;
|
|
133
|
+
/** Callback when thread is starred/unstarred */
|
|
134
|
+
onThreadStar?: (threadId: string) => void;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* InsightEnginePanel - AI chat interface with Trinity branding
|
|
138
|
+
*/
|
|
139
|
+
export declare const InsightEnginePanel: React.FC<InsightEnginePanelProps>;
|
|
140
|
+
export default InsightEnginePanel;
|
|
141
|
+
//# sourceMappingURL=InsightEnginePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightEnginePanel.d.ts","sourceRoot":"","sources":["../../../src/components/AppLayout/InsightEnginePanel.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ResizablePanel component.
|
|
3
|
+
* @module components/AppLayout/ResizablePanel
|
|
4
|
+
* ResizablePanel Component
|
|
5
|
+
* A panel that can be resized by dragging its edge
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { ResizablePanel } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <ResizablePanel
|
|
11
|
+
* open={false}
|
|
12
|
+
* >
|
|
13
|
+
* <div>Example content</div>
|
|
14
|
+
* </ResizablePanel>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { SxProps, Theme } from '@mui/material';
|
|
19
|
+
/**
|
|
20
|
+
* Props for ResizablePanel component.
|
|
21
|
+
*/
|
|
22
|
+
export interface ResizablePanelProps {
|
|
23
|
+
/** Whether the panel is open */
|
|
24
|
+
open: boolean;
|
|
25
|
+
/** Panel content */
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
/** Default width of the panel */
|
|
28
|
+
defaultWidth?: number;
|
|
29
|
+
/** Minimum width the panel can be resized to */
|
|
30
|
+
minWidth?: number;
|
|
31
|
+
/** Maximum width the panel can be resized to */
|
|
32
|
+
maxWidth?: number;
|
|
33
|
+
/** Callback when panel is closed */
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
/** Which side the panel is on */
|
|
36
|
+
side?: 'left' | 'right';
|
|
37
|
+
/** Header content */
|
|
38
|
+
header?: React.ReactNode;
|
|
39
|
+
/** Show close button in header */
|
|
40
|
+
showCloseButton?: boolean;
|
|
41
|
+
/** Custom sx props */
|
|
42
|
+
sx?: SxProps<Theme>;
|
|
43
|
+
/** Custom sx for content area */
|
|
44
|
+
contentSx?: SxProps<Theme>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* ResizablePanel - A panel that can be resized by dragging.
|
|
48
|
+
* Used for sidebars, AI chat panels, and other expandable content areas.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ResizablePanel: React.FC<ResizablePanelProps>;
|
|
51
|
+
export default ResizablePanel;
|
|
52
|
+
//# sourceMappingURL=ResizablePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizablePanel.d.ts","sourceRoot":"","sources":["../../../src/components/AppLayout/ResizablePanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAA4B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGzE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2KxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ThreadHistorySidebar component.
|
|
3
|
+
* @module components/AppLayout/ThreadHistorySidebar
|
|
4
|
+
* ThreadHistorySidebar Component
|
|
5
|
+
* Displays conversation history similar to ChatGPT/Perplexity sidebar
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { ThreadHistorySidebar } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <ThreadHistorySidebar />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
export interface ThreadItem {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
preview?: string;
|
|
18
|
+
timestamp: Date;
|
|
19
|
+
isStarred?: boolean;
|
|
20
|
+
messageCount?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ThreadGroup {
|
|
23
|
+
label: string;
|
|
24
|
+
threads: ThreadItem[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for ThreadHistorySidebar component.
|
|
28
|
+
*/
|
|
29
|
+
export interface ThreadHistorySidebarProps {
|
|
30
|
+
/** List of threads grouped by time period */
|
|
31
|
+
threadGroups?: ThreadGroup[];
|
|
32
|
+
/** Currently selected thread ID */
|
|
33
|
+
selectedThreadId?: string;
|
|
34
|
+
/** Callback when a thread is selected */
|
|
35
|
+
onThreadSelect?: (threadId: string) => void;
|
|
36
|
+
/** Callback to create a new thread */
|
|
37
|
+
onNewThread?: () => void;
|
|
38
|
+
/** Callback when thread is deleted */
|
|
39
|
+
onThreadDelete?: (threadId: string) => void;
|
|
40
|
+
/** Callback when thread is renamed */
|
|
41
|
+
onThreadRename?: (threadId: string, newTitle: string) => void;
|
|
42
|
+
/** Callback when thread is starred/unstarred */
|
|
43
|
+
onThreadStar?: (threadId: string) => void;
|
|
44
|
+
/** Callback to close the sidebar */
|
|
45
|
+
onClose?: () => void;
|
|
46
|
+
/** Whether the sidebar is open */
|
|
47
|
+
open?: boolean;
|
|
48
|
+
/** Width of the sidebar */
|
|
49
|
+
width?: number;
|
|
50
|
+
}
|
|
51
|
+
export declare const ThreadHistorySidebar: React.FC<ThreadHistorySidebarProps>;
|
|
52
|
+
export default ThreadHistorySidebar;
|
|
53
|
+
//# sourceMappingURL=ThreadHistorySidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreadHistorySidebar.d.ts","sourceRoot":"","sources":["../../../src/components/AppLayout/ThreadHistorySidebar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AA6BxC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,gDAAgD;IAChD,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAmCD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAiVpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppLayout Components
|
|
3
|
+
* Reusable application layout templates with navigation and AI panel support
|
|
4
|
+
*/
|
|
5
|
+
export { AppLayout } from './AppLayout';
|
|
6
|
+
export type { AppLayoutProps, NavStyle, AITrigger, NavItem } from './AppLayout';
|
|
7
|
+
export { ResizablePanel } from './ResizablePanel';
|
|
8
|
+
export type { ResizablePanelProps } from './ResizablePanel';
|
|
9
|
+
export { InsightEnginePanel } from './InsightEnginePanel';
|
|
10
|
+
export type { InsightEnginePanelProps, ChatMessage, SourceCategory, SourceItem, SourceReference } from './InsightEnginePanel';
|
|
11
|
+
export { ThreadHistorySidebar } from './ThreadHistorySidebar';
|
|
12
|
+
export type { ThreadHistorySidebarProps, ThreadItem, ThreadGroup } from './ThreadHistorySidebar';
|
|
13
|
+
export { AIFab } from './AIFab';
|
|
14
|
+
export type { AIFabProps } from './AIFab';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated AIFabLayout has been merged into AppLayout.
|
|
17
|
+
* Use AppLayout with navStyle="topnav" and aiTrigger="fab" instead.
|
|
18
|
+
*
|
|
19
|
+
* @example Migration:
|
|
20
|
+
* // Before:
|
|
21
|
+
* <AIFabLayout navStyle="topnav" />
|
|
22
|
+
*
|
|
23
|
+
* // After:
|
|
24
|
+
* <AppLayout navStyle="topnav" aiTrigger="fab" />
|
|
25
|
+
*/
|
|
26
|
+
export { AIFabLayout } from './AIFabLayout.deprecated';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppLayout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE9H,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEjG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AreaChart component.
|
|
3
|
+
* @module components/Charts/AreaChart
|
|
4
|
+
* AreaChart Component
|
|
5
|
+
* Trinity-styled area chart with support for stacked and gradient fills
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { AreaChart } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <AreaChart />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { AreaChartProps } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* AreaChart - Multi-series area chart with Trinity styling
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <AreaChart
|
|
21
|
+
* data={[
|
|
22
|
+
* { month: 'Jan', users: 4000, sessions: 2400 },
|
|
23
|
+
* { month: 'Feb', users: 3000, sessions: 1398 },
|
|
24
|
+
* ]}
|
|
25
|
+
* series={[
|
|
26
|
+
* { dataKey: 'users', name: 'Users' },
|
|
27
|
+
* { dataKey: 'sessions', name: 'Sessions' },
|
|
28
|
+
* ]}
|
|
29
|
+
* xAxis={{ dataKey: 'month' }}
|
|
30
|
+
* stacked
|
|
31
|
+
* gradient
|
|
32
|
+
* title="User Activity"
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const AreaChart: React.FC<AreaChartProps>;
|
|
37
|
+
export default AreaChart;
|
|
38
|
+
//# sourceMappingURL=AreaChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/AreaChart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAwB9C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8N9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview BarChart component.
|
|
3
|
+
* @module components/Charts/BarChart
|
|
4
|
+
* BarChart Component
|
|
5
|
+
* Trinity-styled bar chart with support for grouped, stacked, and horizontal layouts
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { BarChart } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <BarChart />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { BarChartProps } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* BarChart - Versatile bar chart with Trinity styling
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // Grouped bar chart
|
|
21
|
+
* <BarChart
|
|
22
|
+
* data={[
|
|
23
|
+
* { category: 'Q1', sales: 4000, profit: 2400 },
|
|
24
|
+
* { category: 'Q2', sales: 3000, profit: 1398 },
|
|
25
|
+
* ]}
|
|
26
|
+
* series={[
|
|
27
|
+
* { dataKey: 'sales', name: 'Sales' },
|
|
28
|
+
* { dataKey: 'profit', name: 'Profit' },
|
|
29
|
+
* ]}
|
|
30
|
+
* xAxis={{ dataKey: 'category' }}
|
|
31
|
+
* title="Quarterly Performance"
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* // Stacked bar chart
|
|
35
|
+
* <BarChart
|
|
36
|
+
* variant="stacked"
|
|
37
|
+
* series={[
|
|
38
|
+
* { dataKey: 'desktop', name: 'Desktop', stackId: 'a' },
|
|
39
|
+
* { dataKey: 'mobile', name: 'Mobile', stackId: 'a' },
|
|
40
|
+
* ]}
|
|
41
|
+
* // ...
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const BarChart: React.FC<BarChartProps>;
|
|
46
|
+
export default BarChart;
|
|
47
|
+
//# sourceMappingURL=BarChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/BarChart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqO5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ChartWrapper component.
|
|
3
|
+
* @module components/Charts/ChartWrapper
|
|
4
|
+
* Chart Wrapper Component
|
|
5
|
+
* Common container for all chart types with loading, error, and empty states
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { ChartWrapper } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <ChartWrapper
|
|
11
|
+
* >
|
|
12
|
+
* <div>Example content</div>
|
|
13
|
+
* </ChartWrapper>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { SxProps, Theme } from '@mui/material';
|
|
18
|
+
/**
|
|
19
|
+
* Props for ChartWrapper component.
|
|
20
|
+
*/
|
|
21
|
+
export interface ChartWrapperProps {
|
|
22
|
+
/** Chart title */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Chart subtitle/description */
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
/** Chart height */
|
|
27
|
+
height?: number;
|
|
28
|
+
/** Loading state */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/** Error message */
|
|
31
|
+
error?: string;
|
|
32
|
+
/** Empty state (no data) */
|
|
33
|
+
empty?: boolean;
|
|
34
|
+
/** Empty state message */
|
|
35
|
+
emptyMessage?: string;
|
|
36
|
+
/** Children (the actual chart) */
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
/** Custom sx props */
|
|
39
|
+
sx?: SxProps<Theme>;
|
|
40
|
+
/** Use paper container */
|
|
41
|
+
variant?: 'default' | 'outlined' | 'elevated';
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* ChartWrapper - Container component for charts with built-in states
|
|
45
|
+
*/
|
|
46
|
+
export declare const ChartWrapper: React.FC<ChartWrapperProps>;
|
|
47
|
+
export default ChartWrapper;
|
|
48
|
+
//# sourceMappingURL=ChartWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/ChartWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAIvB;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;CAC/C;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiNpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ComposedChart component.
|
|
3
|
+
* @module components/Charts/ComposedChart
|
|
4
|
+
* ComposedChart Component
|
|
5
|
+
* Trinity-styled combined line, bar, and area chart
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { ComposedChart } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <ComposedChart />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { ComposedChartProps } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* ComposedChart - Combines line, bar, and area charts
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <ComposedChart
|
|
21
|
+
* data={salesData}
|
|
22
|
+
* xAxisKey="month"
|
|
23
|
+
* series={[
|
|
24
|
+
* { key: 'revenue', type: 'bar', name: 'Revenue' },
|
|
25
|
+
* { key: 'orders', type: 'line', name: 'Orders' },
|
|
26
|
+
* { key: 'target', type: 'area', name: 'Target' },
|
|
27
|
+
* ]}
|
|
28
|
+
* title="Sales Dashboard"
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const ComposedChart: React.FC<ComposedChartProps>;
|
|
33
|
+
export default ComposedChart;
|
|
34
|
+
//# sourceMappingURL=ComposedChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComposedChart.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/ComposedChart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAkB,MAAM,OAAO,CAAC;AA0BvC,OAAO,EAAE,kBAAkB,EAAwB,MAAM,SAAS,CAAC;AAWnE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8UtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview CustomLegend component.
|
|
3
|
+
* @module components/Charts/CustomLegend
|
|
4
|
+
* Custom Legend Component
|
|
5
|
+
* Trinity-styled legend for all chart types
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { CustomLegend } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <CustomLegend
|
|
11
|
+
* value="Example"
|
|
12
|
+
* type="Example"
|
|
13
|
+
* id="id-1"
|
|
14
|
+
* color="Example"
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* Props for CustomLegend component.
|
|
21
|
+
*/
|
|
22
|
+
export interface CustomLegendProps {
|
|
23
|
+
/** Payload from Recharts */
|
|
24
|
+
payload?: Array<{
|
|
25
|
+
value: string;
|
|
26
|
+
type: string;
|
|
27
|
+
id: string;
|
|
28
|
+
color: string;
|
|
29
|
+
dataKey?: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** Legend layout direction */
|
|
32
|
+
direction?: 'horizontal' | 'vertical';
|
|
33
|
+
/** Custom formatter */
|
|
34
|
+
formatter?: (value: string) => string;
|
|
35
|
+
/** Click handler for legend items */
|
|
36
|
+
onClick?: (dataKey: string) => void;
|
|
37
|
+
/** Disabled items */
|
|
38
|
+
disabledKeys?: string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* CustomLegend - Trinity-styled chart legend
|
|
42
|
+
*/
|
|
43
|
+
export declare const CustomLegend: React.FC<CustomLegendProps>;
|
|
44
|
+
/**
|
|
45
|
+
* Interactive legend with toggle functionality
|
|
46
|
+
*/
|
|
47
|
+
export declare const InteractiveLegend: React.FC<CustomLegendProps & {
|
|
48
|
+
onToggle: (dataKey: string) => void;
|
|
49
|
+
hiddenKeys: string[];
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Pie chart legend with values
|
|
53
|
+
*/
|
|
54
|
+
export declare const PieLegend: React.FC<{
|
|
55
|
+
payload?: Array<{
|
|
56
|
+
value: string;
|
|
57
|
+
color: string;
|
|
58
|
+
}>;
|
|
59
|
+
data?: Array<{
|
|
60
|
+
name: string;
|
|
61
|
+
value: number;
|
|
62
|
+
}>;
|
|
63
|
+
direction?: 'horizontal' | 'vertical';
|
|
64
|
+
showValues?: boolean;
|
|
65
|
+
showPercent?: boolean;
|
|
66
|
+
valueFormatter?: (value: number) => string;
|
|
67
|
+
}>;
|
|
68
|
+
export default CustomLegend;
|
|
69
|
+
//# sourceMappingURL=CustomLegend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomLegend.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/CustomLegend.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IACH,8BAA8B;IAC9B,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,uBAAuB;IACvB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,qCAAqC;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,qBAAqB;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiEpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CACtC,iBAAiB,GAAG;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAkEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C,CA6EA,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview CustomTooltip component.
|
|
3
|
+
* @module components/Charts/CustomTooltip
|
|
4
|
+
* Custom Tooltip Component
|
|
5
|
+
* Trinity-styled tooltip for all chart types
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { CustomTooltip } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <CustomTooltip />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Props for CustomTooltip component.
|
|
16
|
+
*/
|
|
17
|
+
export interface CustomTooltipProps {
|
|
18
|
+
/** Whether the tooltip is active */
|
|
19
|
+
active?: boolean;
|
|
20
|
+
/** Tooltip payload data from recharts */
|
|
21
|
+
payload?: Array<{
|
|
22
|
+
color?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
value?: number | string;
|
|
25
|
+
}>;
|
|
26
|
+
/** Label for the tooltip */
|
|
27
|
+
label?: string | number;
|
|
28
|
+
/** Custom formatter for values */
|
|
29
|
+
valueFormatter?: (value: number) => string;
|
|
30
|
+
/** Custom formatter for labels */
|
|
31
|
+
labelFormatter?: (label: string) => string;
|
|
32
|
+
/** Show total for stacked charts */
|
|
33
|
+
showTotal?: boolean;
|
|
34
|
+
/** Unit suffix */
|
|
35
|
+
unit?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* CustomTooltip - Trinity-styled chart tooltip
|
|
39
|
+
*/
|
|
40
|
+
export declare const CustomTooltip: React.FC<CustomTooltipProps>;
|
|
41
|
+
/**
|
|
42
|
+
* Simple tooltip for single values
|
|
43
|
+
*/
|
|
44
|
+
export declare const SimpleTooltip: React.FC<{
|
|
45
|
+
active?: boolean;
|
|
46
|
+
payload?: Array<{
|
|
47
|
+
value: number;
|
|
48
|
+
name: string;
|
|
49
|
+
color: string;
|
|
50
|
+
}>;
|
|
51
|
+
valueFormatter?: (value: number) => string;
|
|
52
|
+
unit?: string;
|
|
53
|
+
}>;
|
|
54
|
+
export default CustomTooltip;
|
|
55
|
+
//# sourceMappingURL=CustomTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/CustomTooltip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,kCAAkC;IAClC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,kCAAkC;IAClC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiItD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CA2CA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview LineChart component.
|
|
3
|
+
* @module components/Charts/LineChart
|
|
4
|
+
* LineChart Component
|
|
5
|
+
* Trinity-styled line chart with support for multiple series
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { LineChart } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <LineChart />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { LineChartProps } from './types';
|
|
15
|
+
/**
|
|
16
|
+
* LineChart - Multi-series line chart with Trinity styling
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <LineChart
|
|
21
|
+
* data={[
|
|
22
|
+
* { month: 'Jan', sales: 4000, profit: 2400 },
|
|
23
|
+
* { month: 'Feb', sales: 3000, profit: 1398 },
|
|
24
|
+
* ]}
|
|
25
|
+
* series={[
|
|
26
|
+
* { dataKey: 'sales', name: 'Sales' },
|
|
27
|
+
* { dataKey: 'profit', name: 'Profit' },
|
|
28
|
+
* ]}
|
|
29
|
+
* xAxis={{ dataKey: 'month' }}
|
|
30
|
+
* title="Monthly Performance"
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const LineChart: React.FC<LineChartProps>;
|
|
35
|
+
export default LineChart;
|
|
36
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/LineChart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAyB9C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAsP9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|