@d4gger/design-system 3.0.1 → 4.0.1
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/README.md +19 -0
- package/dist/brand-effects.css +5 -3
- package/dist/components/accordion.css +9 -2
- package/dist/components/alert/Alert.cjs +27 -9
- package/dist/components/alert/Alert.cjs.map +2 -2
- package/dist/components/alert/Alert.d.cts +6 -0
- package/dist/components/alert/Alert.d.cts.map +1 -1
- package/dist/components/alert/Alert.d.mts +6 -0
- package/dist/components/alert/Alert.d.mts.map +1 -1
- package/dist/components/alert/Alert.d.ts +6 -0
- package/dist/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +28 -10
- package/dist/components/alert/Alert.js.map +2 -2
- package/dist/components/alert.css +73 -3
- package/dist/components/article-nodes.css +16 -1
- package/dist/components/articleNodes/ArticleNodes.cjs +46 -5
- package/dist/components/articleNodes/ArticleNodes.cjs.map +2 -2
- package/dist/components/articleNodes/ArticleNodes.d.cts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.cts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.d.mts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.mts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.d.ts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.ts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.js +46 -5
- package/dist/components/articleNodes/ArticleNodes.js.map +2 -2
- package/dist/components/articleNodes/articleExtensions.cjs +21 -4
- package/dist/components/articleNodes/articleExtensions.cjs.map +2 -2
- package/dist/components/articleNodes/articleExtensions.d.cts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.cts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.d.mts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.mts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.d.ts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.ts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.js +21 -4
- package/dist/components/articleNodes/articleExtensions.js.map +2 -2
- package/dist/components/articleNodes/articleNodeViews.cjs +154 -0
- package/dist/components/articleNodes/articleNodeViews.cjs.map +7 -0
- package/dist/components/articleNodes/articleNodeViews.d.cts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.cts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.d.mts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.mts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.d.ts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.ts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.js +124 -0
- package/dist/components/articleNodes/articleNodeViews.js.map +7 -0
- package/dist/components/articleNodes/articleNodes.props.cjs.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.cts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.cts.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.mts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.mts.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.ts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.ts.map +1 -1
- package/dist/components/banner.css +5 -4
- package/dist/components/blockquote.css +7 -4
- package/dist/components/bottom-dock.css +140 -0
- package/dist/components/bottomDock/BottomDock.cjs +140 -0
- package/dist/components/bottomDock/BottomDock.cjs.map +7 -0
- package/dist/components/bottomDock/BottomDock.d.cts +25 -0
- package/dist/components/bottomDock/BottomDock.d.cts.map +1 -0
- package/dist/components/bottomDock/BottomDock.d.mts +25 -0
- package/dist/components/bottomDock/BottomDock.d.mts.map +1 -0
- package/dist/components/bottomDock/BottomDock.d.ts +25 -0
- package/dist/components/bottomDock/BottomDock.d.ts.map +1 -0
- package/dist/components/bottomDock/BottomDock.js +110 -0
- package/dist/components/bottomDock/BottomDock.js.map +7 -0
- package/dist/components/bottomDock/bottomDock.props.cjs +49 -0
- package/dist/components/bottomDock/bottomDock.props.cjs.map +7 -0
- package/dist/components/bottomDock/bottomDock.props.d.cts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.cts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.d.mts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.mts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.d.ts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.ts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.js +29 -0
- package/dist/components/bottomDock/bottomDock.props.js.map +7 -0
- package/dist/components/breadcrumb.css +24 -3
- package/dist/components/callout.css +20 -7
- package/dist/components/card.css +9 -1
- package/dist/components/code.css +29 -13
- package/dist/components/collapsible/Collapsible.cjs +14 -0
- package/dist/components/collapsible/Collapsible.cjs.map +2 -2
- package/dist/components/collapsible/Collapsible.d.cts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.mts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/Collapsible.js +14 -0
- package/dist/components/collapsible/Collapsible.js.map +2 -2
- package/dist/components/collapsible.css +10 -1
- package/dist/components/command.css +0 -2
- package/dist/components/comment-thread.css +15 -7
- package/dist/components/commentThread/CommentThread.cjs +45 -17
- package/dist/components/commentThread/CommentThread.cjs.map +2 -2
- package/dist/components/commentThread/CommentThread.d.cts +6 -6
- package/dist/components/commentThread/CommentThread.d.cts.map +1 -1
- package/dist/components/commentThread/CommentThread.d.mts +6 -6
- package/dist/components/commentThread/CommentThread.d.mts.map +1 -1
- package/dist/components/commentThread/CommentThread.d.ts +6 -6
- package/dist/components/commentThread/CommentThread.d.ts.map +1 -1
- package/dist/components/commentThread/CommentThread.js +45 -17
- package/dist/components/commentThread/CommentThread.js.map +2 -2
- package/dist/components/commentThread/commentThread.props.cjs.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.cts +24 -0
- package/dist/components/commentThread/commentThread.props.d.cts.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.mts +24 -0
- package/dist/components/commentThread/commentThread.props.d.mts.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.ts +24 -0
- package/dist/components/commentThread/commentThread.props.d.ts.map +1 -1
- package/dist/components/config-drawer.css +7 -3
- package/dist/components/configDrawer/ConfigDrawer.cjs +1 -1
- package/dist/components/configDrawer/ConfigDrawer.cjs.map +2 -2
- package/dist/components/configDrawer/ConfigDrawer.js +1 -1
- package/dist/components/configDrawer/ConfigDrawer.js.map +2 -2
- package/dist/components/context-menu.css +3 -1
- package/dist/components/contextMenu/ContextMenu.cjs +37 -6
- package/dist/components/contextMenu/ContextMenu.cjs.map +2 -2
- package/dist/components/contextMenu/ContextMenu.d.cts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.cts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.d.mts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.mts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.js +37 -6
- package/dist/components/contextMenu/ContextMenu.js.map +2 -2
- package/dist/components/dialog.css +1 -1
- package/dist/components/drawer.css +23 -6
- package/dist/components/dropdownMenu/DropdownMenu.cjs +10 -5
- package/dist/components/dropdownMenu/DropdownMenu.cjs.map +2 -2
- package/dist/components/dropdownMenu/DropdownMenu.d.cts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.d.mts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.js +10 -5
- package/dist/components/dropdownMenu/DropdownMenu.js.map +2 -2
- package/dist/components/environment-ribbon.css +73 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs +69 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs.map +7 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js +39 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs +39 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js +19 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js.map +7 -0
- package/dist/components/field.css +5 -0
- package/dist/components/file-upload.css +36 -9
- package/dist/components/floating-panel.css +49 -18
- package/dist/components/floatingPanel/FloatingPanel.cjs +156 -58
- package/dist/components/floatingPanel/FloatingPanel.cjs.map +2 -2
- package/dist/components/floatingPanel/FloatingPanel.d.cts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.d.mts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.d.ts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.js +156 -58
- package/dist/components/floatingPanel/FloatingPanel.js.map +2 -2
- package/dist/components/grid/Grid.cjs +24 -35
- package/dist/components/grid/Grid.cjs.map +2 -2
- package/dist/components/grid/Grid.d.cts.map +1 -1
- package/dist/components/grid/Grid.d.mts.map +1 -1
- package/dist/components/grid/Grid.d.ts.map +1 -1
- package/dist/components/grid/Grid.js +24 -35
- package/dist/components/grid/Grid.js.map +2 -2
- package/dist/components/heading/Heading.cjs +1 -8
- package/dist/components/heading/Heading.cjs.map +2 -2
- package/dist/components/heading/Heading.d.cts.map +1 -1
- package/dist/components/heading/Heading.d.mts.map +1 -1
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +1 -8
- package/dist/components/heading/Heading.js.map +2 -2
- package/dist/components/heading/heading.props.cjs +9 -9
- package/dist/components/heading/heading.props.cjs.map +2 -2
- package/dist/components/heading/heading.props.d.cts +42 -43
- package/dist/components/heading/heading.props.d.cts.map +1 -1
- package/dist/components/heading/heading.props.d.mts +42 -43
- package/dist/components/heading/heading.props.d.mts.map +1 -1
- package/dist/components/heading/heading.props.d.ts +42 -43
- package/dist/components/heading/heading.props.d.ts.map +1 -1
- package/dist/components/heading/heading.props.js +9 -9
- package/dist/components/heading/heading.props.js.map +2 -2
- package/dist/components/heading.css +127 -104
- package/dist/components/hover-card.css +5 -2
- package/dist/components/icon/Icon.cjs +19 -0
- package/dist/components/icon/Icon.cjs.map +2 -2
- package/dist/components/icon/Icon.d.cts +29 -1
- package/dist/components/icon/Icon.d.cts.map +1 -1
- package/dist/components/icon/Icon.d.mts +29 -1
- package/dist/components/icon/Icon.d.mts.map +1 -1
- package/dist/components/icon/Icon.d.ts +29 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +25 -0
- package/dist/components/icon/Icon.js.map +2 -2
- package/dist/components/icon/icons.cjs +14 -0
- package/dist/components/icon/icons.cjs.map +2 -2
- package/dist/components/icon/icons.d.cts +35 -0
- package/dist/components/icon/icons.d.cts.map +1 -1
- package/dist/components/icon/icons.d.mts +35 -0
- package/dist/components/icon/icons.d.mts.map +1 -1
- package/dist/components/icon/icons.d.ts +35 -0
- package/dist/components/icon/icons.d.ts.map +1 -1
- package/dist/components/icon/icons.js +14 -0
- package/dist/components/icon/icons.js.map +2 -2
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.cjs.map +2 -2
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +2 -2
- package/dist/components/label.css +3 -0
- package/dist/components/link.css +33 -97
- package/dist/components/notification-center.css +58 -10
- package/dist/components/notificationCenter/NotificationCenter.cjs +27 -17
- package/dist/components/notificationCenter/NotificationCenter.cjs.map +2 -2
- package/dist/components/notificationCenter/NotificationCenter.d.cts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.cts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.mts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.mts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.ts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.js +28 -18
- package/dist/components/notificationCenter/NotificationCenter.js.map +2 -2
- package/dist/components/page-header.css +21 -0
- package/dist/components/pageHeader/PageHeader.cjs +10 -2
- package/dist/components/pageHeader/PageHeader.cjs.map +2 -2
- package/dist/components/pageHeader/PageHeader.d.cts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.mts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/pageHeader/PageHeader.js +10 -2
- package/dist/components/pageHeader/PageHeader.js.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.cjs +7 -1
- package/dist/components/pageHeader/pageHeader.props.cjs.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.d.cts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.cts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.mts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.mts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.ts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.ts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.js +7 -1
- package/dist/components/pageHeader/pageHeader.props.js.map +2 -2
- package/dist/components/pills/Pills.cjs +1 -1
- package/dist/components/pills/Pills.cjs.map +2 -2
- package/dist/components/pills/Pills.js +2 -2
- package/dist/components/pills/Pills.js.map +2 -2
- package/dist/components/pills.css +6 -0
- package/dist/components/popover.css +45 -6
- package/dist/components/prose.css +3 -3
- package/dist/components/qr-code.css +5 -2
- package/dist/components/qrCode/QrCode.cjs +14 -11
- package/dist/components/qrCode/QrCode.cjs.map +2 -2
- package/dist/components/qrCode/QrCode.d.cts.map +1 -1
- package/dist/components/qrCode/QrCode.d.mts.map +1 -1
- package/dist/components/qrCode/QrCode.d.ts.map +1 -1
- package/dist/components/qrCode/QrCode.js +14 -11
- package/dist/components/qrCode/QrCode.js.map +2 -2
- package/dist/components/resizable.css +20 -4
- package/dist/components/rich-text-editor.css +50 -14
- package/dist/components/richTextEditor/EditorTools.cjs +226 -0
- package/dist/components/richTextEditor/EditorTools.cjs.map +7 -0
- package/dist/components/richTextEditor/EditorTools.d.cts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.cts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.d.mts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.mts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.d.ts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.ts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.js +196 -0
- package/dist/components/richTextEditor/EditorTools.js.map +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.cjs +96 -0
- package/dist/components/richTextEditor/MentionSuggestions.cjs.map +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.cts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.cts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.mts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.mts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.ts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.ts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.js +66 -0
- package/dist/components/richTextEditor/MentionSuggestions.js.map +7 -0
- package/dist/components/richTextEditor/RichTextEditor.cjs +53 -206
- package/dist/components/richTextEditor/RichTextEditor.cjs.map +3 -3
- package/dist/components/richTextEditor/RichTextEditor.d.cts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.cts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.mts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.mts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.ts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.js +53 -206
- package/dist/components/richTextEditor/RichTextEditor.js.map +3 -3
- package/dist/components/richTextEditor/editorTokens.cjs +75 -0
- package/dist/components/richTextEditor/editorTokens.cjs.map +7 -0
- package/dist/components/richTextEditor/editorTokens.d.cts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.cts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.d.mts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.mts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.d.ts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.ts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.js +55 -0
- package/dist/components/richTextEditor/editorTokens.js.map +7 -0
- package/dist/components/scroll-area.css +12 -0
- package/dist/components/scrollArea/ScrollArea.cjs +12 -1
- package/dist/components/scrollArea/ScrollArea.cjs.map +2 -2
- package/dist/components/scrollArea/ScrollArea.d.cts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.d.mts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.js +12 -1
- package/dist/components/scrollArea/ScrollArea.js.map +2 -2
- package/dist/components/segmentedControl/SegmentedControl.cjs +2 -2
- package/dist/components/segmentedControl/SegmentedControl.cjs.map +2 -2
- package/dist/components/segmentedControl/SegmentedControl.d.cts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.d.mts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.js +2 -2
- package/dist/components/segmentedControl/SegmentedControl.js.map +2 -2
- package/dist/components/separator.css +3 -9
- package/dist/components/sidebar/Sidebar.cjs +17 -5
- package/dist/components/sidebar/Sidebar.cjs.map +2 -2
- package/dist/components/sidebar/Sidebar.d.cts +12 -1
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.mts +12 -1
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +12 -1
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +17 -5
- package/dist/components/sidebar/Sidebar.js.map +2 -2
- package/dist/components/sidebar/sidebar.props.cjs +8 -1
- package/dist/components/sidebar/sidebar.props.cjs.map +2 -2
- package/dist/components/sidebar/sidebar.props.d.cts +9 -1
- package/dist/components/sidebar/sidebar.props.d.cts.map +1 -1
- package/dist/components/sidebar/sidebar.props.d.mts +9 -1
- package/dist/components/sidebar/sidebar.props.d.mts.map +1 -1
- package/dist/components/sidebar/sidebar.props.d.ts +9 -1
- package/dist/components/sidebar/sidebar.props.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.props.js +8 -1
- package/dist/components/sidebar/sidebar.props.js.map +2 -2
- package/dist/components/sidebar.css +86 -13
- package/dist/components/sonner.css +78 -16
- package/dist/components/stepper.css +23 -12
- package/dist/components/tab-nav.css +25 -13
- package/dist/components/tabNav/TabNav.cjs +1 -4
- package/dist/components/tabNav/TabNav.cjs.map +2 -2
- package/dist/components/tabNav/TabNav.d.cts.map +1 -1
- package/dist/components/tabNav/TabNav.d.mts.map +1 -1
- package/dist/components/tabNav/TabNav.d.ts.map +1 -1
- package/dist/components/tabNav/TabNav.js +1 -4
- package/dist/components/tabNav/TabNav.js.map +2 -2
- package/dist/components/table-of-contents.css +12 -2
- package/dist/components/tableOfContents/TableOfContents.cjs +11 -4
- package/dist/components/tableOfContents/TableOfContents.cjs.map +2 -2
- package/dist/components/tableOfContents/TableOfContents.d.cts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.d.mts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.d.ts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.js +11 -4
- package/dist/components/tableOfContents/TableOfContents.js.map +2 -2
- package/dist/components/tabs/Tabs.cjs +39 -54
- package/dist/components/tabs/Tabs.cjs.map +2 -2
- package/dist/components/tabs/Tabs.d.cts.map +1 -1
- package/dist/components/tabs/Tabs.d.mts.map +1 -1
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +39 -54
- package/dist/components/tabs/Tabs.js.map +2 -2
- package/dist/components/tabs.css +52 -7
- package/dist/components/text/text.props.cjs +9 -9
- package/dist/components/text/text.props.cjs.map +2 -2
- package/dist/components/text/text.props.d.cts +42 -43
- package/dist/components/text/text.props.d.cts.map +1 -1
- package/dist/components/text/text.props.d.mts +42 -43
- package/dist/components/text/text.props.d.mts.map +1 -1
- package/dist/components/text/text.props.d.ts +42 -43
- package/dist/components/text/text.props.d.ts.map +1 -1
- package/dist/components/text/text.props.js +9 -9
- package/dist/components/text/text.props.js.map +2 -2
- package/dist/components/text/typography.props.cjs +32 -0
- package/dist/components/text/typography.props.cjs.map +7 -0
- package/dist/components/text/typography.props.d.cts +3 -0
- package/dist/components/text/typography.props.d.cts.map +1 -0
- package/dist/components/text/typography.props.d.mts +3 -0
- package/dist/components/text/typography.props.d.mts.map +1 -0
- package/dist/components/text/typography.props.d.ts +3 -0
- package/dist/components/text/typography.props.d.ts.map +1 -0
- package/dist/components/text/typography.props.js +12 -0
- package/dist/components/text/typography.props.js.map +7 -0
- package/dist/components/text-field.css +1 -0
- package/dist/components/text.css +41 -6
- package/dist/components/theme-panel.css +6 -0
- package/dist/components/toast/Toast.cjs +3 -1
- package/dist/components/toast/Toast.cjs.map +2 -2
- package/dist/components/toast/Toast.d.cts.map +1 -1
- package/dist/components/toast/Toast.d.mts.map +1 -1
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +3 -1
- package/dist/components/toast/Toast.js.map +2 -2
- package/dist/components/toast.css +36 -36
- package/dist/components/toggle-tip.css +58 -9
- package/dist/components/toggleTip/ToggleTip.cjs +9 -5
- package/dist/components/toggleTip/ToggleTip.cjs.map +2 -2
- package/dist/components/toggleTip/ToggleTip.d.cts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.d.mts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.d.ts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.js +9 -5
- package/dist/components/toggleTip/ToggleTip.js.map +2 -2
- package/dist/components/toolbar/Toolbar.cjs +10 -7
- package/dist/components/toolbar/Toolbar.cjs.map +2 -2
- package/dist/components/toolbar/Toolbar.js +10 -7
- package/dist/components/toolbar/Toolbar.js.map +2 -2
- package/dist/components/toolbar.css +58 -4
- package/dist/components/tooltip.css +9 -5
- package/dist/components/tree-view.css +17 -3
- package/dist/components/treeView/TreeView.cjs +76 -21
- package/dist/components/treeView/TreeView.cjs.map +2 -2
- package/dist/components/treeView/TreeView.d.cts.map +1 -1
- package/dist/components/treeView/TreeView.d.mts.map +1 -1
- package/dist/components/treeView/TreeView.d.ts.map +1 -1
- package/dist/components/treeView/TreeView.js +76 -21
- package/dist/components/treeView/TreeView.js.map +2 -2
- package/dist/components.css +2 -0
- package/dist/docs/README.md +2 -0
- package/dist/docs/component-contract.md +7 -4
- package/dist/docs/component-index.json +17 -1
- package/dist/docs/components/accordion.md +5 -36
- package/dist/docs/components/alert.md +44 -17
- package/dist/docs/components/article-nodes.md +59 -2
- package/dist/docs/components/aspect-ratio.md +3 -26
- package/dist/docs/components/banner.md +7 -7
- package/dist/docs/components/blockquote.md +15 -14
- package/dist/docs/components/bottom-dock.md +146 -0
- package/dist/docs/components/box.md +3 -34
- package/dist/docs/components/breadcrumb.md +13 -8
- package/dist/docs/components/callout.md +18 -7
- package/dist/docs/components/card.md +10 -3
- package/dist/docs/components/code.md +33 -220
- package/dist/docs/components/collapsible.md +16 -35
- package/dist/docs/components/command.md +2 -0
- package/dist/docs/components/comment-thread.md +51 -1
- package/dist/docs/components/config-drawer.md +72 -171
- package/dist/docs/components/container.md +2 -0
- package/dist/docs/components/context-menu.md +19 -5
- package/dist/docs/components/dialog.md +4 -2
- package/dist/docs/components/drawer.md +17 -6
- package/dist/docs/components/dropdown-menu.md +11 -2
- package/dist/docs/components/em.md +1 -1
- package/dist/docs/components/environment-ribbon.md +126 -0
- package/dist/docs/components/field.md +2 -0
- package/dist/docs/components/file-upload.md +13 -7
- package/dist/docs/components/floating-panel.md +79 -285
- package/dist/docs/components/form.md +4 -0
- package/dist/docs/components/grid.md +11 -60
- package/dist/docs/components/heading.md +35 -32
- package/dist/docs/components/hover-card.md +9 -1
- package/dist/docs/components/icon.md +1 -0
- package/dist/docs/components/kbd.md +2 -0
- package/dist/docs/components/label.md +11 -9
- package/dist/docs/components/link.md +31 -209
- package/dist/docs/components/notification-center.md +30 -15
- package/dist/docs/components/page-header.md +20 -6
- package/dist/docs/components/pagination.md +4 -0
- package/dist/docs/components/pills.md +13 -4
- package/dist/docs/components/popover.md +10 -3
- package/dist/docs/components/prose.md +9 -0
- package/dist/docs/components/qr-code.md +12 -12
- package/dist/docs/components/quote.md +9 -4
- package/dist/docs/components/resizable.md +26 -18
- package/dist/docs/components/rich-text-editor.md +68 -18
- package/dist/docs/components/scroll-area.md +17 -9
- package/dist/docs/components/section.md +3 -38
- package/dist/docs/components/segmented-control.md +1 -1
- package/dist/docs/components/segmented-meter.md +9 -0
- package/dist/docs/components/separator.md +10 -46
- package/dist/docs/components/sidebar.md +34 -9
- package/dist/docs/components/sonner.md +25 -16
- package/dist/docs/components/stepper.md +8 -33
- package/dist/docs/components/strong.md +1 -1
- package/dist/docs/components/tab-nav.md +33 -96
- package/dist/docs/components/table-of-contents.md +8 -2
- package/dist/docs/components/tabs.md +19 -50
- package/dist/docs/components/text-field.md +1 -0
- package/dist/docs/components/text.md +34 -28
- package/dist/docs/components/theme-panel.md +3 -28
- package/dist/docs/components/theme.md +7 -3
- package/dist/docs/components/toast.md +27 -13
- package/dist/docs/components/toggle-tip.md +58 -241
- package/dist/docs/components/toolbar.md +16 -39
- package/dist/docs/components/tooltip.md +13 -7
- package/dist/docs/components/tree-view.md +22 -55
- package/dist/docs/consumer-guide.md +11 -4
- package/dist/generated/tokens.cjs +1 -0
- package/dist/generated/tokens.cjs.map +2 -2
- package/dist/generated/tokens.d.cts.map +1 -1
- package/dist/generated/tokens.d.mts.map +1 -1
- package/dist/generated/tokens.d.ts.map +1 -1
- package/dist/generated/tokens.js +1 -0
- package/dist/generated/tokens.js.map +2 -2
- package/dist/styles.css +1921 -1349
- package/dist/tokens.css +346 -362
- package/package.json +1 -1
|
@@ -179,42 +179,11 @@ Box has no motion. The motion section is intentionally empty.
|
|
|
179
179
|
|
|
180
180
|
- Box is not interactive and does not require an accessible name on its own. When Box wraps an interactive element, the interactive element's accessible name is the source.
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
**Default story:**
|
|
185
|
-
|
|
186
|
-
- Renders `Box` with no extra props and a child node. Asserts the root class is `dsx-box` and the host element is a `div`.
|
|
187
|
-
|
|
188
|
-
**Padding story:**
|
|
189
|
-
|
|
190
|
-
- Renders `Box padding="md"` and `Box p="md"` side by side. Asserts the matching `dsx-r-p-md` class and that `--dsx-box-padding` plus `--dsx-r-p` resolve to `var(--dsx-space-md)`.
|
|
191
|
-
|
|
192
|
-
**Surface story:**
|
|
193
|
-
|
|
194
|
-
- Renders `Box surface="surface-raised" border borderTone="strong" radius="md" shadow="2"`. Asserts that the `dsx-box` root class is present and the inline style carries the resolved CSS variables for surface, border, and shadow.
|
|
195
|
-
|
|
196
|
-
**Responsive story:**
|
|
182
|
+
The padding matrix uses outlined content bounds and the surface matrix uses actual Box surface props. The live example offers sm/md/lg padding controls (8/16/24px) around a fixed inner surface.
|
|
197
183
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
**Token story:**
|
|
201
|
-
|
|
202
|
-
- Box does not honor `data-accent-color`; surface tones come from `var(--dsx-color-*)` and respond to the active `Theme` wrapper automatically. Render `Box` inside a `Theme` with `accentColor="silver"` and `accentColor="bronze"`. The story asserts the surface variables come from the theme, not the brand color.
|
|
203
|
-
|
|
204
|
-
**A11y story:**
|
|
205
|
-
|
|
206
|
-
- Use `vitest-axe` against the rendered `Box`. The default story is a non-semantic `div` with no axe-critical content; tests assert no violations on the default render.
|
|
207
|
-
|
|
208
|
-
**Props exposed in the playground controls:**
|
|
184
|
+
## Playground demo spec
|
|
209
185
|
|
|
210
|
-
|
|
211
|
-
|---|---|---|
|
|
212
|
-
| `display` | select | `block` |
|
|
213
|
-
| `padding` | select | `md` |
|
|
214
|
-
| `radius` | select | `md` |
|
|
215
|
-
| `surface` | select | `surface` |
|
|
216
|
-
| `border` | boolean | `false` |
|
|
217
|
-
| `shadow` | select | `none` |
|
|
186
|
+
The matrix exposes padding sm/md/lg and three neutral surfaces. Every cell outlines the content bounds inside a Box with an actual padding/surface prop. The live example changes padding between 8/16/24px around an unchanged inner project surface. It uses native Buttons with aria-pressed and remains bounded at 320px.
|
|
218
187
|
|
|
219
188
|
## Wiring notes
|
|
220
189
|
|
|
@@ -112,7 +112,7 @@ Rules:
|
|
|
112
112
|
|
|
113
113
|
**Responsive behavior:**
|
|
114
114
|
|
|
115
|
-
- The component does not
|
|
115
|
+
- The component does not use width breakpoints. `size` is single-value only; the prop def is not `responsive: true`.
|
|
116
116
|
|
|
117
117
|
**Reduced motion:**
|
|
118
118
|
|
|
@@ -127,17 +127,18 @@ Rules:
|
|
|
127
127
|
| Link radius | `var(--dsx-rounded-md)` | Rounded tap area. |
|
|
128
128
|
| Link color | `var(--dsx-color-on-surface)` | Default link. |
|
|
129
129
|
| Link hover background | `var(--dsx-effect-hover-ghost)` | Hover. |
|
|
130
|
-
| Link hover color | `var(--dsx-color-
|
|
130
|
+
| Link hover color | `var(--dsx-color-accent-indicator)` | Hover. |
|
|
131
131
|
| Link focus ring | `var(--dsx-shadow-focus-ring)` | Visible focus. |
|
|
132
132
|
| Link disabled opacity | `var(--dsx-opacity-disabled)` | Disabled state. |
|
|
133
|
-
| Page
|
|
133
|
+
| Page background | `var(--dsx-color-accent-surface)` | Subtle current-page fill. |
|
|
134
|
+
| Page color | `var(--dsx-color-accent-indicator)` | Current page text. |
|
|
134
135
|
| Separator color | `var(--dsx-color-on-surface-variant)` | Divider. |
|
|
135
136
|
| Typography (link and page) | `var(--dsx-typography-body-medium-*)` | Body copy. |
|
|
136
137
|
|
|
137
138
|
Rules:
|
|
138
139
|
|
|
139
140
|
- No raw color, spacing, radius, or motion values in `breadcrumb.css`.
|
|
140
|
-
-
|
|
141
|
+
- Breadcrumb inherits the active theme accent roles: hover/current-page foreground uses accent-indicator and the current-page fill uses accent-surface.
|
|
141
142
|
|
|
142
143
|
## Motion contract
|
|
143
144
|
|
|
@@ -176,7 +177,7 @@ Rules:
|
|
|
176
177
|
|
|
177
178
|
**Color and meaning:**
|
|
178
179
|
|
|
179
|
-
- The current page is communicated by `aria-current` and the
|
|
180
|
+
- The current page is communicated by `aria-current` and the accent foreground and current-page label. The color is not the only signal.
|
|
180
181
|
|
|
181
182
|
**Naming:**
|
|
182
183
|
|
|
@@ -185,6 +186,8 @@ Rules:
|
|
|
185
186
|
|
|
186
187
|
## Playground demo spec
|
|
187
188
|
|
|
189
|
+
Size scales the link/page typography and padding: sm uses body-small and space-xs; md retains body-medium with space-xs/space-sm; lg uses body-large and space-sm/space-md. Link targets have a minimum 24px height, and long labels wrap within the available container.
|
|
190
|
+
|
|
188
191
|
**Default story:**
|
|
189
192
|
|
|
190
193
|
- Renders a `Breadcrumb` with three items: Home (link), Products (link), Keyboard (page). Asserts the root has `dsx-breadcrumb` and `data-size="md"`. Asserts the page has `aria-current="page"`.
|
|
@@ -273,7 +276,7 @@ Rules:
|
|
|
273
276
|
| `<Link text>` | typography | `var(--dsx-typography-body-medium-*)` | Typography | `typography` |
|
|
274
277
|
| `<Link text>` | color | `var(--dsx-color-on-surface)` | Color | `fills` |
|
|
275
278
|
| `<Page text>` | typography | `var(--dsx-typography-body-medium-*)` | Typography | `typography` |
|
|
276
|
-
| `<Page text>` | color | `var(--dsx-color-
|
|
279
|
+
| `<Page text>` | color | `var(--dsx-color-accent-indicator)` | Color | `fills` |
|
|
277
280
|
| `<Separator icon>` | color | `var(--dsx-color-on-surface-variant)` | Color | `fills` |
|
|
278
281
|
|
|
279
282
|
### State transformations
|
|
@@ -281,8 +284,8 @@ Rules:
|
|
|
281
284
|
| State | Link fill | Link background |
|
|
282
285
|
|---|---|---|
|
|
283
286
|
| `default` | `var(--dsx-color-on-surface)` | `transparent` |
|
|
284
|
-
| `hover` | `var(--dsx-color-
|
|
285
|
-
| `focus-visible` | `var(--dsx-color-
|
|
287
|
+
| `hover` | `var(--dsx-color-accent-indicator)` | `var(--dsx-effect-hover-ghost)` |
|
|
288
|
+
| `focus-visible` | `var(--dsx-color-accent-indicator)` | `var(--dsx-shadow-focus-ring)` |
|
|
286
289
|
| `disabled` | `var(--dsx-color-on-surface)` with `var(--dsx-opacity-disabled)` | `transparent` |
|
|
287
290
|
|
|
288
291
|
### Variant model
|
|
@@ -295,3 +298,5 @@ Rules:
|
|
|
295
298
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
296
299
|
- [ ] Component is promoted to Main Component under `Components`.
|
|
297
300
|
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
301
|
+
|
|
302
|
+
Current-page text pairs accent-indicator with accent-surface, retaining readable foreground contrast in both appearances.
|
|
@@ -16,7 +16,7 @@ depends_on: []
|
|
|
16
16
|
|
|
17
17
|
## Purpose
|
|
18
18
|
|
|
19
|
-
A bordered inline notice: an icon, a message, and an optional
|
|
19
|
+
A bordered inline notice: an icon, a message, and an optional action row. Distinct from `Alert` (in-page flow banner) and `Toast`/`Sonner` (transient) — `Callout` is a persistent, bordered box, most often used for contextual tips, warnings, or dismissible product notices.
|
|
20
20
|
|
|
21
21
|
## Anatomy & slots
|
|
22
22
|
|
|
@@ -26,10 +26,10 @@ A bordered inline notice: an icon, a message, and an optional trailing action co
|
|
|
26
26
|
|
|
27
27
|
| Slot | Element | Renders | Notes |
|
|
28
28
|
|---|---|---|---|
|
|
29
|
-
| `Callout.Root` | `<div>` | `dsx-callout` |
|
|
29
|
+
| `Callout.Root` | `<div>` | `dsx-callout` | Two-column grid: icon plus minmax(0, 1fr) content. Title, text and actions stack in column 2. |
|
|
30
30
|
| `Callout.Icon` | `<div>` | `dsx-callout__icon` | Grid column 1. Sized by the `size` prop. |
|
|
31
31
|
| `Callout.Text` | `<p>` | `dsx-callout__text` | Grid column 2. The message body. |
|
|
32
|
-
| `Callout.Actions` | `<div>` | `dsx-callout__actions` |
|
|
32
|
+
| `Callout.Actions` | `<div>` | `dsx-callout__actions` | Optional wrapping action row in content column 2, below title/text. Without an Icon, all content uses column 1. |
|
|
33
33
|
|
|
34
34
|
## Props contract
|
|
35
35
|
|
|
@@ -94,7 +94,9 @@ Rules that apply to this row:
|
|
|
94
94
|
|
|
95
95
|
Rules:
|
|
96
96
|
|
|
97
|
-
- No raw color, spacing, or radius values in `callout.css`. The action
|
|
97
|
+
- No raw color, spacing, or radius values in `callout.css`. The action row introduces no new tokens — it reuses `--dsx-space-xs` for its internal gap.
|
|
98
|
+
|
|
99
|
+
When no `Callout.Icon` is rendered, Title, Text and Actions occupy the first grid column. No empty icon gutter is reserved.
|
|
98
100
|
|
|
99
101
|
## Motion contract
|
|
100
102
|
|
|
@@ -178,7 +180,7 @@ Rules:
|
|
|
178
180
|
|
|
179
181
|
**State boundaries:**
|
|
180
182
|
|
|
181
|
-
- Owned by `Callout`: the root class, variant/size modifier classes, the grid layout, and
|
|
183
|
+
- Owned by `Callout`: the root class, variant/size modifier classes, the grid layout, and its slot classes.
|
|
182
184
|
- Owned by the consumer: the message content, which action(s) render inside `Callout.Actions`, and any dismissal state/persistence (e.g. per-user dismissal tracked on the backend, per the `dashboard_notices` ask this slot was added for).
|
|
183
185
|
|
|
184
186
|
**Boundary rules:**
|
|
@@ -193,7 +195,7 @@ Rules:
|
|
|
193
195
|
### Root board
|
|
194
196
|
|
|
195
197
|
- **Name**: `Components / Callout`.
|
|
196
|
-
- **Layout**: `Grid`, columns `auto 1fr
|
|
198
|
+
- **Layout**: `Grid`, columns `auto minmax(0, 1fr)`, gap per `size`.
|
|
197
199
|
|
|
198
200
|
### Layer tree
|
|
199
201
|
|
|
@@ -217,4 +219,13 @@ Rules:
|
|
|
217
219
|
|
|
218
220
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
219
221
|
- [ ] Component is promoted to Main Component under `Components`.
|
|
220
|
-
- [ ] Grid renders
|
|
222
|
+
- [ ] Grid renders with optional Title, Icon and Actions; actions wrap below copy.
|
|
223
|
+
|
|
224
|
+
## Overlay review composition
|
|
225
|
+
|
|
226
|
+
`Callout.Title` is an existing h3 slot with class `dsx-callout__title`. Its
|
|
227
|
+
heading, Text and wrapping Actions stack beside an Icon that spans the rows.
|
|
228
|
+
Without Icon the root becomes a single column. Text has margin=0 and
|
|
229
|
+
min-width=0; long copy wraps. Existing tone values info/warning/success/danger
|
|
230
|
+
select semantic border and icon colors; highContrast uses the high-contrast
|
|
231
|
+
foreground. `/docs/callout` shows all tones and real dismiss/restore actions.
|
|
@@ -126,15 +126,15 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
126
126
|
| Glass inset rim | `var(--dsx-effect-panel-glass-rim)` | Theme-aware subtle inset perimeter |
|
|
127
127
|
| Glass border | `var(--dsx-effect-panel-glass-border)` | Theme-aware outer edge |
|
|
128
128
|
| Shadow (glass) | `var(--dsx-shadow-panel-shadow)` | Glass shadow |
|
|
129
|
-
| Glass backdrop | `var(--dsx-effect-panel-glass-backdrop-filter)` | Glass blur |
|
|
129
|
+
| Glass backdrop | `var(--dsx-effect-panel-glass-backdrop-filter)` | Glass blur. Declared as `-webkit-backdrop-filter` first and the standard `backdrop-filter` last: the Next/Turbopack CSS pipeline drops the standard line when it comes first, and the blur silently disappears (B-1, 2026-10-04). This spec directs that order in `_internal/baseCard.css`; `src/test/styles/backdrop-filter-order.test.ts` guards it for every rule in the package. |
|
|
130
130
|
| Surface (elevated) | `var(--dsx-color-surface-raised)` | Elevated surface |
|
|
131
131
|
| Shadow (elevated) | `var(--dsx-shadow-elevation-3, var(--dsx-effect-shadow-3))` (hover: `--elevation-4`) | Elevated shadow |
|
|
132
132
|
| Surface (filled) | `var(--dsx-color-surface)` | Filled surface (no shadow) |
|
|
133
133
|
| Surface (outline) | `transparent` (plus `--dsx-effect-panel-solid-backdrop-filter`) | Compatibility outline surface |
|
|
134
134
|
| Active / selected surface | `var(--dsx-color-accent-surface)` | Active / selected card |
|
|
135
|
-
| Active / selected
|
|
135
|
+
| Active / selected edge | `var(--dsx-boundary-selected-ring)` | Local accent-indicator 2px inset ring on every variant, including legacy outline; physical border is transparent, including under an outer light Theme |
|
|
136
136
|
| High-contrast surface | `var(--dsx-color-high-contrast-container)` | High-contrast card |
|
|
137
|
-
| High-contrast
|
|
137
|
+
| High-contrast edge | `var(--dsx-boundary-high-contrast-ring)` | Local 2px inset ring; physical border is transparent |
|
|
138
138
|
| High-contrast text | `var(--dsx-color-high-contrast)` | High-contrast text |
|
|
139
139
|
| Hover border | `var(--dsx-color-outline-variant)` | Hover border color |
|
|
140
140
|
| Hover background | `var(--dsx-effect-hover-layer)` over surface-raised | Hover surface |
|
|
@@ -148,6 +148,13 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
148
148
|
|
|
149
149
|
The component is static. Hover state changes are instant; no transition is applied.
|
|
150
150
|
|
|
151
|
+
Selected and high-contrast edges survive hover. For the color-role repair,
|
|
152
|
+
the owning spec explicitly permits the narrow `baseCard.css` selector change:
|
|
153
|
+
exclude selected/high-contrast cards from generic hover and static-accent
|
|
154
|
+
edge/hover paint, and exclude selected cards from the light glass shadow override. This
|
|
155
|
+
keeps the shared engine from replacing their inset rings; Alert and FileUpload
|
|
156
|
+
behavior is unchanged by these Card-only exclusions.
|
|
157
|
+
|
|
151
158
|
## Accessibility
|
|
152
159
|
|
|
153
160
|
**Roles:**
|
|
@@ -8,256 +8,69 @@ depends_on: []
|
|
|
8
8
|
|
|
9
9
|
# Code
|
|
10
10
|
|
|
11
|
-
>
|
|
11
|
+
> Source of truth: the package source at `package_path`. The spec mirrors source in the same change.
|
|
12
12
|
|
|
13
13
|
## Purpose
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Monospace inline code with four treatments, three genuine sizes, optional accent foreground, tone and high contrast. Multi-line code uses a consumer-owned `pre > Code` composition and an overflow container.
|
|
16
16
|
|
|
17
17
|
## Anatomy & slots
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**Slots:**
|
|
22
|
-
|
|
23
|
-
No slots: flat export. The component renders a single `<code>` host element (or the consumer's host element when `as` or `asChild` is set) with the `dsx-code` root class, the variant modifier class, and any `tone` modifier class.
|
|
19
|
+
A single `<code>` root with `dsx-code`; no compound slots. `asChild` slots a consumer host. Native code attributes and refs are forwarded.
|
|
24
20
|
|
|
25
21
|
## Props contract
|
|
26
22
|
|
|
27
23
|
| Prop | Type | Default | Required | Description | Responsive |
|
|
28
24
|
|---|---|---|---|---|---|
|
|
29
|
-
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'ghost'` | `'soft'` | no |
|
|
30
|
-
| `tone` | `'default' \| 'muted' \| 'inverse'` | `'default'` | no |
|
|
31
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | no |
|
|
32
|
-
| `color` | `string` | `undefined` | no |
|
|
33
|
-
| `highContrast` | `boolean` | `false` | no |
|
|
34
|
-
| `asChild` | `boolean` | `false` | no |
|
|
35
|
-
| `className` | `string` | `undefined` | no |
|
|
36
|
-
| `style` | `React.CSSProperties` | `undefined` | no |
|
|
37
|
-
| `children` | `React.ReactNode` | `undefined` | no | Code
|
|
38
|
-
|
|
39
|
-
Rules that apply to this row:
|
|
40
|
-
|
|
41
|
-
- `Code` extends `Omit<ComponentPropsWithoutRef<'code'>, 'color'>` because `color` is redefined by the prop def bag.
|
|
42
|
-
- `variant`, `tone`, `size`, `color`, `highContrast`, and `asChild` flow through `extractProps` and the prop def bag.
|
|
43
|
-
- `data-variant`, `data-size`, `data-accent-color`, and `data-high-contrast` are written alongside the modifier classes so the CSS can target them through attribute selectors.
|
|
44
|
-
- The `color` prop in the prop def has `default: undefined` and an empty `values: [] as const` array, so the runtime accepts any string but the prop def does not enumerate values. The TS type resolves to `string | undefined`.
|
|
25
|
+
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'ghost'` | `'soft'` | no | Writes `dsx-code--{variant}` and `data-variant`. | no |
|
|
26
|
+
| `tone` | `'default' \| 'muted' \| 'inverse'` | `'default'` | no | Non-default tones write `dsx-code--{tone}`. | no |
|
|
27
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | no | Writes `data-size`; small is 0.85×, default 1× and large 1.15× the code font-size token. Inline gutter remains compact at all sizes; ghost has none. | no |
|
|
28
|
+
| `color` | `'rift' \| 'warp' \| 'ray' \| string` | `undefined` | no | Writes `data-accent-color`; recognized accents resolve semantic tokens, including astral/spark. Unknown strings retain ambient tokens. | no |
|
|
29
|
+
| `highContrast` | `boolean` | `false` | no | Writes `data-high-contrast="true"` and paints a real contrast treatment. | no |
|
|
30
|
+
| `asChild` | `boolean` | `false` | no | Slot the consumer host. | no |
|
|
31
|
+
| `className` | `string` | `undefined` | no | Additional classes. | no |
|
|
32
|
+
| `style` | `React.CSSProperties` | `undefined` | no | Forwarded style. | no |
|
|
33
|
+
| `children` | `React.ReactNode` | `undefined` | no | Code content. | no |
|
|
45
34
|
|
|
46
35
|
## CSS class contract
|
|
47
36
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
**Modifier classes** (driven by the `variant` and `tone` prop defs and the `data-*` attributes):
|
|
51
|
-
|
|
52
|
-
| Attribute | Allowed values | Class | CSS file |
|
|
53
|
-
|---|---|---|---|
|
|
54
|
-
| (class) | `solid`, `soft`, `outline`, `ghost` | `dsx-code--{variant}` | `code.css` |
|
|
55
|
-
| (class) | `muted`, `inverse` | `dsx-code--muted`, `dsx-code--inverse` | `code.css` |
|
|
56
|
-
| `data-variant` | `solid`, `soft`, `outline`, `ghost` | `.dsx-code[data-variant='{variant}']` | `code.css` |
|
|
57
|
-
| `data-size` | `sm`, `md`, `lg` | (CSS contract for size) | n/a |
|
|
58
|
-
| `data-accent-color` | any custom string | (no rule in the source CSS) | n/a |
|
|
59
|
-
| `data-high-contrast` | `true` | (no rule in the source CSS) | n/a |
|
|
60
|
-
|
|
61
|
-
**Slot classes:** none.
|
|
62
|
-
|
|
63
|
-
**Responsive behavior:**
|
|
64
|
-
|
|
65
|
-
- The component does not write `@media` rules. `size` is single-value only; the prop def is not `responsive: true`. The CSS for `data-size` is left to downstream CSS.
|
|
37
|
+
Root: `dsx-code`. Modifier classes: `dsx-code--solid`, `--soft`, `--outline`, `--ghost`, `--muted`, `--inverse`. Attributes: `data-variant`, `data-size`, `data-accent-color`, `data-high-contrast`. There are no viewport breakpoints.
|
|
66
38
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
39
|
+
- Soft: contextual neutral wash, normal foreground, no outline. It remains an inline text treatment rather than an input frame.
|
|
40
|
+
- Solid: accent-track fill with accent-contrast foreground. Muted and inverse retain that readable filled pairing.
|
|
41
|
+
- Outline: transparent with an inset outline.
|
|
42
|
+
- Ghost: transparent, no outline or padding at every size.
|
|
43
|
+
- A non-solid explicit color uses accent-indicator, except inverse tone, which preserves its inverse foreground.
|
|
44
|
+
- Soft inverse uses the inverse-background / on-inverse-background pair and no shadow.
|
|
45
|
+
- High contrast: soft uses high-contrast-container / high-contrast; solid uses high-contrast / on-high-contrast; outline and ghost use high-contrast ink. Inverse soft/outline/ghost retain their inverse foreground and surface pairing when high contrast is enabled. The inverse context already supplies the contrasting pair; a normal-surface ink must not replace it.
|
|
70
46
|
|
|
71
47
|
## Token mapping
|
|
72
48
|
|
|
73
|
-
Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
74
|
-
|
|
75
49
|
| Property | Token | Role |
|
|
76
50
|
|---|---|---|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
| Border (soft) | `var(--dsx-color-outline-variant)` | Soft outline (via `inset 0 0 0 1px`). |
|
|
86
|
-
| Background (solid) | `var(--dsx-color-primary)` | Solid surface. |
|
|
87
|
-
| Color (solid) | `var(--dsx-color-on-primary)` | Solid text. |
|
|
88
|
-
| Outline (outline) | `var(--dsx-shadow-inset-outline)` | Inset outline. |
|
|
89
|
-
| Color (outline) | `var(--dsx-color-on-surface)` | Outline text. |
|
|
90
|
-
| Color (ghost) | `var(--dsx-color-on-surface)` | Ghost text. |
|
|
91
|
-
| Color (muted) | `var(--dsx-color-on-surface-variant)` | Muted tone. |
|
|
92
|
-
| Color (solid + muted) | `color-mix(in srgb, var(--dsx-color-on-primary) 65%, transparent)` | Muted text on solid. |
|
|
93
|
-
| Color (inverse) | `var(--dsx-color-on-inverse-background)` | Inverse-context color. |
|
|
94
|
-
| Background (soft + inverse) | `color-mix(in srgb, var(--dsx-color-on-high-contrast) 15%, transparent)` | Inverse soft surface. |
|
|
95
|
-
| Color (soft + inverse) | `var(--dsx-color-on-high-contrast)` | Inverse soft text. |
|
|
51
|
+
| Typography | `--dsx-typography-code-*` | JetBrains Mono family, font size, weight, line height, tracking, axes, case and decoration. |
|
|
52
|
+
| Small / large font size | code font-size × 0.85 / × 1.15 | Existing scale preserved. |
|
|
53
|
+
| Padding | `--dsx-space-0-5`, `--dsx-space-1-5` | Compact inline gutters at every size; ghost has zero padding. |
|
|
54
|
+
| Radius / outline | `--dsx-rounded-sm` / `--dsx-shadow-inset-outline` | Cap geometry; edge belongs to the outline variant only. |
|
|
55
|
+
| Soft | `--dsx-code-soft-background`, `--dsx-color-on-surface` | Neutral wash from the dedicated gray-alpha-3 effect; also used by the consumer preformatted example. |
|
|
56
|
+
| Solid | `--dsx-color-accent-track`, `--dsx-color-accent-contrast` | Filled code with readable foreground. |
|
|
57
|
+
| Accent / muted / inverse | `--dsx-color-accent-indicator`, `--dsx-color-on-surface-variant`, inverse-background + on-inverse-background | Context roles. |
|
|
58
|
+
| High contrast | high-contrast-container + high-contrast, high-contrast + on-high-contrast | Self-contained soft/solid pairs. |
|
|
96
59
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- The monospace font stack resolves from `var(--dsx-typography-code-font-family)` (the `code` node in `tokens/typography.json`); it is token-backed, not a CSS hard-code.
|
|
100
|
-
- The `color-mix` expressions are token-driven; the alpha is encoded in the token, not as a raw value.
|
|
60
|
+
No local alpha mixing or primitive accent ramp reference is authored here. The component bridge references the existing gray-12-at-10% effect and is rebound at local theme/accent/gray boundaries. Soft and ghost stay distinct on page, shell and raised backgrounds.
|
|
101
61
|
|
|
102
62
|
## Motion contract
|
|
103
63
|
|
|
104
|
-
|
|
105
|
-
|---|---|---|---|
|
|
106
|
-
| (none) | `none` | `none` | `none` |
|
|
107
|
-
|
|
108
|
-
Rules:
|
|
109
|
-
|
|
110
|
-
- Code has no motion. The motion section is intentionally empty.
|
|
64
|
+
Static typography; no animation or transition.
|
|
111
65
|
|
|
112
66
|
## Accessibility
|
|
113
67
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- The component renders a `<code>` by default (or the consumer's host element when `as` / `asChild` is set). The semantic role of an inline code token is preserved.
|
|
117
|
-
|
|
118
|
-
**Keyboard:**
|
|
119
|
-
|
|
120
|
-
- Code is not interactive. No keyboard contract beyond the page-level Tab order.
|
|
121
|
-
|
|
122
|
-
**Focus:**
|
|
123
|
-
|
|
124
|
-
- Code has no focusable surface. Focus management is the consumer's responsibility when the code is wrapped in a focusable container.
|
|
125
|
-
|
|
126
|
-
**Reduced motion:**
|
|
127
|
-
|
|
128
|
-
- N/A. Code has no motion.
|
|
129
|
-
|
|
130
|
-
**Color and meaning:**
|
|
131
|
-
|
|
132
|
-
- The `variant` and `tone` props are visual modifiers. The code body itself carries the meaning.
|
|
133
|
-
|
|
134
|
-
**Naming:**
|
|
135
|
-
|
|
136
|
-
- No accessible name is required by default. Consumers that need an announced label for a code token (e.g. an inline icon) should supply `aria-label`.
|
|
68
|
+
Native `<code>` semantics are preserved. The component is non-interactive; no focus or touch target is required. Consumer hosts through `asChild` own their semantics. Surrounding copy explains the snippet. Preformatted content keeps its whitespace and can scroll horizontally in the consumer's bounded overflow region.
|
|
137
69
|
|
|
138
70
|
## Playground demo spec
|
|
139
71
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
**Default story:**
|
|
143
|
-
|
|
144
|
-
- Renders `Code` with a default code string. Asserts the root class is `dsx-code` and the variant modifier is `dsx-code--soft`. The `data-variant` attribute is `soft` and the `data-size` attribute is `md`. Host element is `CODE`.
|
|
145
|
-
|
|
146
|
-
**Variant story:**
|
|
147
|
-
|
|
148
|
-
- Renders Code with each `variant` value. Asserts the matching `dsx-code--{variant}` class and the matching `data-variant` attribute.
|
|
149
|
-
|
|
150
|
-
**Size story:**
|
|
151
|
-
|
|
152
|
-
- Renders Code with each `size` value. Asserts the `data-size` attribute on the root.
|
|
153
|
-
|
|
154
|
-
**Color story:**
|
|
155
|
-
|
|
156
|
-
- Renders Code with a `color` value (e.g. `color="blue"`). Asserts the `data-accent-color` attribute on the root.
|
|
157
|
-
|
|
158
|
-
**Composition story** (for `asChild`):
|
|
159
|
-
|
|
160
|
-
- Renders Code with `asChild` wrapping a `<span>` element. Asserts the host element is `SPAN` and the `dsx-code` class is preserved.
|
|
161
|
-
|
|
162
|
-
**State story:**
|
|
163
|
-
|
|
164
|
-
- Renders Code in muted and inverse states, including the variant-on-tone pairings (`solid` + `muted`, `soft` + `inverse`).
|
|
165
|
-
|
|
166
|
-
**Token story:**
|
|
167
|
-
|
|
168
|
-
- Renders inside a `Theme` wrapper. Code is not themed by `data-accent-color`; the story documents that the variant surfaces are visually unchanged across accent colors.
|
|
169
|
-
|
|
170
|
-
**A11y story:**
|
|
171
|
-
|
|
172
|
-
- The default render passes the `vitest-axe` no-violations check.
|
|
173
|
-
|
|
174
|
-
**Props exposed in the playground controls:**
|
|
175
|
-
|
|
176
|
-
| Prop | Control | Default |
|
|
177
|
-
|---|---|---|
|
|
178
|
-
| `variant` | select | `soft` |
|
|
179
|
-
| `tone` | select | `default` |
|
|
180
|
-
| `size` | select | `md` |
|
|
181
|
-
| `color` | text | (empty) |
|
|
182
|
-
| `highContrast` | boolean | `false` |
|
|
183
|
-
| `asChild` | boolean | `false` |
|
|
72
|
+
`/docs/code`, typography registry. Matrix forwards all props. The live example compares all variants and sizes, muted/inverse/high-contrast states, all five accent strings, a slotted host, real inline configuration names and a preformatted snippet, and soft/ghost comparisons on page, shell and raised backgrounds. Inverse code has its paired background. Solid foreground remains readable on every accent in both appearances.
|
|
184
73
|
|
|
185
74
|
## Wiring notes
|
|
186
75
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- `@radix-ui/react-slot` for `asChild`.
|
|
190
|
-
- `_internal/helpers/extractProps` for the prop def bag.
|
|
191
|
-
- `_internal/props/{asChild,highContrast}.prop` for the shared prop defs.
|
|
192
|
-
- `_internal/cn` (via `classNames`) for class merging.
|
|
193
|
-
- No DS component composition. Code is a leaf primitive.
|
|
194
|
-
|
|
195
|
-
**Used by:**
|
|
196
|
-
|
|
197
|
-
- The Playground typography registry, in-product inline code tokens, and any app surface that needs a monospace accent (command palettes, key hints, code samples, file paths).
|
|
198
|
-
|
|
199
|
-
**State boundaries:**
|
|
200
|
-
|
|
201
|
-
- Owned by Code: the root class, the variant and tone modifier classes, the `data-variant`, `data-size`, `data-accent-color`, and `data-high-contrast` attributes, and the prop def bag.
|
|
202
|
-
- Owned by the consumer: the code body, the host element when `as` / `asChild` is set, and any extra `className` / `style` applied through prop forwarding.
|
|
203
|
-
|
|
204
|
-
**Boundary rules:**
|
|
205
|
-
|
|
206
|
-
- App-owned data: the code string, the surrounding prose context, and the host element when `asChild` is set.
|
|
207
|
-
- DS-owned visuals: the `dsx-code` root class, the variant and tone modifier classes, the data attributes, and the prop def bag.
|
|
208
|
-
|
|
209
|
-
## Penpot build recipe
|
|
210
|
-
|
|
211
|
-
> Optional. Penpot is a visual reference, not a code authority. The Code recipe tracks the variant, tone, size, color, and high-contrast contract.
|
|
212
|
-
|
|
213
|
-
The package does not yet publish a Penpot asset for Code. The recipe is visual reference only and tracks the CSS contract.
|
|
214
|
-
|
|
215
|
-
### Root board
|
|
216
|
-
|
|
217
|
-
- **Name**: `Primitives / Code`.
|
|
218
|
-
- **Dimensions**: `auto × auto` (inline token).
|
|
219
|
-
- **Layout**: `Flex` (inline).
|
|
220
|
-
- **Sizing**: `horizontalSizing = 'auto'`, `verticalSizing = 'auto'`.
|
|
221
|
-
|
|
222
|
-
### Layer tree
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
<Root Board: Code>
|
|
226
|
-
└── <Text: code body (monospace)>
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Token bindings (Penpot properties)
|
|
230
|
-
|
|
231
|
-
| Shape | Property | Token | Token type | Penpot property name |
|
|
232
|
-
|---|---|---|---|---|
|
|
233
|
-
| Root | typography | `--dsx-typography-code-*` token family | Typography | `typography` |
|
|
234
|
-
| Root | radius | `--dsx-rounded-sm` | Radius | `radius` |
|
|
235
|
-
| Root (soft) | fill | `--dsx-color-surface-raised` | Color | `fills` (state) |
|
|
236
|
-
| Root (soft) | stroke | `--dsx-color-outline-variant` | Color | `strokes` (state) |
|
|
237
|
-
| Root (solid) | fill | `--dsx-color-primary` | Color | `fills` (state) |
|
|
238
|
-
| Root (solid) | text fill | `--dsx-color-on-primary` | Color | `fills` (state) |
|
|
239
|
-
| Root (outline) | stroke | `--dsx-shadow-inset-outline` | Color | `strokes` (state) |
|
|
240
|
-
|
|
241
|
-
### State transformations
|
|
242
|
-
|
|
243
|
-
| State | Root fill | Root stroke | Text fill |
|
|
244
|
-
|---|---|---|---|
|
|
245
|
-
| `soft` (default) | `--dsx-color-surface-raised` | `--dsx-color-outline-variant` | `--dsx-color-on-surface` |
|
|
246
|
-
| `solid` | `--dsx-color-primary` | (none) | `--dsx-color-on-primary` |
|
|
247
|
-
| `outline` | `transparent` | `--dsx-shadow-inset-outline` | `--dsx-color-on-surface` |
|
|
248
|
-
| `ghost` | `transparent` | (none) | `--dsx-color-on-surface` |
|
|
249
|
-
|
|
250
|
-
### Variant model
|
|
251
|
-
|
|
252
|
-
- `variant`: `soft`, `solid`, `outline`, `ghost`. Default `soft`.
|
|
253
|
-
- `tone`: `default`, `muted`, `inverse`. Default `default`.
|
|
254
|
-
- `size`: `sm`, `md`, `lg`. Default `md`.
|
|
255
|
-
- `color` and `highContrast` documented in the spec body.
|
|
256
|
-
- Total members: variant × tone × size = 4 × 3 × 3 = 36, plus the high-contrast toggle.
|
|
257
|
-
|
|
258
|
-
### Validation checklist
|
|
259
|
-
|
|
260
|
-
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
261
|
-
- [ ] Component is promoted to Main Component under `Primitives`.
|
|
262
|
-
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
263
|
-
- [ ] Monospace font stack resolves from `--dsx-typography-code-font-family`; treat it as token-backed in Penpot.
|
|
76
|
+
Radix Slot implements `asChild`; `extractProps` consumes `codePropDefs`; classnames merges the root/modifiers. Code is a leaf primitive; the token layer scopes accent values. Apps own text, host, code language, syntax highlighting and preformatted overflow layout.
|
|
@@ -73,7 +73,7 @@ Rules:
|
|
|
73
73
|
|
|
74
74
|
**Responsive behavior:**
|
|
75
75
|
|
|
76
|
-
- The component does not
|
|
76
|
+
- The component does not use width breakpoints. The motion and layout are single-value only.
|
|
77
77
|
|
|
78
78
|
**Reduced motion:**
|
|
79
79
|
|
|
@@ -86,7 +86,11 @@ Rules:
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
```
|
|
89
|
-
The expand/collapse keyframes (`dsx-collapsible-expand`, `dsx-collapsible-collapse`) are gated off when the user prefers reduced motion. The chevron rotation uses `var(--dsx-motion-duration-fast)` and is
|
|
89
|
+
The expand/collapse keyframes (`dsx-collapsible-expand`, `dsx-collapsible-collapse`) are gated off when the user prefers reduced motion. The chevron rotation uses `var(--dsx-motion-duration-fast)` and is disabled in component CSS under reduced motion.
|
|
90
|
+
|
|
91
|
+
**Force-mounted content** (`Collapsible.Content forceMount`, used by `Sidebar.MenuSubTrigger`):
|
|
92
|
+
|
|
93
|
+
- The closed look of the content is the end frame of `dsx-collapsible-collapse` (`height: 0`, `opacity: 0`, `visibility: hidden`, held by the `both` fill). A force-mounted panel that first mounts closed never plays that animation, because Radix suppresses the mount animation by writing `animation-name: none` on the element. The runtime-inserted style block therefore hides it at rest: `.dsx-collapsible__content[data-state='closed']:where([style*='animation-name: none']) { display: none; }`. After any toggle Radix puts the animation back and the panel animates out as usual. Without this rule a closed sidebar parent listed all of its children (G-14, 2026-10-05).
|
|
90
94
|
|
|
91
95
|
## Token mapping
|
|
92
96
|
|
|
@@ -98,7 +102,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
98
102
|
| Trigger padding | `var(--dsx-space-md)` | Internal gutter |
|
|
99
103
|
| Trigger color | `var(--dsx-color-on-surface)` | Closed trigger text |
|
|
100
104
|
| Trigger label type | `var(--dsx-typography-label-large-font-family)`, `var(--dsx-typography-label-large-font-size)` | Trigger text ramp |
|
|
101
|
-
| Trigger open color | `var(--dsx-color-
|
|
105
|
+
| Trigger open color | `var(--dsx-color-accent-indicator)` | Open trigger text |
|
|
102
106
|
| Trigger focus ring | `var(--dsx-shadow-focus-ring)` | Focus indicator |
|
|
103
107
|
| Chevron transition | `var(--dsx-motion-duration-fast, 150ms) var(--dsx-motion-easing-standard, ease)` | Rotate transition |
|
|
104
108
|
| Content padding | `var(--dsx-space-md)` | Inner content gutter |
|
|
@@ -107,12 +111,14 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
107
111
|
| Expand/collapse duration | `var(--dsx-motion-duration-normal)` | Keyframe duration |
|
|
108
112
|
| Expand/collapse easing | `var(--dsx-motion-easing-in-out)` | Keyframe easing |
|
|
109
113
|
|
|
114
|
+
Content height and vertical padding animate together from zero to their measured/underlying values. This prevents padding from clamping the first animation frames. The underlying endpoint retains consumer padding overrides, including `asChild` hosts. No wrapper is added.
|
|
115
|
+
|
|
110
116
|
## Motion contract
|
|
111
117
|
|
|
112
118
|
| Region | Token | Default | Reduced |
|
|
113
119
|
|---|---|---|---|
|
|
114
|
-
| `dsx-collapsible__content` height + opacity | `var(--dsx-motion-duration-normal)` + `var(--dsx-motion-easing-in-out)` |
|
|
115
|
-
| `dsx-collapsible__chevron` rotate | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | 150ms standard (token-dependent) |
|
|
120
|
+
| `dsx-collapsible__content` height + block-axis padding + opacity | `var(--dsx-motion-duration-normal)` + `var(--dsx-motion-easing-in-out)` | motion-duration-normal (token-dependent) | `animation: none !important` via the runtime-inserted `prefers-reduced-motion` block |
|
|
121
|
+
| `dsx-collapsible__chevron` rotate | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | 150ms standard (token-dependent) | Transition disabled in component CSS |
|
|
116
122
|
|
|
117
123
|
## Accessibility
|
|
118
124
|
|
|
@@ -126,15 +132,15 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
126
132
|
|---|---|
|
|
127
133
|
| `Tab` | Moves focus to the trigger. |
|
|
128
134
|
| `Enter`, `Space` | Toggles the open state. |
|
|
129
|
-
| `Escape` | Collapses the content if the content has focus. Behavior is owned by Radix. |
|
|
130
135
|
|
|
131
136
|
**Focus:**
|
|
132
137
|
|
|
133
138
|
- The trigger renders a visible focus ring via `box-shadow: var(--dsx-shadow-focus-ring)` on `:focus-visible`.
|
|
139
|
+
- A collapsed force-mounted panel is out of the tab order: the end frame of the collapse animation sets `visibility: hidden`, and a panel that mounted closed is `display: none`. Radix unmounts a panel that is not force-mounted.
|
|
134
140
|
|
|
135
141
|
**Reduced motion:**
|
|
136
142
|
|
|
137
|
-
- The runtime-inserted style block disables the expand/collapse keyframes when `prefers-reduced-motion: reduce` matches. The chevron
|
|
143
|
+
- The runtime-inserted style block disables the expand/collapse keyframes when `prefers-reduced-motion: reduce` matches. The chevron transition is disabled in component CSS as well.
|
|
138
144
|
|
|
139
145
|
**Color and meaning:**
|
|
140
146
|
|
|
@@ -144,36 +150,11 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
144
150
|
|
|
145
151
|
- `Collapsible.Trigger` is the interactive element; the consumer's `children` become the button's accessible name.
|
|
146
152
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
**Default story:**
|
|
150
|
-
|
|
151
|
-
- Renders a `Collapsible` with a trigger and content. Asserts the root renders as a transparent host and the trigger and content are present.
|
|
152
|
-
|
|
153
|
-
**State story:**
|
|
154
|
-
|
|
155
|
-
- Renders with `open`. Asserts the trigger has `data-state="open"` and the content is visible.
|
|
156
|
-
- Renders with `defaultOpen={false}` and triggers a click. Asserts the trigger's `data-state` flips from `closed` to `open`.
|
|
157
|
-
- Renders with `disabled`. Asserts the trigger is disabled and the content does not toggle.
|
|
153
|
+
The live example embeds a disclosure and moving footer in a project card. Disabled and initially expanded warp/ray examples remain separate.
|
|
158
154
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
- Renders the root wrapped in a `Card` to demonstrate the surface composition pattern. Asserts the trigger and content are present inside the card.
|
|
162
|
-
|
|
163
|
-
**Token story:**
|
|
164
|
-
|
|
165
|
-
- Renders inside a `Theme` wrapper with `accentColor="silver"` and `accentColor="bronze"`. Collapsible does not track `data-accent-color`; the story asserts the open trigger color continues to resolve through `var(--dsx-color-primary)`.
|
|
166
|
-
|
|
167
|
-
**A11y story:**
|
|
168
|
-
|
|
169
|
-
- Uses `vitest-axe` against the rendered default story. Asserts no axe violations.
|
|
170
|
-
|
|
171
|
-
**Props exposed in the playground controls:**
|
|
155
|
+
## Playground demo spec
|
|
172
156
|
|
|
173
|
-
|
|
174
|
-
|---|---|---|
|
|
175
|
-
| `open` | boolean | `false` |
|
|
176
|
-
| `disabled` | boolean | `false` |
|
|
157
|
+
The default render is a disclosure within a bounded consumer surface. The live project card includes fixed introductory content, optional project details, and a footer that moves with the disclosure. Separate disabled and initially expanded warp/ray examples expose the behavior and accent state. Normal-motion probes sample expansion and collapse; reduced motion skips both animations.
|
|
177
158
|
|
|
178
159
|
## Wiring notes
|
|
179
160
|
|
|
@@ -236,6 +236,8 @@ The palette has no mount or exit motion. Item selection and hover animate throug
|
|
|
236
236
|
- `Command` accepts an optional `label` for the palette. When omitted, the input placeholder and surrounding context must provide a meaningful name.
|
|
237
237
|
- Each `CommandItem` needs a meaningful label. The optional `CommandShortcut` is decorative.
|
|
238
238
|
|
|
239
|
+
`Command.Shortcut` displays a hint; consumers wire the handler. The live playground example implements ⌘P/⌘S and Ctrl+P/Ctrl+S while focus is inside the palette and explains that scope. `Command.Separator` owns the group boundary; headings do not add a second rule.
|
|
240
|
+
|
|
239
241
|
## Playground demo spec
|
|
240
242
|
|
|
241
243
|
**Default story:**
|