@trinityui/design-system 2.11.1 → 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 +2155 -0
- package/CONTRIBUTING.md +180 -69
- package/LICENSE +21 -0
- package/MIGRATION.md +505 -28
- 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 +18458 -10385
- 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 +159 -77
- package/dist/components/AI/AIChainOfThought.d.ts.map +1 -1
- package/dist/components/AI/AIChainOfThought.types.d.ts +292 -40
- 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 +81 -11
- 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 +104 -16
- 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 +47 -4
- 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.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/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 +9 -2
- package/dist/components/shared/safeContent.d.ts.map +1 -1
- 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 +69 -69
- 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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview mergeSx: one ordered sx array from several parts (ADR-04 (4), master-plan E-15).
|
|
3
|
+
* @module components/shared/mergeSx
|
|
4
|
+
*
|
|
5
|
+
* @internal — not part of the public API; see ADR-02
|
|
6
|
+
*
|
|
7
|
+
* Object spread of `sx` drops function sx and turns array sx into keys '0', '1' (ADR-04).
|
|
8
|
+
* `mergeSx(base, sx)` replaces both that and the hand-written
|
|
9
|
+
* `[base, ...(Array.isArray(sx) ? sx : [sx])]`: objects and functions are kept as entries,
|
|
10
|
+
* arrays are flattened one level, and `false`, `true`, `null` and `undefined` are dropped.
|
|
11
|
+
* Later parts win, so pass the component's own styles first and the consumer's `sx` last.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Box sx={mergeSx({ display: 'flex' }, dense && { gap: 0.5 }, sx)} />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
19
|
+
/** One part of {@link mergeSx}: any sx value, or a falsy value to skip. @internal */
|
|
20
|
+
export type SxPart = SxProps<Theme> | false | null | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Merges sx parts into one ordered array that MUI resolves left to right.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function mergeSx(...parts: SxPart[]): SxProps<Theme>;
|
|
26
|
+
//# sourceMappingURL=mergeSx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeSx.d.ts","sourceRoot":"","sources":["../../../src/components/shared/mergeSx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qFAAqF;AACrF,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;AAQ/D;;;GAGG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAU1D"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Motion helpers: token durations in milliseconds, reduced-motion styles and
|
|
3
|
+
* scoped keyframes (master-plan E-13, ADR-11 §4).
|
|
4
|
+
* @module components/shared/motion
|
|
5
|
+
*
|
|
6
|
+
* @internal — not part of the public API; see ADR-02
|
|
7
|
+
*
|
|
8
|
+
* The motion policy (docs/TOKEN_USAGE_RULES.md, "Motion"):
|
|
9
|
+
*
|
|
10
|
+
* - Durations and easings come from `semanticTokens.motion` (or `aiTokens.motion`), never
|
|
11
|
+
* from literals (ADR-22-R7, the motion-literal rule).
|
|
12
|
+
* - An infinite loop stops under reduced motion, and the state it shows stays visible: wrap
|
|
13
|
+
* the stop in {@link reducedMotion}.
|
|
14
|
+
* - An entrance falls back to an instant change of opacity under reduced motion.
|
|
15
|
+
* - A JavaScript timeout (a MUI `Fade` or `Collapse` `timeout`, a delayed state change that
|
|
16
|
+
* waits for an animation) reads {@link useMotionTimeout}, which is 0 under reduced motion.
|
|
17
|
+
* - Keyframes come only from {@link keyframes}, which gives each animation a scoped,
|
|
18
|
+
* collision-free name. A nested `'@keyframes name'` key in `sx` declares a global name: two
|
|
19
|
+
* components that both say `pulse` overwrite each other (E-13's characterization test).
|
|
20
|
+
*
|
|
21
|
+
* Components guard their own motion with these helpers, because only the component knows
|
|
22
|
+
* which state a stopped loop must keep visible. The theme's CssBaseline backstop (E-44+)
|
|
23
|
+
* collapses whatever they miss; motion that must keep running opts out with
|
|
24
|
+
* {@link ESSENTIAL_MOTION_CLASS}.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const spin = keyframes({ from: { transform: 'rotate(0deg)' }, to: { transform: 'rotate(360deg)' } });
|
|
29
|
+
* <Box sx={{
|
|
30
|
+
* animation: `${spin} ${semanticTokens.motion.loop.spin} linear infinite`,
|
|
31
|
+
* ...reducedMotion({ animation: 'none' }),
|
|
32
|
+
* }} />
|
|
33
|
+
*
|
|
34
|
+
* const timeout = useMotionTimeout(semanticTokens.motion.duration.slower);
|
|
35
|
+
* <Collapse in={open} timeout={timeout} />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
import { keyframes } from '@mui/material/styles';
|
|
39
|
+
import type { CSSObject } from '@mui/material/styles';
|
|
40
|
+
import { REDUCED_MOTION_QUERY } from '../../accessibility';
|
|
41
|
+
import type { TrinitySemanticMotion } from '../../tokens';
|
|
42
|
+
export { keyframes };
|
|
43
|
+
/**
|
|
44
|
+
* A motion token in milliseconds: `'200ms'` → 200, `'1.5s'` → 1500, and a number is taken as
|
|
45
|
+
* milliseconds already. Throws on anything that is not a CSS time, so a malformed token fails
|
|
46
|
+
* loudly instead of turning into `NaN` or 0. The theme reads its transitions with the same
|
|
47
|
+
* parser (`cssTimeToMs`).
|
|
48
|
+
*/
|
|
49
|
+
export declare function toMs(token: string | number): number;
|
|
50
|
+
/**
|
|
51
|
+
* The token's duration in milliseconds for a JavaScript timeout, or 0 when the user prefers
|
|
52
|
+
* reduced motion. SSR-stable: the server render and the hydration render use the token's
|
|
53
|
+
* duration, then the component re-renders with the user's preference (ADR-27).
|
|
54
|
+
*/
|
|
55
|
+
export declare function useMotionTimeout(token: string | number): number;
|
|
56
|
+
/**
|
|
57
|
+
* Styles that apply only under reduced motion, keyed by the shared
|
|
58
|
+
* `REDUCED_MOTION_QUERY`, for spreading into an `sx` object:
|
|
59
|
+
* `{ animation: …, ...reducedMotion({ animation: 'none' }) }`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function reducedMotion(styles: CSSObject): Record<typeof REDUCED_MOTION_QUERY, CSSObject>;
|
|
62
|
+
/**
|
|
63
|
+
* The class that exempts an element from the theme's reduced-motion backstop. Only for motion
|
|
64
|
+
* that carries information with no static equivalent; the element still respects reduced
|
|
65
|
+
* motion in its own styles where it can. The exemption covers the element and its `::before`
|
|
66
|
+
* and `::after`, not its descendants.
|
|
67
|
+
*/
|
|
68
|
+
export declare const ESSENTIAL_MOTION_CLASS = "trinity-essential-motion";
|
|
69
|
+
/** The duration the backstop gives every transition and animation under reduced motion. */
|
|
70
|
+
export declare const REDUCED_MOTION_DURATION = "0.01ms";
|
|
71
|
+
/**
|
|
72
|
+
* The theme's `transitions` option, read from the semantic motion tokens. Value-neutral where
|
|
73
|
+
* MUI's default equals a token, so default motion does not change:
|
|
74
|
+
*
|
|
75
|
+
* | theme.transitions | MUI default | Token |
|
|
76
|
+
* |---|---|---|
|
|
77
|
+
* | `duration.shortest` | 150 | `motion.duration.fast` |
|
|
78
|
+
* | `duration.shorter` | 200 | `motion.duration.normal` |
|
|
79
|
+
* | `duration.standard` | 300 | `motion.duration.slow` |
|
|
80
|
+
* | `easing.easeInOut` | `cubic-bezier(0.4, 0, 0.2, 1)` | `motion.easing.default` |
|
|
81
|
+
* | `easing.easeOut` | `cubic-bezier(0.0, 0, 0.2, 1)` | `motion.easing.enter` (the same curve) |
|
|
82
|
+
* | `easing.easeIn` | `cubic-bezier(0.4, 0, 1, 1)` | `motion.easing.exit` |
|
|
83
|
+
*
|
|
84
|
+
* MUI's `duration.short` (250), `complex` (375), `enteringScreen` (225), `leavingScreen` (195)
|
|
85
|
+
* and `easing.sharp` have no equal token and keep MUI's values (C-26 keeps 225/195 for the
|
|
86
|
+
* drawers and dialogs); docs/remediation/E-44-theme-motion-backstop.md records them. Token
|
|
87
|
+
* overrides now reach `theme.transitions`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function themeTransitions(motion: TrinitySemanticMotion): {
|
|
90
|
+
duration: {
|
|
91
|
+
shortest: number;
|
|
92
|
+
shorter: number;
|
|
93
|
+
standard: number;
|
|
94
|
+
};
|
|
95
|
+
easing: {
|
|
96
|
+
easeInOut: string;
|
|
97
|
+
easeOut: string;
|
|
98
|
+
easeIn: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The CssBaseline `styleOverrides` that collapse motion under `REDUCED_MOTION_QUERY`: every
|
|
103
|
+
* element except one with {@link ESSENTIAL_MOTION_CLASS} (and its `::before` and `::after`)
|
|
104
|
+
* gets 0.01ms animation and transition durations, one animation iteration and
|
|
105
|
+
* `scroll-behavior: auto`. An animation jumps to its end state and a transition to its target.
|
|
106
|
+
* A safety net only: components still guard their own motion, because only a component knows
|
|
107
|
+
* which state a stopped loop must keep visible.
|
|
108
|
+
*/
|
|
109
|
+
export declare function reducedMotionBackstop(): CSSObject;
|
|
110
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../src/components/shared/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEnD;AAGD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,OAAO,oBAAoB,EAAE,SAAS,CAAC,CAE/F;AAOD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AAEjE,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB;;;;;;;;;;;EAa7D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,CAYjD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Stable React keys for lists whose items carry no id (WI-52).
|
|
3
|
+
* @module components/shared/occurrenceKeys
|
|
4
|
+
*
|
|
5
|
+
* @internal — not part of the public API; see ADR-02
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Stable React keys for a list whose items carry no id.
|
|
9
|
+
*
|
|
10
|
+
* Each key is the item's natural identity (a label, a URL, the text) plus how
|
|
11
|
+
* many earlier items share it, so duplicates stay distinct. Removing or
|
|
12
|
+
* reordering items leaves every other item's key unchanged: React keeps each
|
|
13
|
+
* DOM node, and the focus inside it, with the same logical item. An index key
|
|
14
|
+
* hands the node to whichever item now sits at that index, so focus silently
|
|
15
|
+
* moves to a different item (WCAG 2.4.3).
|
|
16
|
+
*
|
|
17
|
+
* The key is a JSON pair, so no identity string can collide with another
|
|
18
|
+
* identity's counted form.
|
|
19
|
+
*
|
|
20
|
+
* @internal Not exported from any package entry.
|
|
21
|
+
*/
|
|
22
|
+
export declare function occurrenceKeys<T>(items: readonly T[], identity: (item: T) => string): string[];
|
|
23
|
+
//# sourceMappingURL=occurrenceKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"occurrenceKeys.d.ts","sourceRoot":"","sources":["../../../src/components/shared/occurrenceKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,EAAE,CAQ9F"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Primary-action overlay: one pattern for a clickable container that holds nested actions.
|
|
3
|
+
* @module components/shared/primaryAction
|
|
4
|
+
*
|
|
5
|
+
* @internal — not part of the public API; see ADR-02
|
|
6
|
+
*
|
|
7
|
+
* A card or row that is clickable as a whole, and also holds its own buttons
|
|
8
|
+
* or links, must not become one big button: that nests interactive content
|
|
9
|
+
* (axe `nested-interactive`), and the nested actions lose their names. Use
|
|
10
|
+
* three layers instead (BEHAVIOR_CONTRACT §2 "Pressable elements"):
|
|
11
|
+
*
|
|
12
|
+
* 1. The host gets `primaryActionContainerSx` (`position: relative`).
|
|
13
|
+
* 2. Its first child is the primary action: a `ButtonBase` with
|
|
14
|
+
* `disableRipple` and `primaryActionOverlaySx`. It covers the host
|
|
15
|
+
* (`inset: 0`) and takes its name from the title through
|
|
16
|
+
* `aria-labelledby`.
|
|
17
|
+
* 3. The content follows in a box with `primaryActionContentSx`. It sits
|
|
18
|
+
* above the overlay and lets clicks fall through to it, except on
|
|
19
|
+
* interactive descendants (buttons, links, inputs, `[tabindex]`), which
|
|
20
|
+
* keep their own clicks.
|
|
21
|
+
*
|
|
22
|
+
* Tab order follows the DOM: the primary action first, then the nested
|
|
23
|
+
* actions. Enter and Space work because the overlay is a real button.
|
|
24
|
+
*
|
|
25
|
+
* The focus ring: MUI Card sets `overflow: hidden`, and the theme draws the
|
|
26
|
+
* ButtonBase ring outside the element (`outlineOffset: 2`). A ring on an
|
|
27
|
+
* overlay with `inset: 0` would be clipped. The overlay draws the same ring
|
|
28
|
+
* inside the host instead: the offset is minus the focus border width
|
|
29
|
+
* (`semanticTokens.borders.width.focus`), so the theme's ring colour stays.
|
|
30
|
+
*
|
|
31
|
+
* Fallback, if a browser clips the inset ring: draw it on the host with
|
|
32
|
+
* `'&:has(> .<overlay class>:focus-visible)': { outline: …, outlineOffset: -2 }`
|
|
33
|
+
* and remove the overlay's outline. Every browser that runs the
|
|
34
|
+
* test:storybook check (Chromium) passes without it.
|
|
35
|
+
*
|
|
36
|
+
* Limits: text in the content layer cannot be selected with the mouse,
|
|
37
|
+
* because the overlay takes the press. A component that needs selectable
|
|
38
|
+
* text keeps an explicit action button instead.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* const titleId = React.useId();
|
|
43
|
+
* <Card sx={primaryActionContainerSx}>
|
|
44
|
+
* <ButtonBase disableRipple aria-labelledby={titleId} onClick={open} sx={primaryActionOverlaySx} />
|
|
45
|
+
* <Box sx={primaryActionContentSx}>
|
|
46
|
+
* <Typography id={titleId}>Q3 report</Typography>
|
|
47
|
+
* <Tooltip title="More actions">
|
|
48
|
+
* <IconButton aria-label="More actions" onClick={openMenu}><MoreIcon /></IconButton>
|
|
49
|
+
* </Tooltip>
|
|
50
|
+
* </Box>
|
|
51
|
+
* </Card>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
55
|
+
/**
|
|
56
|
+
* One style object of an `sx` array. Narrower than `SxProps<Theme>` (and assignable to it), so
|
|
57
|
+
* a host can combine the helper with its own styles: `sx={[{ overflow: 'hidden' }, primaryActionContainerSx]}`.
|
|
58
|
+
*/
|
|
59
|
+
type SxStyleObject = Exclude<Extract<SxProps<Theme>, ReadonlyArray<unknown>>[number], boolean | ((theme: Theme) => unknown)>;
|
|
60
|
+
/**
|
|
61
|
+
* A CSS selector for interactive elements. A host that also handles clicks
|
|
62
|
+
* itself (a table row) uses it to ignore clicks that started on a nested
|
|
63
|
+
* control: `(event.target as Element).closest(PRIMARY_ACTION_INTERACTIVE_SELECTOR)`.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare const PRIMARY_ACTION_INTERACTIVE_SELECTOR: string;
|
|
68
|
+
/**
|
|
69
|
+
* The host: positions the overlay. Required on the element the overlay covers.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export declare const primaryActionContainerSx: SxStyleObject;
|
|
74
|
+
/**
|
|
75
|
+
* The primary action: a `ButtonBase` with `disableRipple`, the host's first
|
|
76
|
+
* child. It covers the host and draws the theme's focus ring inside it.
|
|
77
|
+
*
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
export declare const primaryActionOverlaySx: SxStyleObject;
|
|
81
|
+
/**
|
|
82
|
+
* The content layer: above the overlay. Clicks on plain content reach the
|
|
83
|
+
* overlay; interactive descendants keep their own.
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export declare const primaryActionContentSx: SxStyleObject;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=primaryAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primaryAction.d.ts","sourceRoot":"","sources":["../../../src/components/shared/primaryAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG3D;;;GAGG;AACH,KAAK,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC;AAqB7H;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,QAAyB,CAAC;AAI1E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAEtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAQpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAOpC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Keyboard model for resizable surfaces (internal).
|
|
3
|
+
* @module components/shared/resizeKeyboard
|
|
4
|
+
*
|
|
5
|
+
* @internal — not part of the public API; see ADR-02
|
|
6
|
+
*
|
|
7
|
+
* One keyboard model for the two resizable surfaces: SplitPane's separator and
|
|
8
|
+
* ResizablePanel's window splitter (APG Window Splitter). It is extracted from
|
|
9
|
+
* SplitPane's handler, the only RTL-aware keyboard resize in the library:
|
|
10
|
+
*
|
|
11
|
+
* - Arrow keys move the separator by `step` (10px), or `largeStep` (50px) with Shift.
|
|
12
|
+
* - Home goes to `min`, End goes to `max`.
|
|
13
|
+
* - Under RTL the horizontal arrows swap, so the arrow that points to the
|
|
14
|
+
* inline end always moves the separator toward the inline end.
|
|
15
|
+
*
|
|
16
|
+
* SplitPane adopts it in H-33 and ResizablePanel in H-31. Until then neither
|
|
17
|
+
* calls it. It is not exported from any package entry.
|
|
18
|
+
*/
|
|
19
|
+
/** Layout of the two areas the separator divides (SplitPane's `direction`). */
|
|
20
|
+
export type ResizeOrientation = 'horizontal' | 'vertical';
|
|
21
|
+
/**
|
|
22
|
+
* Which way the resized area grows. 'forward': it grows when the separator
|
|
23
|
+
* moves toward the inline end (horizontal) or down (vertical), as SplitPane's
|
|
24
|
+
* first pane does. 'reverse': it grows when the separator moves the other way,
|
|
25
|
+
* as a panel docked at the inline end does. Same meaning as useResizable's
|
|
26
|
+
* `direction` option.
|
|
27
|
+
*/
|
|
28
|
+
export type ResizeGrowDirection = 'forward' | 'reverse';
|
|
29
|
+
export interface ResizeKeyOptions {
|
|
30
|
+
/** Whether Shift is held: the arrow keys then use `largeStep`. */
|
|
31
|
+
shiftKey?: boolean;
|
|
32
|
+
/** 'horizontal': the areas sit side by side and the size is a width. */
|
|
33
|
+
orientation: ResizeOrientation;
|
|
34
|
+
/** Which way the resized area grows. */
|
|
35
|
+
growDirection: ResizeGrowDirection;
|
|
36
|
+
/** Right-to-left layout (`theme.direction === 'rtl'`). Swaps the horizontal arrows. */
|
|
37
|
+
isRtl: boolean;
|
|
38
|
+
/** The current size, in px. */
|
|
39
|
+
current: number;
|
|
40
|
+
/** The smallest size, in px. Home goes here. */
|
|
41
|
+
min: number;
|
|
42
|
+
/** The largest size, in px. End goes here. */
|
|
43
|
+
max: number;
|
|
44
|
+
/** Arrow-key step, in px. @default 10 */
|
|
45
|
+
step?: number;
|
|
46
|
+
/** Arrow-key step with Shift, in px. @default 50 */
|
|
47
|
+
largeStep?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Also move the separator with the arrows of the other axis: Down and Right
|
|
50
|
+
* move it forward, Up and Left move it back, with no RTL swap. SplitPane does
|
|
51
|
+
* this today; APG and ResizablePanel use only the arrows of the separator's
|
|
52
|
+
* own axis. @default false
|
|
53
|
+
*/
|
|
54
|
+
crossAxisKeys?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Arrow-key step, in px (SplitPane and ResizablePanel). */
|
|
57
|
+
export declare const RESIZE_KEY_STEP = 10;
|
|
58
|
+
/** Arrow-key step with Shift, in px (SplitPane and ResizablePanel). */
|
|
59
|
+
export declare const RESIZE_KEY_LARGE_STEP = 50;
|
|
60
|
+
/**
|
|
61
|
+
* The size a key press resizes to, or `null` when the key is not a resize key
|
|
62
|
+
* (the caller then leaves the event alone). Arrow results are clamped to
|
|
63
|
+
* `[min, max]`; when `min` is above `max` (a container too small for both
|
|
64
|
+
* bounds), `min` wins, as in SplitPane's clamp. Home returns `min` and End
|
|
65
|
+
* returns `max`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getResizeKeyTarget(key: string, options: ResizeKeyOptions): number | null;
|
|
68
|
+
//# sourceMappingURL=resizeKeyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizeKeyboard.d.ts","sourceRoot":"","sources":["../../../src/components/shared/resizeKeyboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+EAA+E;AAC/E,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,WAAW,EAAE,iBAAiB,CAAC;IAC/B,wCAAwC;IACxC,aAAa,EAAE,mBAAmB,CAAC;IACnC,uFAAuF;IACvF,KAAK,EAAE,OAAO,CAAC;IACf,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,4DAA4D;AAC5D,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAqBxC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAuBxF"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Root props contract helpers (ADR-04, master-plan E-15).
|
|
3
|
+
* @module components/shared/rootProps
|
|
4
|
+
*
|
|
5
|
+
* @internal — not part of the public API; see ADR-02
|
|
6
|
+
*
|
|
7
|
+
* ADR-04 gives every new or touched component the same root contract: the ref and
|
|
8
|
+
* `className` reach the root, rest props are spread on it, a closed list of owned
|
|
9
|
+
* attributes stays the component's, and `id`, `aria-describedby` and `aria-labelledby` are
|
|
10
|
+
* composed. `useRootProps` implements the rest-props part once:
|
|
11
|
+
*
|
|
12
|
+
* - The consumer's rest props are spread first.
|
|
13
|
+
* - The owned attributes ({@link OwnedAttribute}) are always the component's. A consumer
|
|
14
|
+
* value for one of them is dropped, and a development warning names it, once per
|
|
15
|
+
* component. Production builds print nothing.
|
|
16
|
+
* - `id` defaults to `useId()`, so it is stable between the server and the client.
|
|
17
|
+
* - `aria-describedby` and `aria-labelledby` join the component's ids and the consumer's,
|
|
18
|
+
* in that order, without duplicates.
|
|
19
|
+
*
|
|
20
|
+
* Two types here are public, because public `slotProps` and docs reference them:
|
|
21
|
+
* {@link OwnedAttribute} and {@link TrinitySlotProps}. Everything else is internal.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const { className, sx, id, ...rest } = props;
|
|
26
|
+
* const rootProps = useRootProps({ rest, id, owned: { role: 'log', 'aria-live': 'polite' }, componentName: 'ChatThread' });
|
|
27
|
+
* return <Box ref={ref} className={className} sx={mergeSx(baseSx, sx)} {...rootProps} />;
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
import * as React from 'react';
|
|
31
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
32
|
+
/**
|
|
33
|
+
* The attributes a Trinity component owns on its root and on its slots. A consumer value
|
|
34
|
+
* for one of them is ignored, with a development warning, so rest props cannot break the
|
|
35
|
+
* component's role or live-region model (ADR-04, ADR-19).
|
|
36
|
+
*
|
|
37
|
+
* @since 2.13.0
|
|
38
|
+
*/
|
|
39
|
+
export type OwnedAttribute = 'role' | 'aria-live' | 'aria-busy' | 'aria-relevant' | 'aria-atomic' | 'aria-modal';
|
|
40
|
+
/**
|
|
41
|
+
* Props of a Trinity-owned slot, as accepted by a component's `slotProps.<slot>`:
|
|
42
|
+
* `className`, `sx`, `id`, and the HTML attributes of the slot's element, including
|
|
43
|
+
* `aria-*`, `data-*` and event handlers. The {@link OwnedAttribute} attributes are not
|
|
44
|
+
* accepted. Slot names and elements are documented per component (ADR-04 (6)).
|
|
45
|
+
*
|
|
46
|
+
* @since 2.13.0
|
|
47
|
+
*/
|
|
48
|
+
export type TrinitySlotProps<El extends HTMLElement = HTMLElement> = {
|
|
49
|
+
/** Added to the slot's own class names. */
|
|
50
|
+
className?: string;
|
|
51
|
+
/** Applied after the slot's own styles. */
|
|
52
|
+
sx?: SxProps<Theme>;
|
|
53
|
+
/** Replaces the slot's generated id. The component's references follow it. */
|
|
54
|
+
id?: string;
|
|
55
|
+
} & Omit<React.HTMLAttributes<El>, OwnedAttribute | 'className' | 'id'> & {
|
|
56
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The rest props a component's root accepts: every HTML attribute of the root element,
|
|
60
|
+
* minus the component's own prop names and `color` (ADR-04 (3)).
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export type TrinityRootProps<El extends HTMLElement, Own> = Omit<React.HTMLAttributes<El>, keyof Own | 'color'>;
|
|
64
|
+
/** The owned attributes, as a runtime list. @internal */
|
|
65
|
+
export declare const OWNED_ATTRIBUTES: readonly OwnedAttribute[];
|
|
66
|
+
/** An id list: one id string, or several, with empty entries skipped. @internal */
|
|
67
|
+
export type IdList = string | ReadonlyArray<string | false | null | undefined> | false | null | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Joins id lists into one space-separated value: tokens in order, duplicates and empty
|
|
70
|
+
* entries removed. Returns `undefined` when nothing is left.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export declare function joinIds(...lists: IdList[]): string | undefined;
|
|
74
|
+
/** Whether `key` is one of the owned attributes. @internal */
|
|
75
|
+
export declare function isOwnedAttribute(key: string): key is OwnedAttribute;
|
|
76
|
+
/**
|
|
77
|
+
* Warns once per component that a consumer passed owned attributes, which were ignored.
|
|
78
|
+
* Silent in production builds.
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
export declare function warnOwnedAttributes(componentName: string, attributes: readonly string[], slotName?: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* Test-only: forget which components already warned, so a test can observe the warning
|
|
84
|
+
* again.
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export declare function __resetOwnedAttributeWarnings(): void;
|
|
88
|
+
/** Options of {@link useRootProps}. @internal */
|
|
89
|
+
export interface UseRootPropsOptions<El extends HTMLElement = HTMLElement> {
|
|
90
|
+
/** The consumer's rest props. Spread first. */
|
|
91
|
+
rest?: React.HTMLAttributes<El> | Record<string, unknown>;
|
|
92
|
+
/**
|
|
93
|
+
* The owned attributes this component sets on its root. Applied after `rest`; a consumer
|
|
94
|
+
* value never replaces them. Owned attributes left out here are not set at all.
|
|
95
|
+
*/
|
|
96
|
+
owned?: Partial<Record<OwnedAttribute, string | boolean | undefined>>;
|
|
97
|
+
/** The consumer's `id`, if the component takes it out of `rest`. Else `rest.id`, else `useId()`. */
|
|
98
|
+
id?: string;
|
|
99
|
+
/** The component's own description ids, joined before the consumer's `aria-describedby`. */
|
|
100
|
+
describedBy?: IdList;
|
|
101
|
+
/** The component's own label ids, joined before the consumer's `aria-labelledby`. */
|
|
102
|
+
labelledBy?: IdList;
|
|
103
|
+
/** Names the component in the development warning. */
|
|
104
|
+
componentName: string;
|
|
105
|
+
}
|
|
106
|
+
/** What {@link useRootProps} returns: props to spread on the root element. @internal */
|
|
107
|
+
export type RootPropsResult<El extends HTMLElement = HTMLElement> = React.HTMLAttributes<El> & {
|
|
108
|
+
id: string;
|
|
109
|
+
[attribute: string]: unknown;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Builds the root's props: the consumer's rest props, then the component's owned
|
|
113
|
+
* attributes, a stable `id` and the joined `aria-describedby` and `aria-labelledby`.
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export declare function useRootProps<El extends HTMLElement = HTMLElement>(options: UseRootPropsOptions<El>): RootPropsResult<El>;
|
|
117
|
+
//# sourceMappingURL=rootProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rootProps.d.ts","sourceRoot":"","sources":["../../../src/components/shared/rootProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,CAAC;AAEjH;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW,IAAI;IACnE,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,IAAI,CAAC,GAAG;IACtE,CAAC,aAAa,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC1E,CAAC;AAEJ;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC;AAEhH,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAAqF,CAAC;AAI5I,mFAAmF;AACnF,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;AAE1G;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAY9D;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,cAAc,CAEnE;AAID;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAWjH;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAED,iDAAiD;AACjD,MAAM,WAAW,mBAAmB,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW;IACvE,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1D;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IACtE,oGAAoG;IACpG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wFAAwF;AACxF,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW,IAAI,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,GAAG;IAC7F,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,EAAE,CAAC,CAiCxH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @internal — not part of the public API;
|
|
2
|
+
* @internal — not part of the public API; see ADR-02. Used by components that render untrusted content.
|
|
3
3
|
* @fileoverview Safe rendering of untrusted (model-, user- or data-supplied) content.
|
|
4
4
|
* @module components/shared/safeContent
|
|
5
5
|
*
|
|
@@ -43,7 +43,7 @@ export declare function isSafeHref(url: string | null | undefined): boolean;
|
|
|
43
43
|
* schemes (file:, asset:, tauri:, capacitor:).
|
|
44
44
|
*/
|
|
45
45
|
export declare function isSafeSrc(url: string | null | undefined): boolean;
|
|
46
|
-
/** @internal Test-only: forget which unsafe-URL warnings were shown (mirrors `
|
|
46
|
+
/** @internal Test-only: forget which unsafe-URL warnings were shown (mirrors `__resetDevWarnings` in warnDeprecated.ts). */
|
|
47
47
|
export declare function __resetUnsafeUrlWarnings(): void;
|
|
48
48
|
/**
|
|
49
49
|
* @internal
|
|
@@ -109,6 +109,12 @@ export interface RenderSafeHtmlOptions {
|
|
|
109
109
|
* `{ highlight: 'mark' }` renders a semantic `<mark>`. All other classes are dropped.
|
|
110
110
|
*/
|
|
111
111
|
allowClasses?: Record<string, 'span' | 'mark'>;
|
|
112
|
+
/**
|
|
113
|
+
* The id of the caller's new-tab hint ("Opens in a new tab", WI-56). Every kept
|
|
114
|
+
* `target="_blank"` anchor gets `aria-describedby` with this id, so its name
|
|
115
|
+
* stays its text. The caller renders the hint element once.
|
|
116
|
+
*/
|
|
117
|
+
newTabHintId?: string;
|
|
112
118
|
}
|
|
113
119
|
/**
|
|
114
120
|
* @internal
|
|
@@ -118,6 +124,7 @@ export interface RenderSafeHtmlOptions {
|
|
|
118
124
|
* Default tags: b, strong, i, em, code, br, p, ul, ol, li, span, a, mark.
|
|
119
125
|
* Anchors keep only a safe `href`, `title` and `target="_blank"`, and always
|
|
120
126
|
* get `rel="noopener noreferrer"`; an anchor with an unsafe href becomes text.
|
|
127
|
+
* With `newTabHintId`, a `target="_blank"` anchor is described by that hint.
|
|
121
128
|
*
|
|
122
129
|
* @example
|
|
123
130
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safeContent.d.ts","sourceRoot":"","sources":["../../../src/components/shared/safeContent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6F/B;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,MAAM,CAqBzE;AAqBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMlE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAQjE;AAID
|
|
1
|
+
{"version":3,"file":"safeContent.d.ts","sourceRoot":"","sources":["../../../src/components/shared/safeContent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6F/B;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,MAAM,CAqBzE;AAqBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMlE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAQjE;AAID,4HAA4H;AAC5H,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,GAAE,MAAM,GAAG,OAAgB,GAAG,IAAI,CAetH;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMnE;AA+BD,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAkC3D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAoBnG;AAMD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAIrD,CAAC;AAKH,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAEnD,CAAC;AA2BH,KAAK,KAAK,GACN;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,GACpF;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAQlC,+FAA+F;AAC/F,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,CAmIpD;AAoBD,sDAAsD;AACtD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;AAEzH,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA6MD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,qBAA0B,GAAG,KAAK,CAAC,SAAS,CAIpH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Target-size hit area: one recipe that grows a compact control's pointer target to
|
|
3
|
+
* the 24px floor without changing how it looks.
|
|
4
|
+
* @module components/shared/targetSize
|
|
5
|
+
*
|
|
6
|
+
* @internal — not part of the public API; see ADR-02
|
|
7
|
+
*
|
|
8
|
+
* WCAG 2.2 SC 2.5.8 Target Size (Minimum, AA) asks for a pointer target of at least 24 by 24 CSS
|
|
9
|
+
* pixels. The program's floor is that 24px (DN-12, 2026-10-05; the record is
|
|
10
|
+
* docs/remediation/primitives/target-size.md). Standard MUI controls already meet it. A compact
|
|
11
|
+
* control whose visual box is smaller (a 20px pill, a dense icon button) gets a larger hit area
|
|
12
|
+
* here, so its look and its layout stay the same:
|
|
13
|
+
*
|
|
14
|
+
* - the host keeps its box and gets `position: relative`;
|
|
15
|
+
* - an `::after` pseudo-element is the hit area. It is centred on the host and is
|
|
16
|
+
* `max(box, floor)` on each axis: `inset: min(0px, (100% - floor) / 2)`. A host that is already
|
|
17
|
+
* 24px or larger on an axis gets a hit area equal to its box on that axis, so the recipe is a
|
|
18
|
+
* no-op there;
|
|
19
|
+
* - the pseudo-element paints nothing. A press on it is a press on the host (hit testing reports
|
|
20
|
+
* the originating element), so the host's own handlers, cursor and hover styles apply.
|
|
21
|
+
*
|
|
22
|
+
* The inset is symmetric, so the recipe needs no physical `left`/`right` and works the same in
|
|
23
|
+
* right-to-left layouts.
|
|
24
|
+
*
|
|
25
|
+
* Use it on a control that is not an inline target in a sentence (the 2.5.8 inline exception) and
|
|
26
|
+
* whose visual size cannot grow. Do not hand-roll a local `::before`/`::after` hit area instead:
|
|
27
|
+
* the remediation stop rule forbids local hit-area hacks (WI-54).
|
|
28
|
+
*
|
|
29
|
+
* Limits:
|
|
30
|
+
* - The host must not be absolutely or fixed positioned (the recipe sets `position: relative`);
|
|
31
|
+
* put the recipe on an inner element instead.
|
|
32
|
+
* - The host must not use its own `::after`.
|
|
33
|
+
* - An ancestor with `overflow: hidden` clips the hit area at its edge, like any other content.
|
|
34
|
+
* - Two compact controls closer than 24px centre to centre would share hit area; the later one in
|
|
35
|
+
* the DOM wins. Keep such controls at least 24px apart (the 2.5.8 spacing rule).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <IconButton aria-label="Remove filter" sx={[{ width: 20, height: 20 }, targetSizeHitAreaSx]}>
|
|
40
|
+
* <CloseIcon fontSize="inherit" />
|
|
41
|
+
* </IconButton>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
45
|
+
/**
|
|
46
|
+
* One style object of an `sx` array. Narrower than `SxProps<Theme>` (and assignable to it), so a
|
|
47
|
+
* host can combine the recipe with its own styles: `sx={[{ width: 20 }, targetSizeHitAreaSx]}`.
|
|
48
|
+
*/
|
|
49
|
+
type SxStyleObject = Exclude<Extract<SxProps<Theme>, ReadonlyArray<unknown>>[number], boolean | ((theme: Theme) => unknown)>;
|
|
50
|
+
/**
|
|
51
|
+
* The floor in CSS pixels: `scaleHierarchy.touchTargets.floor` (24, DN-12).
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare const TARGET_SIZE_FLOOR_PX: number;
|
|
56
|
+
/**
|
|
57
|
+
* The hit-area recipe. Add it to the host's `sx` array after the component's own styles and
|
|
58
|
+
* before the consumer's `sx`, so a consumer can still override it deliberately.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare const targetSizeHitAreaSx: SxStyleObject;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=targetSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"targetSize.d.ts","sourceRoot":"","sources":["../../../src/components/shared/targetSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG3D;;;GAGG;AACH,KAAK,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC;AAE7H;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAA0C,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAOjC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview useContainerInlineSize: an element's inline size from a ResizeObserver
|
|
3
|
+
* (master-plan H-20, ADR-11 (5), ADR-27).
|
|
4
|
+
* @module components/shared/useContainerInlineSize
|
|
5
|
+
*
|
|
6
|
+
* @internal — not part of the public API; see ADR-02
|
|
7
|
+
*
|
|
8
|
+
* For a switch CSS container queries cannot express: a structural change, such as
|
|
9
|
+
* ListDetailTemplate's split view becoming a list with a full-width drawer
|
|
10
|
+
* (`collapseMode="container"`). Styling that only changes properties uses
|
|
11
|
+
* `containerUp` / `containerDown` (containerQueries.ts) instead.
|
|
12
|
+
*
|
|
13
|
+
* Semantics:
|
|
14
|
+
*
|
|
15
|
+
* - The size is `null` until the element is measured: on the server and in the first client
|
|
16
|
+
* render, so hydration matches (ADR-27's stable initial value). Callers treat `null` as
|
|
17
|
+
* "wide enough" (the split layout).
|
|
18
|
+
* - The element is passed through the returned callback ref, so an element that is replaced
|
|
19
|
+
* (a new root node) is observed again.
|
|
20
|
+
* - The size is the border box's content inline size (`contentBoxSize[0].inlineSize`, else
|
|
21
|
+
* `contentRect.width`), updated on every ResizeObserver report; state changes only when the
|
|
22
|
+
* value changes.
|
|
23
|
+
* - Without ResizeObserver (an old engine, a server) the size stays `null`.
|
|
24
|
+
* - `enabled: false` observes nothing and reports `null`.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const [inlineSize, measureRef] = useContainerInlineSize<HTMLDivElement>({ enabled: collapseMode === 'container' });
|
|
29
|
+
* const handleRef = useForkRef(ref, measureRef);
|
|
30
|
+
* const collapsed = inlineSize !== null && inlineSize < threshold;
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
/** Options of {@link useContainerInlineSize}. @internal */
|
|
34
|
+
export interface UseContainerInlineSizeOptions {
|
|
35
|
+
/** Observe the element. Default `true`; `false` reports `null`. */
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The inline size of the element given to the returned ref, or `null` before it is measured.
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare function useContainerInlineSize<El extends HTMLElement = HTMLElement>(options?: UseContainerInlineSizeOptions): [inlineSize: number | null, ref: (node: El | null) => void];
|
|
43
|
+
//# sourceMappingURL=useContainerInlineSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContainerInlineSize.d.ts","sourceRoot":"","sources":["../../../src/components/shared/useContainerInlineSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,2DAA2D;AAC3D,MAAM,WAAW,6BAA6B;IAC5C,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AASD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,WAAW,GAAG,WAAW,EACzE,OAAO,GAAE,6BAAkC,GAC1C,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC,CAqB7D"}
|