@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
|
@@ -12,7 +12,7 @@ depends_on: []
|
|
|
12
12
|
|
|
13
13
|
## Purpose
|
|
14
14
|
|
|
15
|
-
The app-level heading primitive. Renders an `h1`–`h6` host element with token-aligned typography, a token-backed color prop, a `tone` modifier for muted or inverse contexts, a
|
|
15
|
+
The app-level heading primitive. Renders an `h1`–`h6` host element with token-aligned typography, a token-backed color prop, a `tone` modifier for muted or inverse contexts, a scalar `size` scale, and the shared margin, padding, alignment, wrap, trim, weight, truncate, high-contrast, and `asChild` infra. The host element is derived from the `size` prop when provided, or from the `variant` prop when `size` is unset.
|
|
16
16
|
|
|
17
17
|
## Anatomy & slots
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The app-level heading primitive. Renders an `h1`–`h6` host element with token-
|
|
|
20
20
|
|
|
21
21
|
**Slots:**
|
|
22
22
|
|
|
23
|
-
No slots: flat export. The component renders a single `h1`–`h6` host element (or the consumer's host element when `
|
|
23
|
+
No slots: flat export. The component renders a single `h1`–`h6` host element (or the consumer's host element when `asChild` is set) with the `dsx-heading` root class, the variant modifier class, and any `tone` modifier class.
|
|
24
24
|
|
|
25
25
|
## Props contract
|
|
26
26
|
|
|
@@ -28,16 +28,16 @@ No slots: flat export. The component renders a single `h1`–`h6` host element (
|
|
|
28
28
|
|---|---|---|---|---|---|
|
|
29
29
|
| `variant` | `'display-large' \| 'display-medium' \| 'headline-large' \| 'headline-medium'` | `'headline-medium'` | no | Heading ramp. Writes the `dsx-heading--{variant}` modifier class. Determines the default host element when `size` is unset: `display-large` → `h1`, `display-medium` → `h2`, `headline-large` → `h3`, `headline-medium` → `h4`. | no |
|
|
30
30
|
| `tone` | `'default' \| 'muted' \| 'inverse'` | `'default'` | no | Tone modifier. Writes `dsx-heading--{tone}` for `muted` and `inverse`. | no |
|
|
31
|
-
| `size` | `'1' \| '2' \| '3' \| '4' \| '5' \| '6' \| '7' \| '8' \| '9'` | `undefined` | no |
|
|
32
|
-
| `color` |
|
|
33
|
-
| `weight` | `
|
|
34
|
-
| `align` | `
|
|
35
|
-
| `wrap` | `
|
|
31
|
+
| `size` | `'1' \| '2' \| '3' \| '4' \| '5' \| '6' \| '7' \| '8' \| '9'` | `undefined` | no | Scalar size scale. The host is derived from it: `9` → `h1`, `8` → `h2`, `7` → `h3`, `6`/`5` → `h4`, `4`/`3` → `h5`, `2`/`1` → `h6`. Explicit `asChild` supplies the semantic host. | no |
|
|
32
|
+
| `color` | shared semantic color enum | `undefined` | no | Values are listed in the class contract below. Writes `data-accent-color` and the matching `dsx-r-color-{name}` class. | no |
|
|
33
|
+
| `weight` | `'light' \| 'regular' \| 'medium' \| 'bold'` | `undefined` | no | Typography weight. Writes the `dsx-r-weight-{name}` class. | no |
|
|
34
|
+
| `align` | `'left' \| 'center' \| 'right' \| 'justify'` | `undefined` | no | Text alignment. Writes the `dsx-r-ta-{name}` class. | no |
|
|
35
|
+
| `wrap` | `'wrap' \| 'nowrap' \| 'pretty' \| 'balance'` | `undefined` | no | Text wrap. Writes the `dsx-r-tw-{name}` class. | no |
|
|
36
36
|
| `truncate` | `boolean` | `undefined` | no | When set, writes the `dsx-truncate` class. | no |
|
|
37
|
-
| `trim` | `
|
|
37
|
+
| `trim` | `'normal' \| 'start' \| 'end' \| 'both'` | `undefined` | no | Leading-trim behavior. Writes the `dsx-r-lt-{name}` class. | no |
|
|
38
38
|
| `highContrast` | `boolean` | `false` | no | When `true`, writes `data-high-contrast="true"`. | no |
|
|
39
|
-
| `m`, `mt`, `mr`, `mb`, `ml`, `mx`, `my` | `string` | `undefined` | no |
|
|
40
|
-
| `p`, `pt`, `pr`, `pb`, `pl`, `px`, `py` | `string` | `undefined` | no |
|
|
39
|
+
| `margin`, `m`, `mt`, `mr`, `mb`, `ml`, `mx`, `my` | `string` | `undefined` | no | Scalar margin style props from the `margin.prop` def. | no |
|
|
40
|
+
| `padding`, `p`, `pt`, `pr`, `pb`, `pl`, `px`, `py` | `string` | `undefined` | no | Scalar padding style props from the `padding.prop` def. | no |
|
|
41
41
|
| `asChild` | `boolean` | `false` | no | Renders the host through `Slot` from `@radix-ui/react-slot`; consumer supplies the host element. | no |
|
|
42
42
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-heading`. | no |
|
|
43
43
|
| `style` | `React.CSSProperties` | `undefined` | no | Extra inline style forwarded to the host element. | no |
|
|
@@ -47,25 +47,25 @@ Rules that apply to this row:
|
|
|
47
47
|
|
|
48
48
|
- `Heading` extends `Omit<ComponentPropsWithoutRef<'h1'>, 'color'>` because `color` is redefined by the prop def bag. The component's own `color` prop must not be confused with the native `color` attribute on `<h1>`.
|
|
49
49
|
- `variant`, `tone`, `size`, `color`, `weight`, `align`, `wrap`, `truncate`, `trim`, `highContrast`, and `asChild` flow through `extractProps` and the prop def bag. The margin and padding prop defs spread into the same bag.
|
|
50
|
-
- The host
|
|
50
|
+
- The host is the consumer slot when `asChild` is set; otherwise `getHeadingTagFromSize(size)` supplies it when size is present, and `getDefaultHeadingTag(variant)` supplies the default. The `size` axis wins over the `variant` axis. The test `size prop determines semantic heading level over variant` documents this.
|
|
51
51
|
- `data-accent-color` is written when `color` is a string. `data-size` is written when `size` is a string. `data-high-contrast` is written when `highContrast` is truthy.
|
|
52
52
|
|
|
53
53
|
## CSS class contract
|
|
54
54
|
|
|
55
55
|
**Root class:** `dsx-heading`
|
|
56
56
|
|
|
57
|
-
**Modifier classes** (driven by the prop def bag and
|
|
57
|
+
**Modifier classes** (driven by the scalar prop def bag and shared class extraction):
|
|
58
58
|
|
|
59
59
|
| Attribute | Allowed values | Class | CSS file |
|
|
60
60
|
|---|---|---|---|
|
|
61
61
|
| (class) | `display-large`, `display-medium`, `headline-large`, `headline-medium` | `dsx-heading--{variant}` | `heading.css` |
|
|
62
62
|
| (class) | `muted`, `inverse` | `dsx-heading--muted`, `dsx-heading--inverse` | `heading.css` |
|
|
63
|
-
| `data-size` | `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` | `dsx-r-heading-size-{n}`
|
|
64
|
-
| `data-accent-color` |
|
|
65
|
-
| (class) |
|
|
66
|
-
| (class) |
|
|
67
|
-
| (class) |
|
|
68
|
-
| (class) |
|
|
63
|
+
| `data-size` | `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` | `dsx-r-heading-size-{n}` | `heading.css` |
|
|
64
|
+
| `data-accent-color` | `primary`, `primary-container`, `secondary`, `secondary-container`, `tertiary`, `tertiary-container`, `success`, `success-container`, `error`, `error-container`, `surface`, `surface-raised`, `surface-overlay`, `surface-sunken`, `background`, `outline`, `outline-variant` | `dsx-r-color-{name}` | `src/styles/responsive/*.css` |
|
|
65
|
+
| (class) | `light`, `regular`, `medium`, `bold` | `dsx-r-weight-{name}` | `src/styles/responsive/*.css` |
|
|
66
|
+
| (class) | `left`, `center`, `right`, `justify` | `dsx-r-ta-{name}` | `src/styles/responsive/*.css` |
|
|
67
|
+
| (class) | `wrap`, `nowrap`, `pretty`, `balance` | `dsx-r-tw-{name}` | `src/styles/responsive/*.css` |
|
|
68
|
+
| (class) | `normal`, `start`, `end`, `both` | `dsx-r-lt-{name}` | `src/styles/responsive/*.css` |
|
|
69
69
|
| (class) | `true` (truncate) | `dsx-truncate` | `src/styles/responsive/truncate.css` |
|
|
70
70
|
| `data-high-contrast` | `true` | `.dsx-heading[data-high-contrast='true']` | `heading.css` |
|
|
71
71
|
|
|
@@ -73,13 +73,15 @@ Rules that apply to this row:
|
|
|
73
73
|
|
|
74
74
|
**Responsive behavior:**
|
|
75
75
|
|
|
76
|
-
-
|
|
77
|
-
- The
|
|
76
|
+
- All typography and spacing props are scalar. This family emits no breakpoint-prefixed classes and has no viewport rules. Responsive page layout belongs to `Box`, `Flex` and `Grid`.
|
|
77
|
+
- The maintainer approved removing the previous responsive typography API on 2026-10-04: “better to do it best versions from the get go and dont make backwards”. This is a breaking type change; release classification must reflect it.
|
|
78
78
|
|
|
79
79
|
**Reduced motion:**
|
|
80
80
|
|
|
81
81
|
- Heading has no motion. No transitions or animations are declared in `heading.css`.
|
|
82
82
|
|
|
83
|
+
High contrast preserves `on-inverse-background` when `tone="inverse"` is used on its paired surface. Normal-surface high-contrast ink must not replace an inverse foreground.
|
|
84
|
+
|
|
83
85
|
## Token mapping
|
|
84
86
|
|
|
85
87
|
Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
@@ -97,12 +99,14 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
97
99
|
| Color (muted) | `var(--dsx-color-on-surface-variant)` | Muted tone. |
|
|
98
100
|
| Color (inverse) | `var(--dsx-color-on-inverse-background)` | Inverse-context color. |
|
|
99
101
|
| Color (high-contrast) | `var(--dsx-color-high-contrast)` | High-contrast shift. |
|
|
100
|
-
|
|
|
101
|
-
| Margin / padding | `var(--dsx-r-
|
|
102
|
+
| Scalar size 1–9 | `var(--dsx-typography-*-font-size)` | `dsx-r-heading-size-1` through `dsx-r-heading-size-9` map to the same typography tokens. |
|
|
103
|
+
| Margin / padding | `var(--dsx-r-margin-{top,right,bottom,left})`, `var(--dsx-r-p*)` | Numeric, named and arbitrary spacing utilities resolve the local margins and padding. |
|
|
102
104
|
|
|
103
105
|
Rules:
|
|
104
106
|
|
|
105
|
-
- Tokens come from `DESIGN.md` and the generated `tokens.css`. The variant classes are the only modifiers; the
|
|
107
|
+
- Tokens come from `DESIGN.md` and the generated `tokens.css`. The variant classes are the only modifiers; the size classes are the second axis.
|
|
108
|
+
|
|
109
|
+
Spacing custom properties are reset locally so ancestor padding and margins do not leak into this element. Named margins use the same resolved directional variables as numeric and arbitrary values. Weight utilities resolve to 300 / 400 / 500 / 700.
|
|
106
110
|
|
|
107
111
|
## Motion contract
|
|
108
112
|
|
|
@@ -118,7 +122,7 @@ Rules:
|
|
|
118
122
|
|
|
119
123
|
**Roles:**
|
|
120
124
|
|
|
121
|
-
- The component renders an `h1`–`h6` by default. The host element is variant-derived when `size` is unset (`display-large` → `h1`, `display-medium` → `h2`, `headline-large` → `h3`, `headline-medium` → `h4`) and size-derived when `size` is set (`9` → `h1`, `8` → `h2`, `7` → `h3`, `6`/`5` → `h4`, `4`/`3` → `h5`, `2`/`1` → `h6`). Consumers that need a different heading level should
|
|
125
|
+
- The component renders an `h1`–`h6` by default. The host element is variant-derived when `size` is unset (`display-large` → `h1`, `display-medium` → `h2`, `headline-large` → `h3`, `headline-medium` → `h4`) and size-derived when `size` is set (`9` → `h1`, `8` → `h2`, `7` → `h3`, `6`/`5` → `h4`, `4`/`3` → `h5`, `2`/`1` → `h6`). Consumers that need a different heading level should use `asChild` with the heading element they want.
|
|
122
126
|
|
|
123
127
|
**Keyboard:**
|
|
124
128
|
|
|
@@ -146,7 +150,7 @@ Rules:
|
|
|
146
150
|
|
|
147
151
|
**Default story:**
|
|
148
152
|
|
|
149
|
-
- Renders `Heading` with a default heading string. Asserts the root class is `dsx-heading` and the variant modifier is `dsx-heading--headline-medium`. Host element is `
|
|
153
|
+
- Renders `Heading` with a default heading string. Asserts the root class is `dsx-heading` and the variant modifier is `dsx-heading--headline-medium`. Host element is `H4` (variant-derived from the default `headline-medium`).
|
|
150
154
|
|
|
151
155
|
**Variant story:**
|
|
152
156
|
|
|
@@ -154,15 +158,15 @@ Rules:
|
|
|
154
158
|
|
|
155
159
|
**Size story:**
|
|
156
160
|
|
|
157
|
-
- Renders Heading with each `size` value. Asserts the `data-size` attribute and the `dsx-r-heading-size-{n}` class. The host element is size-derived: `9` → `H1`, `8` → `H2`, `7` → `H3`, `6`/`5` → `H4`, `4`/`3` → `H5`, `2`/`1` → `H6`.
|
|
161
|
+
- Renders Heading with each `size` value. Asserts the `data-size` attribute and the `dsx-r-heading-size-{n}` class. The host element is size-derived: `9` → `H1`, `8` → `H2`, `7` → `H3`, `6`/`5` → `H4`, `4`/`3` → `H5`, `2`/`1` → `H6`. Size remains unchanged when the viewport changes; responsive maps are rejected by the public type.
|
|
158
162
|
|
|
159
163
|
**Color story:**
|
|
160
164
|
|
|
161
|
-
- Renders Heading with each `color` token name. Asserts the `data-accent-color` attribute and the `dsx-r-color-{name}` class.
|
|
165
|
+
- Renders Heading with each `color` token name. Asserts the `data-accent-color` attribute and the `dsx-r-color-{name}` class. Color is scalar; responsive maps are rejected by the public type.
|
|
162
166
|
|
|
163
167
|
**Composition story** (for `asChild`):
|
|
164
168
|
|
|
165
|
-
- Renders Heading with `asChild` wrapping
|
|
169
|
+
- Renders Heading with `asChild` wrapping appropriate `<h2>` and `<h3>` elements. Asserts the chosen host is preserved and the `dsx-heading` class is preserved.
|
|
166
170
|
|
|
167
171
|
**State story:**
|
|
168
172
|
|
|
@@ -170,7 +174,7 @@ Rules:
|
|
|
170
174
|
|
|
171
175
|
**Token story:**
|
|
172
176
|
|
|
173
|
-
- Renders inside a `Theme` wrapper with `accentColor="
|
|
177
|
+
- Renders inside a `Theme` wrapper with `accentColor="rift"` and `accentColor="warp"`. Asserts the `data-accent-color` attribute on the wrapper tracks the active accent.
|
|
174
178
|
|
|
175
179
|
**A11y story:**
|
|
176
180
|
|
|
@@ -196,7 +200,6 @@ Rules:
|
|
|
196
200
|
|
|
197
201
|
- `@radix-ui/react-slot` for `asChild`.
|
|
198
202
|
- `_internal/helpers/extractProps` for the prop def bag.
|
|
199
|
-
- `_internal/helpers/getResponsiveStyles.isResponsiveObject` to read the base size from a responsive value.
|
|
200
203
|
- `_internal/props/{asChild,color,highContrast,leadingTrim,margin,padding,textAlign,textWrap,truncate,weight}.prop` for the shared prop defs.
|
|
201
204
|
- `_internal/cn` (via `classNames`) for class merging.
|
|
202
205
|
- No DS component composition. Heading is a leaf primitive.
|
|
@@ -207,8 +210,8 @@ Rules:
|
|
|
207
210
|
|
|
208
211
|
**State boundaries:**
|
|
209
212
|
|
|
210
|
-
- Owned by Heading: the root class, the variant and tone modifier classes, the
|
|
211
|
-
- Owned by the consumer: the heading body, the host element when `
|
|
213
|
+
- Owned by Heading: the root class, the variant and tone modifier classes, the size class, the color and weight classes, the alignment, wrap, trim, and truncate classes, the high-contrast attribute, the `data-size` and `data-accent-color` attributes, the prop def bag, and the host-element derivation logic.
|
|
214
|
+
- Owned by the consumer: the heading body, the host element when `asChild` is set, and any extra `className` / `style` applied through prop forwarding.
|
|
212
215
|
|
|
213
216
|
**Boundary rules:**
|
|
214
217
|
|
|
@@ -258,7 +258,7 @@ Rules:
|
|
|
258
258
|
| `<Content frame>` | fill | `var(--dsx-color-panel-translucent)` | Color | `fills` |
|
|
259
259
|
| `<Content frame>` | radius | `var(--dsx-rounded-lg)` | Radius | `borderRadius` |
|
|
260
260
|
| `<Content frame>` | spacing | `var(--dsx-space-md)` | Spacing | `padding` |
|
|
261
|
-
| `<Arrow svg>` | fill | `
|
|
261
|
+
| `<Arrow svg>` | fill | `--dsx-color-panel-translucent` | Color | `fills` |
|
|
262
262
|
|
|
263
263
|
### State transformations
|
|
264
264
|
|
|
@@ -278,3 +278,11 @@ Rules:
|
|
|
278
278
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
279
279
|
- [ ] Component is promoted to Main Component under `Components`.
|
|
280
280
|
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
281
|
+
|
|
282
|
+
## Overlay review constraints
|
|
283
|
+
|
|
284
|
+
Content uses the popover layer and wraps long words. Arrow fill/color match
|
|
285
|
+
`--dsx-color-panel-translucent`; its stroke uses border-width-sm. The live
|
|
286
|
+
example previews a native link to visible profile content, preserving useful
|
|
287
|
+
navigation on touch without requiring hover. Size and arrow comparisons
|
|
288
|
+
render the same real link/profile composition.
|
|
@@ -40,6 +40,7 @@ Rules:
|
|
|
40
40
|
- `Icon` extends `Omit<React.ComponentPropsWithoutRef<'svg'>, 'color'>` because `color` is redefined. The runtime uses `LucideComponent` or `SimpleIconComponent` for the underlying SVG; both forward standard SVG attributes.
|
|
41
41
|
- The `name` prop is the only visual contract. The internal `isDSXIconName` guard returns `null` for unknown names so callers do not need to handle a missing icon fallback at the call site.
|
|
42
42
|
- The component always writes `data-size` and `class="dsx-icon"`. The `aria-hidden` and `role` attributes are managed by the runtime based on whether `title` is provided.
|
|
43
|
+
- A name lives in four hand-kept lists: the component map, the `DSXIconName` tuple, `dsxIconCatalog` and one named export in `icons.tsx` (`check` → `CheckIcon`). `Icon.test.tsx` keeps them in step (every catalog name renders an `svg`, and the catalog names and the named exports are the same set). One glyph has one name: `dots-horizontal` is Lucide's `Ellipsis`, and no `ellipsis` alias exists.
|
|
43
44
|
|
|
44
45
|
## CSS class contract
|
|
45
46
|
|
|
@@ -120,6 +120,8 @@ Rules:
|
|
|
120
120
|
|
|
121
121
|
## Playground demo spec
|
|
122
122
|
|
|
123
|
+
`/docs/kbd` uses static key labels with an application-owned Ctrl/⌘+K listener, both sizes and an inline slotted host.
|
|
124
|
+
|
|
123
125
|
**Default story:**
|
|
124
126
|
|
|
125
127
|
- Renders `Kbd` with a short body string (`⌘ K`). Asserts the root class is `dsx-kbd` and the host element is `KBD`.
|
|
@@ -50,7 +50,7 @@ Rules that apply to this row:
|
|
|
50
50
|
| Attribute | Allowed values | Class | CSS file |
|
|
51
51
|
|---|---|---|---|
|
|
52
52
|
| `data-size` | `sm`, `md`, `lg` | `.dsx-label[data-size='sm']`, `.dsx-label[data-size='md']`, `.dsx-label[data-size='lg']` | `label.css` |
|
|
53
|
-
| `data-disabled` | (presence) | `.dsx-label
|
|
53
|
+
| `data-disabled` | (presence) | `.dsx-label[data-disabled]` (presence selector) | `label.css` |
|
|
54
54
|
|
|
55
55
|
**Slot classes:** none.
|
|
56
56
|
|
|
@@ -79,10 +79,12 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
79
79
|
|
|
80
80
|
Rules:
|
|
81
81
|
|
|
82
|
-
- No raw color, spacing, radius, or motion values in `label.css`. The label-large
|
|
83
|
-
-
|
|
82
|
+
- No raw color, spacing, radius, or motion values in `label.css`. The size mapping uses label-medium, label-large and body-large tokens, with role font variation settings and normal-case labels.
|
|
83
|
+
- Small uses label-medium (12px), default uses label-large (14px), and large uses body-large font size (16px). Small/default role axes are applied; all sizes remain normal case, including when nested under an uppercase utility label.
|
|
84
84
|
- The disabled state is a single combination: `--dsx-color-on-surface-variant` plus `--dsx-opacity-disabled`. Both tokens are theme-aware.
|
|
85
85
|
|
|
86
|
+
The live example pairs the three label sizes with package Input controls. Clicking an enabled label focuses its associated input; the disabled pair remains disabled. `asChild` demonstrates styling a consumer host.
|
|
87
|
+
|
|
86
88
|
## Motion contract
|
|
87
89
|
|
|
88
90
|
| Region | Token | Default | Reduced |
|
|
@@ -137,7 +139,7 @@ Rules:
|
|
|
137
139
|
|
|
138
140
|
**State story:**
|
|
139
141
|
|
|
140
|
-
- Renders Label with `disabled` set. Asserts `data-disabled=""` is on the host and the
|
|
142
|
+
- Renders Label with `disabled` set. Asserts `data-disabled=""` is on the host and the disabled visual treatment is applied.
|
|
141
143
|
- Renders Label with no `disabled` prop. Asserts `data-disabled` is absent.
|
|
142
144
|
|
|
143
145
|
**Composition with control:**
|
|
@@ -146,7 +148,7 @@ Rules:
|
|
|
146
148
|
|
|
147
149
|
**Token story:**
|
|
148
150
|
|
|
149
|
-
- Renders inside a `Theme` wrapper with `accentColor="
|
|
151
|
+
- Renders inside a `Theme` wrapper with `accentColor="rift"` and `accentColor="warp"`. Label does not consume `data-accent-color`; the story documents that the label color tracks the on-surface token and is unchanged across accents.
|
|
150
152
|
|
|
151
153
|
**A11y story:**
|
|
152
154
|
|
|
@@ -164,7 +166,7 @@ Rules:
|
|
|
164
166
|
|
|
165
167
|
**Composes from:**
|
|
166
168
|
|
|
167
|
-
- `@radix-ui/react-label` (`Root`): provides the `<label>` host
|
|
169
|
+
- `@radix-ui/react-label` (`Root`): provides the `<label>` host and the native `htmlFor` association. The DS `disabled` prop supplies the visual reflection; consumers mirror disabled onto the paired control.
|
|
168
170
|
- `@radix-ui/react-slot`: enables `asChild` for consumer-supplied host elements.
|
|
169
171
|
|
|
170
172
|
**Used by:**
|
|
@@ -181,7 +183,7 @@ Rules:
|
|
|
181
183
|
**Boundary rules:**
|
|
182
184
|
|
|
183
185
|
- App-owned data: the label copy, the target control id, the disabled state of the paired control, and the host element when `asChild` is set.
|
|
184
|
-
- DS-owned visuals: the `dsx-label` root class, the `
|
|
186
|
+
- DS-owned visuals: the `dsx-label` root class, the `data-disabled` hook, the label-large typography token set, the on-surface color token, and the disabled opacity token.
|
|
185
187
|
|
|
186
188
|
## Penpot build recipe
|
|
187
189
|
|
|
@@ -221,7 +223,7 @@ The package does not yet publish a Penpot asset for Label. Recipe is visual refe
|
|
|
221
223
|
|
|
222
224
|
### Variant model
|
|
223
225
|
|
|
224
|
-
- `size`: `sm`, `md`, `lg`. Default `md`.
|
|
226
|
+
- `size`: `sm`, `md`, `lg`. Default `md`. Sizes paint 12px / 14px / 16px.
|
|
225
227
|
- `disabled`: `true`, `false`. Default `false`.
|
|
226
228
|
- `asChild`: `true`, `false`. Default `false`.
|
|
227
229
|
- Total members: 12 (3 × 2 × 2).
|
|
@@ -231,4 +233,4 @@ The package does not yet publish a Penpot asset for Label. Recipe is visual refe
|
|
|
231
233
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
232
234
|
- [ ] Component is promoted to Main Component under `Primitives`.
|
|
233
235
|
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
234
|
-
- [ ] The `data-size` attribute is always written
|
|
236
|
+
- [ ] The `data-size` attribute is always written and resolves distinct typography sizes.
|
|
@@ -8,247 +8,69 @@ depends_on: []
|
|
|
8
8
|
|
|
9
9
|
# Link
|
|
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
|
-
A
|
|
15
|
+
A native inline anchor with readable accent foreground, explicit underline policy and a single-value font-size scale. Apps own destination, routing, target and rel. `asChild` supplies a consumer host.
|
|
16
16
|
|
|
17
17
|
## Anatomy & slots
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**Slots:**
|
|
22
|
-
|
|
23
|
-
No slots: flat export. The component renders a single `<a>` host element (or the consumer's host element when `as` or `asChild` is set) with the `dsx-link` root class, the `underline` modifier class, and any `tone` modifier class.
|
|
19
|
+
Single `<a>` root with `dsx-link`; no compound slots. Native anchor attributes and refs are forwarded. `asChild` uses Radix Slot.
|
|
24
20
|
|
|
25
21
|
## Props contract
|
|
26
22
|
|
|
27
23
|
| Prop | Type | Default | Required | Description | Responsive |
|
|
28
24
|
|---|---|---|---|---|---|
|
|
29
|
-
| `underline` | `'auto' \| 'always' \| 'hover' \| 'none'` | `'auto'` | no |
|
|
30
|
-
| `tone` | `'default' \| 'muted' \| 'inverse'` | `'default'` | no |
|
|
31
|
-
| `color` | `'rift' \| 'warp' \| 'ray' \| string` | `undefined` | no |
|
|
32
|
-
| `size` | `'1' \| '2' \| '3' \| '4' \| '5' \| '6' \| '7' \| '8' \| '9'` | `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 |
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- `Link` extends `Omit<ComponentPropsWithoutRef<'a'>, 'color'>` because `color` is redefined by the prop def bag.
|
|
42
|
-
- `underline`, `tone`, `color`, `size`, `highContrast`, and `asChild` flow through `extractProps` and the prop def bag. The component forwards every other native anchor attribute (`href`, `target`, `rel`, `download`, `aria-*`, etc.) when `asChild` is `false`.
|
|
43
|
-
- `data-accent-color` is written when `color` is set. `data-size` is written when `size` is set. `data-high-contrast` is written when `highContrast` is truthy.
|
|
44
|
-
- The `color` prop in the prop def has `type: 'enum | string'` and a `values` list of `['rift', 'warp', 'ray']`. The runtime accepts any string; the canonical values are the accent palette.
|
|
45
|
-
- Internal versus external routing is not a prop. Apps wrap `Link` in their router's link primitive (or use `asChild` with the router's link) when they need client-side navigation; `Link` itself renders a native anchor and forwards `href`.
|
|
25
|
+
| `underline` | `'auto' \| 'always' \| 'hover' \| 'none'` | `'auto'` | no | Writes `dsx-link--{underline}`; see affordance policy below. | no |
|
|
26
|
+
| `tone` | `'default' \| 'muted' \| 'inverse'` | `'default'` | no | Non-default tones write `dsx-link--{tone}`. | no |
|
|
27
|
+
| `color` | `'rift' \| 'warp' \| 'ray' \| string` | `undefined` | no | Writes `data-accent-color`; the global token layer resolves recognized accents, including astral and spark. Unknown strings retain the ambient tokens. | no |
|
|
28
|
+
| `size` | `'1' \| '2' \| '3' \| '4' \| '5' \| '6' \| '7' \| '8' \| '9'` | `undefined` | no | Writes `data-size` and applies the existing role-derived font-size mapping. | no |
|
|
29
|
+
| `highContrast` | `boolean` | `false` | no | Writes `data-high-contrast="true"` and uses high-contrast foreground. | 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 | Accessible link content. | no |
|
|
34
|
+
|
|
35
|
+
`href`, `target`, `rel`, `download`, `id` and `aria-*` are native anchor props. There is no routing or external-link prop and no `as` prop.
|
|
46
36
|
|
|
47
37
|
## CSS class contract
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
**Modifier classes** (driven by the `underline` and `tone` prop defs and the `data-*` attributes):
|
|
52
|
-
|
|
53
|
-
| Attribute | Allowed values | Class | CSS file |
|
|
54
|
-
|---|---|---|---|
|
|
55
|
-
| (class) | `auto`, `always`, `hover`, `none` | `dsx-link--{underline}` | `link.css` |
|
|
56
|
-
| (class) | `muted`, `inverse` | `dsx-link--muted`, `dsx-link--inverse` | `link.css` |
|
|
57
|
-
| `data-accent-color` | `rift`, `warp`, `ray` (or any custom string) | `.dsx-link[data-accent-color='rift']`, `.dsx-link[data-accent-color='warp']`, `.dsx-link[data-accent-color='ray']` | `link.css` |
|
|
58
|
-
| `data-size` | `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` | (CSS contract for size) | n/a |
|
|
59
|
-
| `data-high-contrast` | `true` | `.dsx-link[data-high-contrast='true']` | `link.css` |
|
|
39
|
+
Root: `dsx-link`. Modifier classes: `dsx-link--auto`, `--always`, `--hover`, `--none`, `--muted`, `--inverse`. Attributes: `data-size`, `data-accent-color`, `data-high-contrast`.
|
|
60
40
|
|
|
61
|
-
|
|
41
|
+
The root uses native inline flow; multiline links share line boxes with surrounding text. `overflow-wrap: anywhere` allows long identifiers to wrap. SVG children align vertically with a token gutter. Layout primitives can still position a Link as a flex/grid child.
|
|
62
42
|
|
|
63
|
-
|
|
43
|
+
Underline policy:
|
|
64
44
|
|
|
65
|
-
- `
|
|
45
|
+
- `auto`: no underline at desktop rest; underline on hover, focus-visible or pressed. On devices without hover it is underlined at rest.
|
|
46
|
+
- `always`: underline at rest and through interaction.
|
|
47
|
+
- `hover`: no underline at rest; underline on hover, focus-visible or pressed.
|
|
48
|
+
- `none`: no underline through interaction; focus ring remains visible.
|
|
66
49
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- The component transitions `color` over `var(--dsx-motion-duration-fast, 150ms) var(--dsx-motion-easing-standard, ease)`. The transition is a color change only; it is not gated by `prefers-reduced-motion` in the source CSS. The default fast duration is short enough that the transition is acceptable for most reduced-motion users.
|
|
50
|
+
Underlines use `currentColor`, including muted, inverse and high-contrast tones. High contrast preserves the inverse foreground on an inverse surface. Thickness and offset preserve the existing font-relative browser heuristics.
|
|
70
51
|
|
|
71
52
|
## Token mapping
|
|
72
53
|
|
|
73
|
-
Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
74
|
-
|
|
75
54
|
| Property | Token | Role |
|
|
76
55
|
|---|---|---|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
| Text decoration color | `var(--dsx-color-primary)` (or `var(--dsx-color-accent-9)` on accent, or `var(--dsx-color-high-contrast)` on high-contrast) | Underline color. |
|
|
83
|
-
| Gap | `var(--dsx-space-xs)` | Inner gap for icon-plus-label layouts. |
|
|
84
|
-
| Border radius (focus) | `var(--dsx-rounded-sm)` | Focus ring roundness. |
|
|
85
|
-
| Outline (focus) | `2px solid var(--dsx-effect-ring-focus)` | Focus ring width. |
|
|
86
|
-
| Outline offset (focus) | `var(--dsx-focus-ring-offset, 2px)` | Focus ring offset. |
|
|
87
|
-
| Motion duration | `var(--dsx-motion-duration-fast, 150ms)` | Color transition. |
|
|
88
|
-
| Motion easing | `var(--dsx-motion-easing-standard, ease)` | Color transition. |
|
|
89
|
-
|
|
90
|
-
Rules:
|
|
91
|
-
|
|
92
|
-
- Tokens come from `DESIGN.md` and the generated `tokens.css`. The accent override is the only place a brand color is used directly; the default link color tracks `var(--dsx-color-primary)` so it follows `data-accent-color` for rift, warp, and ray.
|
|
93
|
-
- The text-decoration thickness and offset use the browser-native heuristics `min(2px, max(1px, 0.05em))` and `calc(0.025em + 2px)`. These are CSS values, not tokens; the spec records them as the canonical underline rhythm.
|
|
56
|
+
| Default foreground | `--dsx-color-accent-indicator` | Readable text, independently scoped through all five accents. |
|
|
57
|
+
| Muted / inverse / high contrast | `--dsx-color-on-surface-variant` / `--dsx-color-on-inverse-background` / `--dsx-color-high-contrast` | Existing tone and contrast roles. |
|
|
58
|
+
| Icon gutter / focus radius | `--dsx-space-xs` / `--dsx-rounded-sm` | Inline icon and focus geometry. |
|
|
59
|
+
| Focus outline / offset | `--dsx-border-width-lg` + `--dsx-effect-ring-focus` / `--dsx-space-0-5` | Visible 2px keyboard outline, 2px offset. |
|
|
60
|
+
| Size 1–9 | label-small, label-medium, body-medium, body-large, label-large, headline-medium, headline-large, display-medium, display-large font-size tokens | Existing mapping preserved; omitted size inherits context. |
|
|
94
61
|
|
|
95
62
|
## Motion contract
|
|
96
63
|
|
|
97
|
-
|
|
98
|
-
|---|---|---|---|
|
|
99
|
-
| Color transition | `var(--dsx-motion-duration-fast) var(--dsx-motion-easing-standard)` | `150ms ease` | (no explicit reduced override in the source CSS) |
|
|
100
|
-
|
|
101
|
-
Rules:
|
|
102
|
-
|
|
103
|
-
- The color transition is a token-driven property. A future `prefers-reduced-motion` override would either zero the duration or remove the transition entirely; the spec leaves that decision to a future spec change.
|
|
64
|
+
Color transitions use `--dsx-motion-duration-fast` and `--dsx-motion-easing-standard`. `prefers-reduced-motion: reduce` removes the transition. Modality queries are not viewport breakpoints; no responsive prop or width query is added.
|
|
104
65
|
|
|
105
66
|
## Accessibility
|
|
106
67
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- The component renders an `<a>` by default (or the consumer's host element when `as` / `asChild` is set). The semantic role of a link is preserved.
|
|
110
|
-
|
|
111
|
-
**Keyboard:**
|
|
112
|
-
|
|
113
|
-
- Links are focusable. `Tab` moves focus to and from the link. `Enter` activates the link. The browser's focus ring renders through `dsx-link:focus-visible`.
|
|
114
|
-
|
|
115
|
-
**Focus:**
|
|
116
|
-
|
|
117
|
-
- Visible focus ring via `2px solid var(--dsx-effect-ring-focus)` with `outline-offset: var(--dsx-focus-ring-offset, 2px)`. The ring is rendered only on `:focus-visible` so mouse-driven focus does not show it.
|
|
118
|
-
|
|
119
|
-
**Reduced motion:**
|
|
120
|
-
|
|
121
|
-
- The color transition is short (150ms). Apps that need a strict reduced-motion fallback should layer a global rule that disables the transition inside `@media (prefers-reduced-motion: reduce)`.
|
|
122
|
-
|
|
123
|
-
**Color and meaning:**
|
|
124
|
-
|
|
125
|
-
- The `color`, `tone`, and `underline` props are visual modifiers. The link's href and label carry the meaning.
|
|
126
|
-
|
|
127
|
-
**Naming:**
|
|
128
|
-
|
|
129
|
-
- Every link needs an accessible name. The default render uses the body text as the accessible content. Consumers should supply `aria-label` when the body is an icon or another non-text node.
|
|
68
|
+
Body prose should use `underline="always"` where link color does not have a 3:1 luminance distinction from surrounding text; the live paragraph demonstrates that policy. A named anchor with href receives native Tab/Enter behavior. Focus-visible always paints the outline. Touch and keyboard affordances do not depend on hover. Inline prose links use the WCAG 2.5.8 inline exception. When a link is blockified by flex/grid layout, its minimum inline/block size is a physical 24px (`size-md / density-scale`); density must not shrink the floor. Standalone icon actions should use the appropriate control component. Inverse tone requires an inverse surface. Apps supply accessible labels for icon-only content and their router host through `asChild`.
|
|
130
69
|
|
|
131
70
|
## Playground demo spec
|
|
132
71
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
**Default story:**
|
|
136
|
-
|
|
137
|
-
- Renders `Link` with a default href and body. Asserts the root class is `dsx-link` and the `underline` modifier is `dsx-link--auto`. Host element is `A` and the `href` attribute is forwarded.
|
|
138
|
-
|
|
139
|
-
**Underline story:**
|
|
140
|
-
|
|
141
|
-
- Renders Link with each `underline` value. Asserts the matching `dsx-link--{underline}` class.
|
|
142
|
-
|
|
143
|
-
**Color story:**
|
|
144
|
-
|
|
145
|
-
- Renders Link with each `color` value. Asserts the `data-accent-color` attribute on the root. The test `renders data-accent-color for warp and ray` documents rift, warp, and ray.
|
|
146
|
-
|
|
147
|
-
**Composition story** (for `asChild`):
|
|
148
|
-
|
|
149
|
-
- Renders Link with `asChild` wrapping a Next.js-style `<a>` element. Asserts the host element is `A` and the `dsx-link` class is preserved.
|
|
150
|
-
|
|
151
|
-
**State story:**
|
|
152
|
-
|
|
153
|
-
- Renders Link in muted, inverse, and high-contrast states. Asserts the matching modifier class or `data-high-contrast` attribute.
|
|
154
|
-
|
|
155
|
-
**Token story:**
|
|
156
|
-
|
|
157
|
-
- Renders inside a `Theme` wrapper with `accentColor="rift"` and `accentColor="warp"`. Asserts the `data-accent-color` attribute tracks the active accent.
|
|
158
|
-
|
|
159
|
-
**A11y story:**
|
|
160
|
-
|
|
161
|
-
- The default render passes the `vitest-axe` no-violations check. The focus-visible ring test is covered by the `:focus-visible` selector in the CSS.
|
|
162
|
-
|
|
163
|
-
**Props exposed in the playground controls:**
|
|
164
|
-
|
|
165
|
-
| Prop | Control | Default |
|
|
166
|
-
|---|---|---|
|
|
167
|
-
| `underline` | select | `auto` |
|
|
168
|
-
| `tone` | select | `default` |
|
|
169
|
-
| `color` | select | (none) |
|
|
170
|
-
| `size` | select | (none) |
|
|
171
|
-
| `highContrast` | boolean | `false` |
|
|
172
|
-
| `asChild` | boolean | `false` |
|
|
72
|
+
`/docs/link`, typography registry. Matrix render forwards all props; controls expose underline, tone, color, size and highContrast. The live example has real local hash navigation, all four underline policies, muted/inverse/high-contrast references, all five accent strings and a slotted native anchor. Tab/Enter navigates to the labelled destination. The nine size values remain available in the matrix.
|
|
173
73
|
|
|
174
74
|
## Wiring notes
|
|
175
75
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- `@radix-ui/react-slot` for `asChild`.
|
|
179
|
-
- `_internal/helpers/extractProps` for the prop def bag.
|
|
180
|
-
- `_internal/props/{asChild,highContrast}.prop` for the shared prop defs.
|
|
181
|
-
- `_internal/cn` (via `classNames`) for class merging.
|
|
182
|
-
- No DS component composition. Link is a leaf primitive.
|
|
183
|
-
|
|
184
|
-
**Used by:**
|
|
185
|
-
|
|
186
|
-
- The Playground typography registry, in-product navigation, in-line references, footer links, and any app surface that needs a styled anchor.
|
|
187
|
-
|
|
188
|
-
**State boundaries:**
|
|
189
|
-
|
|
190
|
-
- Owned by Link: the root class, the `underline` and `tone` modifier classes, the `data-accent-color`, `data-size`, and `data-high-contrast` attributes, the focus-visible ring, and the prop def bag.
|
|
191
|
-
- Owned by the consumer: the href, target, rel, the body content, the host element when `as` / `asChild` is set, the click navigation behavior, and any extra `className` / `style` applied through prop forwarding.
|
|
192
|
-
|
|
193
|
-
**Boundary rules:**
|
|
194
|
-
|
|
195
|
-
- App-owned data: the destination, the link copy, the open-in-new-tab and rel behavior (`target="_blank"` requires `rel="noopener noreferrer"` for security), and the routing strategy.
|
|
196
|
-
- DS-owned visuals: the `dsx-link` root class, the `underline` and `tone` modifier classes, the accent color, the focus ring, and the prop def bag.
|
|
197
|
-
|
|
198
|
-
## Penpot build recipe
|
|
199
|
-
|
|
200
|
-
> Optional. Penpot is a visual reference, not a code authority. The Link recipe tracks the `underline`, `tone`, `color`, `size`, and `highContrast` contract.
|
|
201
|
-
|
|
202
|
-
The package does not yet publish a Penpot asset for Link. The recipe is visual reference only and tracks the CSS contract.
|
|
203
|
-
|
|
204
|
-
### Root board
|
|
205
|
-
|
|
206
|
-
- **Name**: `Primitives / Link`.
|
|
207
|
-
- **Dimensions**: `auto × auto` (inline).
|
|
208
|
-
- **Layout**: `Flex` (inline).
|
|
209
|
-
- **Sizing**: `horizontalSizing = 'auto'`, `verticalSizing = 'auto'`.
|
|
210
|
-
|
|
211
|
-
### Layer tree
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
<Root Board: Link>
|
|
215
|
-
└── <Text: link body (anchor)>
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Token bindings (Penpot properties)
|
|
219
|
-
|
|
220
|
-
| Shape | Property | Token | Token type | Penpot property name |
|
|
221
|
-
|---|---|---|---|---|
|
|
222
|
-
| Root | text fill | `--dsx-color-primary` (default) | Color | `fills` |
|
|
223
|
-
| Root (accent) | text fill | `--dsx-color-accent-9` | Color | `fills` (state) |
|
|
224
|
-
| Root (muted) | text fill | `--dsx-color-on-surface-variant` | Color | `fills` (state) |
|
|
225
|
-
| Root (inverse) | text fill | `--dsx-color-on-inverse-background` | Color | `fills` (state) |
|
|
226
|
-
| Root (always) | text decoration | `--dsx-color-primary` | Color | `textDecoration` |
|
|
227
|
-
| Root (focus-visible) | outline | `--dsx-effect-ring-focus` | Color | `outline` |
|
|
228
|
-
|
|
229
|
-
### State transformations
|
|
230
|
-
|
|
231
|
-
| State | Root text fill | Text decoration |
|
|
232
|
-
|---|---|---|
|
|
233
|
-
| `default` | `--dsx-color-primary` | (none on `auto`) |
|
|
234
|
-
| `muted` | `--dsx-color-on-surface-variant` | (none) |
|
|
235
|
-
| `inverse` | `--dsx-color-on-inverse-background` | (none) |
|
|
236
|
-
| `highContrast` | `--dsx-color-high-contrast` | (none) |
|
|
237
|
-
| `accent=rift` | `--dsx-color-accent-9` | `--dsx-color-accent-9` on `always` |
|
|
238
|
-
| `always` | (per tone) | `underline` solid `--dsx-color-primary` |
|
|
239
|
-
| `hover` (auto) | (per tone) | `underline` solid `--dsx-color-primary` |
|
|
240
|
-
|
|
241
|
-
### Variant model
|
|
242
|
-
|
|
243
|
-
- `underline`: `auto`, `always`, `hover`, `none`. Default `auto`.
|
|
244
|
-
- `tone`: `default`, `muted`, `inverse`. Default `default`.
|
|
245
|
-
- `color`: `rift`, `warp`, `ray`, or a free-form string. Default unset.
|
|
246
|
-
- `size`, `highContrast` documented in the spec body.
|
|
247
|
-
- Total members: underline × tone × color = 4 × 3 × 4 = 48, plus the high-contrast toggle.
|
|
248
|
-
|
|
249
|
-
### Validation checklist
|
|
250
|
-
|
|
251
|
-
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
252
|
-
- [ ] Component is promoted to Main Component under `Primitives`.
|
|
253
|
-
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
254
|
-
- [ ] The accent override is the only place a brand color is used directly; the default link color tracks `data-accent-color` for rift, warp, and ray.
|
|
76
|
+
Radix Slot implements `asChild`; `extractProps` consumes `linkPropDefs`; classnames merges the root and modifiers. No DS component composition inside Link. The token layer owns accent rescoping; Link consumes semantic roles. Apps own link content, destination and navigation.
|