@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,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics/Dashboard Application Preset
|
|
3
|
+
*
|
|
4
|
+
* Optimized for data-heavy analytics dashboards:
|
|
5
|
+
* - Extended color palette for data visualization
|
|
6
|
+
* - Dense layouts for dashboards
|
|
7
|
+
* - Enhanced chart styling
|
|
8
|
+
* - Focus on data readability
|
|
9
|
+
*/
|
|
10
|
+
import { TrinityThemePreset } from '../theme';
|
|
11
|
+
/**
|
|
12
|
+
* Extended color palette for charts and data visualization
|
|
13
|
+
* Designed for accessibility and clear differentiation
|
|
14
|
+
*/
|
|
15
|
+
export declare const dataVizColors: {
|
|
16
|
+
/** Primary series colors (categorical) */
|
|
17
|
+
categorical: string[];
|
|
18
|
+
/** Sequential colors for gradients/heatmaps */
|
|
19
|
+
sequential: {
|
|
20
|
+
blue: string[];
|
|
21
|
+
green: string[];
|
|
22
|
+
orange: string[];
|
|
23
|
+
};
|
|
24
|
+
/** Diverging colors for positive/negative */
|
|
25
|
+
diverging: {
|
|
26
|
+
greenRed: string[];
|
|
27
|
+
blueOrange: string[];
|
|
28
|
+
};
|
|
29
|
+
/** Status colors for metrics */
|
|
30
|
+
status: {
|
|
31
|
+
positive: string;
|
|
32
|
+
negative: string;
|
|
33
|
+
neutral: string;
|
|
34
|
+
warning: string;
|
|
35
|
+
};
|
|
36
|
+
/** Trend colors */
|
|
37
|
+
trend: {
|
|
38
|
+
up: string;
|
|
39
|
+
down: string;
|
|
40
|
+
flat: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Analytics-specific configuration options
|
|
45
|
+
*/
|
|
46
|
+
export declare const analyticsConfig: {
|
|
47
|
+
/** Default date range for dashboards */
|
|
48
|
+
defaultDateRange: "last30days";
|
|
49
|
+
/** Auto-refresh interval (ms), 0 = disabled */
|
|
50
|
+
autoRefreshInterval: number;
|
|
51
|
+
/** Enable real-time updates */
|
|
52
|
+
enableRealtime: boolean;
|
|
53
|
+
/** Default chart animation duration (ms) */
|
|
54
|
+
chartAnimationDuration: number;
|
|
55
|
+
/** Enable chart tooltips */
|
|
56
|
+
enableTooltips: boolean;
|
|
57
|
+
/** Enable chart legends */
|
|
58
|
+
enableLegends: boolean;
|
|
59
|
+
/** Default number format locale */
|
|
60
|
+
numberLocale: string;
|
|
61
|
+
/** Compact number threshold (show 1.2M instead of 1,200,000) */
|
|
62
|
+
compactNumberThreshold: number;
|
|
63
|
+
/** Data visualization color palette */
|
|
64
|
+
colors: {
|
|
65
|
+
/** Primary series colors (categorical) */
|
|
66
|
+
categorical: string[];
|
|
67
|
+
/** Sequential colors for gradients/heatmaps */
|
|
68
|
+
sequential: {
|
|
69
|
+
blue: string[];
|
|
70
|
+
green: string[];
|
|
71
|
+
orange: string[];
|
|
72
|
+
};
|
|
73
|
+
/** Diverging colors for positive/negative */
|
|
74
|
+
diverging: {
|
|
75
|
+
greenRed: string[];
|
|
76
|
+
blueOrange: string[];
|
|
77
|
+
};
|
|
78
|
+
/** Status colors for metrics */
|
|
79
|
+
status: {
|
|
80
|
+
positive: string;
|
|
81
|
+
negative: string;
|
|
82
|
+
neutral: string;
|
|
83
|
+
warning: string;
|
|
84
|
+
};
|
|
85
|
+
/** Trend colors */
|
|
86
|
+
trend: {
|
|
87
|
+
up: string;
|
|
88
|
+
down: string;
|
|
89
|
+
flat: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Enable data export */
|
|
93
|
+
enableExport: boolean;
|
|
94
|
+
/** Enable drill-down */
|
|
95
|
+
enableDrillDown: boolean;
|
|
96
|
+
/** Show trend indicators */
|
|
97
|
+
showTrendIndicators: boolean;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Analytics Light Theme Preset
|
|
101
|
+
*/
|
|
102
|
+
export declare const analyticsLightPreset: TrinityThemePreset;
|
|
103
|
+
/**
|
|
104
|
+
* Analytics Dark Theme Preset
|
|
105
|
+
*/
|
|
106
|
+
export declare const analyticsDarkPreset: TrinityThemePreset;
|
|
107
|
+
/** Analytics preset with both light and dark themes */
|
|
108
|
+
export declare const analyticsPreset: {
|
|
109
|
+
light: TrinityThemePreset;
|
|
110
|
+
dark: TrinityThemePreset;
|
|
111
|
+
config: {
|
|
112
|
+
/** Default date range for dashboards */
|
|
113
|
+
defaultDateRange: "last30days";
|
|
114
|
+
/** Auto-refresh interval (ms), 0 = disabled */
|
|
115
|
+
autoRefreshInterval: number;
|
|
116
|
+
/** Enable real-time updates */
|
|
117
|
+
enableRealtime: boolean;
|
|
118
|
+
/** Default chart animation duration (ms) */
|
|
119
|
+
chartAnimationDuration: number;
|
|
120
|
+
/** Enable chart tooltips */
|
|
121
|
+
enableTooltips: boolean;
|
|
122
|
+
/** Enable chart legends */
|
|
123
|
+
enableLegends: boolean;
|
|
124
|
+
/** Default number format locale */
|
|
125
|
+
numberLocale: string;
|
|
126
|
+
/** Compact number threshold (show 1.2M instead of 1,200,000) */
|
|
127
|
+
compactNumberThreshold: number;
|
|
128
|
+
/** Data visualization color palette */
|
|
129
|
+
colors: {
|
|
130
|
+
/** Primary series colors (categorical) */
|
|
131
|
+
categorical: string[];
|
|
132
|
+
/** Sequential colors for gradients/heatmaps */
|
|
133
|
+
sequential: {
|
|
134
|
+
blue: string[];
|
|
135
|
+
green: string[];
|
|
136
|
+
orange: string[];
|
|
137
|
+
};
|
|
138
|
+
/** Diverging colors for positive/negative */
|
|
139
|
+
diverging: {
|
|
140
|
+
greenRed: string[];
|
|
141
|
+
blueOrange: string[];
|
|
142
|
+
};
|
|
143
|
+
/** Status colors for metrics */
|
|
144
|
+
status: {
|
|
145
|
+
positive: string;
|
|
146
|
+
negative: string;
|
|
147
|
+
neutral: string;
|
|
148
|
+
warning: string;
|
|
149
|
+
};
|
|
150
|
+
/** Trend colors */
|
|
151
|
+
trend: {
|
|
152
|
+
up: string;
|
|
153
|
+
down: string;
|
|
154
|
+
flat: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
/** Enable data export */
|
|
158
|
+
enableExport: boolean;
|
|
159
|
+
/** Enable drill-down */
|
|
160
|
+
enableDrillDown: boolean;
|
|
161
|
+
/** Show trend indicators */
|
|
162
|
+
showTrendIndicators: boolean;
|
|
163
|
+
};
|
|
164
|
+
colors: {
|
|
165
|
+
/** Primary series colors (categorical) */
|
|
166
|
+
categorical: string[];
|
|
167
|
+
/** Sequential colors for gradients/heatmaps */
|
|
168
|
+
sequential: {
|
|
169
|
+
blue: string[];
|
|
170
|
+
green: string[];
|
|
171
|
+
orange: string[];
|
|
172
|
+
};
|
|
173
|
+
/** Diverging colors for positive/negative */
|
|
174
|
+
diverging: {
|
|
175
|
+
greenRed: string[];
|
|
176
|
+
blueOrange: string[];
|
|
177
|
+
};
|
|
178
|
+
/** Status colors for metrics */
|
|
179
|
+
status: {
|
|
180
|
+
positive: string;
|
|
181
|
+
negative: string;
|
|
182
|
+
neutral: string;
|
|
183
|
+
warning: string;
|
|
184
|
+
};
|
|
185
|
+
/** Trend colors */
|
|
186
|
+
trend: {
|
|
187
|
+
up: string;
|
|
188
|
+
down: string;
|
|
189
|
+
flat: string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
/** Analytics light theme (direct MUI theme object) */
|
|
194
|
+
export declare const analyticsLightTheme: import("@mui/material").Theme;
|
|
195
|
+
/** Analytics dark theme (direct MUI theme object) */
|
|
196
|
+
export declare const analyticsDarkTheme: import("@mui/material").Theme;
|
|
197
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/presets/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMxE;;;GAGG;AACH,eAAO,MAAM,aAAa;IACxB,0CAA0C;;IAc1C,+CAA+C;;;;;;IAO/C,6CAA6C;;;;;IAM7C,gCAAgC;;;;;;;IAQhC,mBAAmB;;;;;;CAMpB,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,wCAAwC;;IAGxC,+CAA+C;;IAG/C,+BAA+B;;IAG/B,4CAA4C;;IAG5C,4BAA4B;;IAG5B,2BAA2B;;IAG3B,mCAAmC;;IAGnC,gEAAgE;;IAGhE,uCAAuC;;QA3EvC,0CAA0C;;QAc1C,+CAA+C;;;;;;QAO/C,6CAA6C;;;;;QAM7C,gCAAgC;;;;;;;QAQhC,mBAAmB;;;;;;;IA2CnB,yBAAyB;;IAGzB,wBAAwB;;IAGxB,4BAA4B;;CAE7B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBA6IjC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBA2FhC,CAAC;AAMH,uDAAuD;AACvD,eAAO,MAAM,eAAe;;;;QApS1B,wCAAwC;;QAGxC,+CAA+C;;QAG/C,+BAA+B;;QAG/B,4CAA4C;;QAG5C,4BAA4B;;QAG5B,2BAA2B;;QAG3B,mCAAmC;;QAGnC,gEAAgE;;QAGhE,uCAAuC;;YA3EvC,0CAA0C;;YAc1C,+CAA+C;;;;;;YAO/C,6CAA6C;;;;;YAM7C,gCAAgC;;;;;;;YAQhC,mBAAmB;;;;;;;QA2CnB,yBAAyB;;QAGzB,wBAAwB;;QAGxB,4BAA4B;;;;QApF5B,0CAA0C;;QAc1C,+CAA+C;;;;;;QAO/C,6CAA6C;;;;;QAM7C,gCAAgC;;;;;;;QAQhC,mBAAmB;;;;;;;CAyTpB,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,+BAA6B,CAAC;AAE9D,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,+BAA4B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRM Application Preset
|
|
3
|
+
*
|
|
4
|
+
* Optimized for customer relationship management applications:
|
|
5
|
+
* - Compact data tables for viewing many records
|
|
6
|
+
* - Enhanced form controls
|
|
7
|
+
* - Quick action buttons
|
|
8
|
+
* - Status-heavy interfaces
|
|
9
|
+
*/
|
|
10
|
+
import { TrinityThemePreset } from '../theme';
|
|
11
|
+
/**
|
|
12
|
+
* CRM-specific configuration options
|
|
13
|
+
*/
|
|
14
|
+
export declare const crmConfig: {
|
|
15
|
+
/** Default page size for data tables */
|
|
16
|
+
defaultPageSize: number;
|
|
17
|
+
/** Available page size options */
|
|
18
|
+
pageSizeOptions: number[];
|
|
19
|
+
/** Enable AI-powered insights */
|
|
20
|
+
enableAI: boolean;
|
|
21
|
+
/** Default table density */
|
|
22
|
+
tableDensity: "compact";
|
|
23
|
+
/** Enable bulk actions in tables */
|
|
24
|
+
enableBulkActions: boolean;
|
|
25
|
+
/** Enable data export features */
|
|
26
|
+
enableExport: boolean;
|
|
27
|
+
/** Show row numbers in tables */
|
|
28
|
+
showRowNumbers: boolean;
|
|
29
|
+
/** Enable inline editing */
|
|
30
|
+
enableInlineEdit: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* CRM Light Theme Preset
|
|
34
|
+
*/
|
|
35
|
+
export declare const crmLightPreset: TrinityThemePreset;
|
|
36
|
+
/**
|
|
37
|
+
* CRM Dark Theme Preset
|
|
38
|
+
*/
|
|
39
|
+
export declare const crmDarkPreset: TrinityThemePreset;
|
|
40
|
+
/** CRM preset with both light and dark themes */
|
|
41
|
+
export declare const crmPreset: {
|
|
42
|
+
light: TrinityThemePreset;
|
|
43
|
+
dark: TrinityThemePreset;
|
|
44
|
+
config: {
|
|
45
|
+
/** Default page size for data tables */
|
|
46
|
+
defaultPageSize: number;
|
|
47
|
+
/** Available page size options */
|
|
48
|
+
pageSizeOptions: number[];
|
|
49
|
+
/** Enable AI-powered insights */
|
|
50
|
+
enableAI: boolean;
|
|
51
|
+
/** Default table density */
|
|
52
|
+
tableDensity: "compact";
|
|
53
|
+
/** Enable bulk actions in tables */
|
|
54
|
+
enableBulkActions: boolean;
|
|
55
|
+
/** Enable data export features */
|
|
56
|
+
enableExport: boolean;
|
|
57
|
+
/** Show row numbers in tables */
|
|
58
|
+
showRowNumbers: boolean;
|
|
59
|
+
/** Enable inline editing */
|
|
60
|
+
enableInlineEdit: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/** CRM light theme (direct MUI theme object) */
|
|
64
|
+
export declare const crmLightTheme: import("@mui/material").Theme;
|
|
65
|
+
/** CRM dark theme (direct MUI theme object) */
|
|
66
|
+
export declare const crmDarkTheme: import("@mui/material").Theme;
|
|
67
|
+
//# sourceMappingURL=crm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crm.d.ts","sourceRoot":"","sources":["../../src/presets/crm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMxE;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB,wCAAwC;;IAGxC,kCAAkC;;IAGlC,iCAAiC;;IAGjC,4BAA4B;;IAG5B,oCAAoC;;IAGpC,kCAAkC;;IAGlC,iCAAiC;;IAGjC,4BAA4B;;CAE7B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,kBAkF3B,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,kBAgD1B,CAAC;AAMH,iDAAiD;AACjD,eAAO,MAAM,SAAS;;;;QAlLpB,wCAAwC;;QAGxC,kCAAkC;;QAGlC,iCAAiC;;QAGjC,4BAA4B;;QAG5B,oCAAoC;;QAGpC,kCAAkC;;QAGlC,iCAAiC;;QAGjC,4BAA4B;;;CAiK7B,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,aAAa,+BAAuB,CAAC;AAElD,+CAA+C;AAC/C,eAAO,MAAM,YAAY,+BAAsB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trinity Design System - Theme Presets
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured theme variations for different application types.
|
|
5
|
+
* Each preset maintains Trinity brand consistency while optimizing
|
|
6
|
+
* for specific use cases.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { crmPreset } from '@trinitydesign/design-system/presets';
|
|
11
|
+
*
|
|
12
|
+
* <ThemeProvider theme={crmPreset.light.theme}>
|
|
13
|
+
* <App />
|
|
14
|
+
* </ThemeProvider>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export { crmPreset, crmLightTheme, crmDarkTheme, crmConfig } from './crm';
|
|
18
|
+
export { portalPreset, portalLightTheme, portalDarkTheme, portalConfig } from './portal';
|
|
19
|
+
export { analyticsPreset, analyticsLightTheme, analyticsDarkTheme, analyticsConfig, dataVizColors } from './analytics';
|
|
20
|
+
export type { TrinityThemePreset, TrinityThemePresetOptions } from '../theme';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGvH,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal/Customer-Facing Application Preset
|
|
3
|
+
*
|
|
4
|
+
* Optimized for external-facing customer portals:
|
|
5
|
+
* - Larger touch targets for mobile/tablet
|
|
6
|
+
* - More generous spacing
|
|
7
|
+
* - Prominent call-to-action buttons
|
|
8
|
+
* - Accessible focus indicators
|
|
9
|
+
*/
|
|
10
|
+
import { TrinityThemePreset } from '../theme';
|
|
11
|
+
/**
|
|
12
|
+
* Portal-specific configuration options
|
|
13
|
+
*/
|
|
14
|
+
export declare const portalConfig: {
|
|
15
|
+
/** Default page size for lists */
|
|
16
|
+
defaultPageSize: number;
|
|
17
|
+
/** Enable simplified navigation */
|
|
18
|
+
simplifiedNav: boolean;
|
|
19
|
+
/** Show help tooltips */
|
|
20
|
+
showHelpTooltips: boolean;
|
|
21
|
+
/** Enable accessibility announcements */
|
|
22
|
+
enableA11yAnnouncements: boolean;
|
|
23
|
+
/** Minimum touch target size (px) */
|
|
24
|
+
minTouchTarget: number;
|
|
25
|
+
/** Enable high contrast mode option */
|
|
26
|
+
enableHighContrast: boolean;
|
|
27
|
+
/** Show breadcrumbs */
|
|
28
|
+
showBreadcrumbs: boolean;
|
|
29
|
+
/** Enable step-by-step wizards */
|
|
30
|
+
enableWizards: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Portal Light Theme Preset
|
|
34
|
+
*/
|
|
35
|
+
export declare const portalLightPreset: TrinityThemePreset;
|
|
36
|
+
/**
|
|
37
|
+
* Portal Dark Theme Preset
|
|
38
|
+
*/
|
|
39
|
+
export declare const portalDarkPreset: TrinityThemePreset;
|
|
40
|
+
/** Portal preset with both light and dark themes */
|
|
41
|
+
export declare const portalPreset: {
|
|
42
|
+
light: TrinityThemePreset;
|
|
43
|
+
dark: TrinityThemePreset;
|
|
44
|
+
config: {
|
|
45
|
+
/** Default page size for lists */
|
|
46
|
+
defaultPageSize: number;
|
|
47
|
+
/** Enable simplified navigation */
|
|
48
|
+
simplifiedNav: boolean;
|
|
49
|
+
/** Show help tooltips */
|
|
50
|
+
showHelpTooltips: boolean;
|
|
51
|
+
/** Enable accessibility announcements */
|
|
52
|
+
enableA11yAnnouncements: boolean;
|
|
53
|
+
/** Minimum touch target size (px) */
|
|
54
|
+
minTouchTarget: number;
|
|
55
|
+
/** Enable high contrast mode option */
|
|
56
|
+
enableHighContrast: boolean;
|
|
57
|
+
/** Show breadcrumbs */
|
|
58
|
+
showBreadcrumbs: boolean;
|
|
59
|
+
/** Enable step-by-step wizards */
|
|
60
|
+
enableWizards: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/** Portal light theme (direct MUI theme object) */
|
|
64
|
+
export declare const portalLightTheme: import("@mui/material").Theme;
|
|
65
|
+
/** Portal dark theme (direct MUI theme object) */
|
|
66
|
+
export declare const portalDarkTheme: import("@mui/material").Theme;
|
|
67
|
+
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/presets/portal.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA4B,kBAAkB,EAAe,MAAM,UAAU,CAAC;AAMrF;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB,kCAAkC;;IAGlC,mCAAmC;;IAGnC,yBAAyB;;IAGzB,yCAAyC;;IAGzC,qCAAqC;;IAGrC,uCAAuC;;IAGvC,uBAAuB;;IAGvB,kCAAkC;;CAEnC,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAgK9B,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAsE7B,CAAC;AAMH,oDAAoD;AACpD,eAAO,MAAM,YAAY;;;;QAtRvB,kCAAkC;;QAGlC,mCAAmC;;QAGnC,yBAAyB;;QAGzB,yCAAyC;;QAGzC,qCAAqC;;QAGrC,uCAAuC;;QAGvC,uBAAuB;;QAGvB,kCAAkC;;;CAqQnC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,+BAA0B,CAAC;AAExD,kDAAkD;AAClD,eAAO,MAAM,eAAe,+BAAyB,CAAC"}
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { createTheme, type ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
import { TrinityTokens } from './tokens';
|
|
3
|
+
/**
|
|
4
|
+
* Generate all CSS custom properties from tokens
|
|
5
|
+
* Returns a CSS string that can be injected into :root
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateCssVariables(tokenSet?: TrinityTokens): string;
|
|
8
|
+
/**
|
|
9
|
+
* Generate CSS variables string for dark mode overrides
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateDarkModeCssVariables(tokenSet?: TrinityTokens): string;
|
|
12
|
+
/**
|
|
13
|
+
* Returns a set of CSS custom properties for key Trinity tokens.
|
|
14
|
+
* Call this at runtime to inject variables into :root.
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectTrinityCssVariables(tokenSet?: TrinityTokens): void;
|
|
17
|
+
/**
|
|
18
|
+
* Inject dark mode CSS variables
|
|
19
|
+
* Adds a style block that applies dark mode overrides when [data-theme="dark"] or .dark-mode is present
|
|
20
|
+
*/
|
|
21
|
+
export declare function injectDarkModeCssVariables(tokenSet?: TrinityTokens): void;
|
|
22
|
+
/**
|
|
23
|
+
* Calculate contrast ratio between two hex colors (WCAG 2.1)
|
|
24
|
+
* @param fg - Foreground color (hex)
|
|
25
|
+
* @param bg - Background color (hex)
|
|
26
|
+
* @returns Contrast ratio (number)
|
|
27
|
+
*/
|
|
28
|
+
export declare function getContrastRatio(fg: string, bg: string): number;
|
|
29
|
+
/**
|
|
30
|
+
* Validate accessible color pairs and warn if not WCAG AA compliant.
|
|
31
|
+
* @param fg - Foreground color (hex)
|
|
32
|
+
* @param bg - Background color (hex)
|
|
33
|
+
* @param minRatio - Minimum contrast ratio (default 4.5)
|
|
34
|
+
*/
|
|
35
|
+
export declare function validateAccessibility(fg: string, bg: string, minRatio?: number): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Configuration options for creating a Trinity theme preset
|
|
38
|
+
*/
|
|
39
|
+
export interface TrinityThemePresetOptions {
|
|
40
|
+
/** Theme mode */
|
|
41
|
+
mode: 'light' | 'dark';
|
|
42
|
+
/** Optional name for the preset (for debugging) */
|
|
43
|
+
name?: string;
|
|
44
|
+
/** Token overrides - customize colors, spacing, etc. */
|
|
45
|
+
tokens?: Partial<TrinityTokens>;
|
|
46
|
+
/** MUI Palette overrides - extend or modify the color palette */
|
|
47
|
+
palette?: ThemeOptions['palette'];
|
|
48
|
+
/** MUI Component overrides - customize component styles/defaults */
|
|
49
|
+
components?: ThemeOptions['components'] | Record<string, unknown>;
|
|
50
|
+
/** Typography overrides */
|
|
51
|
+
typography?: ThemeOptions['typography'];
|
|
52
|
+
/** Shape overrides (border radius) */
|
|
53
|
+
shape?: ThemeOptions['shape'];
|
|
54
|
+
/** Custom configuration for app-specific settings */
|
|
55
|
+
config?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A Trinity theme preset with additional metadata
|
|
59
|
+
*/
|
|
60
|
+
export interface TrinityThemePreset {
|
|
61
|
+
/** The MUI theme object */
|
|
62
|
+
theme: ReturnType<typeof createTheme>;
|
|
63
|
+
/** Preset name */
|
|
64
|
+
name: string;
|
|
65
|
+
/** Theme mode */
|
|
66
|
+
mode: 'light' | 'dark';
|
|
67
|
+
/** Custom configuration passed to the preset */
|
|
68
|
+
config: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Factory to create a Trinity MUI theme preset with full customization.
|
|
72
|
+
* Use this for creating app-specific theme variations while maintaining Trinity branding.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* // CRM App Preset - compact tables, specific colors
|
|
77
|
+
* const crmPreset = createTrinityThemePreset({
|
|
78
|
+
* mode: 'light',
|
|
79
|
+
* name: 'CRM',
|
|
80
|
+
* palette: {
|
|
81
|
+
* tertiary: { main: '#8B5CF6' },
|
|
82
|
+
* },
|
|
83
|
+
* components: {
|
|
84
|
+
* MuiDataGrid: {
|
|
85
|
+
* defaultProps: { density: 'compact' },
|
|
86
|
+
* },
|
|
87
|
+
* },
|
|
88
|
+
* config: {
|
|
89
|
+
* defaultPageSize: 25,
|
|
90
|
+
* enableAI: true,
|
|
91
|
+
* },
|
|
92
|
+
* });
|
|
93
|
+
*
|
|
94
|
+
* // Use the theme
|
|
95
|
+
* <ThemeProvider theme={crmPreset.theme}>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function createTrinityThemePreset(options: TrinityThemePresetOptions): TrinityThemePreset;
|
|
99
|
+
/**
|
|
100
|
+
* Factory to create a Trinity MUI theme from tokens.
|
|
101
|
+
* For simple theme creation, use this function.
|
|
102
|
+
* For full preset customization, use createTrinityThemePreset instead.
|
|
103
|
+
*
|
|
104
|
+
* @param mode 'light' | 'dark'
|
|
105
|
+
* @param overrides Optional token overrides
|
|
106
|
+
*/
|
|
107
|
+
export declare function createTrinityTheme(mode: 'light' | 'dark', overrides?: Partial<TrinityTokens>): ReturnType<typeof createTheme>;
|
|
108
|
+
export { baseTokens, semanticTokens, componentTokens, darkModeTokens, tokens } from './tokens';
|
|
109
|
+
export { hierarchy, elevationHierarchy, typographicHierarchy, attentionHierarchy, scaleHierarchy, contrastHierarchy, interactiveHierarchy, spacingHierarchy, getElevation, getTypography, getAttentionColor, getHierarchySpacing, } from './tokens';
|
|
110
|
+
export declare const brandColors: {
|
|
111
|
+
primary: {
|
|
112
|
+
main: string;
|
|
113
|
+
light: string;
|
|
114
|
+
dark: string;
|
|
115
|
+
};
|
|
116
|
+
secondary: {
|
|
117
|
+
main: string;
|
|
118
|
+
light: string;
|
|
119
|
+
dark: string;
|
|
120
|
+
};
|
|
121
|
+
neutral: {
|
|
122
|
+
white: string;
|
|
123
|
+
lightGray: string;
|
|
124
|
+
gray100: string;
|
|
125
|
+
gray400: string;
|
|
126
|
+
gray500: string;
|
|
127
|
+
gray600: string;
|
|
128
|
+
darkBg: string;
|
|
129
|
+
darkPaper: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export declare const accessibleCombinations: {
|
|
133
|
+
whiteOnNavy: {
|
|
134
|
+
text: string;
|
|
135
|
+
bg: string;
|
|
136
|
+
};
|
|
137
|
+
whiteOnPurple: {
|
|
138
|
+
text: string;
|
|
139
|
+
bg: string;
|
|
140
|
+
};
|
|
141
|
+
navyOnWhite: {
|
|
142
|
+
text: string;
|
|
143
|
+
bg: string;
|
|
144
|
+
};
|
|
145
|
+
navyOnCoral: {
|
|
146
|
+
text: string;
|
|
147
|
+
bg: string;
|
|
148
|
+
};
|
|
149
|
+
navyOnAzure: {
|
|
150
|
+
text: string;
|
|
151
|
+
bg: string;
|
|
152
|
+
};
|
|
153
|
+
purpleOnWhite: {
|
|
154
|
+
text: string;
|
|
155
|
+
bg: string;
|
|
156
|
+
};
|
|
157
|
+
coralOnNavy: {
|
|
158
|
+
text: string;
|
|
159
|
+
bg: string;
|
|
160
|
+
};
|
|
161
|
+
azureOnNavy: {
|
|
162
|
+
text: string;
|
|
163
|
+
bg: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Trinity light theme (MUI Theme)
|
|
168
|
+
* @see createTrinityTheme
|
|
169
|
+
*/
|
|
170
|
+
export declare const lightTheme: import("@mui/material").Theme;
|
|
171
|
+
/**
|
|
172
|
+
* Trinity dark theme (MUI Theme)
|
|
173
|
+
* @see createTrinityTheme
|
|
174
|
+
*/
|
|
175
|
+
export declare const darkTheme: import("@mui/material").Theme;
|
|
176
|
+
export interface UseTrinityTokensResult {
|
|
177
|
+
/** All Trinity tokens */
|
|
178
|
+
tokens: TrinityTokens;
|
|
179
|
+
/** Base primitive tokens */
|
|
180
|
+
base: TrinityTokens['base'];
|
|
181
|
+
/** Semantic tokens */
|
|
182
|
+
semantic: TrinityTokens['semantic'];
|
|
183
|
+
/** Component-specific tokens */
|
|
184
|
+
component: TrinityTokens['component'];
|
|
185
|
+
/** Dark mode override tokens */
|
|
186
|
+
darkMode: TrinityTokens['darkMode'];
|
|
187
|
+
/** Current theme mode */
|
|
188
|
+
mode: 'light' | 'dark';
|
|
189
|
+
/** Whether dark mode is active */
|
|
190
|
+
isDarkMode: boolean;
|
|
191
|
+
/** Get the appropriate color value based on current mode */
|
|
192
|
+
getColor: <T extends string>(lightColor: T, darkColor?: T) => T;
|
|
193
|
+
/** Get semantic color with automatic dark mode handling */
|
|
194
|
+
getSemanticColor: (category: keyof TrinityTokens['semantic']['colors'], name: string) => string;
|
|
195
|
+
/** Helper to get spacing value in pixels */
|
|
196
|
+
spacing: (size: keyof TrinityTokens['base']['spacing']) => number;
|
|
197
|
+
/** Helper to get CSS spacing value */
|
|
198
|
+
spacingCss: (size: keyof TrinityTokens['base']['spacing']) => string;
|
|
199
|
+
/** Helper to get border radius */
|
|
200
|
+
radius: (size: keyof TrinityTokens['base']['borderRadius']) => number;
|
|
201
|
+
/** Helper to get shadow */
|
|
202
|
+
shadow: (size: keyof TrinityTokens['base']['shadows']) => string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* React hook to access Trinity design tokens with theme awareness.
|
|
206
|
+
* Provides typed access to all token layers and utility functions.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```tsx
|
|
210
|
+
* const { base, semantic, isDarkMode, spacing, getColor } = useTrinityTokens();
|
|
211
|
+
*
|
|
212
|
+
* <Box sx={{
|
|
213
|
+
* backgroundColor: getColor(semantic.colors.background.primary),
|
|
214
|
+
* padding: spacingCss(4),
|
|
215
|
+
* borderRadius: radius('md'),
|
|
216
|
+
* }} />
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
export declare function useTrinityTokens(): UseTrinityTokensResult;
|
|
220
|
+
export type { TrinityTokens } from './tokens';
|
|
221
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EACL,aAAa,EAOd,MAAM,UAAU,CAAC;AAwClB;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,GAAE,aAAsB,GAAG,MAAM,CA8B7E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,GAAE,aAAsB,GAAG,MAAM,CAgBrF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,GAAE,aAAsB,QAezE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,GAAE,aAAsB,QAwB1E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GA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