@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,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIContainer component.
|
|
3
|
+
* @module components/AI/AIContainer
|
|
4
|
+
* AI Container & Layout Components
|
|
5
|
+
* Container, Expandable Section, and Persona Card components
|
|
6
|
+
*
|
|
7
|
+
* These are wrapper components for AI content that provide
|
|
8
|
+
* consistent styling with the AI design tokens.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { AIContainer } from '@trinityui/design-system';
|
|
13
|
+
*
|
|
14
|
+
* <AIContainer
|
|
15
|
+
* >
|
|
16
|
+
* <div>Example content</div>
|
|
17
|
+
* </AIContainer>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { SxProps, Theme } from '@mui/material';
|
|
22
|
+
/**
|
|
23
|
+
* Props for AIContainer component.
|
|
24
|
+
*/
|
|
25
|
+
export interface AIContainerProps {
|
|
26
|
+
/** Container title */
|
|
27
|
+
title?: string;
|
|
28
|
+
/** Container subtitle */
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
/** Header actions */
|
|
31
|
+
headerActions?: React.ReactNode;
|
|
32
|
+
/** Whether to show AI avatar in header */
|
|
33
|
+
showAvatar?: boolean;
|
|
34
|
+
/** Container children */
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
/** Whether container has border */
|
|
37
|
+
bordered?: boolean;
|
|
38
|
+
/** Whether container has background */
|
|
39
|
+
filled?: boolean;
|
|
40
|
+
/** Whether container has padding */
|
|
41
|
+
padded?: boolean;
|
|
42
|
+
/** Custom sx props */
|
|
43
|
+
sx?: SxProps<Theme>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* AI Container - Wrapper for AI content with optional header.
|
|
47
|
+
*/
|
|
48
|
+
export declare const AIContainer: React.FC<AIContainerProps>;
|
|
49
|
+
/**
|
|
50
|
+
* Props for AIExpandableSection component.
|
|
51
|
+
*/
|
|
52
|
+
export interface AIExpandableSectionProps {
|
|
53
|
+
/** Section title */
|
|
54
|
+
title: string;
|
|
55
|
+
/** Section subtitle */
|
|
56
|
+
subtitle?: string;
|
|
57
|
+
/** Leading icon */
|
|
58
|
+
icon?: string;
|
|
59
|
+
/** Section children */
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
/** Default expanded state */
|
|
62
|
+
defaultExpanded?: boolean;
|
|
63
|
+
/** Controlled expanded state */
|
|
64
|
+
expanded?: boolean;
|
|
65
|
+
/** Change handler */
|
|
66
|
+
onChange?: (expanded: boolean) => void;
|
|
67
|
+
/** Custom sx props */
|
|
68
|
+
sx?: SxProps<Theme>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* AI Expandable Section - Collapsible content section.
|
|
72
|
+
*/
|
|
73
|
+
export declare const AIExpandableSection: React.FC<AIExpandableSectionProps>;
|
|
74
|
+
/**
|
|
75
|
+
* Props for AIPersonaCard component.
|
|
76
|
+
*/
|
|
77
|
+
export interface AIPersonaCardProps {
|
|
78
|
+
/** Persona name */
|
|
79
|
+
name: string;
|
|
80
|
+
/** Persona description */
|
|
81
|
+
description?: string;
|
|
82
|
+
/** Persona avatar */
|
|
83
|
+
avatar?: React.ReactNode;
|
|
84
|
+
/** Persona capabilities */
|
|
85
|
+
capabilities?: string[];
|
|
86
|
+
/** Whether persona is selected */
|
|
87
|
+
selected?: boolean;
|
|
88
|
+
/** Click handler */
|
|
89
|
+
onClick?: () => void;
|
|
90
|
+
/** Custom sx props */
|
|
91
|
+
sx?: SxProps<Theme>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* AI Persona Card - Card for selecting AI personas/agents.
|
|
95
|
+
*/
|
|
96
|
+
export declare const AIPersonaCard: React.FC<AIPersonaCardProps>;
|
|
97
|
+
//# sourceMappingURL=AIContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIContainer.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EASL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAUvB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0DlD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA+ElE,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2GtD,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIExplainability component.
|
|
3
|
+
* @module components/AI/AIExplainability
|
|
4
|
+
* AI Explainability Component
|
|
5
|
+
* Provides details about AI-generated content
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { AIExplainability } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <AIExplainability />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { SxProps, Theme } from '@mui/material';
|
|
15
|
+
/**
|
|
16
|
+
* Props for AIExplainability component.
|
|
17
|
+
*/
|
|
18
|
+
export interface AIExplainabilityProps {
|
|
19
|
+
/** Title/overview of the AI */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Description of what the AI does */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Model name or version */
|
|
24
|
+
modelName?: string;
|
|
25
|
+
/** Confidence score (0-100) */
|
|
26
|
+
confidence?: number;
|
|
27
|
+
/** Last updated date */
|
|
28
|
+
lastUpdated?: string;
|
|
29
|
+
/** Additional details */
|
|
30
|
+
details?: Array<{
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** Action buttons */
|
|
35
|
+
actions?: Array<{
|
|
36
|
+
label: string;
|
|
37
|
+
onClick: () => void;
|
|
38
|
+
}>;
|
|
39
|
+
/** Custom sx props */
|
|
40
|
+
sx?: SxProps<Theme>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* AI Explainability Content - Provides details about AI-generated content.
|
|
44
|
+
*/
|
|
45
|
+
export declare const AIExplainability: React.FC<AIExplainabilityProps>;
|
|
46
|
+
//# sourceMappingURL=AIExplainability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIExplainability.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIExplainability.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA2C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQxF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,qBAAqB;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IACxD,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmF5D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AILabel component.
|
|
3
|
+
* @module components/AI/AILabel
|
|
4
|
+
* AI Label Component
|
|
5
|
+
* Indicates AI-generated content and provides pathway to explainability
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { AILabel } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <AILabel />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { SxProps, Theme } from '@mui/material';
|
|
15
|
+
export type AILabelSize = 'mini' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
16
|
+
export type AILabelVariant = 'default' | 'inline';
|
|
17
|
+
/**
|
|
18
|
+
* Props for AILabel component.
|
|
19
|
+
*/
|
|
20
|
+
export interface AILabelProps {
|
|
21
|
+
/** Size of the AI label */
|
|
22
|
+
size?: AILabelSize;
|
|
23
|
+
/** Variant of the AI label */
|
|
24
|
+
variant?: AILabelVariant;
|
|
25
|
+
/** Custom text (default: "AI") */
|
|
26
|
+
text?: string;
|
|
27
|
+
/** Whether to show explainability popover on click */
|
|
28
|
+
showPopover?: boolean;
|
|
29
|
+
/** Content for the explainability popover */
|
|
30
|
+
popoverContent?: React.ReactNode;
|
|
31
|
+
/** Whether the label is clickable */
|
|
32
|
+
clickable?: boolean;
|
|
33
|
+
/** Click handler */
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
/** Custom sx props */
|
|
36
|
+
sx?: SxProps<Theme>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* AI Label - Indicates AI-generated content and provides pathway to explainability.
|
|
40
|
+
* Use to mark any instance of AI in the interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AILabel: React.FC<AILabelProps>;
|
|
43
|
+
//# sourceMappingURL=AILabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AILabel.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AILabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAwB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQrE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AA8BD;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwH1C,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIMessage component.
|
|
3
|
+
* @module components/AI/AIMessage
|
|
4
|
+
* AIMessage Component
|
|
5
|
+
* Visual wrapper for AI responses. Handles presentation concerns ONLY.
|
|
6
|
+
*
|
|
7
|
+
* SEPARATION OF CONCERNS:
|
|
8
|
+
* ┌─────────────────────────────────────────────────────────────────┐
|
|
9
|
+
* │ AIMessage (this component) │
|
|
10
|
+
* │ ─────────────────────────────────────────────────────────────── │
|
|
11
|
+
* │ Responsibilities: │
|
|
12
|
+
* │ • Avatar display │
|
|
13
|
+
* │ • Message bubble/container styling │
|
|
14
|
+
* │ • Metadata (timestamp, sender info) │
|
|
15
|
+
* │ • Action buttons (copy, feedback, share, download) │
|
|
16
|
+
* │ • Spacing and visual alignment │
|
|
17
|
+
* │ │
|
|
18
|
+
* │ Does NOT handle: │
|
|
19
|
+
* │ • Block type detection │
|
|
20
|
+
* │ • Content rendering logic │
|
|
21
|
+
* │ • Voice/streaming state │
|
|
22
|
+
* │ • Business logic │
|
|
23
|
+
* ├─────────────────────────────────────────────────────────────────┤
|
|
24
|
+
* │ AIResponseRenderer (delegated) │
|
|
25
|
+
* │ ─────────────────────────────────────────────────────────────── │
|
|
26
|
+
* │ Responsibilities: │
|
|
27
|
+
* │ • Iterate over response.blocks │
|
|
28
|
+
* │ • Dispatch each block to type-specific renderer │
|
|
29
|
+
* │ • Text, table, chart, image, form, actions │
|
|
30
|
+
* └─────────────────────────────────────────────────────────────────┘
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* import { AIMessage } from '@trinityui/design-system';
|
|
35
|
+
*
|
|
36
|
+
* <AIMessage />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { SxProps, Theme } from '@mui/material';
|
|
41
|
+
import { type AIResponse } from './types';
|
|
42
|
+
/**
|
|
43
|
+
* Props for AIMessage component.
|
|
44
|
+
*/
|
|
45
|
+
export interface AIMessageProps {
|
|
46
|
+
/**
|
|
47
|
+
* AIResponse object to render (preferred API)
|
|
48
|
+
* When provided, AIResponseRenderer is used automatically
|
|
49
|
+
*/
|
|
50
|
+
response?: AIResponse;
|
|
51
|
+
/**
|
|
52
|
+
* Legacy: Direct children content
|
|
53
|
+
* Use `response` prop instead for new implementations
|
|
54
|
+
*/
|
|
55
|
+
children?: React.ReactNode;
|
|
56
|
+
/** Timestamp display */
|
|
57
|
+
timestamp?: string;
|
|
58
|
+
/** Custom AI avatar */
|
|
59
|
+
avatar?: React.ReactNode;
|
|
60
|
+
/** Show copy button */
|
|
61
|
+
showCopy?: boolean;
|
|
62
|
+
/** Show feedback buttons (thumbs up/down) */
|
|
63
|
+
showFeedback?: boolean;
|
|
64
|
+
/** Show share button */
|
|
65
|
+
showShare?: boolean;
|
|
66
|
+
/** Show download button */
|
|
67
|
+
showDownload?: boolean;
|
|
68
|
+
/** Copy callback */
|
|
69
|
+
onCopy?: () => void;
|
|
70
|
+
/** Feedback callback */
|
|
71
|
+
onFeedback?: (positive: boolean) => void;
|
|
72
|
+
/** Share callback */
|
|
73
|
+
onShare?: () => void;
|
|
74
|
+
/** Download callback */
|
|
75
|
+
onDownload?: () => void;
|
|
76
|
+
/** Custom sx props */
|
|
77
|
+
sx?: SxProps<Theme>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* AIMessage - Visual wrapper for AI responses.
|
|
81
|
+
*
|
|
82
|
+
* This is a pure PRESENTATION component. It provides:
|
|
83
|
+
* - Avatar display
|
|
84
|
+
* - Timestamp
|
|
85
|
+
* - Action buttons (copy, feedback, share, download)
|
|
86
|
+
* - Consistent spacing and alignment
|
|
87
|
+
*
|
|
88
|
+
* Content rendering is delegated to AIResponseRenderer.
|
|
89
|
+
* AIMessage does NOT inspect or care about block types.
|
|
90
|
+
*/
|
|
91
|
+
export declare const AIMessage: React.FC<AIMessageProps>;
|
|
92
|
+
export default AIMessage;
|
|
93
|
+
//# sourceMappingURL=AIMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIMessage.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIMessage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAML,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wBAAwB;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB;IACxB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyK9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIRelatedQuestions component.
|
|
3
|
+
* @module components/AI/AIRelatedQuestions
|
|
4
|
+
* AI Related Questions Component
|
|
5
|
+
* Collapsible panel displaying related/follow-up questions with filled background surface
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { AIRelatedQuestions } from '@trinityui/design-system';
|
|
10
|
+
*
|
|
11
|
+
* <AIRelatedQuestions
|
|
12
|
+
* questions="Example"
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { SxProps, Theme } from '@mui/material';
|
|
18
|
+
/**
|
|
19
|
+
* Props for AIRelatedQuestions component.
|
|
20
|
+
*/
|
|
21
|
+
export interface AIRelatedQuestionsProps {
|
|
22
|
+
/** List of related questions */
|
|
23
|
+
questions: string[];
|
|
24
|
+
/** Callback when a question is clicked */
|
|
25
|
+
onQuestionClick?: (question: string) => void;
|
|
26
|
+
/** Panel title */
|
|
27
|
+
title?: string;
|
|
28
|
+
/** Whether panel is initially expanded */
|
|
29
|
+
defaultExpanded?: boolean;
|
|
30
|
+
/** Controlled expanded state */
|
|
31
|
+
expanded?: boolean;
|
|
32
|
+
/** Callback when expanded state changes */
|
|
33
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
34
|
+
/** Empty state title when no questions */
|
|
35
|
+
emptyTitle?: string;
|
|
36
|
+
/** Empty state description */
|
|
37
|
+
emptyDescription?: string;
|
|
38
|
+
/** Show empty state instead of hiding */
|
|
39
|
+
showEmpty?: boolean;
|
|
40
|
+
/** Custom sx props */
|
|
41
|
+
sx?: SxProps<Theme>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* AI Related Questions - Collapsible panel with clickable follow-up questions
|
|
45
|
+
* Features:
|
|
46
|
+
* - Filled background surface using semantic tokens
|
|
47
|
+
* - Left-aligned questions with arrow icons
|
|
48
|
+
* - Proper empty state with icon, title, and description
|
|
49
|
+
* - MUI List/ListItem for accessibility
|
|
50
|
+
*/
|
|
51
|
+
export declare const AIRelatedQuestions: React.FC<AIRelatedQuestionsProps>;
|
|
52
|
+
export default AIRelatedQuestions;
|
|
53
|
+
//# sourceMappingURL=AIRelatedQuestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIRelatedQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIRelatedQuestions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAWL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAQvB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2LhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIResponseRenderer component.
|
|
3
|
+
* @module components/AI/AIResponseRenderer
|
|
4
|
+
* AIResponseRenderer
|
|
5
|
+
* Renders AIResponse objects by iterating over blocks and dispatching to type-specific renderers.
|
|
6
|
+
*
|
|
7
|
+
* This is a pure rendering component with NO:
|
|
8
|
+
* - Layout styling (handled by parent)
|
|
9
|
+
* - AIMessage wrapper (that's a separate component)
|
|
10
|
+
* - Voice logic
|
|
11
|
+
* - Business logic
|
|
12
|
+
*
|
|
13
|
+
* Currently Supported Block Types:
|
|
14
|
+
* - text ✅
|
|
15
|
+
*
|
|
16
|
+
* Future Block Types (placeholders):
|
|
17
|
+
* - table 🔜
|
|
18
|
+
* - chart 🔜
|
|
19
|
+
* - image 🔜
|
|
20
|
+
* - form 🔜
|
|
21
|
+
* - actions 🔜
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { AIResponseRenderer } from '@trinityui/design-system';
|
|
26
|
+
*
|
|
27
|
+
* <AIResponseRenderer
|
|
28
|
+
* response={undefined as never}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import { type AIResponse } from './types';
|
|
34
|
+
/**
|
|
35
|
+
* Props for AIResponseRenderer component.
|
|
36
|
+
*/
|
|
37
|
+
export interface AIResponseRendererProps {
|
|
38
|
+
/** The AIResponse object to render */
|
|
39
|
+
response: AIResponse;
|
|
40
|
+
/** Gap between blocks (default: aiSpacing.sm) */
|
|
41
|
+
blockGap?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* AIResponseRenderer - Iterates over AIResponse blocks and renders each by type.
|
|
45
|
+
*
|
|
46
|
+
* Pure rendering logic only. No layout wrapper, no business logic.
|
|
47
|
+
*/
|
|
48
|
+
export declare const AIResponseRenderer: React.FC<AIResponseRendererProps>;
|
|
49
|
+
export default AIResponseRenderer;
|
|
50
|
+
//# sourceMappingURL=AIResponseRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIResponseRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AIResponseRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,KAAK,UAAU,EAQhB,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,QAAQ,EAAE,UAAU,CAAC;IACrB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0BhE,CAAC;AAuGF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AISources component.
|
|
3
|
+
* @module components/AI/AISources
|
|
4
|
+
* AI Source Components
|
|
5
|
+
* Components for displaying AI source citations and references
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { AISources } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <AISources
|
|
11
|
+
* number={0}
|
|
12
|
+
* title="Example"
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { SxProps, Theme } from '@mui/material';
|
|
18
|
+
/**
|
|
19
|
+
* Props for AISource component.
|
|
20
|
+
*/
|
|
21
|
+
export interface AISourceProps {
|
|
22
|
+
/** Source number */
|
|
23
|
+
number: number;
|
|
24
|
+
/** Source title */
|
|
25
|
+
title: string;
|
|
26
|
+
/** Source URL */
|
|
27
|
+
url?: string;
|
|
28
|
+
/** Source description/snippet */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Source type (webpage, document, etc.) */
|
|
31
|
+
type?: 'webpage' | 'document' | 'article' | 'video' | 'other';
|
|
32
|
+
/** Favicon URL */
|
|
33
|
+
favicon?: string;
|
|
34
|
+
/** Click handler */
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
/** Custom sx props */
|
|
37
|
+
sx?: SxProps<Theme>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* AI Source - Individual source citation card.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AISource: React.FC<AISourceProps>;
|
|
43
|
+
/**
|
|
44
|
+
* Props for AISourcesSection component.
|
|
45
|
+
*/
|
|
46
|
+
export interface AISourcesSectionProps {
|
|
47
|
+
/** List of sources */
|
|
48
|
+
sources: Omit<AISourceProps, 'number'>[];
|
|
49
|
+
/** Section title */
|
|
50
|
+
title?: string;
|
|
51
|
+
/** Whether section is collapsible */
|
|
52
|
+
collapsible?: boolean;
|
|
53
|
+
/** Default expanded state */
|
|
54
|
+
defaultExpanded?: boolean;
|
|
55
|
+
/** Maximum sources to show initially (rest collapsed) */
|
|
56
|
+
maxVisible?: number;
|
|
57
|
+
/** Source click handler */
|
|
58
|
+
onSourceClick?: (index: number, source: Omit<AISourceProps, 'number'>) => void;
|
|
59
|
+
/** Custom sx props */
|
|
60
|
+
sx?: SxProps<Theme>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* AI Sources Section - Collapsible section displaying source citations.
|
|
64
|
+
*/
|
|
65
|
+
export declare const AISourcesSection: React.FC<AISourcesSectionProps>;
|
|
66
|
+
//# sourceMappingURL=AISources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AISources.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISources.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAUL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAUvB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC9D,kBAAkB;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiI5C,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sBAAsB;IACtB,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;IACzC,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC/E,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuF5D,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AISourcesPanel component.
|
|
3
|
+
* @module components/AI/AISourcesPanel
|
|
4
|
+
* AI Sources Panel Components
|
|
5
|
+
* Collapsible sources accordion for displaying AI response citations
|
|
6
|
+
*
|
|
7
|
+
* These components provide a structured way to display sources with
|
|
8
|
+
* expandable categories and detail views.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { AISourcesPanel } from '@trinityui/design-system';
|
|
13
|
+
*
|
|
14
|
+
* <AISourcesPanel
|
|
15
|
+
* sources={[]}
|
|
16
|
+
* />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import { SxProps, Theme } from '@mui/material';
|
|
21
|
+
export interface AISourceItem {
|
|
22
|
+
/** Unique identifier */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Display label */
|
|
25
|
+
label: string;
|
|
26
|
+
/** Optional detail key-value pairs */
|
|
27
|
+
details?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
export interface AISourceCategory {
|
|
30
|
+
/** Unique identifier */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Category name */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Number of items in category */
|
|
35
|
+
count: number;
|
|
36
|
+
/** Optional expandable items */
|
|
37
|
+
items?: AISourceItem[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props for AISourcesPanel component.
|
|
41
|
+
*/
|
|
42
|
+
export interface AISourcesPanelProps {
|
|
43
|
+
/** List of source categories */
|
|
44
|
+
sources: AISourceCategory[];
|
|
45
|
+
/** Panel title */
|
|
46
|
+
title?: string;
|
|
47
|
+
/** Whether panel is initially expanded */
|
|
48
|
+
defaultExpanded?: boolean;
|
|
49
|
+
/** Controlled expanded state */
|
|
50
|
+
expanded?: boolean;
|
|
51
|
+
/** Callback when expanded state changes */
|
|
52
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
53
|
+
/** Custom sx props */
|
|
54
|
+
sx?: SxProps<Theme>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props for AISourceCategoryItem component.
|
|
58
|
+
*/
|
|
59
|
+
export interface AISourceCategoryItemProps {
|
|
60
|
+
/** Source category data */
|
|
61
|
+
category: AISourceCategory;
|
|
62
|
+
/** Index number to display */
|
|
63
|
+
index: number;
|
|
64
|
+
/** Whether category is expanded */
|
|
65
|
+
isExpanded: boolean;
|
|
66
|
+
/** Toggle expansion callback */
|
|
67
|
+
onToggle: () => void;
|
|
68
|
+
/** Currently selected item */
|
|
69
|
+
selectedItem: AISourceItem | null;
|
|
70
|
+
/** Callback when item is selected */
|
|
71
|
+
onSelectItem: (item: AISourceItem | null) => void;
|
|
72
|
+
/** Custom sx props */
|
|
73
|
+
sx?: SxProps<Theme>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* AI Sources Panel - Collapsible panel displaying source citations
|
|
77
|
+
*/
|
|
78
|
+
export declare const AISourcesPanel: React.FC<AISourcesPanelProps>;
|
|
79
|
+
/**
|
|
80
|
+
* AI Source Category Item - Individual collapsible source category
|
|
81
|
+
*/
|
|
82
|
+
export declare const AISourceCategoryItem: React.FC<AISourceCategoryItemProps>;
|
|
83
|
+
export default AISourcesPanel;
|
|
84
|
+
//# sourceMappingURL=AISourcesPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AISourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AISourcesPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAQL,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAQvB,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gCAAgC;IAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,2BAA2B;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,YAAY,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiFxD,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAgKpE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AITextBlock component.
|
|
3
|
+
* @module components/AI/AITextBlock
|
|
4
|
+
* AITextBlock
|
|
5
|
+
* Renders text content within AI responses with markdown support.
|
|
6
|
+
*
|
|
7
|
+
* Responsibilities:
|
|
8
|
+
* - Render markdown or plain text
|
|
9
|
+
* - Use existing MUI typography components
|
|
10
|
+
* - Respect spacing and readability
|
|
11
|
+
* - Accessible by default (semantic HTML)
|
|
12
|
+
*
|
|
13
|
+
* Constraints:
|
|
14
|
+
* - No custom styling
|
|
15
|
+
* - No inline styles
|
|
16
|
+
* - Semantic tokens only
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { AITextBlock } from '@trinityui/design-system';
|
|
21
|
+
*
|
|
22
|
+
* <AITextBlock
|
|
23
|
+
* content="Example"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import { SxProps, Theme } from '@mui/material';
|
|
29
|
+
import { type TextBlock } from './types';
|
|
30
|
+
/**
|
|
31
|
+
* Props for AITextBlock component.
|
|
32
|
+
*/
|
|
33
|
+
export interface AITextBlockProps {
|
|
34
|
+
/** Text content to render */
|
|
35
|
+
content: string;
|
|
36
|
+
/** Whether to parse as markdown */
|
|
37
|
+
markdown?: boolean;
|
|
38
|
+
/** Semantic variant for styling */
|
|
39
|
+
variant?: TextBlock['variant'];
|
|
40
|
+
/** Optional block ID for anchoring */
|
|
41
|
+
id?: string;
|
|
42
|
+
/** Custom sx props (use sparingly) */
|
|
43
|
+
sx?: SxProps<Theme>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* AITextBlock - Renders text content with optional markdown parsing.
|
|
47
|
+
*
|
|
48
|
+
* Uses semantic HTML elements for accessibility:
|
|
49
|
+
* - body → <p>
|
|
50
|
+
* - heading → <h3>
|
|
51
|
+
* - caption → <p> with caption styling
|
|
52
|
+
* - quote → <blockquote>
|
|
53
|
+
*/
|
|
54
|
+
export declare const AITextBlock: React.FC<AITextBlockProps>;
|
|
55
|
+
export default AITextBlock;
|
|
56
|
+
//# sourceMappingURL=AITextBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AITextBlock.d.ts","sourceRoot":"","sources":["../../../src/components/AI/AITextBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAyB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAOzC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4BlD,CAAC;AAomBF,eAAe,WAAW,CAAC"}
|