@trinityui/design-system 2.11.0 → 2.13.0
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 +2209 -0
- package/CONTRIBUTING.md +180 -69
- package/LICENSE +21 -0
- package/MIGRATION.md +523 -21
- package/README.md +281 -120
- package/dist/IllustratedMessage.js +546 -1341
- package/dist/accessibility.d.ts +596 -18
- package/dist/accessibility.d.ts.map +1 -1
- package/dist/accessibility.js +458 -0
- package/dist/app-shell.js +17230 -9097
- package/dist/assets/index.d.ts +1 -1
- package/dist/charts.js +8507 -6059
- package/dist/color-contrast.d.ts +35 -0
- package/dist/color-contrast.d.ts.map +1 -0
- package/dist/commonjs-helpers.js +8 -0
- package/dist/component-color-references.d.ts +175 -0
- package/dist/component-color-references.d.ts.map +1 -0
- package/dist/components/AI/AIActions.d.ts +72 -12
- package/dist/components/AI/AIActions.d.ts.map +1 -1
- package/dist/components/AI/AIAvatar.d.ts +31 -3
- package/dist/components/AI/AIAvatar.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.d.ts +192 -72
- package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.types.d.ts +296 -34
- package/dist/components/AI/AIChainOfThought.types.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.utils.d.ts +25 -7
- package/dist/components/AI/AIChainOfThought.utils.d.ts.map +1 -1
- package/dist/components/AI/AIChat.d.ts +12 -0
- package/dist/components/AI/AIChat.d.ts.map +1 -1
- package/dist/components/AI/AIChatWelcome.d.ts +254 -0
- package/dist/components/AI/AIChatWelcome.d.ts.map +1 -0
- package/dist/components/AI/AIClarificationPrompt.d.ts +134 -0
- package/dist/components/AI/AIClarificationPrompt.d.ts.map +1 -0
- package/dist/components/AI/AIConfidenceBadge.d.ts +117 -0
- package/dist/components/AI/AIConfidenceBadge.d.ts.map +1 -0
- package/dist/components/AI/AIConfigContext.d.ts +100 -0
- package/dist/components/AI/AIConfigContext.d.ts.map +1 -0
- package/dist/components/AI/AIConfigProvider.d.ts +66 -0
- package/dist/components/AI/AIConfigProvider.d.ts.map +1 -0
- package/dist/components/AI/AIContainer.d.ts +80 -11
- package/dist/components/AI/AIContainer.d.ts.map +1 -1
- package/dist/components/AI/AIExplainability.d.ts +39 -5
- package/dist/components/AI/AIExplainability.d.ts.map +1 -1
- package/dist/components/AI/AIFeedbackControl.d.ts +113 -0
- package/dist/components/AI/AIFeedbackControl.d.ts.map +1 -0
- package/dist/components/AI/AIFeedbackForm.d.ts +117 -0
- package/dist/components/AI/AIFeedbackForm.d.ts.map +1 -0
- package/dist/components/AI/AIFeedbackHostContext.d.ts +16 -0
- package/dist/components/AI/AIFeedbackHostContext.d.ts.map +1 -0
- package/dist/components/AI/AILabel.d.ts +39 -6
- package/dist/components/AI/AILabel.d.ts.map +1 -1
- package/dist/components/AI/AIMessage.d.ts +337 -42
- package/dist/components/AI/AIMessage.d.ts.map +1 -1
- package/dist/components/AI/AIPlanReview.d.ts +194 -0
- package/dist/components/AI/AIPlanReview.d.ts.map +1 -0
- package/dist/components/AI/AIQueryDisclosure.d.ts +119 -0
- package/dist/components/AI/AIQueryDisclosure.d.ts.map +1 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts +50 -11
- package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -1
- package/dist/components/AI/AIResponseRenderer.d.ts +133 -21
- package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -1
- package/dist/components/AI/AIResponseSourcesContext.d.ts +83 -0
- package/dist/components/AI/AIResponseSourcesContext.d.ts.map +1 -0
- package/dist/components/AI/AIReviewItem.d.ts +142 -0
- package/dist/components/AI/AIReviewItem.d.ts.map +1 -0
- package/dist/components/AI/AISourceChip.d.ts +135 -0
- package/dist/components/AI/AISourceChip.d.ts.map +1 -0
- package/dist/components/AI/AISources.d.ts +91 -13
- package/dist/components/AI/AISources.d.ts.map +1 -1
- package/dist/components/AI/AISourcesPanel.d.ts +43 -7
- package/dist/components/AI/AISourcesPanel.d.ts.map +1 -1
- package/dist/components/AI/AITextBlock.d.ts +107 -17
- package/dist/components/AI/AITextBlock.d.ts.map +1 -1
- package/dist/components/AI/AITextBlock.parser.d.ts +153 -0
- package/dist/components/AI/AITextBlock.parser.d.ts.map +1 -0
- package/dist/components/AI/AIVerificationBadge.d.ts +94 -0
- package/dist/components/AI/AIVerificationBadge.d.ts.map +1 -0
- package/dist/components/AI/AIVisuals.d.ts +92 -23
- package/dist/components/AI/AIVisuals.d.ts.map +1 -1
- package/dist/components/AI/AIVoiceInput.d.ts +42 -11
- package/dist/components/AI/AIVoiceInput.d.ts.map +1 -1
- package/dist/components/AI/AIVoiceMode.d.ts +16 -2
- package/dist/components/AI/AIVoiceMode.d.ts.map +1 -1
- package/dist/components/AI/BlockErrorBoundary.d.ts +77 -0
- package/dist/components/AI/BlockErrorBoundary.d.ts.map +1 -0
- package/dist/components/AI/ChatHeader.d.ts +41 -4
- package/dist/components/AI/ChatHeader.d.ts.map +1 -1
- package/dist/components/AI/ChatHistoryList.d.ts +25 -12
- package/dist/components/AI/ChatHistoryList.d.ts.map +1 -1
- package/dist/components/AI/ChatThread.d.ts +263 -13
- package/dist/components/AI/ChatThread.d.ts.map +1 -1
- package/dist/components/AI/InThreadContext.d.ts +14 -0
- package/dist/components/AI/InThreadContext.d.ts.map +1 -0
- package/dist/components/AI/InsightEngine.d.ts +270 -46
- package/dist/components/AI/InsightEngine.d.ts.map +1 -1
- package/dist/components/AI/InsightEngineInput.d.ts +52 -5
- package/dist/components/AI/InsightEngineInput.d.ts.map +1 -1
- package/dist/components/AI/MessageActionButton.d.ts +72 -0
- package/dist/components/AI/MessageActionButton.d.ts.map +1 -0
- package/dist/components/AI/QueryInput.d.ts.map +1 -1
- package/dist/components/AI/UserAvatar.d.ts +50 -4
- package/dist/components/AI/UserAvatar.d.ts.map +1 -1
- package/dist/components/AI/UserMessage.d.ts +32 -3
- package/dist/components/AI/UserMessage.d.ts.map +1 -1
- package/dist/components/AI/blockRendererContext.d.ts +64 -0
- package/dist/components/AI/blockRendererContext.d.ts.map +1 -0
- package/dist/components/AI/hitlBlockRenderers.d.ts +48 -0
- package/dist/components/AI/hitlBlockRenderers.d.ts.map +1 -0
- package/dist/components/AI/index.d.ts +23 -6
- package/dist/components/AI/index.d.ts.map +1 -1
- package/dist/components/AI/moleculeBlockRenderers.d.ts +15 -0
- package/dist/components/AI/moleculeBlockRenderers.d.ts.map +1 -0
- package/dist/components/AI/planReviewBlockRenderer.d.ts +8 -0
- package/dist/components/AI/planReviewBlockRenderer.d.ts.map +1 -0
- package/dist/components/AI/strings/defaults.d.ts +31 -0
- package/dist/components/AI/strings/defaults.d.ts.map +1 -0
- package/dist/components/AI/tokens.d.ts +185 -20
- package/dist/components/AI/tokens.d.ts.map +1 -1
- package/dist/components/AI/types/hitl.d.ts +2294 -0
- package/dist/components/AI/types/hitl.d.ts.map +1 -0
- package/dist/components/AI/types/index.d.ts +2 -1
- package/dist/components/AI/types/index.d.ts.map +1 -1
- package/dist/components/AI/types/response.d.ts +428 -40
- package/dist/components/AI/types/response.d.ts.map +1 -1
- package/dist/components/AI/useBlockSources.d.ts +67 -0
- package/dist/components/AI/useBlockSources.d.ts.map +1 -0
- package/dist/components/AI/useBrowserVoiceMode.d.ts +31 -2
- package/dist/components/AI/useBrowserVoiceMode.d.ts.map +1 -1
- package/dist/components/AI/useWelcomeComposerHandoff.d.ts +30 -0
- package/dist/components/AI/useWelcomeComposerHandoff.d.ts.map +1 -0
- package/dist/components/AI/utils/alphaIndex.d.ts +19 -0
- package/dist/components/AI/utils/alphaIndex.d.ts.map +1 -0
- package/dist/components/AI/utils/blockReady.d.ts +54 -0
- package/dist/components/AI/utils/blockReady.d.ts.map +1 -0
- package/dist/components/AI/utils/blocks.d.ts +28 -0
- package/dist/components/AI/utils/blocks.d.ts.map +1 -0
- package/dist/components/AI/utils/confidence.d.ts +182 -0
- package/dist/components/AI/utils/confidence.d.ts.map +1 -0
- package/dist/components/AI/utils/filters.d.ts +31 -0
- package/dist/components/AI/utils/filters.d.ts.map +1 -0
- package/dist/components/AI/utils/responseText.d.ts +8 -0
- package/dist/components/AI/utils/responseText.d.ts.map +1 -0
- package/dist/components/AI/utils/sources.d.ts +110 -0
- package/dist/components/AI/utils/sources.d.ts.map +1 -0
- package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -1
- package/dist/components/AIDigestCard/types.d.ts +42 -5
- package/dist/components/AIDigestCard/types.d.ts.map +1 -1
- package/dist/components/AppLayout/AIFab.d.ts +33 -6
- package/dist/components/AppLayout/AIFab.d.ts.map +1 -1
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -1
- package/dist/components/AppLayout/AppLayout.d.ts +135 -7
- package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/components/AppLayout/InsightEnginePanel.d.ts +315 -21
- package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -1
- package/dist/components/AppLayout/ResizablePanel.d.ts +145 -8
- package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -1
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +6 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -1
- package/dist/components/AppLayout/index.d.ts +3 -3
- package/dist/components/AppLayout/index.d.ts.map +1 -1
- package/dist/components/AppLayout/insightEnginePanel.demo.d.ts +32 -0
- package/dist/components/AppLayout/insightEnginePanel.demo.d.ts.map +1 -0
- package/dist/components/AppLayout/panelPropsPath.d.ts +26 -0
- package/dist/components/AppLayout/panelPropsPath.d.ts.map +1 -0
- package/dist/components/AppLayout/panelResizeTransition.d.ts +49 -0
- package/dist/components/AppLayout/panelResizeTransition.d.ts.map +1 -0
- package/dist/components/AppLayout/toChatThreadMessage.d.ts +40 -0
- package/dist/components/AppLayout/toChatThreadMessage.d.ts.map +1 -0
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +5 -1
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -1
- package/dist/components/AuditDrawer/AuditDrawer.d.ts +4 -3
- package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -1
- package/dist/components/AuditDrawer/index.d.ts +1 -1
- package/dist/components/AuditDrawer/index.d.ts.map +1 -1
- package/dist/components/AuditDrawer/types.d.ts +39 -5
- package/dist/components/AuditDrawer/types.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +6 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +10 -2
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Charts/AreaChart.d.ts.map +1 -1
- package/dist/components/Charts/BarChart.d.ts.map +1 -1
- package/dist/components/Charts/ChartWrapper.d.ts.map +1 -1
- package/dist/components/Charts/ComposedChart.d.ts.map +1 -1
- package/dist/components/Charts/CustomLegend.d.ts +11 -2
- package/dist/components/Charts/CustomLegend.d.ts.map +1 -1
- package/dist/components/Charts/LineChart.d.ts.map +1 -1
- package/dist/components/Charts/PieChart.d.ts.map +1 -1
- package/dist/components/Charts/RadialChart.d.ts.map +1 -1
- package/dist/components/Charts/ScatterChart.d.ts.map +1 -1
- package/dist/components/Charts/Sparkline.d.ts.map +1 -1
- package/dist/components/Charts/gaugeGeometry.d.ts +35 -0
- package/dist/components/Charts/gaugeGeometry.d.ts.map +1 -0
- package/dist/components/Charts/highcharts.d.ts +23 -0
- package/dist/components/Charts/highcharts.d.ts.map +1 -0
- package/dist/components/Charts/highchartsUtils.d.ts +101 -6
- package/dist/components/Charts/highchartsUtils.d.ts.map +1 -1
- package/dist/components/Charts/index.d.ts +1 -1
- package/dist/components/Charts/index.d.ts.map +1 -1
- package/dist/components/Charts/tokens.d.ts +21 -0
- package/dist/components/Charts/tokens.d.ts.map +1 -1
- package/dist/components/Charts/types.d.ts +7 -7
- package/dist/components/Charts/types.d.ts.map +1 -1
- package/dist/components/ChipsInput/ChipsInput.d.ts.map +1 -1
- package/dist/components/ChoiceChips/ChoiceChips.d.ts +106 -0
- package/dist/components/ChoiceChips/ChoiceChips.d.ts.map +1 -0
- package/dist/components/ClearableTextField/ClearableTextField.d.ts +23 -2
- package/dist/components/ClearableTextField/ClearableTextField.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +80 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +3 -2
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.d.ts +54 -3
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.d.ts +80 -0
- package/dist/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/dist/components/DataCard/DataCard.d.ts +11 -1
- package/dist/components/DataCard/DataCard.d.ts.map +1 -1
- package/dist/components/DataTable/CellRenderers.d.ts +8 -11
- package/dist/components/DataTable/CellRenderers.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -1
- package/dist/components/DataTable/columnContext.d.ts +8 -0
- package/dist/components/DataTable/columnContext.d.ts.map +1 -0
- package/dist/components/DataTable/index.d.ts +2 -2
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/labels.d.ts +13 -0
- package/dist/components/DataTable/labels.d.ts.map +1 -0
- package/dist/components/DataTable/types.d.ts +34 -0
- package/dist/components/DataTable/types.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DetailsPopover/DetailsPopover.d.ts +185 -0
- package/dist/components/DetailsPopover/DetailsPopover.d.ts.map +1 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +3 -2
- package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -1
- package/dist/components/Disclosure/Disclosure.d.ts +83 -0
- package/dist/components/Disclosure/Disclosure.d.ts.map +1 -0
- package/dist/components/DockLayout/DockLayout.d.ts +58 -0
- package/dist/components/DockLayout/DockLayout.d.ts.map +1 -1
- package/dist/components/DockLayout/index.d.ts +1 -1
- package/dist/components/DockLayout/index.d.ts.map +1 -1
- package/dist/components/DocumentCard/DocumentCard.d.ts +5 -1
- package/dist/components/DocumentCard/DocumentCard.d.ts.map +1 -1
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +6 -2
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +141 -6
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/FilterBar/FilterBar.d.ts +27 -1
- package/dist/components/FilterBar/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar/index.d.ts +1 -1
- package/dist/components/FilterBar/index.d.ts.map +1 -1
- package/dist/components/FlowAutoLayout/useFlowAutoLayout.d.ts.map +1 -1
- package/dist/components/GanttView/GanttView.d.ts +24 -0
- package/dist/components/GanttView/GanttView.d.ts.map +1 -1
- package/dist/components/GanttView/types.d.ts +33 -7
- package/dist/components/GanttView/types.d.ts.map +1 -1
- package/dist/components/GaugeCard/GaugeCard.d.ts +4 -3
- package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -1
- package/dist/components/GaugeCard/geometry.d.ts +59 -0
- package/dist/components/GaugeCard/geometry.d.ts.map +1 -0
- package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -1
- package/dist/components/GeoStatusMap/types.d.ts +8 -5
- package/dist/components/GeoStatusMap/types.d.ts.map +1 -1
- package/dist/components/GoToTop/GoToTop.d.ts +1 -1
- package/dist/components/GoToTop/GoToTop.d.ts.map +1 -1
- package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -1
- package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -1
- package/dist/components/HtmlToMui/HtmlToMui.d.ts +32 -2
- package/dist/components/HtmlToMui/HtmlToMui.d.ts.map +1 -1
- package/dist/components/Icon.d.ts +567 -10
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/IllustratedMessage.d.ts +52 -3
- package/dist/components/IllustratedMessage.d.ts.map +1 -1
- package/dist/components/InlineEditableText/InlineEditableText.d.ts +117 -0
- package/dist/components/InlineEditableText/InlineEditableText.d.ts.map +1 -0
- package/dist/components/InsightCard/InsightCard.d.ts.map +1 -1
- package/dist/components/InsightCard/types.d.ts +10 -3
- package/dist/components/InsightCard/types.d.ts.map +1 -1
- package/dist/components/KeyValueList/KeyValueList.d.ts +94 -0
- package/dist/components/KeyValueList/KeyValueList.d.ts.map +1 -0
- package/dist/components/LandingPage/FeatureCard.d.ts +4 -0
- package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -1
- package/dist/components/LandingPage/LandingPage.d.ts +43 -4
- package/dist/components/LandingPage/LandingPage.d.ts.map +1 -1
- package/dist/components/LandingPage/heroTone.d.ts +54 -0
- package/dist/components/LandingPage/heroTone.d.ts.map +1 -0
- package/dist/components/MentionsInput/MentionsInput.d.ts.map +1 -1
- package/dist/components/MetaChip/MetaChip.d.ts +113 -0
- package/dist/components/MetaChip/MetaChip.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +222 -20
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/OrgChart/OrgChart.d.ts +5 -0
- package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
- package/dist/components/OrgChart/types.d.ts +31 -7
- package/dist/components/OrgChart/types.d.ts.map +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/PageTOC/PageTOC.d.ts +2 -1
- package/dist/components/PageTOC/PageTOC.d.ts.map +1 -1
- package/dist/components/Popper/Popper.d.ts +80 -9
- package/dist/components/Popper/Popper.d.ts.map +1 -1
- package/dist/components/Popper/index.d.ts +1 -1
- package/dist/components/Popper/index.d.ts.map +1 -1
- package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts +5 -1
- package/dist/components/PredictiveTextInput/PredictiveTextInput.d.ts.map +1 -1
- package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts +48 -4
- package/dist/components/SandboxedIframeRenderer/SandboxedIframeRenderer.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +49 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/SearchInput/index.d.ts +1 -1
- package/dist/components/SearchInput/index.d.ts.map +1 -1
- package/dist/components/SimpleTable/SimpleTable.d.ts +11 -2
- package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +2 -1
- package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
- package/dist/components/StatusHero/StatusHero.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Badge.d.ts +6 -1
- package/dist/components/StatusIndicator/Badge.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Chip.d.ts +3 -1
- package/dist/components/StatusIndicator/Chip.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Indicators.d.ts +5 -1
- package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -1
- package/dist/components/StatusIndicator/Legend.d.ts.map +1 -1
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +98 -4
- package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
- package/dist/components/StatusIndicator/index.d.ts +2 -2
- package/dist/components/StatusIndicator/index.d.ts.map +1 -1
- package/dist/components/StatusIndicator/types.d.ts +48 -1
- package/dist/components/StatusIndicator/types.d.ts.map +1 -1
- package/dist/components/StepList/StepList.d.ts +80 -0
- package/dist/components/StepList/StepList.d.ts.map +1 -0
- package/dist/components/StepList/StepStatusMarker.d.ts +39 -0
- package/dist/components/StepList/StepStatusMarker.d.ts.map +1 -0
- package/dist/components/StepList/stepStatus.d.ts +30 -0
- package/dist/components/StepList/stepStatus.d.ts.map +1 -0
- package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +57 -3
- package/dist/components/Timeline/Timeline.d.ts.map +1 -1
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/timelineLabels.d.ts +70 -0
- package/dist/components/Timeline/timelineLabels.d.ts.map +1 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/TopNavHeader.d.ts +6 -0
- package/dist/components/TopNavHeader.d.ts.map +1 -1
- package/dist/components/TopNavWithSidebar.d.ts +49 -1
- package/dist/components/TopNavWithSidebar.d.ts.map +1 -1
- package/dist/components/Tour/Tour.d.ts +18 -1
- package/dist/components/Tour/Tour.d.ts.map +1 -1
- package/dist/components/TransferList/TransferList.d.ts +123 -4
- package/dist/components/TransferList/TransferList.d.ts.map +1 -1
- package/dist/components/TransferList/index.d.ts +1 -1
- package/dist/components/TransferList/index.d.ts.map +1 -1
- package/dist/components/TreeView/TreeView.d.ts +97 -8
- package/dist/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/components/TreeView/index.d.ts +1 -1
- package/dist/components/TreeView/index.d.ts.map +1 -1
- package/dist/components/TrinityLoader.d.ts.map +1 -1
- package/dist/components/icons/featherExtensions.d.ts +55 -0
- package/dist/components/icons/featherExtensions.d.ts.map +1 -0
- package/dist/components/icons/materialExtensions.d.ts +20 -0
- package/dist/components/icons/materialExtensions.d.ts.map +1 -0
- package/dist/components/internal/index.d.ts +87 -0
- package/dist/components/internal/index.d.ts.map +1 -1
- package/dist/components/navigation/MenuListWithHeading.d.ts +33 -0
- package/dist/components/navigation/MenuListWithHeading.d.ts.map +1 -0
- package/dist/components/navigation/clientSelectorLabels.d.ts +13 -0
- package/dist/components/navigation/clientSelectorLabels.d.ts.map +1 -0
- package/dist/components/navigation/components.d.ts +6 -0
- package/dist/components/navigation/components.d.ts.map +1 -1
- package/dist/components/shared/AsyncOutcomeAlert.d.ts +91 -0
- package/dist/components/shared/AsyncOutcomeAlert.d.ts.map +1 -0
- package/dist/components/shared/TrinityIconSvg.d.ts.map +1 -1
- package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -1
- package/dist/components/shared/bidi.d.ts +44 -0
- package/dist/components/shared/bidi.d.ts.map +1 -0
- package/dist/components/shared/bidiText.d.ts +25 -0
- package/dist/components/shared/bidiText.d.ts.map +1 -0
- package/dist/components/shared/containerQueries.d.ts +73 -0
- package/dist/components/shared/containerQueries.d.ts.map +1 -0
- package/dist/components/shared/createStringsContext.d.ts +69 -0
- package/dist/components/shared/createStringsContext.d.ts.map +1 -0
- package/dist/components/shared/direction.d.ts +46 -0
- package/dist/components/shared/direction.d.ts.map +1 -0
- package/dist/components/shared/focusTrap.d.ts +36 -0
- package/dist/components/shared/focusTrap.d.ts.map +1 -0
- package/dist/components/shared/getInitials.d.ts +29 -0
- package/dist/components/shared/getInitials.d.ts.map +1 -0
- package/dist/components/shared/headingLevel.d.ts +69 -0
- package/dist/components/shared/headingLevel.d.ts.map +1 -0
- package/dist/components/shared/mergeSlotProps.d.ts +50 -0
- package/dist/components/shared/mergeSlotProps.d.ts.map +1 -0
- package/dist/components/shared/mergeSx.d.ts +26 -0
- package/dist/components/shared/mergeSx.d.ts.map +1 -0
- package/dist/components/shared/motion.d.ts +110 -0
- package/dist/components/shared/motion.d.ts.map +1 -0
- package/dist/components/shared/occurrenceKeys.d.ts +23 -0
- package/dist/components/shared/occurrenceKeys.d.ts.map +1 -0
- package/dist/components/shared/primaryAction.d.ts +89 -0
- package/dist/components/shared/primaryAction.d.ts.map +1 -0
- package/dist/components/shared/resizeKeyboard.d.ts +68 -0
- package/dist/components/shared/resizeKeyboard.d.ts.map +1 -0
- package/dist/components/shared/rootProps.d.ts +117 -0
- package/dist/components/shared/rootProps.d.ts.map +1 -0
- package/dist/components/shared/safeContent.d.ts +136 -0
- package/dist/components/shared/safeContent.d.ts.map +1 -0
- package/dist/components/shared/targetSize.d.ts +64 -0
- package/dist/components/shared/targetSize.d.ts.map +1 -0
- package/dist/components/shared/useContainerInlineSize.d.ts +43 -0
- package/dist/components/shared/useContainerInlineSize.d.ts.map +1 -0
- package/dist/components/shared/useCopyAction.d.ts +35 -0
- package/dist/components/shared/useCopyAction.d.ts.map +1 -0
- package/dist/components/shared/useOverflow.d.ts +44 -0
- package/dist/components/shared/useOverflow.d.ts.map +1 -0
- package/dist/components/shared/useResizable.d.ts +106 -7
- package/dist/components/shared/useResizable.d.ts.map +1 -1
- package/dist/components/shared/warnDeprecated.d.ts +89 -15
- package/dist/components/shared/warnDeprecated.d.ts.map +1 -1
- package/dist/components/shared/zIndexRoles.d.ts +62 -0
- package/dist/components/shared/zIndexRoles.d.ts.map +1 -0
- package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts +213 -0
- package/dist/components/templates/AIReviewQueue/AIReviewQueueTemplate.d.ts.map +1 -0
- package/dist/components/templates/AIReviewQueue/index.d.ts +2 -0
- package/dist/components/templates/AIReviewQueue/index.d.ts.map +1 -0
- package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -1
- package/dist/components/templates/Auth/types.d.ts +4 -1
- package/dist/components/templates/Auth/types.d.ts.map +1 -1
- package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -1
- package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -1
- package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -1
- package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +168 -10
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/index.d.ts +1 -1
- package/dist/components/templates/ListDetail/index.d.ts.map +1 -1
- package/dist/components/templates/ListDetail/listDetailLabels.d.ts +106 -0
- package/dist/components/templates/ListDetail/listDetailLabels.d.ts.map +1 -0
- package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -1
- package/dist/components/templates/Settings/SettingsTemplate.d.ts +0 -3
- package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -1
- package/dist/components/templates/Wizard/WizardTemplate.d.ts +4 -1
- package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -1
- package/dist/components/templates/index.d.ts +2 -1
- package/dist/components/templates/index.d.ts.map +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +1 -0
- package/dist/data-table2.js +13522 -13465
- package/dist/data.js +213 -194
- package/dist/elk.bundled.js +47371 -0
- package/dist/essentials.d.ts +3 -3
- package/dist/essentials.d.ts.map +1 -1
- package/dist/essentials.js +179 -147
- package/dist/focus-on-replace.js +49 -0
- package/dist/form.d.ts +26 -4
- package/dist/form.d.ts.map +1 -1
- package/dist/forms.js +575 -483
- package/dist/foundation.js +3704 -0
- package/dist/hooks/storageStore.d.ts +51 -0
- package/dist/hooks/storageStore.d.ts.map +1 -0
- package/dist/hooks/useAsyncAction.d.ts +65 -0
- package/dist/hooks/useAsyncAction.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.d.ts +190 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useFocusOnReplace.d.ts +95 -0
- package/dist/hooks/useFocusOnReplace.d.ts.map +1 -0
- package/dist/hooks/useTrinityPalette.d.ts +38 -40
- package/dist/hooks/useTrinityPalette.d.ts.map +1 -1
- package/dist/hooks.d.ts +44 -6
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +301 -0
- package/dist/index.d.ts +71 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13923 -60619
- package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts +203 -0
- package/dist/patterns/AICopilotPattern/AICopilotPattern.d.ts.map +1 -0
- package/dist/patterns/AICopilotPattern/index.d.ts +3 -0
- package/dist/patterns/AICopilotPattern/index.d.ts.map +1 -0
- package/dist/patterns/index.d.ts +15 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/presets/analytics.d.ts +8 -1
- package/dist/presets/analytics.d.ts.map +1 -1
- package/dist/presets/crm.d.ts +8 -1
- package/dist/presets/crm.d.ts.map +1 -1
- package/dist/presets/index.d.ts +1 -1
- package/dist/presets/portal.d.ts +8 -1
- package/dist/presets/portal.d.ts.map +1 -1
- package/dist/safe-content.js +792 -0
- package/dist/theme-augmentation.d.ts +388 -0
- package/dist/theme-augmentation.d.ts.map +1 -0
- package/dist/theme.d.ts +116 -30
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +891 -436
- package/dist/token-color.d.ts +14 -0
- package/dist/token-color.d.ts.map +1 -0
- package/dist/token-merge.d.ts +56 -0
- package/dist/token-merge.d.ts.map +1 -0
- package/dist/token-serialization.d.ts +65 -0
- package/dist/token-serialization.d.ts.map +1 -0
- package/dist/tokens.d.ts +882 -13
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +21 -19
- package/dist/trinity.css +1077 -414
- package/package.json +111 -90
- package/dist/components/index.d.ts +0 -145
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/shared.d.ts +0 -92
- package/dist/components/shared.d.ts.map +0 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -22,33 +22,28 @@ Please be respectful and constructive in all interactions. We are committed to p
|
|
|
22
22
|
|
|
23
23
|
### Prerequisites
|
|
24
24
|
|
|
25
|
-
- Node.js
|
|
26
|
-
-
|
|
25
|
+
- Node.js 24 (the version CI uses)
|
|
26
|
+
- pnpm 10 (pinned in `package.json` `packageManager`; `corepack enable` provides it)
|
|
27
27
|
- Git
|
|
28
28
|
|
|
29
29
|
### Setup
|
|
30
30
|
|
|
31
31
|
1. Clone the repository:
|
|
32
32
|
```bash
|
|
33
|
-
git clone https://github.com/
|
|
33
|
+
git clone https://github.com/Trinity-UI-Components/trinity-design-system.git
|
|
34
34
|
cd trinity-design-system
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
2. Install dependencies:
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
pnpm install --frozen-lockfile
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Commercial licensing note: For MUI, AG Grid, or Syncfusion license procurement/renewal, contact Arun Manoharan, Rahul Desai, or Sangeetha before production rollout.
|
|
43
43
|
|
|
44
|
-
3. Start the development server:
|
|
44
|
+
3. Start Storybook, the development environment (there is no separate app dev server):
|
|
45
45
|
```bash
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
4. Start Storybook:
|
|
50
|
-
```bash
|
|
51
|
-
npm run storybook
|
|
46
|
+
pnpm start
|
|
52
47
|
```
|
|
53
48
|
|
|
54
49
|
## Development Workflow
|
|
@@ -149,12 +144,28 @@ export const MyComponent: React.FC<MyComponentProps> = ({
|
|
|
149
144
|
|
|
150
145
|
### Export Components
|
|
151
146
|
|
|
152
|
-
|
|
147
|
+
A component is public only when a package entry exports it. `src/index.ts` is the root entry: add the component and its types there, in the section for its kind, with the `// Import:` comment the other exports use.
|
|
153
148
|
|
|
154
149
|
```typescript
|
|
155
|
-
|
|
150
|
+
// src/index.ts
|
|
151
|
+
// Import: import { MyComponent } from '@trinityui/design-system';
|
|
152
|
+
export { MyComponent } from './components/MyComponent';
|
|
153
|
+
export type { MyComponentProps } from './components/MyComponent';
|
|
156
154
|
```
|
|
157
155
|
|
|
156
|
+
- An AI component also goes in the AI barrel, `src/components/AI/index.ts`.
|
|
157
|
+
- A component that belongs in the `essentials` or `data-table` entry also goes in `src/essentials.ts` or `src/data-table.ts`.
|
|
158
|
+
- There is no `src/components/index.ts`. A barrel that no entry imports never reaches consumers (see `docs/remediation/HITL-A-15-components-barrel.md`).
|
|
159
|
+
|
|
160
|
+
Then build and update the public API snapshot in the same PR:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
pnpm run build
|
|
164
|
+
node scripts/check-api-surface.mjs --update # rewrites docs/api/public-api.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Every new export needs `@since x.y` in its JSDoc and a minor changeset. A new component also needs an approved entry in `docs/process/approved-proposals.json`. `node scripts/check-api-surface.mjs` checks all three against the base branch (`docs/remediation/HITL-A-18-api-surface.md`).
|
|
168
|
+
|
|
158
169
|
## Styling Guidelines
|
|
159
170
|
|
|
160
171
|
### Use Theme Tokens
|
|
@@ -169,6 +180,26 @@ Always use theme tokens from `src/theme.ts`:
|
|
|
169
180
|
<Box sx={{ color: '#003366', borderRadius: '16px' }}>
|
|
170
181
|
```
|
|
171
182
|
|
|
183
|
+
`trinity/color-literal` reports hex colors, `rgba()`/`hsla()` strings and px-only literals in `sx`/`style` on the lines you change in `src/components` and `src/hooks` ([TOKEN_USAGE_RULES.md](docs/TOKEN_USAGE_RULES.md)). A deliberate literal takes `// eslint-disable-next-line trinity/color-literal -- @intentional-color: <category> - <reason>` with a category from [INTENTIONAL_EXCEPTIONS.md](docs/INTENTIONAL_EXCEPTIONS.md).
|
|
184
|
+
|
|
185
|
+
### Linting
|
|
186
|
+
|
|
187
|
+
- CI runs `pnpm lint:changed`: ESLint with `eslint.config.js` on the files changed since the base, failing on any finding (warnings included) on a changed line. A new or extracted file counts as changed in full. Existing debt elsewhere is not reported; `pnpm lint` shows it.
|
|
188
|
+
- Every `eslint-disable` names the rules it disables and says why after ` -- `; an unused directive is an error. This mirrors the behavior contract's waivers.
|
|
189
|
+
- In `src/components` and `src/patterns`, three structural rules also run on changed lines (B-18):
|
|
190
|
+
- `trinity/sx-spread` (ADR-04): never spread the `sx` prop into an object. Merge it as an array: `sx={[baseSx, ...(Array.isArray(sx) ? sx : [sx])]}`.
|
|
191
|
+
- `trinity/rtl-physical` (ADR-11): use logical keys (`marginInlineStart`, `paddingInlineEnd`, `insetInlineStart`) instead of `ml`, `mr`, `pl`, `pr`, `marginLeft`, `paddingRight`, `left` or `right` in `sx` and `style`. Two cases are real exceptions and take a reasoned disable: centering (`left: '50%'` with `translateX(-50%)`) and data or measured coordinates (a bar's x on a time axis, a position from `getBoundingClientRect`). Example: `// eslint-disable-next-line trinity/rtl-physical -- data coordinate: x is a value on the time axis`.
|
|
192
|
+
- `trinity/units-px` (ADR-20): `aiSpacing` values are theme units, so never write `${aiSpacing.md}px`. Use `theme.spacing(aiSpacing.md)`.
|
|
193
|
+
- In `src/components` and `src/patterns`, the theming rules also run on changed lines (E-08; [TOKEN_USAGE_RULES.md](docs/TOKEN_USAGE_RULES.md) §1, §8-§11):
|
|
194
|
+
- `trinity/color-source` (ADR-03, ADR-26): read colors through `useTrinityPalette()` or `getTrinityPalette(theme)`, never `aiTokens.colors`, `semanticTokens.colors`/`.effects`, `brandColors`, raw `theme.palette.trinity` or `'trinity.*'` palette path strings.
|
|
195
|
+
- `trinity/mode-branch` (ADR-03): never compare `palette.mode` or call `applyStyles('dark')`; the resolver already returns the active mode's role.
|
|
196
|
+
- `trinity/token-hook-branch` (E-31): `useTrinityTokens()`'s `getColor`, `isDarkMode` and `getSemanticColor` are for app code; components use the resolver.
|
|
197
|
+
- `trinity/global-keyframes` (ADR-11): use `keyframes()` from `@mui/material/styles`, not a `'@keyframes name'` key, whose global name another component can override.
|
|
198
|
+
- `trinity/motion-literal` (ADR-22-R7): durations come from `theme.transitions` or the motion tokens, and timeouts are 0 under reduced motion. A decorative loop whose period is part of the design takes a reasoned disable, for example `// eslint-disable-next-line trinity/motion-literal -- decorative spinner: its period is not a UI transition`.
|
|
199
|
+
- `trinity/inline-font-size` (AI surfaces only): use a Typography variant, `theme.typography.<variant>` or an `aiTypography` token instead of a px, rem, em or numeric `fontSize`. Icon sizes are exempt.
|
|
200
|
+
- A new file, or code you move into a new file, is linted in full: every line counts as changed. Fix or disable (with a reason) every finding in it before you open the PR, including findings in code you only moved.
|
|
201
|
+
- New rule families go into the one local plugin, `eslint/plugin-trinity.js`, as `trinity/*` rules: a family of AST selectors is a `SELECTOR_RULES` entry with an invalid and a valid example per selector; a rule that needs more context is a rule object. Never add a `no-restricted-syntax` entry or block (DN-07 a): one shared id makes every waiver silence every family, and `src/__tests__/eslintRules.test.ts` fails when a config sets it for component files.
|
|
202
|
+
|
|
172
203
|
### Accessible Color Combinations
|
|
173
204
|
|
|
174
205
|
Use `accessibleCombinations` for text/background pairs:
|
|
@@ -191,7 +222,7 @@ import { accessibleCombinations } from '../theme';
|
|
|
191
222
|
|
|
192
223
|
## Accessibility Requirements
|
|
193
224
|
|
|
194
|
-
All components must meet **WCAG 2.
|
|
225
|
+
All components must meet **WCAG 2.2 AA** standards:
|
|
195
226
|
|
|
196
227
|
### Minimum Requirements
|
|
197
228
|
|
|
@@ -203,26 +234,70 @@ All components must meet **WCAG 2.1 AA** standards:
|
|
|
203
234
|
|
|
204
235
|
### Behavior Contract (enforced in CI)
|
|
205
236
|
|
|
206
|
-
Don't hand-roll behaviors the design system already provides
|
|
237
|
+
Don't hand-roll behaviors the design system already provides. [docs/BEHAVIOR_CONTRACT.md](docs/BEHAVIOR_CONTRACT.md) §2 names the one sanctioned implementation for each, and the export it comes from:
|
|
238
|
+
|
|
239
|
+
| Behavior | Use |
|
|
240
|
+
|---|---|
|
|
241
|
+
| A message a screen reader should read ("Copied", "Saved") | `useAnnounce()` |
|
|
242
|
+
| A live container (chat log, streaming answer) | `liveRegionProps()`, inside the package wrapped in `LiveRegionProvider` |
|
|
243
|
+
| An async action (Save, Confirm, Retry) | `useAsyncAction()`; its failure in `AsyncOutcomeAlert` (internal) |
|
|
244
|
+
| Copy to clipboard | `useClipboard({ announce })` |
|
|
245
|
+
| CSS motion / JS-timed motion / smooth scrolling | `[REDUCED_MOTION_QUERY]` in `sx` / `useReducedMotion()` |
|
|
246
|
+
| Focus trapping | MUI's built-in trap (`Dialog`, `Popover`, `Menu`, temporary `Drawer`); `useFocusTrap` is deprecated |
|
|
247
|
+
| Arrow keys within a group | MUI's own widget, else `useRovingTabIndex()` (registry form) |
|
|
248
|
+
| Screen-reader-only text | `VisuallyHidden`, or `visuallyHiddenSx` for an element that cannot be one |
|
|
249
|
+
| Controlled and uncontrolled props | `useControlled` from `@mui/utils/useControlled` |
|
|
250
|
+
| Expand/collapse and popup triggers | `useDisclosure()` |
|
|
251
|
+
| A focused control that unmounts or disables itself | `useFocusOnReplace()` (internal) |
|
|
252
|
+
| Ids and ARIA relationships | `React.useId()`, with the id prop as an override |
|
|
253
|
+
| Anything clickable | `Button`, `IconButton`, `ButtonBase`, `ListItemButton`; a clickable card or row with nested actions uses the primary-action overlay (internal) |
|
|
254
|
+
| Icon-only buttons | `aria-label` plus a `Tooltip` with the same text |
|
|
255
|
+
| Untrusted HTML and URLs | `renderSafeHtml()`, `isSafeHref()`, `isSafeSrc()` (internal) |
|
|
256
|
+
|
|
257
|
+
Live demos are in Storybook under Foundation/Accessibility and Utilities/Hooks. Composite widgets follow their keyboard model in [docs/remediation/keyboard-models.md](docs/remediation/keyboard-models.md) (ADR-34).
|
|
207
258
|
|
|
208
259
|
`pnpm check:behavior` runs on every PR and fails on new hand-rolled behavior. Run `pnpm check:behavior --report` to see each finding with its fix.
|
|
209
260
|
|
|
261
|
+
The findings it still allows are recorded in `scripts/behavior-contract-baseline/`, one shard per source file, and every finding names its one owner, the plan item that fixes it ([README](scripts/behavior-contract-baseline/README.md)). After a fix, run `pnpm check:behavior --update` and commit the changed shard with the fix.
|
|
262
|
+
|
|
263
|
+
**Hot-file rule (`hot-file:behavior-baseline`).** A PR that changes more than one shard, such as a guard change that re-baselines many files (B-16, B-17, B-19, B-54), carries the `hot-file:behavior-baseline` label and lands alone (ADR-28). A PR that changes only its own component's shard needs no label and can land in parallel with others.
|
|
264
|
+
|
|
265
|
+
### Icons (enforced in CI)
|
|
266
|
+
|
|
267
|
+
Components render icons through `Icon` (ADR-10). A direct import of `@mui/icons-material` or `react-feather` in `src/components` fails `trinity/icon-imports` on the changed line, and `pnpm check:icon-imports` fails when a new file imports one. The files that still do are listed in `scripts/icon-imports-baseline.json`; the list only shrinks.
|
|
268
|
+
|
|
269
|
+
- **Touching a listed file:** migrate its icons in a separate commit of the same PR, with a PNG compare of the affected stories (ADR-10 (8), OD-B6 (a)). If a glyph has no Icon name with an approved optical match yet, migrate that file in an immediate follow-up PR instead (OD-B6 (b)).
|
|
270
|
+
- **After migrating:** run `pnpm check:icon-imports --update` and commit the shorter baseline.
|
|
271
|
+
- **A missing name:** request it through C-28 in [the I-06 manifest](docs/remediation/I-06-icon-manifest.md). Names are never synonyms of existing ones.
|
|
272
|
+
- **No library pins.** A component's `<Icon>` follows the app's `IconProvider`; it never passes `library` (C-38+ removed the last pins, see [D icon pins](docs/remediation/D-icon-pins.md), and `Icon.pins.test.ts` fails on a new one). A migration whose glyph differs from the file's old import is a visible correction: it carries the PNG compare under both libraries and its own changeset.
|
|
273
|
+
|
|
210
274
|
### Testing Accessibility
|
|
211
275
|
|
|
276
|
+
Tests use the helpers in `src/testing/` (B-01): `expectNoA11yViolations` (axe, light and dark), `readAnnouncements` (what a screen reader would announce right now), `assertNoNestedLive` (no live region inside another), user-event keyboard helpers and `createMatchMediaController` (reduced motion). Every axe check sits inside `describe('Accessibility')`.
|
|
277
|
+
|
|
212
278
|
```tsx
|
|
213
|
-
|
|
214
|
-
import {
|
|
279
|
+
import { describe, expect, it } from 'vitest';
|
|
280
|
+
import { render, screen, waitFor, expectNoA11yViolations } from '../../testing/test-utils';
|
|
281
|
+
import { readAnnouncements } from '../../testing/announcements';
|
|
282
|
+
import { assertNoNestedLive } from '../../testing/assertNoNestedLive';
|
|
283
|
+
import { MyComponent } from '../MyComponent';
|
|
215
284
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
285
|
+
describe('Accessibility', () => {
|
|
286
|
+
it('has no accessibility violations in light and dark', async () => {
|
|
287
|
+
const light = render(<MyComponent />);
|
|
288
|
+
await expectNoA11yViolations(light.container);
|
|
289
|
+
light.unmount();
|
|
290
|
+
const dark = render(<MyComponent />, { theme: 'dark' });
|
|
291
|
+
await expectNoA11yViolations(dark.container);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
it('announces the outcome and keeps live regions flat', async () => {
|
|
295
|
+
const { user } = render(<MyComponent />);
|
|
296
|
+
await user.click(screen.getByRole('button', { name: 'Save' }));
|
|
297
|
+
await waitFor(() => expect(readAnnouncements().polite).toContain('Saved'));
|
|
298
|
+
assertNoNestedLive(document.body);
|
|
299
|
+
});
|
|
300
|
+
});
|
|
226
301
|
```
|
|
227
302
|
|
|
228
303
|
### Storybook Accessibility Addon
|
|
@@ -245,62 +320,70 @@ src/
|
|
|
245
320
|
|
|
246
321
|
```bash
|
|
247
322
|
# Run all tests
|
|
248
|
-
|
|
323
|
+
pnpm test
|
|
249
324
|
|
|
250
|
-
# Run tests with coverage
|
|
251
|
-
|
|
325
|
+
# Run tests with a coverage report (no thresholds are configured)
|
|
326
|
+
pnpm test:coverage
|
|
252
327
|
|
|
253
328
|
# Run tests in watch mode
|
|
254
|
-
|
|
329
|
+
pnpm test:watch
|
|
330
|
+
|
|
331
|
+
# Run the accessibility lane (tests named "Accessibility")
|
|
332
|
+
pnpm test:a11y
|
|
255
333
|
```
|
|
256
334
|
|
|
257
335
|
### Test Template
|
|
258
336
|
|
|
337
|
+
Copy `src/testing/component.template.test.tsx`. It is organised as rendering, variants, accessibility, keyboard, interaction, integration and edge cases, and its accessibility section already holds the cases every component needs: axe in light and dark, under a brand colour and right to left, the accessible name, announcements read with `readAnnouncements` and checked with `assertNoNestedLive`, and keyboard paths driven through user-event (`render` returns `user`). The short form:
|
|
338
|
+
|
|
259
339
|
```tsx
|
|
260
|
-
import { describe,
|
|
261
|
-
import { render, screen,
|
|
340
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
341
|
+
import { render, screen, expectNoA11yViolations } from '../../testing/test-utils';
|
|
262
342
|
import { MyComponent } from '../MyComponent';
|
|
263
343
|
|
|
264
344
|
describe('MyComponent', () => {
|
|
265
|
-
it('
|
|
345
|
+
it('renders with default props', () => {
|
|
266
346
|
render(<MyComponent>Content</MyComponent>);
|
|
267
347
|
expect(screen.getByText('Content')).toBeInTheDocument();
|
|
268
348
|
});
|
|
269
349
|
|
|
270
|
-
it('
|
|
350
|
+
it('runs onClick from the keyboard', async () => {
|
|
271
351
|
const onClick = vi.fn();
|
|
272
|
-
render(<MyComponent onClick={onClick}>Click me</MyComponent>);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
expect(onClick).
|
|
352
|
+
const { user } = render(<MyComponent onClick={onClick}>Click me</MyComponent>);
|
|
353
|
+
await user.tab();
|
|
354
|
+
await user.keyboard('{Enter}');
|
|
355
|
+
expect(onClick).toHaveBeenCalledTimes(1);
|
|
276
356
|
});
|
|
277
357
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
358
|
+
describe('Accessibility', () => {
|
|
359
|
+
it('has no accessibility violations', async () => {
|
|
360
|
+
const { container } = render(<MyComponent>Content</MyComponent>);
|
|
361
|
+
await expectNoA11yViolations(container);
|
|
362
|
+
});
|
|
281
363
|
});
|
|
282
364
|
});
|
|
283
365
|
```
|
|
284
366
|
|
|
285
|
-
###
|
|
367
|
+
### Test Requirements
|
|
286
368
|
|
|
287
|
-
-
|
|
369
|
+
- No coverage threshold is enforced (`pnpm test:coverage` only reports).
|
|
288
370
|
- All public APIs must have tests
|
|
289
371
|
- Edge cases and error states should be tested
|
|
372
|
+
- A CPU-bound test (it spawns a process, parses the repository, imports a whole package entry or renders a large tree) takes its timeout from `src/testing/timeouts.ts` (`CPU_BOUND`), never a number; the `test-time-budgets` guard checks it. The rule is in [docs/TESTING_STRATEGY.md](docs/TESTING_STRATEGY.md#time-budgets-for-cpu-bound-tests).
|
|
290
373
|
|
|
291
374
|
## Documentation
|
|
292
375
|
|
|
293
376
|
### Storybook Stories
|
|
294
377
|
|
|
295
|
-
Every component needs a Storybook story:
|
|
378
|
+
Every component needs a Storybook story, in the CSF-factory form [STORYBOOK_STANDARDS.md](docs/STORYBOOK_STANDARDS.md) describes (start from `src/stories/utils/ComponentTemplate.stories.tsx.txt`):
|
|
296
379
|
|
|
297
380
|
```tsx
|
|
298
381
|
// src/stories/MyComponent.stories.tsx
|
|
299
|
-
import
|
|
382
|
+
import preview from '#.storybook/preview';
|
|
300
383
|
import { MyComponent } from '../components/MyComponent';
|
|
301
384
|
|
|
302
|
-
const meta
|
|
303
|
-
title: '
|
|
385
|
+
const meta = preview.meta({
|
|
386
|
+
title: 'Data Display/MyComponent', // an IA category from docs/NAMING.md, then the component
|
|
304
387
|
component: MyComponent,
|
|
305
388
|
tags: ['autodocs'],
|
|
306
389
|
argTypes: {
|
|
@@ -310,25 +393,35 @@ const meta: Meta<typeof MyComponent> = {
|
|
|
310
393
|
description: 'Visual variant',
|
|
311
394
|
},
|
|
312
395
|
},
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
export default meta;
|
|
316
|
-
type Story = StoryObj<typeof meta>;
|
|
396
|
+
});
|
|
317
397
|
|
|
318
|
-
export const Default
|
|
398
|
+
export const Default = meta.story({
|
|
319
399
|
args: {
|
|
320
400
|
children: 'Default content',
|
|
321
401
|
},
|
|
322
|
-
};
|
|
402
|
+
});
|
|
323
403
|
|
|
324
|
-
export const Secondary
|
|
404
|
+
export const Secondary = meta.story({
|
|
325
405
|
args: {
|
|
326
406
|
variant: 'secondary',
|
|
327
407
|
children: 'Secondary variant',
|
|
328
408
|
},
|
|
329
|
-
};
|
|
409
|
+
});
|
|
330
410
|
```
|
|
331
411
|
|
|
412
|
+
#### Internal-block stories (`STORYBOOK_INCLUDE_INTERNAL`)
|
|
413
|
+
|
|
414
|
+
Stories for internal blocks (ADR-02) live in `src/stories/internal/` with the title `Internal/<Name>`. They are part of the build only when the environment variable `STORYBOOK_INCLUDE_INTERNAL=1` is set:
|
|
415
|
+
|
|
416
|
+
| Command | Internal stories |
|
|
417
|
+
|---|---|
|
|
418
|
+
| `pnpm start` | included |
|
|
419
|
+
| `pnpm test:storybook` | included (they are tested) |
|
|
420
|
+
| `pnpm build-storybook:internal` | included (output `storybook-static-internal/`, for visual review) |
|
|
421
|
+
| `pnpm build-storybook` | **never**: this is the published build behind the docs site, `index.json` and the MCP manifest |
|
|
422
|
+
|
|
423
|
+
The first three set the variable through `scripts/with-internal-stories.mjs`, which works in every shell; do not set it by hand for the published build. `check-story-titles --artifact` fails a published build that contains an `Internal/` entry, and the Figma link check ignores `src/stories/internal/`. (The a11y canary in `src/stories/internal/canary/` has its own variable, `STORYBOOK_A11Y_CANARY=1`, which only CI sets.)
|
|
424
|
+
|
|
332
425
|
### JSDoc Comments
|
|
333
426
|
|
|
334
427
|
All exported functions and components should have JSDoc comments:
|
|
@@ -351,19 +444,35 @@ export const getAccessibleColor = (backgroundColor: string): string => {
|
|
|
351
444
|
};
|
|
352
445
|
```
|
|
353
446
|
|
|
447
|
+
### Generated regions
|
|
448
|
+
|
|
449
|
+
Some text in the docs is generated, and a test fails when it is edited by hand. Change the generator (or the source it reads), then run its `--write` command:
|
|
450
|
+
|
|
451
|
+
| Region | Markers | Generator | Test |
|
|
452
|
+
|---|---|---|---|
|
|
453
|
+
| README intro, Key Capabilities (component, AI, chart, template, hook, export and CSS variable counts), Packages & Entry Points (`entry-points`: the exports of each subpath) and the AI table (`ai-table`: the AI components by group with their Storybook page, the contracts and helpers, the deprecated AI exports with their replacements); the same counts for the Storybook guide pages in `src/stories/generated/catalogCounts.ts` (the whole file) | `<!-- catalog-counts:start <id> -->` ... `<!-- catalog-counts:end <id> -->` | `node scripts/generate-catalog-counts.mjs --write` | `src/__tests__/docs/catalog-counts.test.ts` |
|
|
454
|
+
| DEFINITION_OF_DONE automated list | `<!-- automated:begin ... -->` ... `<!-- automated:end -->` | `node scripts/render-definition-of-done.mjs --write` | `src/__tests__/docs/definition-of-done.test.ts` |
|
|
455
|
+
|
|
456
|
+
The counts come from the export manifest (`docs/api/public-api.json`, kept equal to the build by `pnpm check:api`), so a change that adds or deprecates a root export reruns the catalog-counts generator. A new AI component also needs its row in `AI_TABLE` (a deprecated one, its replacement in `AI_DEPRECATED`) in `scripts/generate-catalog-counts.mjs`: until then the render fails and names it. Do not type a catalog count ("100+ components", "17 chart types") anywhere else: the same test rejects one on the README and the guidance pages.
|
|
457
|
+
|
|
354
458
|
## Pull Request Process
|
|
355
459
|
|
|
460
|
+
A pull request is done when it meets the [definition of done](docs/DEFINITION_OF_DONE.md): every automated check of the guard registry passes, and the manual items (screen-reader scenarios, story prose, the visual review, React and CSS parity) are covered.
|
|
461
|
+
|
|
356
462
|
### Before Submitting
|
|
357
463
|
|
|
358
|
-
1. ✅ Run `
|
|
359
|
-
2. ✅ Run `
|
|
360
|
-
3. ✅ Run `
|
|
361
|
-
4. ✅ Update documentation if needed
|
|
464
|
+
1. ✅ Run `pnpm lint:changed` and fix any finding on the lines you changed
|
|
465
|
+
2. ✅ Run `pnpm test` and ensure all tests pass
|
|
466
|
+
3. ✅ Run `pnpm typecheck` and `pnpm build`
|
|
467
|
+
4. ✅ Update documentation if needed (`pnpm check:docs` checks links and script names)
|
|
362
468
|
5. ✅ Add/update Storybook stories
|
|
363
|
-
6. ✅
|
|
469
|
+
6. ✅ Add one changeset (`pnpm changeset`, or `pnpm changeset --empty` if the PR changes no code, types, styles, LICENSE file or dependencies; [.changeset/README.md](.changeset/README.md) has the rule, including docs that ship in the tarball). Never edit CHANGELOG.md or a package version by hand; release PRs do that from the changesets (docs/CHANGESETS.md).
|
|
470
|
+
7. ✅ Optionally run `pnpm verify:release`, the full gate CI runs as the `verify` check
|
|
364
471
|
|
|
365
472
|
### PR Template
|
|
366
473
|
|
|
474
|
+
GitHub fills in `.github/PULL_REQUEST_TEMPLATE.md` on every PR. The short form:
|
|
475
|
+
|
|
367
476
|
```markdown
|
|
368
477
|
## Description
|
|
369
478
|
Brief description of the changes.
|
|
@@ -378,21 +487,23 @@ Brief description of the changes.
|
|
|
378
487
|
- [ ] Tests added/updated
|
|
379
488
|
- [ ] Documentation updated
|
|
380
489
|
- [ ] Storybook stories added/updated
|
|
381
|
-
- [ ] CHANGELOG.md
|
|
382
|
-
- [ ] Accessibility requirements met
|
|
490
|
+
- [ ] One changeset added (CHANGELOG.md is never edited by hand)
|
|
491
|
+
- [ ] Accessibility requirements met (WCAG 2.2 AA)
|
|
383
492
|
- [ ] Behavior contract passes (`pnpm check:behavior`); any waiver has a reason
|
|
384
|
-
- [ ]
|
|
385
|
-
- [ ]
|
|
493
|
+
- [ ] `pnpm lint:changed` passes (token rules included)
|
|
494
|
+
- [ ] Every `eslint-disable` names its rules and gives a reason; color disables use `@intentional-color: <category> - <reason>` from [INTENTIONAL_EXCEPTIONS.md](docs/INTENTIONAL_EXCEPTIONS.md)
|
|
386
495
|
|
|
387
496
|
## Screenshots (if applicable)
|
|
388
497
|
```
|
|
389
498
|
|
|
390
499
|
### Review Process
|
|
391
500
|
|
|
392
|
-
1. Create PR against `main` branch
|
|
393
|
-
2.
|
|
394
|
-
3. Address feedback
|
|
395
|
-
4. Squash and merge
|
|
501
|
+
1. Create the PR against `main` (or against a release line, `release/<major>.<minor>.x`, for a maintenance fix). Name the branch `<ws>/<ITEM-ID>-<slug>` for plan items.
|
|
502
|
+
2. Keep one concern and one changeset per PR (see [CHANGESETS.md](docs/CHANGESETS.md)).
|
|
503
|
+
3. Wait for the required checks, including `verify`. Address feedback by pushing new commits; do not force-push a branch that is under review.
|
|
504
|
+
4. Merge with a **merge commit**. Squash and rebase merges are turned off on `main` and on release lines: commit boundaries are evidence (a characterization commit stays separate from its fix, a dependency bump from its lockfile change), and a merge commit keeps every cited SHA valid.
|
|
505
|
+
|
|
506
|
+
A commit that records today's behavior before a fix carries the trailer `Characterizes: <Component> (ADR-17)`; the `characterization-proof` check runs its tests at its own SHA and expects its `it.fails` cases to be flipped by the fix. The full rules, the rulesets and the single-maintainer sign-off are in [docs/process/BRANCHING.md](docs/process/BRANCHING.md).
|
|
396
507
|
|
|
397
508
|
## Questions?
|
|
398
509
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Trinity Design
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|