@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,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Badge component.
|
|
3
|
+
* @module components/StatusIndicator/Badge
|
|
4
|
+
* Status Indicator - Badge and Differential Components
|
|
5
|
+
* BadgeIndicator, DifferentialIndicator
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Badge } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <Badge
|
|
11
|
+
* >
|
|
12
|
+
* <div>Example content</div>
|
|
13
|
+
* </Badge>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { SxProps, Theme } from '@mui/material';
|
|
18
|
+
import { StatusType, StatusSize } from './types';
|
|
19
|
+
/**
|
|
20
|
+
* Props for BadgeIndicator component.
|
|
21
|
+
*/
|
|
22
|
+
export interface BadgeIndicatorProps {
|
|
23
|
+
/** The content to wrap with badge */
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
/** Number to display (max 999+) */
|
|
26
|
+
count?: number;
|
|
27
|
+
/** Whether to show dot instead of number */
|
|
28
|
+
dot?: boolean;
|
|
29
|
+
/** The status type for color */
|
|
30
|
+
status?: StatusType;
|
|
31
|
+
/** Max count before showing + */
|
|
32
|
+
max?: number;
|
|
33
|
+
/** Whether badge is visible */
|
|
34
|
+
invisible?: boolean;
|
|
35
|
+
/** Custom sx props */
|
|
36
|
+
sx?: SxProps<Theme>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Badge Indicator - Used when a count of new or updated items is available.
|
|
40
|
+
* Displays over an icon or other content.
|
|
41
|
+
*/
|
|
42
|
+
export declare const BadgeIndicator: React.FC<BadgeIndicatorProps>;
|
|
43
|
+
/**
|
|
44
|
+
* Props for DifferentialIndicator component.
|
|
45
|
+
*/
|
|
46
|
+
export interface DifferentialIndicatorProps {
|
|
47
|
+
/** The value (positive or negative) */
|
|
48
|
+
value: number;
|
|
49
|
+
/** Format as percentage */
|
|
50
|
+
percentage?: boolean;
|
|
51
|
+
/** Format as currency */
|
|
52
|
+
currency?: string;
|
|
53
|
+
/** Show arrow/caret icon */
|
|
54
|
+
showIcon?: boolean;
|
|
55
|
+
/** Size of the indicator */
|
|
56
|
+
size?: StatusSize;
|
|
57
|
+
/** Whether to show color */
|
|
58
|
+
showColor?: boolean;
|
|
59
|
+
/** Custom positive color */
|
|
60
|
+
positiveColor?: string;
|
|
61
|
+
/** Custom negative color */
|
|
62
|
+
negativeColor?: string;
|
|
63
|
+
/** Custom sx props */
|
|
64
|
+
sx?: SxProps<Theme>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Differential Indicator - Used for displaying positive or negative changes.
|
|
68
|
+
* Common in financial dashboards and data visualizations.
|
|
69
|
+
*/
|
|
70
|
+
export declare const DifferentialIndicator: React.FC<DifferentialIndicatorProps>;
|
|
71
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/Badge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAwC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAM7E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,gCAAgC;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgCxD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAkDtE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Chip component.
|
|
3
|
+
* @module components/StatusIndicator/Chip
|
|
4
|
+
* Status Indicator - Chip and Inline Components
|
|
5
|
+
* StatusChip, InlineStatus
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Chip } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <Chip
|
|
11
|
+
* status={undefined as never}
|
|
12
|
+
* />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { SxProps, Theme } from '@mui/material';
|
|
17
|
+
import { StatusType, StatusSize } from './types';
|
|
18
|
+
/**
|
|
19
|
+
* Props for StatusChip component.
|
|
20
|
+
*/
|
|
21
|
+
export interface StatusChipProps {
|
|
22
|
+
/** The status type */
|
|
23
|
+
status: StatusType;
|
|
24
|
+
/** Optional custom label (overrides default) */
|
|
25
|
+
label?: string;
|
|
26
|
+
/** Size of the chip */
|
|
27
|
+
size?: 'small' | 'medium';
|
|
28
|
+
/** Whether to show icon */
|
|
29
|
+
showIcon?: boolean;
|
|
30
|
+
/** Click handler */
|
|
31
|
+
onClick?: () => void;
|
|
32
|
+
/** Delete handler */
|
|
33
|
+
onDelete?: () => void;
|
|
34
|
+
/** Custom sx props */
|
|
35
|
+
sx?: SxProps<Theme>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Status Chip - A compact status indicator using MUI Chip component.
|
|
39
|
+
* Useful for tags, filters, and inline status labels.
|
|
40
|
+
*/
|
|
41
|
+
export declare const StatusChip: React.FC<StatusChipProps>;
|
|
42
|
+
/**
|
|
43
|
+
* Props for InlineStatus component.
|
|
44
|
+
*/
|
|
45
|
+
export interface InlineStatusProps {
|
|
46
|
+
/** The status type */
|
|
47
|
+
status: StatusType;
|
|
48
|
+
/** Optional custom label (overrides default) */
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Whether to show dot */
|
|
51
|
+
showDot?: boolean;
|
|
52
|
+
/** Whether to show icon */
|
|
53
|
+
showIcon?: boolean;
|
|
54
|
+
/** Size */
|
|
55
|
+
size?: StatusSize;
|
|
56
|
+
/** Custom sx props */
|
|
57
|
+
sx?: SxProps<Theme>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Inline Status - A text-based status indicator with optional dot/icon.
|
|
61
|
+
* Useful for status in tables and lists.
|
|
62
|
+
*/
|
|
63
|
+
export declare const InlineStatus: React.FC<InlineStatusProps>;
|
|
64
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/Chip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA2B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAO7E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqChD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW;IACX,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAkCpD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Indicators component.
|
|
3
|
+
* @module components/StatusIndicator/Indicators
|
|
4
|
+
* Status Indicator - Core Indicator Components
|
|
5
|
+
* IconIndicator, ShapeIndicator, StatusDot
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Indicators } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <Indicators
|
|
11
|
+
* status={undefined as never}
|
|
12
|
+
* />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { SxProps, Theme } from '@mui/material';
|
|
17
|
+
import { StatusType, StatusSize, StatusShape } from './types';
|
|
18
|
+
/**
|
|
19
|
+
* Props for IconIndicator component.
|
|
20
|
+
*/
|
|
21
|
+
export interface IconIndicatorProps {
|
|
22
|
+
/** The status type */
|
|
23
|
+
status: StatusType;
|
|
24
|
+
/** Size of the indicator */
|
|
25
|
+
size?: StatusSize;
|
|
26
|
+
/** Optional custom label (overrides default) */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Whether to show the label */
|
|
29
|
+
showLabel?: boolean;
|
|
30
|
+
/** Whether to show only the icon without background */
|
|
31
|
+
iconOnly?: boolean;
|
|
32
|
+
/** Custom sx props */
|
|
33
|
+
sx?: SxProps<Theme>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Icon Indicator - Used when the layout offers ample space and the content requires maximum attention.
|
|
37
|
+
* Consists of an icon, a shape, a meaningful color, and a descriptive label.
|
|
38
|
+
*/
|
|
39
|
+
export declare const IconIndicator: React.FC<IconIndicatorProps>;
|
|
40
|
+
/**
|
|
41
|
+
* Props for ShapeIndicator component.
|
|
42
|
+
*/
|
|
43
|
+
export interface ShapeIndicatorProps {
|
|
44
|
+
/** The status type */
|
|
45
|
+
status: StatusType;
|
|
46
|
+
/** Override the default shape */
|
|
47
|
+
shape?: StatusShape;
|
|
48
|
+
/** Size of the indicator */
|
|
49
|
+
size?: StatusSize;
|
|
50
|
+
/** Optional custom label (overrides default) */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Whether to show the label */
|
|
53
|
+
showLabel?: boolean;
|
|
54
|
+
/** Whether to show outline (recommended for light colors) */
|
|
55
|
+
showOutline?: boolean;
|
|
56
|
+
/** Custom sx props */
|
|
57
|
+
sx?: SxProps<Theme>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Shape Indicator - Useful in smaller spaces or when users need to scan large amounts of data.
|
|
61
|
+
* Uses shape and color to convey status without relying on symbols.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ShapeIndicator: React.FC<ShapeIndicatorProps>;
|
|
64
|
+
/**
|
|
65
|
+
* Props for StatusDot component.
|
|
66
|
+
*/
|
|
67
|
+
export interface StatusDotProps {
|
|
68
|
+
/** The status type */
|
|
69
|
+
status: StatusType;
|
|
70
|
+
/** Size of the dot */
|
|
71
|
+
size?: StatusSize;
|
|
72
|
+
/** Whether to pulse/animate */
|
|
73
|
+
pulse?: boolean;
|
|
74
|
+
/** Custom sx props */
|
|
75
|
+
sx?: SxProps<Theme>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Status Dot - A minimal status indicator, useful for inline status display.
|
|
79
|
+
*/
|
|
80
|
+
export declare const StatusDot: React.FC<StatusDotProps>;
|
|
81
|
+
//# sourceMappingURL=Indicators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Indicators.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/Indicators.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAA8B,MAAM,SAAS,CAAC;AAQ1F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoDtD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,iCAAiC;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6BxD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,sBAAsB;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA4B9C,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Legend component.
|
|
3
|
+
* @module components/StatusIndicator/Legend
|
|
4
|
+
* Status Indicator - Legend Component
|
|
5
|
+
* StatusLegend for dashboards and charts
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Legend } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <Legend
|
|
11
|
+
* items={[]}
|
|
12
|
+
* />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { SxProps, Theme } from '@mui/material';
|
|
17
|
+
import { StatusType, StatusSize } from './types';
|
|
18
|
+
export interface StatusLegendItem {
|
|
19
|
+
status: StatusType;
|
|
20
|
+
label?: string;
|
|
21
|
+
count?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for StatusLegend component.
|
|
25
|
+
*/
|
|
26
|
+
export interface StatusLegendProps {
|
|
27
|
+
/** Items to display in legend */
|
|
28
|
+
items: StatusLegendItem[];
|
|
29
|
+
/** Variant: icon or shape */
|
|
30
|
+
variant?: 'icon' | 'shape' | 'dot';
|
|
31
|
+
/** Layout direction */
|
|
32
|
+
direction?: 'row' | 'column';
|
|
33
|
+
/** Size */
|
|
34
|
+
size?: StatusSize;
|
|
35
|
+
/** Custom sx props */
|
|
36
|
+
sx?: SxProps<Theme>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Status Legend - A collection of status indicators for use in dashboards and charts.
|
|
40
|
+
*/
|
|
41
|
+
export declare const StatusLegend: React.FC<StatusLegendProps>;
|
|
42
|
+
//# sourceMappingURL=Legend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/Legend.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,UAAU,EAA8B,MAAM,SAAS,CAAC;AAS7E,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IACnC,uBAAuB;IACvB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,WAAW;IACX,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sBAAsB;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAMD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwEpD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Shapes component.
|
|
3
|
+
* @module components/StatusIndicator/Shapes
|
|
4
|
+
* Status Indicator - Shape Components
|
|
5
|
+
* SVG shape components for different status shapes
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Shapes } from '@trinityui/design-system';
|
|
9
|
+
*
|
|
10
|
+
* <Shapes
|
|
11
|
+
* size={0}
|
|
12
|
+
* color="Example"
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { StatusShape } from './types';
|
|
18
|
+
/**
|
|
19
|
+
* Props for Shape component.
|
|
20
|
+
*/
|
|
21
|
+
export interface ShapeProps {
|
|
22
|
+
size: number;
|
|
23
|
+
color: string;
|
|
24
|
+
outline?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const CircleShape: React.FC<ShapeProps>;
|
|
27
|
+
export declare const SquareShape: React.FC<ShapeProps>;
|
|
28
|
+
export declare const DiamondShape: React.FC<ShapeProps>;
|
|
29
|
+
export declare const TriangleShape: React.FC<ShapeProps>;
|
|
30
|
+
export declare const HexagonShape: React.FC<ShapeProps>;
|
|
31
|
+
export declare const ShapeComponents: Record<StatusShape, React.FC<ShapeProps>>;
|
|
32
|
+
//# sourceMappingURL=Shapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shapes.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/Shapes.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAI5C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAI5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAQ7C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAQ9C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAO7C,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,CAMrE,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview StatusIndicator component.
|
|
3
|
+
* @module components/StatusIndicator/StatusIndicator
|
|
4
|
+
* StatusIndicator - Unified Polymorphic Status Component
|
|
5
|
+
*
|
|
6
|
+
* A single, flexible status indicator that can render in multiple variants.
|
|
7
|
+
* Consolidates: IconIndicator, ShapeIndicator, StatusDot, StatusChip, InlineStatus,
|
|
8
|
+
* BadgeIndicator, DifferentialIndicator into one component.
|
|
9
|
+
*
|
|
10
|
+
* @version 2.0.0
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { StatusIndicator } from '@trinityui/design-system';
|
|
14
|
+
*
|
|
15
|
+
* <StatusIndicator />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { SxProps, Theme } from '@mui/material';
|
|
20
|
+
import { StatusType, StatusSize, StatusShape } from './types';
|
|
21
|
+
/**
|
|
22
|
+
* Available display variants for the StatusIndicator
|
|
23
|
+
*
|
|
24
|
+
* - `icon`: Icon with circular background and optional label
|
|
25
|
+
* - `shape`: Geometric shape (circle, square, diamond, triangle, hexagon) with label
|
|
26
|
+
* - `dot`: Minimal colored dot, optionally with pulse animation
|
|
27
|
+
* - `chip`: MUI Chip-based status tag
|
|
28
|
+
* - `inline`: Text label with optional dot/icon prefix
|
|
29
|
+
* - `badge`: Wraps children with a notification badge
|
|
30
|
+
* - `differential`: Shows positive/negative value changes
|
|
31
|
+
*/
|
|
32
|
+
export type StatusVariant = 'icon' | 'shape' | 'dot' | 'chip' | 'inline' | 'badge' | 'differential';
|
|
33
|
+
/**
|
|
34
|
+
* Base props shared across all variants
|
|
35
|
+
*/
|
|
36
|
+
interface BaseStatusProps {
|
|
37
|
+
/** Visual variant of the indicator */
|
|
38
|
+
variant?: StatusVariant;
|
|
39
|
+
/** The semantic status type - determines color, icon, and default label */
|
|
40
|
+
status?: StatusType;
|
|
41
|
+
/** Size of the indicator */
|
|
42
|
+
size?: StatusSize;
|
|
43
|
+
/** Custom label (overrides status default) */
|
|
44
|
+
label?: string;
|
|
45
|
+
/** Whether to show the label text */
|
|
46
|
+
showLabel?: boolean;
|
|
47
|
+
/** Custom MUI sx props */
|
|
48
|
+
sx?: SxProps<Theme>;
|
|
49
|
+
/** Accessible label for screen readers */
|
|
50
|
+
'aria-label'?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props specific to 'icon' variant
|
|
54
|
+
*/
|
|
55
|
+
interface IconVariantProps {
|
|
56
|
+
variant: 'icon';
|
|
57
|
+
/** Show only the icon without background shape */
|
|
58
|
+
iconOnly?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Props specific to 'shape' variant
|
|
62
|
+
*/
|
|
63
|
+
interface ShapeVariantProps {
|
|
64
|
+
variant: 'shape';
|
|
65
|
+
/** Override the default shape for the status */
|
|
66
|
+
shape?: StatusShape;
|
|
67
|
+
/** Show outline around shape (recommended for light colors) */
|
|
68
|
+
showOutline?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Props specific to 'dot' variant
|
|
72
|
+
*/
|
|
73
|
+
interface DotVariantProps {
|
|
74
|
+
variant: 'dot';
|
|
75
|
+
/** Enable pulsing animation */
|
|
76
|
+
pulse?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Props specific to 'chip' variant
|
|
80
|
+
*/
|
|
81
|
+
interface ChipVariantProps {
|
|
82
|
+
variant: 'chip';
|
|
83
|
+
/** Show icon in chip */
|
|
84
|
+
showIcon?: boolean;
|
|
85
|
+
/** Chip click handler */
|
|
86
|
+
onClick?: () => void;
|
|
87
|
+
/** Chip delete handler */
|
|
88
|
+
onDelete?: () => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Props specific to 'inline' variant
|
|
92
|
+
*/
|
|
93
|
+
interface InlineVariantProps {
|
|
94
|
+
variant: 'inline';
|
|
95
|
+
/** Show colored dot before label */
|
|
96
|
+
showDot?: boolean;
|
|
97
|
+
/** Show icon before label (mutually exclusive with showDot) */
|
|
98
|
+
showIcon?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Props specific to 'badge' variant
|
|
102
|
+
*/
|
|
103
|
+
interface BadgeVariantProps {
|
|
104
|
+
variant: 'badge';
|
|
105
|
+
/** Content to wrap with badge */
|
|
106
|
+
children: React.ReactNode;
|
|
107
|
+
/** Badge count (0-999+) */
|
|
108
|
+
count?: number;
|
|
109
|
+
/** Show dot instead of count */
|
|
110
|
+
dot?: boolean;
|
|
111
|
+
/** Maximum count before showing + */
|
|
112
|
+
max?: number;
|
|
113
|
+
/** Hide the badge */
|
|
114
|
+
invisible?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Props specific to 'differential' variant
|
|
118
|
+
*/
|
|
119
|
+
interface DifferentialVariantProps {
|
|
120
|
+
variant: 'differential';
|
|
121
|
+
/** The numeric value (positive or negative) */
|
|
122
|
+
value: number;
|
|
123
|
+
/** Format as percentage */
|
|
124
|
+
percentage?: boolean;
|
|
125
|
+
/** Format with currency symbol */
|
|
126
|
+
currency?: string;
|
|
127
|
+
/** Show trending arrow icon */
|
|
128
|
+
showIcon?: boolean;
|
|
129
|
+
/** Show color based on positive/negative */
|
|
130
|
+
showColor?: boolean;
|
|
131
|
+
/** Custom color for positive values */
|
|
132
|
+
positiveColor?: string;
|
|
133
|
+
/** Custom color for negative values */
|
|
134
|
+
negativeColor?: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Default variant props (when variant is omitted or 'icon')
|
|
138
|
+
*/
|
|
139
|
+
interface DefaultVariantProps {
|
|
140
|
+
variant?: undefined;
|
|
141
|
+
iconOnly?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Union type of all StatusIndicator props
|
|
145
|
+
*/
|
|
146
|
+
export type StatusIndicatorProps = BaseStatusProps & (IconVariantProps | ShapeVariantProps | DotVariantProps | ChipVariantProps | InlineVariantProps | BadgeVariantProps | DifferentialVariantProps | DefaultVariantProps);
|
|
147
|
+
/**
|
|
148
|
+
* StatusIndicator - A unified, polymorphic status indicator component.
|
|
149
|
+
*
|
|
150
|
+
* Renders different visual representations based on the `variant` prop:
|
|
151
|
+
* - `icon`: Icon with background (default)
|
|
152
|
+
* - `shape`: Geometric shape indicator
|
|
153
|
+
* - `dot`: Minimal colored dot
|
|
154
|
+
* - `chip`: Tag-style chip
|
|
155
|
+
* - `inline`: Text with dot/icon prefix
|
|
156
|
+
* - `badge`: Notification badge wrapper
|
|
157
|
+
* - `differential`: Positive/negative value indicator
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* // Basic icon indicator
|
|
161
|
+
* <StatusIndicator status="success" />
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* // Chip variant
|
|
165
|
+
* <StatusIndicator variant="chip" status="warning" label="Pending Review" />
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* // Dot with pulse animation
|
|
169
|
+
* <StatusIndicator variant="dot" status="running" pulse />
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* // Badge wrapping an icon
|
|
173
|
+
* <StatusIndicator variant="badge" status="error" count={5}>
|
|
174
|
+
* <NotificationsIcon />
|
|
175
|
+
* </StatusIndicator>
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* // Differential value
|
|
179
|
+
* <StatusIndicator variant="differential" value={12.5} percentage />
|
|
180
|
+
*/
|
|
181
|
+
export declare const StatusIndicator: React.FC<StatusIndicatorProps>;
|
|
182
|
+
export default StatusIndicator;
|
|
183
|
+
//# sourceMappingURL=StatusIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/StatusIndicator.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Status Indicator Module
|
|
4
|
+
* Internal barrel file for status indicator components.
|
|
5
|
+
*
|
|
6
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
7
|
+
* This file is for internal workspace use only.
|
|
8
|
+
*
|
|
9
|
+
* @module StatusIndicator
|
|
10
|
+
* @version 2.0.0
|
|
11
|
+
*/
|
|
12
|
+
export { StatusIndicator, default as StatusIndicatorDefault, type StatusIndicatorProps, type StatusVariant, } from './StatusIndicator';
|
|
13
|
+
export { type StatusType, type SeverityLevel, type StatusShape, type StatusSize, type StatusConfig, } from './types';
|
|
14
|
+
/** @internal */
|
|
15
|
+
export { statusConfigs } from './types';
|
|
16
|
+
/** @internal */
|
|
17
|
+
export { sizeConfigs } from './types';
|
|
18
|
+
/** @internal */
|
|
19
|
+
export { getStatusConfig } from './types';
|
|
20
|
+
/** @internal */
|
|
21
|
+
export { getAllStatusTypes } from './types';
|
|
22
|
+
/** @internal */
|
|
23
|
+
export { getStatusTypesBySeverity } from './types';
|
|
24
|
+
export { type ShapeProps } from './Shapes';
|
|
25
|
+
/** @internal */
|
|
26
|
+
export { CircleShape } from './Shapes';
|
|
27
|
+
/** @internal */
|
|
28
|
+
export { SquareShape } from './Shapes';
|
|
29
|
+
/** @internal */
|
|
30
|
+
export { DiamondShape } from './Shapes';
|
|
31
|
+
/** @internal */
|
|
32
|
+
export { TriangleShape } from './Shapes';
|
|
33
|
+
/** @internal */
|
|
34
|
+
export { HexagonShape } from './Shapes';
|
|
35
|
+
/** @internal */
|
|
36
|
+
export { ShapeComponents } from './Shapes';
|
|
37
|
+
/** @internal */
|
|
38
|
+
export { IconIndicator } from './Indicators';
|
|
39
|
+
/** @internal */
|
|
40
|
+
export { ShapeIndicator } from './Indicators';
|
|
41
|
+
/** @internal */
|
|
42
|
+
export { StatusDot } from './Indicators';
|
|
43
|
+
/** @internal */
|
|
44
|
+
export { StatusChip } from './Chip';
|
|
45
|
+
/** @internal */
|
|
46
|
+
export { InlineStatus } from './Chip';
|
|
47
|
+
/** @internal */
|
|
48
|
+
export { BadgeIndicator } from './Badge';
|
|
49
|
+
/** @internal */
|
|
50
|
+
export { DifferentialIndicator } from './Badge';
|
|
51
|
+
export type { IconIndicatorProps, ShapeIndicatorProps, StatusDotProps } from './Indicators';
|
|
52
|
+
export type { StatusChipProps, InlineStatusProps } from './Chip';
|
|
53
|
+
export type { BadgeIndicatorProps, DifferentialIndicatorProps } from './Badge';
|
|
54
|
+
export { StatusLegend, type StatusLegendItem, type StatusLegendProps, } from './Legend';
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EACL,eAAe,EACf,OAAO,IAAI,sBAAsB,EACjC,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AAGjB,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,gBAAgB;AAChB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,gBAAgB;AAChB,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,gBAAgB;AAChB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO3C,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,gBAAgB;AAChB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,gBAAgB;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,gBAAgB;AAChB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,gBAAgB;AAChB,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAK/E,OAAO,EACL,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Indicator - Types and Configuration
|
|
3
|
+
* Centralized type definitions and status configs
|
|
4
|
+
*/
|
|
5
|
+
export type StatusType = 'error' | 'critical' | 'failed' | 'rejected' | 'cancelled' | 'warning' | 'caution' | 'pending' | 'in-progress' | 'running' | 'success' | 'complete' | 'approved' | 'active' | 'enabled' | 'info' | 'new' | 'updated' | 'draft' | 'inactive' | 'disabled' | 'unknown' | 'beta' | 'experimental';
|
|
6
|
+
export type SeverityLevel = 'high' | 'medium' | 'low' | 'info' | 'neutral';
|
|
7
|
+
export type StatusShape = 'circle' | 'square' | 'diamond' | 'triangle' | 'hexagon';
|
|
8
|
+
export type StatusSize = 'small' | 'medium' | 'large';
|
|
9
|
+
export interface StatusConfig {
|
|
10
|
+
color: string;
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
outlineColor?: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
shape: StatusShape;
|
|
15
|
+
severity: SeverityLevel;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const statusConfigs: Record<StatusType, StatusConfig>;
|
|
19
|
+
export declare const sizeConfigs: Record<StatusSize, {
|
|
20
|
+
icon: number;
|
|
21
|
+
shape: number;
|
|
22
|
+
fontSize: string;
|
|
23
|
+
dotSize: number;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the configuration for a status type
|
|
27
|
+
*/
|
|
28
|
+
export declare const getStatusConfig: (status: StatusType) => StatusConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Get all available status types
|
|
31
|
+
*/
|
|
32
|
+
export declare const getAllStatusTypes: () => StatusType[];
|
|
33
|
+
/**
|
|
34
|
+
* Get status types by severity level
|
|
35
|
+
*/
|
|
36
|
+
export declare const getStatusTypesBySeverity: (severity: SeverityLevel) => StatusType[];
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/StatusIndicator/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,MAAM,UAAU,GAElB,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,WAAW,GAEX,SAAS,GACT,SAAS,GACT,SAAS,GACT,aAAa,GACb,SAAS,GAET,SAAS,GACT,UAAU,GACV,UAAU,GACV,QAAQ,GACR,SAAS,GAET,MAAM,GACN,KAAK,GACL,SAAS,GAET,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,GAET,MAAM,GACN,cAAc,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3E,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEnF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAMtD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CA+M1D,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAI9G,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,UAAU,KAAG,YAAqC,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO,UAAU,EAAgD,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAU,aAAa,KAAG,UAAU,EAI5E,CAAC"}
|