@d4gger/design-system 3.0.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/components/accordion.css +9 -2
- package/dist/components/alert/Alert.cjs +11 -7
- package/dist/components/alert/Alert.cjs.map +2 -2
- package/dist/components/alert/Alert.d.cts.map +1 -1
- package/dist/components/alert/Alert.d.mts.map +1 -1
- package/dist/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +12 -8
- package/dist/components/alert/Alert.js.map +2 -2
- package/dist/components/alert.css +13 -0
- 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 +132 -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 +8 -0
- package/dist/components/code.css +29 -13
- package/dist/components/collapsible/Collapsible.cjs +4 -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 +4 -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/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/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 +3 -0
- package/dist/components/icon/Icon.cjs.map +2 -2
- package/dist/components/icon/Icon.d.cts +5 -1
- package/dist/components/icon/Icon.d.cts.map +1 -1
- package/dist/components/icon/Icon.d.mts +5 -1
- package/dist/components/icon/Icon.d.mts.map +1 -1
- package/dist/components/icon/Icon.d.ts +5 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +4 -0
- package/dist/components/icon/Icon.js.map +2 -2
- package/dist/components/icon/icons.cjs +2 -0
- package/dist/components/icon/icons.cjs.map +2 -2
- package/dist/components/icon/icons.d.cts +5 -0
- package/dist/components/icon/icons.d.cts.map +1 -1
- package/dist/components/icon/icons.d.mts +5 -0
- package/dist/components/icon/icons.d.mts.map +1 -1
- package/dist/components/icon/icons.d.ts +5 -0
- package/dist/components/icon/icons.d.ts.map +1 -1
- package/dist/components/icon/icons.js +2 -0
- package/dist/components/icon/icons.js.map +2 -2
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.cjs.map +2 -2
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +1 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -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 +49 -9
- package/dist/components/notificationCenter/NotificationCenter.cjs +21 -16
- package/dist/components/notificationCenter/NotificationCenter.cjs.map +2 -2
- package/dist/components/notificationCenter/NotificationCenter.d.cts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.mts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.js +22 -17
- package/dist/components/notificationCenter/NotificationCenter.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 +12 -4
- package/dist/components/sidebar/Sidebar.cjs.map +2 -2
- package/dist/components/sidebar/Sidebar.d.cts +4 -1
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.mts +4 -1
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +4 -1
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +12 -4
- 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 +28 -0
- 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 +1 -0
- package/dist/docs/README.md +1 -0
- package/dist/docs/component-contract.md +4 -3
- package/dist/docs/component-index.json +9 -1
- package/dist/docs/components/accordion.md +5 -36
- package/dist/docs/components/alert.md +17 -10
- 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 +9 -2
- package/dist/docs/components/code.md +33 -220
- package/dist/docs/components/collapsible.md +11 -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 +3 -1
- 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/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/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 +24 -14
- package/dist/docs/components/page-header.md +2 -0
- 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 +17 -3
- 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/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 +1632 -1300
- package/dist/tokens.css +344 -362
- package/package.json +1 -1
|
@@ -65,7 +65,7 @@ The CSS file also targets `[data-sonner-toaster]` and `[data-sonner-toast]` dire
|
|
|
65
65
|
**Responsive behavior:**
|
|
66
66
|
|
|
67
67
|
- The component does not write `@media` rules. None of its prop defs are `responsive: true`.
|
|
68
|
-
- The
|
|
68
|
+
- The package stylesheet uses an intrinsic viewport width cap at every width; it has no width media queries. The adapter retains its own positioning rules and mobileOffset API.
|
|
69
69
|
|
|
70
70
|
**Reduced motion:**
|
|
71
71
|
|
|
@@ -81,32 +81,33 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
81
81
|
| Toaster z-index | `var(--dsx-z-index-toast)` | Toast stack. |
|
|
82
82
|
| Toaster gap | `var(--dsx-space-md)` | Space between toasts. |
|
|
83
83
|
| Toaster padding | `var(--dsx-space-md)` | Inner gutter. |
|
|
84
|
-
| Toast padding block | `var(--dsx-space-
|
|
84
|
+
| Toast padding block | `var(--dsx-space-md)` | Toast vertical padding. |
|
|
85
85
|
| Toast padding inline | `var(--dsx-space-md)` | Toast horizontal padding. |
|
|
86
86
|
| Toast background | `var(--dsx-color-surface)` | Resting toast surface. |
|
|
87
87
|
| Toast radius | `var(--dsx-rounded-md)` | Toast corner roundness. |
|
|
88
88
|
| Toast border | `var(--dsx-border-width-sm) solid var(--dsx-color-outline)` | Toast edge. |
|
|
89
89
|
| Toast shadow | `var(--dsx-shadow-elevation-5)` | Spotlight: below dialogs, above all menus (B4 Q3). |
|
|
90
|
-
| Toast gap | `var(--dsx-space-
|
|
90
|
+
| Toast gap | `var(--dsx-space-sm)` | Gap between icon, body and close; action row below. |
|
|
91
91
|
| Success border | `var(--dsx-color-success)` | Success variant edge. |
|
|
92
92
|
| Error background | `var(--dsx-color-error-container)` | Error variant surface. |
|
|
93
93
|
| Error border | `var(--dsx-color-error)` | Error variant edge. |
|
|
94
94
|
| Error text | `var(--dsx-color-on-error-container)` | Error variant text. |
|
|
95
|
-
| Warning border | `var(--dsx-color-
|
|
96
|
-
| Info border | `var(--dsx-color-
|
|
95
|
+
| Warning border | `var(--dsx-color-warning)` | Warning variant edge. |
|
|
96
|
+
| Info border | `var(--dsx-color-info)` | Info variant edge. |
|
|
97
97
|
| Title typography | `var(--dsx-typography-label-large-*)` | Toast title. |
|
|
98
|
+
| Title line-height | `var(--dsx-size-md)` | First line centred with the 24px icon/Close boxes. |
|
|
98
99
|
| Title text | `var(--dsx-color-on-surface)` | Default title color. |
|
|
99
100
|
| Description typography | `var(--dsx-typography-body-medium-*)` | Toast description. |
|
|
100
101
|
| Description text | `var(--dsx-color-on-surface-variant)` | Default description color. |
|
|
101
102
|
| Action, cancel, close | `var(--dsx-color-on-surface-variant)` | Default button text. |
|
|
102
|
-
| Action
|
|
103
|
+
| Action / cancel padding and height | `var(--dsx-space-xs) var(--dsx-space-sm)`, minimum `--dsx-size-lg` | Labelled controls below the message. |
|
|
104
|
+
| Close dimensions / padding | `--dsx-size-md`, `0` | 24px box at the trailing top edge. |
|
|
103
105
|
| Action, cancel, close radius | `var(--dsx-rounded-sm)` | Button corner roundness. |
|
|
104
106
|
| Action, cancel, close hover background | `var(--dsx-color-high-contrast-container)` | Hover affordance. |
|
|
105
107
|
| Action, cancel, close hover text | `var(--dsx-color-high-contrast)` | Hover affordance. |
|
|
106
108
|
| Error title, description, close text | `var(--dsx-color-on-error-container)` | Error variant text. |
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
| Mobile inset | `var(--dsx-space-3)` | Mobile offset. |
|
|
109
|
+
|
|
110
|
+
The first row places an optional icon, a shrinkable message body and a trailing Close in separate columns. The title line-height uses size-md (24px), aligning its first line with the centres of the 24px icon and Close boxes, including wrapped titles. Action and cancel controls occupy a second row below the message, preserving readable label widths. Without an icon, the message starts in the first column.
|
|
110
111
|
|
|
111
112
|
## Motion contract
|
|
112
113
|
|
|
@@ -131,7 +132,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
131
132
|
|
|
132
133
|
**Focus:**
|
|
133
134
|
|
|
134
|
-
-
|
|
135
|
+
- Action, cancel and close controls have the package focus ring and a minimum 24px control box. Actions retain their intrinsic label width; the text column shrinks and wraps within the available toast width.
|
|
135
136
|
|
|
136
137
|
**Reduced motion:**
|
|
137
138
|
|
|
@@ -165,7 +166,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
165
166
|
|
|
166
167
|
**Token story:**
|
|
167
168
|
|
|
168
|
-
- Renders inside a `Theme` wrapper with `accentColor="
|
|
169
|
+
- Renders inside a `Theme` wrapper with `accentColor="rift"`, `accentColor="astral"`, and `accentColor="spark"`. Asserts the toaster host renders inside the wrapper and the variant borders continue to render with the package tokens.
|
|
169
170
|
|
|
170
171
|
**Props exposed in the playground controls:**
|
|
171
172
|
|
|
@@ -186,7 +187,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
186
187
|
|
|
187
188
|
**Used by:**
|
|
188
189
|
|
|
189
|
-
-
|
|
190
|
+
- Consumers compose transient notifications with `Sonner`; `NotificationCenter` is a separate inbox surface and does not render this adapter internally.
|
|
190
191
|
|
|
191
192
|
**State boundaries:**
|
|
192
193
|
|
|
@@ -228,8 +229,8 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
228
229
|
| Success toast | stroke | `var(--dsx-color-success)` | Color | `strokes` |
|
|
229
230
|
| Error toast | fill | `var(--dsx-color-error-container)` | Color | `fills` |
|
|
230
231
|
| Error toast | stroke | `var(--dsx-color-error)` | Color | `strokes` |
|
|
231
|
-
| Warning toast | stroke | `var(--dsx-color-
|
|
232
|
-
| Info toast | stroke | `var(--dsx-color-
|
|
232
|
+
| Warning toast | stroke | `var(--dsx-color-warning)` | Color | `strokes` |
|
|
233
|
+
| Info toast | stroke | `var(--dsx-color-info)` | Color | `strokes` |
|
|
233
234
|
| Title | text fill | `var(--dsx-color-on-surface)` | Color | `fills` |
|
|
234
235
|
| Description | text fill | `var(--dsx-color-on-surface-variant)` | Color | `fills` |
|
|
235
236
|
| Error title, description | text fill | `var(--dsx-color-on-error-container)` | Color | `fills` |
|
|
@@ -241,8 +242,8 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
241
242
|
| `default` | `var(--dsx-color-surface)` | `var(--dsx-color-outline)` | `var(--dsx-color-on-surface)` |
|
|
242
243
|
| `success` | `var(--dsx-color-surface)` | `var(--dsx-color-success)` | `var(--dsx-color-on-surface)` |
|
|
243
244
|
| `error` | `var(--dsx-color-error-container)` | `var(--dsx-color-error)` | `var(--dsx-color-on-error-container)` |
|
|
244
|
-
| `warning` | `var(--dsx-color-surface)` | `var(--dsx-color-
|
|
245
|
-
| `info` | `var(--dsx-color-surface)` | `var(--dsx-color-
|
|
245
|
+
| `warning` | `var(--dsx-color-surface)` | `var(--dsx-color-warning)` | `var(--dsx-color-on-surface)` |
|
|
246
|
+
| `info` | `var(--dsx-color-surface)` | `var(--dsx-color-info)` | `var(--dsx-color-on-surface)` |
|
|
246
247
|
|
|
247
248
|
### Variant model
|
|
248
249
|
|
|
@@ -257,3 +258,11 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
257
258
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
258
259
|
- [ ] Component is promoted to Main Component under `Components`.
|
|
259
260
|
- [ ] `penpotUtils.shapeStructure(board, 3)` matches the expected hierarchy.
|
|
261
|
+
|
|
262
|
+
## Overlay review fixture
|
|
263
|
+
|
|
264
|
+
`/docs/sonner` owns one Toaster in its live example; matrix buttons use that
|
|
265
|
+
host rather than mounting duplicates. One action emits one notification.
|
|
266
|
+
Save draft with undo updates visible feedback through its action callback.
|
|
267
|
+
The adapter retains its preferred width, capped by viewport minus
|
|
268
|
+
dialog-viewport-gap. Package padding remains space-md at every width.
|
|
@@ -38,7 +38,7 @@ A multi-step wizard or progress indicator that pairs a numbered indicator with a
|
|
|
38
38
|
|
|
39
39
|
- The root is a flex container. In `orientation="horizontal"` (the default) it is a `flex-direction: row` with `align-items: center`. In `orientation="vertical"` it is a `flex-direction: column` with `align-items: flex-start`.
|
|
40
40
|
- `Stepper.Item` is a flex container. In horizontal orientation the item itself flips to `flex-direction: column` so the indicator sits above the label / description. In vertical orientation the item stays in a `flex-direction: row` and is `width: 100%` so the indicator, label, description, and content lay out side by side.
|
|
41
|
-
- `Stepper.Indicator` is a circular `var(--dsx-size
|
|
41
|
+
- `Stepper.Indicator` is a circular `var(--dsx-stepper-indicator-size)` badge with a 1px outline. It uses the `label-medium` type ramp. State colors (complete, current, error, disabled) are applied via the parent `Item`'s modifier class.
|
|
42
42
|
- `Stepper.Separator` is the connector. In horizontal orientation it is a `flex: 1` bar that fills the available space; in vertical orientation it is a `var(--dsx-border-width-lg)` wide, `var(--dsx-space-lg)` tall bar offset to the right of the indicator.
|
|
43
43
|
|
|
44
44
|
## Props contract
|
|
@@ -107,36 +107,11 @@ These slots accept only `asChild` plus the standard HTML attribute surface for t
|
|
|
107
107
|
|
|
108
108
|
## Token mapping
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
Indicator diameter is a component-local size variable: sm → `var(--dsx-size-md)` (24px), md → `var(--dsx-size-lg)` (32px), lg → `var(--dsx-size-xl)` (40px). The same variable anchors both orientations’ connectors. Labels/descriptions wrap within their column.
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
| Indicator size | `var(--dsx-size-md)` | Indicator width and height |
|
|
116
|
-
| Indicator border | `var(--dsx-border-width-sm) solid var(--dsx-color-outline)` | Indicator edge |
|
|
117
|
-
| Indicator background | `var(--dsx-color-surface)` | Indicator surface |
|
|
118
|
-
| Indicator radius | `var(--dsx-rounded-full)` | Circular indicator |
|
|
119
|
-
| Indicator type ramp | `var(--dsx-typography-label-medium-*)` | Indicator number |
|
|
120
|
-
| Indicator text color | `var(--dsx-color-on-surface-variant)` | Indicator text |
|
|
121
|
-
| Complete indicator | `var(--dsx-color-success)` (border + background), `var(--dsx-color-on-success)` (text) | Success palette |
|
|
122
|
-
| Current indicator | `var(--dsx-color-primary)` (border + background), `var(--dsx-color-on-primary)` (text) | Primary palette |
|
|
123
|
-
| Error indicator | `var(--dsx-color-error)` (border + background), `var(--dsx-color-on-error)` (text) | Error palette |
|
|
124
|
-
| Disabled item | `var(--dsx-opacity-disabled)` | Disabled opacity |
|
|
125
|
-
| Label type ramp | `var(--dsx-typography-label-large-*)` | Label text |
|
|
126
|
-
| Label color | `var(--dsx-color-on-surface)` | Default label color |
|
|
127
|
-
| Pending / disabled label | `var(--dsx-color-on-surface-variant)` | Pending / disabled label color |
|
|
128
|
-
| Description color | `var(--dsx-color-on-surface-variant)` | Description text |
|
|
129
|
-
| Description type ramp | `var(--dsx-typography-body-medium-*)` | Description text |
|
|
130
|
-
| Separator height | `var(--dsx-border-width-lg)` | Default connector thickness |
|
|
131
|
-
| Separator background | `var(--dsx-color-outline-variant)` | Default connector color |
|
|
132
|
-
| Separator radius | `var(--dsx-rounded-full)` | Connector roundness |
|
|
133
|
-
| Separator min-width | `var(--dsx-space-md)` | Min horizontal connector length |
|
|
134
|
-
| Horizontal separator offset | `margin-top: calc(var(--dsx-size-md) / 2 - var(--dsx-border-width-lg) / 2)`, `margin-left: var(--dsx-space-sm)`, `margin-right: var(--dsx-space-sm)` | Alignment with the indicator centerline |
|
|
135
|
-
| Vertical separator width | `var(--dsx-border-width-lg)` | Vertical connector thickness |
|
|
136
|
-
| Vertical separator height | `var(--dsx-space-lg)` | Vertical connector length |
|
|
137
|
-
| Vertical separator offset | `flex: 0`, `margin-left: calc(var(--dsx-size-md) / 2 - var(--dsx-border-width-lg) / 2)`, `min-height: var(--dsx-space-lg)` | Centered alignment with the indicator centerline |
|
|
138
|
-
| Complete-separator color | `var(--dsx-color-primary)` | Connector after a complete step |
|
|
139
|
-
| Content margin-top | `var(--dsx-space-lg)` | Panel offset |
|
|
112
|
+
Horizontal items share equal widths; each non-final item draws a connector from the indicator edge to the next item. Vertical items draw a connector from the indicator bottom through the item padding. `Stepper.Separator` remains a supported DOM slot and is visually hidden in both shipped orientations.
|
|
113
|
+
|
|
114
|
+
Indicators retain state tokens: complete uses success/on-success; current uses primary/on-primary; error uses error/on-error; pending uses surface/outline/on-surface-variant. Disabled opacity uses opacity-disabled. Connector thickness uses border-width-lg, resting color outline-variant, completed color primary. Labels and descriptions use label-large/body-medium typography. Item gap uses space-sm; horizontal column gap uses space-lg.
|
|
140
115
|
|
|
141
116
|
## Motion contract
|
|
142
117
|
|
|
@@ -183,9 +158,9 @@ The component has no motion. State transitions (complete / current / pending / e
|
|
|
183
158
|
The vertical `Stepper` layout previously had two visual defects:
|
|
184
159
|
|
|
185
160
|
1. The `.dsx-stepper--vertical .dsx-stepper__separator` override did not reset the base `flex: 1`, causing the separator to grow along the main axis in vertical orientation.
|
|
186
|
-
2. The `margin-left` was `calc(var(--dsx-size
|
|
161
|
+
2. The `margin-left` was `calc(var(--dsx-stepper-indicator-size) / 2)` without subtracting half the separator width, offsetting the connector from the indicator centerline.
|
|
187
162
|
|
|
188
|
-
Both issues are now fixed: the vertical override sets `flex: 0` and uses `margin-left: calc(var(--dsx-size
|
|
163
|
+
Both issues are now fixed: the vertical override sets `flex: 0` and uses `margin-left: calc(var(--dsx-stepper-indicator-size) / 2 - var(--dsx-border-width-lg) / 2)` to center the connector under the indicator.
|
|
189
164
|
|
|
190
165
|
## Playground demo spec
|
|
191
166
|
|
|
@@ -229,7 +204,7 @@ Both issues are now fixed: the vertical override sets `flex: 0` and uses `margin
|
|
|
229
204
|
**Used by:**
|
|
230
205
|
|
|
231
206
|
- App-level onboarding flows, multi-step forms, and wizard navigation. The roster explicitly calls out that `Stepper` is a composite, not a pattern, and that it must compose primitive `Indicator + Separator + Label` parts rather than a parallel visual shell.
|
|
232
|
-
- Timeline (rail recipe consumer, CSS contract only — no component dependency): Timeline reuses the vertical rail geometry (dot-column centering calc, marker-bottom anchor, size-aware offsets, active-state recolor) for its left rail and centered alternate spine, while keeping its own Item/Marker/Content/Connector API, its own event states, and its own (non-progressbar) semantics. The
|
|
207
|
+
- Timeline (rail recipe consumer, CSS contract only — no component dependency): Timeline reuses the vertical rail geometry (dot-column centering calc, marker-bottom anchor, size-aware offsets, active-state recolor) for its left rail and centered alternate spine, while keeping its own Item/Marker/Content/Connector API, its own event states, and its own (non-progressbar) semantics. The components share the rail recipe but own their size variables independently.
|
|
233
208
|
|
|
234
209
|
**State boundaries:**
|
|
235
210
|
|
|
@@ -105,7 +105,7 @@ Rules:
|
|
|
105
105
|
|
|
106
106
|
## Playground demo spec
|
|
107
107
|
|
|
108
|
-
`Strong` is registered in `apps/playground/lib/registry/typography.tsx` under the `strong` key. The registry entry imports `strongPropDefs` and renders the component with a sample strong span. Per-component route: `/docs/strong`.
|
|
108
|
+
`Strong` is registered in `apps/playground/lib/registry/typography.tsx` under the `strong` key. The registry entry imports `strongPropDefs` and renders the component with a sample strong span. Per-component route: `/docs/strong`. The live example uses English and Russian sentence context plus a slotted span.
|
|
109
109
|
|
|
110
110
|
**Default story:**
|
|
111
111
|
|
|
@@ -23,10 +23,10 @@ A simpler horizontal tab bar for routing, where each tab is a real `<a>` element
|
|
|
23
23
|
| Slot | Element | Renders | Notes |
|
|
24
24
|
|---|---|---|---|
|
|
25
25
|
| `TabNav` (root) | `<nav>` | DS primitive + class | Wrapper that owns the `data-variant` and `data-size` attributes. |
|
|
26
|
-
| `TabNav.List` | `<ul>` | DS primitive + class |
|
|
27
|
-
| `TabNav.Link` | `<li><a>` | DS primitive + class | The active link is wrapped in a list item.
|
|
26
|
+
| `TabNav.List` | `<ul>` | DS primitive + class | Wrapping native list of route links. |
|
|
27
|
+
| `TabNav.Link` | `<li><a>` | DS primitive + class | The active link is wrapped in a list item. Uses native anchor semantics and `aria-current="page"` on the active route. |
|
|
28
28
|
|
|
29
|
-
The list item wrapper (`<li class="dsx-tab-nav__list-item">`) is internal layout, not a public slot. The link host is the only element that carries the link's accessible name and `aria-
|
|
29
|
+
The list item wrapper (`<li class="dsx-tab-nav__list-item">`) is internal layout, not a public slot. The link host is the only element that carries the link's accessible name and `aria-current` state.
|
|
30
30
|
|
|
31
31
|
## Props contract
|
|
32
32
|
|
|
@@ -54,7 +54,7 @@ The list item wrapper (`<li class="dsx-tab-nav__list-item">`) is internal layout
|
|
|
54
54
|
|
|
55
55
|
| Prop | Type | Default | Required | Description | Responsive |
|
|
56
56
|
|---|---|---|---|---|---|
|
|
57
|
-
| `active` | `boolean` | `false` | no | Marks the link as the current route. Drives `data-active="true"
|
|
57
|
+
| `active` | `boolean` | `false` | no | Marks the link as the current route. Drives `data-active="true"` and `aria-current="page"`. All anchors with an href stay keyboard reachable. | no |
|
|
58
58
|
| `asChild` | `boolean` | `false` | no | Renders the link through `Slot` from `@radix-ui/react-slot`; consumer supplies the host element. The component does not wire `asChild` through `extractProps`; the link consumes it directly. | no |
|
|
59
59
|
| `href` | `string` | `undefined` | no | Standard anchor `href` for the navigation target. | no |
|
|
60
60
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-tab-nav__link`. | no |
|
|
@@ -66,7 +66,7 @@ Rules that apply to this row:
|
|
|
66
66
|
- The root extends `React.HTMLAttributes<HTMLElement>` rather than `ComponentPropsWithoutRef<'nav'>`. Any standard HTML attribute (`id`, `aria-*`, `onClick`, etc.) is forwarded to the host.
|
|
67
67
|
- `variant` and `size` are wired through `extractProps` only as far as needed to write the `data-*` attributes. The component then spreads the remaining extracted props onto the host. The prop def bag does not include a `className` mapping, so the size/variant class is only written as a `data-*` attribute, not as a BEM-style modifier class.
|
|
68
68
|
- `asChild` on the root and the link is consumed directly (not through `extractProps`). When `asChild={true}`, the rendered element comes from `Slot` and the consumer owns the host.
|
|
69
|
-
-
|
|
69
|
+
- All route anchors use native Tab navigation; Enter follows the href. The component does not implement tab-panel roving focus.
|
|
70
70
|
|
|
71
71
|
## CSS class contract
|
|
72
72
|
|
|
@@ -90,7 +90,7 @@ Rules that apply to this row:
|
|
|
90
90
|
|
|
91
91
|
**Responsive behavior:**
|
|
92
92
|
|
|
93
|
-
- The component does not
|
|
93
|
+
- The component does not use width breakpoints. `size` is single-value only; the prop def is not `responsive: true`.
|
|
94
94
|
|
|
95
95
|
**Reduced motion:**
|
|
96
96
|
|
|
@@ -108,11 +108,11 @@ Every CSS value the component paints is a `var(--dsx-*)` token, with `150ms` and
|
|
|
108
108
|
| Gap (list) | `var(--dsx-space-xs)` | Spacing between links. |
|
|
109
109
|
| List bullet | `none` | Reset. |
|
|
110
110
|
| List padding/margin | `0` | Reset. |
|
|
111
|
-
| List border (default) | `var(--dsx-
|
|
111
|
+
| List border (default) | `var(--dsx-boundary-divider-width)` + `var(--dsx-color-outline-variant)` (bottom) | Default list separator. |
|
|
112
112
|
| List background (pills) | `var(--dsx-color-surface-raised)` | Pill background. |
|
|
113
113
|
| List padding (pills) | `var(--dsx-space-xs)` | Pill gutter. |
|
|
114
114
|
| List radius (pills) | `var(--dsx-rounded-full)` | Pill shape. |
|
|
115
|
-
| List border (underline) | `
|
|
115
|
+
| List border (underline) | `none` | Indicator-only variant. |
|
|
116
116
|
| Link padding (md) | `var(--dsx-space-sm)` + `var(--dsx-space-md)` | Link hit area. |
|
|
117
117
|
| Link padding (sm) | `var(--dsx-space-xs)` + `var(--dsx-space-sm)` | Compact hit area. |
|
|
118
118
|
| Link padding (lg) | `var(--dsx-space-md)` + `var(--dsx-space-lg)` | Large hit area. |
|
|
@@ -121,11 +121,11 @@ Every CSS value the component paints is a `var(--dsx-*)` token, with `150ms` and
|
|
|
121
121
|
| Link color (default) | `var(--dsx-color-on-surface-variant)` | Resting text. |
|
|
122
122
|
| Link color (hover) | `var(--dsx-color-on-surface)` | Hover text. |
|
|
123
123
|
| Link background (hover) | `var(--dsx-effect-hover-ghost)` | Hover surface. |
|
|
124
|
-
| Link color (active, default / underline) | `var(--dsx-color-
|
|
125
|
-
| Link color (active, pills) | `var(--dsx-color-
|
|
126
|
-
| Link background (active, pills) | `var(--dsx-color-
|
|
127
|
-
| Indicator (default) | `var(--dsx-
|
|
128
|
-
| Indicator (underline) | `
|
|
124
|
+
| Link color (active, default / underline) | `var(--dsx-color-accent-indicator)` | Active text. |
|
|
125
|
+
| Link color (active, pills) | `var(--dsx-color-accent-contrast)` | Active text inside the pill. |
|
|
126
|
+
| Link background (active, pills) | `var(--dsx-color-accent-track)` | Active pill. |
|
|
127
|
+
| Indicator (default) | `var(--dsx-boundary-selected-width)` + `var(--dsx-color-accent-indicator)` + `var(--dsx-rounded-full)` | Underline indicator. |
|
|
128
|
+
| Indicator (underline) | `var(--dsx-boundary-selected-width)` + `var(--dsx-color-accent-indicator)` + `var(--dsx-rounded-full)` | Underline variant indicator. |
|
|
129
129
|
| Link typography | `var(--dsx-typography-label-large-font-family/size/weight)`, sans-serif fallback | Default link text. |
|
|
130
130
|
| Link typography (sm) | `var(--dsx-typography-label-medium-font-size)` | Compact link text. |
|
|
131
131
|
| Link typography (lg) | `var(--dsx-typography-label-large-font-size)` | Large link text. |
|
|
@@ -134,7 +134,6 @@ Every CSS value the component paints is a `var(--dsx-*)` token, with `150ms` and
|
|
|
134
134
|
|
|
135
135
|
Rules:
|
|
136
136
|
|
|
137
|
-
- The `2px` indicator height in the `underline` variant is a CSS hard-code, not a token. The `default` variant uses `var(--dsx-border-width-md)`. This is a small inconsistency in the source CSS; both should be token-driven in a future cleanup (see Anomalies).
|
|
138
137
|
- Alpha is reserved for effect tokens; the hover surface uses `var(--dsx-effect-hover-ghost)`.
|
|
139
138
|
|
|
140
139
|
## Motion contract
|
|
@@ -150,77 +149,15 @@ Rules:
|
|
|
150
149
|
|
|
151
150
|
## Accessibility
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
The root is a navigation landmark. The list retains native list semantics; each href is a native link. `active` reflects `aria-current="page"`. Every link is reachable with Tab and activated with Enter. Arrow keys retain browser behavior.
|
|
154
153
|
|
|
155
|
-
|
|
154
|
+
Links show `var(--dsx-shadow-focus-ring)` on keyboard focus. The selected route also has a visible underline or pill. Consumers supply meaningful link text and an `aria-label` when several navigation landmarks occur on a page. Reduced motion disables color/background transitions.
|
|
156
155
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| Key | Action |
|
|
160
|
-
|---|---|
|
|
161
|
-
| `Tab` | Moves focus into and out of the tab list. Active link is the only focusable item. |
|
|
162
|
-
| `Enter`, `Space` | Activates the focused link. |
|
|
163
|
-
| `ArrowLeft`, `ArrowRight` | (Expected) Move focus across the tab list per the WAI-ARIA tabs pattern. The current source does NOT implement roving focus; consumers must add `onKeyDown` handling. |
|
|
164
|
-
|
|
165
|
-
**Focus:**
|
|
166
|
-
|
|
167
|
-
- Visible focus ring via `var(--dsx-shadow-focus-ring)` on `.dsx-tab-nav__link:focus-visible`.
|
|
168
|
-
- Roving tab index: active link is `tabIndex={0}`; inactive links are `tabIndex={-1}`. The component does not move focus on `ArrowLeft` / `ArrowRight` itself (see Anomalies).
|
|
169
|
-
|
|
170
|
-
**Reduced motion:**
|
|
171
|
-
|
|
172
|
-
- The CSS transitions are disabled under `prefers-reduced-motion: reduce`. No runtime guard is needed.
|
|
173
|
-
|
|
174
|
-
**Color and meaning:**
|
|
175
|
-
|
|
176
|
-
- The active tab is communicated by `aria-selected="true"`, the indicator color (`--dsx-color-primary`), and the pill background in the `pills` variant. Color is not the only signal.
|
|
177
|
-
|
|
178
|
-
**Naming:**
|
|
179
|
-
|
|
180
|
-
- The link label is the accessible name. The root does not require an `aria-label`, but consumers that have multiple `<nav>` landmarks on the page should add `aria-label` to disambiguate (e.g. `Primary`, `Settings`).
|
|
156
|
+
Every preview uses an application-owned hash navigation example with active page content, native href links and Back/Forward synchronization. No tab-panel roles or package router state are introduced.
|
|
181
157
|
|
|
182
158
|
## Playground demo spec
|
|
183
159
|
|
|
184
|
-
The
|
|
185
|
-
|
|
186
|
-
**Default story:**
|
|
187
|
-
|
|
188
|
-
- Renders `TabNav` with `TabNav.List` and three `TabNav.Link` items, the first marked `active={true}`. Asserts the root class is `dsx-tab-nav`, `data-variant` is `default`, `data-size` is `md`, the list has `role="tablist"`, and the active link has `aria-selected="true"` and `tabIndex={0}`.
|
|
189
|
-
|
|
190
|
-
**Variant story** (one per variant):
|
|
191
|
-
|
|
192
|
-
- Renders TabNav with `variant="default"`, `variant="pills"`, and `variant="underline"`. Asserts the matching `data-variant` attribute on the root and the matching CSS treatment (underline indicator, pill background, etc.).
|
|
193
|
-
|
|
194
|
-
**Size story:**
|
|
195
|
-
|
|
196
|
-
- Renders TabNav with `size="sm"`, `size="md"`, and `size="lg"`. Asserts the matching `data-size` attribute and the matching link padding.
|
|
197
|
-
|
|
198
|
-
**Composition story:**
|
|
199
|
-
|
|
200
|
-
- Renders TabNav with a `TabNav.List` containing three `TabNav.Link` items. Asserts each slot renders the right element with the right class and the inactive links carry `aria-selected="false"` and `tabIndex={-1}`.
|
|
201
|
-
|
|
202
|
-
**State story:**
|
|
203
|
-
|
|
204
|
-
- Renders the link in `default`, `hover` (`:hover` pseudo-class; no `data-*` attribute), and `focus` (`:focus-visible`; no `data-*` attribute). Asserts the focus ring is visible and `tabIndex` updates as `active` toggles.
|
|
205
|
-
|
|
206
|
-
**Token story:**
|
|
207
|
-
|
|
208
|
-
- Renders inside a `Theme` wrapper with `accentColor="amber"`, `accentColor="silver"`, and `accentColor="bronze"`. The active indicator color tracks `data-accent-color` (it should resolve to the current `primary` token at runtime).
|
|
209
|
-
|
|
210
|
-
**A11y story:**
|
|
211
|
-
|
|
212
|
-
- Uses `vitest-axe` against the rendered default tab nav. Asserts there are no axe violations and that the active link carries `aria-selected="true"`. Arrow-key navigation is documented as a known gap (see Anomalies).
|
|
213
|
-
|
|
214
|
-
**Props exposed in the playground controls:**
|
|
215
|
-
|
|
216
|
-
| Prop | Control | Default |
|
|
217
|
-
|---|---|---|
|
|
218
|
-
| `variant` (root) | select | `default` |
|
|
219
|
-
| `size` (root) | select | `md` |
|
|
220
|
-
| `asChild` (root) | boolean | `false` |
|
|
221
|
-
| `active` (link) | boolean | `false` |
|
|
222
|
-
| `asChild` (link) | boolean | `false` |
|
|
223
|
-
| `href` (link) | text | `#` |
|
|
160
|
+
The variant and size matrix uses the same application-owned workspace navigation as the live gallery. Every link has a unique actual hash destination and active aria-current="page" state. Clicking Members/Settings changes the content and URL; Back/Forward, including return to the initial empty hash, restore the current example page. Default, pills and underline variants use identical page content. The package remains a native link surface; routing stays with the application.
|
|
224
161
|
|
|
225
162
|
## Wiring notes
|
|
226
163
|
|
|
@@ -235,13 +172,13 @@ The demo file at `demo_path` exposes the component to the playground. The playgr
|
|
|
235
172
|
|
|
236
173
|
**State boundaries:**
|
|
237
174
|
|
|
238
|
-
- Owned by TabNav: the root class, the `data-variant` and `data-size` attributes,
|
|
175
|
+
- Owned by TabNav: the root class, the `data-variant` and `data-size` attributes, native list/link semantics, the `aria-current="page"` reflection, the focus ring, and the color/background transitions.
|
|
239
176
|
- Owned by the consumer: the route data, the active-link detection (route matching), the keyboard roving focus implementation (until the source adds it), the host element when `asChild` is set, and the `<a href>` target.
|
|
240
177
|
|
|
241
178
|
**Boundary rules:**
|
|
242
179
|
|
|
243
180
|
- App-owned data: the route table, the active-route matcher, the navigation history, and any analytics on tab clicks.
|
|
244
|
-
- DS-owned visuals: token bindings (`--dsx-space-{xs,sm,md,lg}`, `--dsx-color-{surface-raised,on-surface-variant,on-surface,on-primary,primary,outline-variant}`, `--dsx-
|
|
181
|
+
- DS-owned visuals: token bindings (`--dsx-space-{xs,sm,md,lg}`, `--dsx-color-{surface-raised,on-surface-variant,on-surface,on-primary,primary,outline-variant}`, `--dsx-boundary-selected-width`, `--dsx-rounded-{md,full}`, `--dsx-typography-label-{large,medium}-*`, `--dsx-shadow-focus-ring`, `--dsx-effect-hover-ghost`, `--dsx-motion-duration-fast`, `--dsx-motion-easing-standard`), the `dsx-tab-nav` root class, the `dsx-tab-nav__list`, `dsx-tab-nav__list-item`, and `dsx-tab-nav__link` slot classes, and the variant CSS blocks.
|
|
245
182
|
|
|
246
183
|
## Penpot build recipe
|
|
247
184
|
|
|
@@ -261,13 +198,13 @@ The package does not yet publish a Penpot asset for TabNav. Recipe is visual ref
|
|
|
261
198
|
```
|
|
262
199
|
<Root Board: TabNav / default / md>
|
|
263
200
|
└── <Frame: dsx-tab-nav>
|
|
264
|
-
└── <Frame: dsx-tab-nav__list (ul
|
|
201
|
+
└── <Frame: dsx-tab-nav__list (ul)>
|
|
265
202
|
├── <Frame: dsx-tab-nav__list-item (li)>
|
|
266
|
-
│ └── <Frame: dsx-tab-nav__link (a,
|
|
203
|
+
│ └── <Frame: dsx-tab-nav__link (a, aria-current=page, data-active=true)>
|
|
267
204
|
├── <Frame: dsx-tab-nav__list-item (li)>
|
|
268
|
-
│ └── <Frame: dsx-tab-nav__link (a
|
|
205
|
+
│ └── <Frame: dsx-tab-nav__link (a)>
|
|
269
206
|
└── <Frame: dsx-tab-nav__list-item (li)>
|
|
270
|
-
└── <Frame: dsx-tab-nav__link (a
|
|
207
|
+
└── <Frame: dsx-tab-nav__link (a)>
|
|
271
208
|
```
|
|
272
209
|
|
|
273
210
|
### Token bindings (Penpot properties)
|
|
@@ -275,19 +212,19 @@ The package does not yet publish a Penpot asset for TabNav. Recipe is visual ref
|
|
|
275
212
|
| Shape | Property | Token | Token type | Penpot property name |
|
|
276
213
|
|---|---|---|---|---|
|
|
277
214
|
| Root | (none) | n/a | n/a | n/a |
|
|
278
|
-
| List (default
|
|
215
|
+
| List (default) | stroke (bottom) | `--dsx-color-outline-variant` | Color | `strokes` |
|
|
279
216
|
| List (pills) | fill | `--dsx-color-surface-raised` | Color | `fills` |
|
|
280
217
|
| List (pills) | radius | `--dsx-rounded-full` | Radius | `radius` |
|
|
281
218
|
| Link (resting) | text fill | `--dsx-color-on-surface-variant` | Color | `fills` |
|
|
282
219
|
| Link (hover) | text fill | `--dsx-color-on-surface` | Color | `fills` (state) |
|
|
283
220
|
| Link (hover) | background | `--dsx-effect-hover-ghost` | Effect | `fills` (state) |
|
|
284
|
-
| Link (active, default / underline) | text fill | `--dsx-color-
|
|
285
|
-
| Link (active, pills) | text fill | `--dsx-color-
|
|
286
|
-
| Link (active, pills) | fill | `--dsx-color-
|
|
287
|
-
| Indicator (default) | fill | `--dsx-color-
|
|
288
|
-
| Indicator (default) | height | `--dsx-
|
|
289
|
-
| Indicator (underline) | fill | `--dsx-color-
|
|
290
|
-
| Indicator (underline) | height | `
|
|
221
|
+
| Link (active, default / underline) | text fill | `--dsx-color-accent-indicator` | Color | `fills` (state) |
|
|
222
|
+
| Link (active, pills) | text fill | `--dsx-color-accent-contrast` | Color | `fills` (state) |
|
|
223
|
+
| Link (active, pills) | fill | `--dsx-color-accent-track` | Color | `fills` (state) |
|
|
224
|
+
| Indicator (default) | fill | `--dsx-color-accent-indicator` | Color | `fills` (state) |
|
|
225
|
+
| Indicator (default) | height | `--dsx-boundary-selected-width` | Sizing | `size` |
|
|
226
|
+
| Indicator (underline) | fill | `--dsx-color-accent-indicator` | Color | `fills` (state) |
|
|
227
|
+
| Indicator (underline) | height | `--dsx-boundary-selected-width` | Sizing | `size` |
|
|
291
228
|
| Link (focus-visible) | shadow | `--dsx-shadow-focus-ring` | Effect | `shadow` (state) |
|
|
292
229
|
|
|
293
230
|
### State transformations
|
|
@@ -296,8 +233,8 @@ The package does not yet publish a Penpot asset for TabNav. Recipe is visual ref
|
|
|
296
233
|
|---|---|---|---|
|
|
297
234
|
| `default` (resting) | `--dsx-color-on-surface-variant` | transparent | none |
|
|
298
235
|
| `hover` | `--dsx-color-on-surface` | `--dsx-effect-hover-ghost` | none |
|
|
299
|
-
| `active` (default / underline) | `--dsx-color-
|
|
300
|
-
| `active` (pills) | `--dsx-color-
|
|
236
|
+
| `active` (default / underline) | `--dsx-color-accent-indicator` | transparent | `--dsx-color-accent-indicator` underline |
|
|
237
|
+
| `active` (pills) | `--dsx-color-accent-contrast` | `--dsx-color-accent-indicator` | none |
|
|
301
238
|
| `focus-visible` | (active or resting) | (active or resting) | `--dsx-shadow-focus-ring` ring |
|
|
302
239
|
|
|
303
240
|
### Variant model
|
|
@@ -13,8 +13,14 @@ Article navigation over stable serialized heading IDs. `extractTableOfContentsHe
|
|
|
13
13
|
|
|
14
14
|
## API and behavior
|
|
15
15
|
|
|
16
|
-
`items` contains `id`, `title`, and optional `level`. `activeId` and `onActiveIdChange` support control; `sticky` defaults true. Active links use `aria-current="location"`. Smooth scrolling is skipped for reduced motion, no-heading articles render no landmark, and
|
|
16
|
+
`items` contains `id`, `title`, and optional `level`. `activeId` and `onActiveIdChange` support control; `sticky` defaults true. Active links use `aria-current="location"`. Smooth scrolling is skipped for reduced motion, no-heading articles render no landmark, and sticky positioning applies at every width when `sticky` is true. Consumers choose placement through layout primitives; no component width breakpoint is used.
|
|
17
|
+
|
|
18
|
+
Links provide a minimum 24px box and visible keyboard focus. Normal clicks scroll smoothly and push a history entry; reduced motion retains native anchor scrolling. Modified clicks retain native link behavior. The observer keeps intersection state across callbacks and selects the current visible heading or the last passed heading.
|
|
19
|
+
|
|
20
|
+
The live example keeps navigation outside a bounded scrolling article. Application-owned activeId and onClickCapture handle that embedded scroll root; standalone window scroll-spy behavior remains in the package. The three heading targets exist, links retain native hash destinations, and the article is a keyboard-focusable region.
|
|
17
21
|
|
|
18
22
|
## Playground demo spec
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
Both the matrix and live example keep the TOC beside a bounded scrollable article on wide screens and above it on narrow screens. Existing activeId and onClickCapture props coordinate this embedded scroll root. Its three real headings can be reached by links or article scrolling; the article region is keyboard-focusable. The package's uncontrolled window observer remains unchanged.
|
|
25
|
+
|
|
26
|
+
The embedded playground article uses natural section spacing; only the last section retains trailing scroll room so its heading can reach the viewport top.
|
|
@@ -84,7 +84,7 @@ The roster's `Parent / Slots` column lists `Tabs.Root`, `Tabs.List`, `Tabs.Trigg
|
|
|
84
84
|
|---|---|---|---|---|---|
|
|
85
85
|
| `asChild` | `boolean` | `false` | no | Renders the indicator through `Slot`. The active trigger's `getBoundingClientRect()` is used to position the indicator, so the `Slot` child must keep the same layout. | no |
|
|
86
86
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-tabs__indicator`. | no |
|
|
87
|
-
| `style` | `React.CSSProperties` | `undefined` | no | Extra inline style.
|
|
87
|
+
| `style` | `React.CSSProperties` | `undefined` | no | Extra inline style. Measured inline geometry is left/width horizontally or left/top/height vertically. Position, paint and motion belong to CSS; consumer styles are merged after geometry. | no |
|
|
88
88
|
|
|
89
89
|
### `Tabs.ContentGroup`
|
|
90
90
|
|
|
@@ -97,7 +97,6 @@ The roster's `Parent / Slots` column lists `Tabs.Root`, `Tabs.List`, `Tabs.Trigg
|
|
|
97
97
|
Rules:
|
|
98
98
|
|
|
99
99
|
- The root, list, trigger, and content slots run through `extractProps` with the matching prop def bag.
|
|
100
|
-
- `Tabs.Indicator` is not in the prop def bag; it manages its own positioning through a `useEffect` that reads the active trigger's `getBoundingClientRect()` relative to the list. The `transition` is hard-coded to `'left 200ms ease, width 200ms ease'` in the source.
|
|
101
100
|
- The root throws an error (`Tabs compound components must be rendered within a Tabs root.`) if `Tabs.Indicator` is rendered outside a `Tabs.Root`, because the indicator reads from `TabsContext`.
|
|
102
101
|
|
|
103
102
|
## CSS class contract
|
|
@@ -131,11 +130,11 @@ Rules:
|
|
|
131
130
|
|
|
132
131
|
**Responsive behavior:**
|
|
133
132
|
|
|
134
|
-
- The component does not
|
|
133
|
+
- The component does not use width breakpoints. `size` is single-value only; the prop def is not `responsive: true`.
|
|
135
134
|
|
|
136
135
|
**Reduced motion:**
|
|
137
136
|
|
|
138
|
-
|
|
137
|
+
The indicator uses CSS motion-duration-normal and motion-easing-standard tokens. Component CSS disables its transition under reduced motion.
|
|
139
138
|
|
|
140
139
|
## Token mapping
|
|
141
140
|
|
|
@@ -144,8 +143,8 @@ Every CSS value the component paints is a `var(--dsx-*)` token. The `tabs.css` f
|
|
|
144
143
|
| Property | Token | Role |
|
|
145
144
|
|---|---|---|
|
|
146
145
|
| List display | `inline-flex` (CSS keyword) | Horizontal list layout. |
|
|
147
|
-
| List border | `var(--dsx-
|
|
148
|
-
| List gap | `var(--dsx-space-xs)` |
|
|
146
|
+
| List border | `var(--dsx-boundary-divider-width) solid var(--dsx-control-separator-color)` | Default list bottom edge. |
|
|
147
|
+
| List gap | `0` for default; `var(--dsx-space-xs)` for pills | Default underline tabs are contiguous. |
|
|
149
148
|
| Pills list background | `var(--dsx-color-surface-raised)` | Pills variant surface. |
|
|
150
149
|
| Pills list border | `0` (none) | Pills variant has no edge. |
|
|
151
150
|
| Pills list border radius | `var(--dsx-rounded-full)` | Pills variant corner roundness. |
|
|
@@ -155,31 +154,24 @@ Every CSS value the component paints is a `var(--dsx-*)` token. The `tabs.css` f
|
|
|
155
154
|
| Trigger color | `var(--dsx-color-on-surface-variant)` | Default trigger text. |
|
|
156
155
|
| Trigger typography | `var(--dsx-typography-label-large-*)` | Trigger font family and size. |
|
|
157
156
|
| Content group padding | `var(--dsx-space-md)` | Content group gutter. |
|
|
158
|
-
| Indicator height | `
|
|
159
|
-
| Indicator background | `var(--dsx-color-accent)` | Active marker color. |
|
|
157
|
+
| Indicator height | `var(--dsx-boundary-selected-width)` | Indicator thickness. |
|
|
158
|
+
| Indicator background | `var(--dsx-color-accent-indicator)` | Active marker color. |
|
|
160
159
|
| Indicator motion duration | `var(--dsx-motion-duration-normal)` | Indicator position transition. |
|
|
161
160
|
| Indicator motion easing | `var(--dsx-motion-easing-standard)` | Indicator position easing. |
|
|
162
161
|
|
|
163
|
-
Rules:
|
|
164
|
-
|
|
165
|
-
- No raw color, spacing, radius, or motion values in `tabs.css` other than the indicator thickness (`2px`) and the indicator transition (`200ms ease`), which the source hard-codes.
|
|
166
|
-
|
|
167
162
|
## Motion contract
|
|
168
163
|
|
|
169
|
-
| Region | Token |
|
|
170
|
-
|
|
171
|
-
| Indicator
|
|
172
|
-
| List / trigger / content (CSS) | `none` | `none` | `none` |
|
|
173
|
-
|
|
174
|
-
Rules:
|
|
164
|
+
| Region | Token | Reduced |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| Indicator left/width/top/height | `var(--dsx-motion-duration-normal)` and `var(--dsx-motion-easing-standard)` | Transition disabled |
|
|
175
167
|
|
|
176
|
-
|
|
168
|
+
Indicator geometry follows the active DOM trigger on controlled or uncontrolled value changes, orientation changes, list scroll, and ResizeObserver notifications. Geometry is relative to the owning list. Vertical lists use a vertical marker and column triggers. Panel flex-basis is 50%, allowing intrinsic wrapping below the list when the two columns no longer fit. Root/list/trigger/content support their advertised `asChild` composition.
|
|
177
169
|
|
|
178
170
|
## Accessibility
|
|
179
171
|
|
|
180
172
|
**Roles:**
|
|
181
173
|
|
|
182
|
-
- `Tabs.
|
|
174
|
+
- `Tabs.List` is `role="tablist"` (Radix); the root is a non-semantic container.
|
|
183
175
|
- `Tabs.Trigger` is `role="tab"` with `aria-selected` and `aria-controls` (Radix).
|
|
184
176
|
- `Tabs.Content` is `role="tabpanel"` with `aria-labelledby` linked to the trigger (Radix).
|
|
185
177
|
- `Tabs.Indicator` is decorative (`aria-hidden`).
|
|
@@ -199,11 +191,10 @@ Rules:
|
|
|
199
191
|
|
|
200
192
|
**Focus:**
|
|
201
193
|
|
|
202
|
-
- The
|
|
194
|
+
- The trigger uses an inset canonical focus ring so a scrollable list does not clip it. The ring stays visible on dark and light surfaces.
|
|
203
195
|
|
|
204
196
|
**Reduced motion:**
|
|
205
197
|
|
|
206
|
-
- The indicator transition is hard-coded in the source. Consumers who need a hard gate can add a page-level `prefers-reduced-motion: reduce` rule.
|
|
207
198
|
|
|
208
199
|
**Color and meaning:**
|
|
209
200
|
|
|
@@ -213,37 +204,13 @@ Rules:
|
|
|
213
204
|
|
|
214
205
|
- Every trigger must have an accessible name from its children. Icon-only triggers need `aria-label`.
|
|
215
206
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
**Default story:**
|
|
219
|
-
|
|
220
|
-
- Renders `Tabs` with two triggers and two content panels. Asserts the first trigger has `data-state="active"` and `aria-selected="true"`, and the first content panel is visible.
|
|
221
|
-
|
|
222
|
-
**Variant story:**
|
|
207
|
+
Default tabs use an underline and transparent selected background; pills retain the solid accent fill. A static underline is provided when `Tabs.Indicator` is omitted. `ContentGroup` owns the 16px panel gap; child content has no additional top margin.
|
|
223
208
|
|
|
224
|
-
|
|
209
|
+
The matrix exposes size, list variant and orientation with the same project panels as the live examples. Disabled settings and working activity panels are present in every composition.
|
|
225
210
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
- Clicks the second trigger and asserts the second trigger becomes `data-state="active"` while the first becomes `data-state="inactive"`. Renders a trigger with `disabled` and asserts `data-disabled` is present.
|
|
229
|
-
|
|
230
|
-
**Composition story:**
|
|
231
|
-
|
|
232
|
-
- Renders a `Tabs.ContentGroup` wrapping one `Tabs.Content`. Asserts the wrapper renders with `dsx-tabs__content-group` and `data-slot="tabs-content-group"`.
|
|
233
|
-
|
|
234
|
-
**Token story:**
|
|
235
|
-
|
|
236
|
-
- Renders `Tabs` inside a `Theme` wrapper with `accentColor="silver"` and one with `accentColor="bronze"`. The active trigger's indicator tracks `var(--dsx-color-accent)`, which is theme-aware.
|
|
237
|
-
|
|
238
|
-
**A11y story:**
|
|
239
|
-
|
|
240
|
-
- The `Tabs.test.tsx` suite covers the role contract via `screen.getByRole('tab', { name })` and the state transitions via `userEvent.click`. The registry does not need a separate `vitest-axe` check.
|
|
211
|
+
## Playground demo spec
|
|
241
212
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
| Prop | Control | Default |
|
|
245
|
-
|---|---|---|
|
|
246
|
-
| `size` | select | `md` |
|
|
213
|
+
The matrix exposes root size, List variant (default/pills), and Radix orientation (horizontal/vertical). Each uses the same working project panels as the live examples: Overview, Activity, and disabled Settings. Default lists contain Tabs.Indicator; pills omit it. ContentGroup wraps the panels and applies the single gap. Arrow navigation changes the visible panel; disabled Settings is skipped.
|
|
247
214
|
|
|
248
215
|
## Wiring notes
|
|
249
216
|
|
|
@@ -266,3 +233,5 @@ Rules:
|
|
|
266
233
|
|
|
267
234
|
- App-owned data: the tab registry, the panel content, the disabled reasons, and the deep-link policy.
|
|
268
235
|
- DS-owned visuals: the `dsx-tabs` root class, the slot classes, the token bindings, and the `data-*` and ARIA attribute contract.
|
|
236
|
+
|
|
237
|
+
Pills use accent-track with accent-contrast text. The default/vertical indicator uses accent-indicator, the foreground and stroke role.
|
|
@@ -128,6 +128,7 @@ Rules that apply to this row:
|
|
|
128
128
|
|
|
129
129
|
- The component does not write `@media` rules. None of its prop defs are `responsive: true`. Density and radius are single-value only.
|
|
130
130
|
- The component's CSS file is breakpoint-agnostic.
|
|
131
|
+
- The inner input has `min-inline-size: 0`, so its intrinsic width yields to leading/trailing slots at 320px. Slot content remains visible inside the shell.
|
|
131
132
|
|
|
132
133
|
**Reduced motion:**
|
|
133
134
|
|