@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
|
@@ -8,6 +8,7 @@ depends_on:
|
|
|
8
8
|
- "@tiptap/starter-kit"
|
|
9
9
|
- Button
|
|
10
10
|
- Icon
|
|
11
|
+
- VisuallyHidden
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
# RichTextEditor
|
|
@@ -51,7 +52,7 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
|
|
|
51
52
|
| Region | Element | Class | Notes |
|
|
52
53
|
|---|---|---|---|
|
|
53
54
|
| Toolbar group | `<div>` | `dsx-rich-text-editor__toolbar-group` | Groups related toolbar buttons. `role="group"` with `aria-label`. |
|
|
54
|
-
|
|
|
55
|
+
| Optional custom toolbar label | `<span>` | `dsx-rich-text-editor__toolbar-label` | Group label ("Text", "Blocks", "Insert", "History"). |
|
|
55
56
|
| Status bar | `<div>` | `dsx-rich-text-editor__status` | Shows editor status ("Editor loading", "Ready to write", or character count). `data-slot="rich-text-editor-status"`. |
|
|
56
57
|
| Placeholder | `<div>` | `dsx-rich-text-editor__placeholder` | Shown when the editor is empty and a placeholder is provided. `data-slot="rich-text-editor-placeholder"`. |
|
|
57
58
|
| Content host | `EditorContent` | `dsx-rich-text-editor__content` | The Tiptap adapter host. `data-slot="rich-text-editor-content"`. |
|
|
@@ -63,7 +64,7 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
|
|
|
63
64
|
| Prop | Type | Default | Required | Description | Responsive |
|
|
64
65
|
|---|---|---|---|---|---|
|
|
65
66
|
| `asChild` | `boolean` | `false` | no | Extracted from prop defs but not used by the root. The root always renders as a `<div>`. | no |
|
|
66
|
-
| `disabled` | `boolean` | `false` | no | Makes the editor non-editable. Drives `data-disabled` and `aria-disabled` on the shell. The CSS file consumes `data-disabled='true'` to change the shell border, background, and text color. | no |
|
|
67
|
+
| `disabled` | `boolean` | `false` | no | Makes the editor non-editable. Drives `data-disabled` and `aria-disabled` on the shell. Changing disabled retains the document and editor instance. The CSS file consumes `data-disabled='true'` to change the shell border, background, and text color. | no |
|
|
67
68
|
| `content` | `unknown` | `''` | no | Initial or controlled editor content. Accepts `string` (HTML), `object` (JSON), or `null`. Validated by `isRichTextEditorContent`. | no |
|
|
68
69
|
| `editorOptions` | `Omit<UseEditorOptions, 'content' \| 'editable' \| 'extensions' \| 'onUpdate'>` | `undefined` | no | Escape hatch for `useEditor` options. Merged with the DS-managed options. | no |
|
|
69
70
|
| `extensions` | `UseEditorOptions['extensions']` | `[StarterKit]` | no | Tiptap extensions. Defaults to `StarterKit`. Apps that need custom schema or extensions pass their own array. | no |
|
|
@@ -73,6 +74,11 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
|
|
|
73
74
|
| `serialize` | `(editor: Editor) => string` | `undefined` | no | Custom serialization function. When provided, `onUpdate` receives the output of this function instead of `editor.getHTML()`. | no |
|
|
74
75
|
| `toolbar` | `RichTextEditorToolbarSlot \| null` | `undefined` | no | Controls the toolbar rendering. `undefined` renders the default `RichTextEditor.Toolbar`. A ReactNode renders that node instead. A function receives `{ disabled, editor }` and returns a ReactNode. `null` hides the toolbar. | no |
|
|
75
76
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-rich-text-editor`. | no |
|
|
77
|
+
| `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
|
|
78
|
+
| `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
|
|
79
|
+
| `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
|
|
80
|
+
| `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
|
|
81
|
+
| `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
|
|
76
82
|
|
|
77
83
|
### `RichTextEditor.Shell` props
|
|
78
84
|
|
|
@@ -84,6 +90,11 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
|
|
|
84
90
|
| `placeholder` | `string` | `undefined` | no | Placeholder text. | no |
|
|
85
91
|
| `toolbar` | `RichTextEditorToolbarSlot \| null` | `undefined` | no | Toolbar override. Same semantics as `Root`. | no |
|
|
86
92
|
| `className` | `string` | `undefined` | no | Extra classes. | no |
|
|
93
|
+
| `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
|
|
94
|
+
| `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
|
|
95
|
+
| `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
|
|
96
|
+
| `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
|
|
97
|
+
| `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
|
|
87
98
|
|
|
88
99
|
### `RichTextEditor.Toolbar` props
|
|
89
100
|
|
|
@@ -92,6 +103,11 @@ The `EditorContent` component from `@tiptap/react` renders inside `RichTextEdito
|
|
|
92
103
|
| `editor` | `Editor \| null` | (required) | yes | The Tiptap editor instance. | no |
|
|
93
104
|
| `disabled` | `boolean` | `false` | no | Disables all toolbar buttons. | no |
|
|
94
105
|
| `className` | `string` | `undefined` | no | Extra classes. | no |
|
|
106
|
+
| `tools` | `readonly EditorTool[]` | common formatting | no | Visible schema-supported controls. Does not validate document policy. | no |
|
|
107
|
+
| `headingLevels` | `readonly (1..6)[]` | schema levels | no | Levels in the text style menu. | no |
|
|
108
|
+
| `insertItems` | `readonly EditorInsertItem[]` | `[]` | no | Consumer-labelled insertion callbacks. | no |
|
|
109
|
+
| `variables` | `readonly EditorVariable[]` | `undefined` | no | Registry metadata; Root adds key-only atom unless extensions are replaced. | no |
|
|
110
|
+
| `mentions` | `readonly EditorMention[]` | `undefined` | no | User IDs/labels; picker and @ suggestions. Custom schemas add the mention extension. | no |
|
|
95
111
|
|
|
96
112
|
### `RichTextEditor.Content` props
|
|
97
113
|
|
|
@@ -133,7 +149,7 @@ All other `React.ButtonHTMLAttributes<HTMLButtonElement>` are forwarded to `Rich
|
|
|
133
149
|
| Root / Shell | `dsx-rich-text-editor` | `rich-text-editor.css` |
|
|
134
150
|
| Toolbar | `dsx-rich-text-editor__toolbar` | `rich-text-editor.css` |
|
|
135
151
|
| Toolbar group | `dsx-rich-text-editor__toolbar-group` | `rich-text-editor.css` |
|
|
136
|
-
|
|
|
152
|
+
| Optional custom toolbar label | `dsx-rich-text-editor__toolbar-label` | `rich-text-editor.css` |
|
|
137
153
|
| Toolbar button | `dsx-rich-text-editor__toolbar-button` | `rich-text-editor.css` |
|
|
138
154
|
| Content area | `dsx-rich-text-editor__area` | `rich-text-editor.css` |
|
|
139
155
|
| Placeholder | `dsx-rich-text-editor__placeholder` | `rich-text-editor.css` |
|
|
@@ -156,12 +172,12 @@ All other `React.ButtonHTMLAttributes<HTMLButtonElement>` are forwarded to `Rich
|
|
|
156
172
|
|
|
157
173
|
**Responsive behavior:**
|
|
158
174
|
|
|
159
|
-
- The component
|
|
175
|
+
- The component has no viewport-width media rules. None of its prop defs are `responsive: true`.
|
|
160
176
|
- The component's CSS file is breakpoint-agnostic.
|
|
161
177
|
|
|
162
178
|
**Reduced motion:**
|
|
163
179
|
|
|
164
|
-
- The shell and toolbar transitions use `var(--dsx-motion-duration-fast)` and `var(--dsx-motion-easing-standard)`.
|
|
180
|
+
- The shell and toolbar transitions use `var(--dsx-motion-duration-fast)` and `var(--dsx-motion-easing-standard)`. Its own `prefers-reduced-motion` gate disables these transitions.
|
|
165
181
|
|
|
166
182
|
## Token mapping
|
|
167
183
|
|
|
@@ -178,15 +194,15 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
178
194
|
| Shell focus border | `var(--dsx-color-primary)` | Focus edge. |
|
|
179
195
|
| Shell focus ring | `var(--dsx-shadow-focus-ring)` | Focus indicator. |
|
|
180
196
|
| Shell disabled | `var(--dsx-color-disabled-border)`, `var(--dsx-color-disabled-surface)`, `var(--dsx-color-disabled-text)` | Disabled state. |
|
|
181
|
-
| Toolbar gap | `var(--dsx-space-
|
|
197
|
+
| Toolbar gap | `var(--dsx-space-sm)` / `var(--dsx-space-md)` | Space separates tool groups. |
|
|
182
198
|
| Toolbar padding | `var(--dsx-space-sm)` / `var(--dsx-space-md)` | Internal gutter. |
|
|
183
199
|
| Toolbar border | `var(--dsx-border-width-sm)` + `var(--dsx-color-outline)` | Bottom edge. |
|
|
184
200
|
| Toolbar background | `var(--dsx-color-surface-editor-toolbar)` | Toolbar surface. |
|
|
185
|
-
| Toolbar group border |
|
|
201
|
+
| Toolbar group border | none | Groups use proximity. |
|
|
186
202
|
| Toolbar group radius | `var(--dsx-rounded-md)` | Group corner roundness. |
|
|
187
|
-
| Toolbar group background |
|
|
203
|
+
| Toolbar group background | transparent | No separate frame. |
|
|
188
204
|
| Toolbar label typography | `var(--dsx-typography-label-small-*)` | Group label. |
|
|
189
|
-
| Toolbar button size | `var(--dsx-density-control-height-
|
|
205
|
+
| Toolbar button size | `var(--dsx-density-control-height-lg)` | Button tap target. |
|
|
190
206
|
| Toolbar button active | `var(--dsx-color-high-contrast)` + `var(--dsx-color-on-high-contrast)` | Active background and text. |
|
|
191
207
|
| Content area min-height | `var(--dsx-rich-text-editor-min-height, 220px)` | Minimum editor height. |
|
|
192
208
|
| Content area background | Gradient using `var(--dsx-color-surface-raised)` and `var(--dsx-color-surface)` | Subtle gradient. |
|
|
@@ -194,19 +210,20 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
194
210
|
| ProseMirror typography | `var(--dsx-typography-body-medium-*)` | Body text. |
|
|
195
211
|
| ProseMirror heading | `var(--dsx-typography-headline-medium-*)` | H1/H2. |
|
|
196
212
|
| ProseMirror H3 | `var(--dsx-typography-label-large-*)` | H3. |
|
|
197
|
-
| ProseMirror blockquote | `var(--dsx-color-
|
|
198
|
-
| ProseMirror code | `var(--dsx-
|
|
199
|
-
| ProseMirror pre | `var(--dsx-
|
|
213
|
+
| ProseMirror blockquote | `var(--dsx-color-accent-border)` (1px border), `var(--dsx-effect-hover-primary)` (bg) | Decorative quotation rule and wash. |
|
|
214
|
+
| ProseMirror code | `var(--dsx-code-soft-background)` + `var(--dsx-color-on-surface)` | Readable inline code. |
|
|
215
|
+
| ProseMirror pre | `var(--dsx-code-soft-background)` + `var(--dsx-color-on-surface)` | Code block. |
|
|
200
216
|
| Status bar | `var(--dsx-color-surface-editor-subtle)` + `var(--dsx-color-on-surface-variant)` | Status surface and text. |
|
|
201
217
|
| Transition | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Hover and focus transitions. |
|
|
218
|
+
| Link popover width | `var(--dsx-rich-text-editor-link-popover-width)` capped by Radix available width | Compact single-field form, independent of density and viewport breakpoints. |
|
|
202
219
|
|
|
203
220
|
## Motion contract
|
|
204
221
|
|
|
205
222
|
| Region | Token | Default | Reduced |
|
|
206
223
|
|---|---|---|---|
|
|
207
|
-
| Shell border, background, shadow, color | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on hover, focus, and disabled |
|
|
208
|
-
| Toolbar background, border | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on state change |
|
|
209
|
-
| Content area background | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on disabled |
|
|
224
|
+
| Shell border, background, shadow, color | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on hover, focus, and disabled | Own CSS disables transitions under prefers-reduced-motion. |
|
|
225
|
+
| Toolbar background, border | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on state change | Own CSS disables transitions under prefers-reduced-motion. |
|
|
226
|
+
| Content area background | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Transition on disabled | Own CSS disables transitions under prefers-reduced-motion. |
|
|
210
227
|
|
|
211
228
|
## Accessibility
|
|
212
229
|
|
|
@@ -220,9 +237,9 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
220
237
|
|
|
221
238
|
| Key | Action |
|
|
222
239
|
|---|---|
|
|
223
|
-
| `Tab` |
|
|
240
|
+
| `Tab` | Enters or leaves the toolbar's roving focus group, then reaches editor content. |
|
|
224
241
|
| `Enter`, `Space` | Activates the focused toolbar button. |
|
|
225
|
-
| Arrow keys
|
|
242
|
+
| Arrow keys / Home / End | Existing Toolbar supplies roving focus between enabled actions. ProseMirror keeps its own Mod-B / Mod-I shortcuts. |
|
|
226
243
|
|
|
227
244
|
**Focus:**
|
|
228
245
|
|
|
@@ -230,7 +247,7 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
230
247
|
|
|
231
248
|
**Reduced motion:**
|
|
232
249
|
|
|
233
|
-
-
|
|
250
|
+
- Own `prefers-reduced-motion` rules disable shell, toolbar, group, button and content-area transitions.
|
|
234
251
|
|
|
235
252
|
**Color and meaning:**
|
|
236
253
|
|
|
@@ -268,6 +285,16 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
268
285
|
|---|---|---|
|
|
269
286
|
| `disabled` | boolean | `false` |
|
|
270
287
|
|
|
288
|
+
## Review examples and retained behavior
|
|
289
|
+
|
|
290
|
+
The default toolbar composes the existing Toolbar and Button. Groups always
|
|
291
|
+
wrap inside narrow hosts; no width breakpoints. Root and ToolbarButton aliases
|
|
292
|
+
are attached as documented. Function-valued editorProps.attributes are evaluated
|
|
293
|
+
and merged with the DS class/slot, retaining app labels and dynamic attributes.
|
|
294
|
+
Images remain bounded; preformatted content scrolls. The live example exposes
|
|
295
|
+
formatting, lock/unlock with retained edits, preview, editable materials, broadcast variables and a
|
|
296
|
+
custom toolbar; app-owned Shell behavior is covered by the functional suite.
|
|
297
|
+
|
|
271
298
|
## Wiring notes
|
|
272
299
|
|
|
273
300
|
**Composes from:**
|
|
@@ -291,3 +318,26 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
291
318
|
|
|
292
319
|
- App-owned data: the editor schema, the extension set, the serialization format, the content persistence, the `onUpdate` handler, and the toolbar override.
|
|
293
320
|
- DS-owned visuals: token bindings, the `dsx-rich-text-editor` class hierarchy, the `data-disabled` and `data-active` attributes, the toolbar `aria-label` templates, the status bar text, and the placeholder rendering.
|
|
321
|
+
|
|
322
|
+
## Authoring enhancement — approved 2026-10-04
|
|
323
|
+
|
|
324
|
+
Root, Shell and Toolbar accept `tools` (formatting tool names), `headingLevels`,
|
|
325
|
+
`insertItems` (`id`, `label`, `insert(editor)`), `variables` (`key`, `label`, optional
|
|
326
|
+
`description`, `type`, `sensitive`) and `mentions` (`id`, `label`). Defaults retain
|
|
327
|
+
common formatting; the text style menu uses headings supported by the schema.
|
|
328
|
+
`tools` configures controls, not document validation. Consumers configure their
|
|
329
|
+
extensions to enforce policy. Link editing uses a labelled DS popover with URL
|
|
330
|
+
validation, save/remove, Escape and selection preservation. Insert entries are
|
|
331
|
+
consumer supplied. Toolbar groups wrap at every width.
|
|
332
|
+
|
|
333
|
+
The link form uses a label-large title, medium action buttons with a size-2xl
|
|
334
|
+
minimum, and a 320px content width capped by available space. Its explanatory
|
|
335
|
+
description remains accessible through VisuallyHidden; the visible title and URL
|
|
336
|
+
label identify the task. Variable/mention pickers retain their larger layout.
|
|
337
|
+
|
|
338
|
+
`createVariableExtension({ variables })` and `createMentionExtension({ mentions })`
|
|
339
|
+
are optional editor exports. Inline atoms store `key` / `userId`, preserve HTML/JSON
|
|
340
|
+
and undo, display registry labels, and visibly mark unknown keys. Root adds these
|
|
341
|
+
when registries are provided unless `extensions` is a complete replacement; custom
|
|
342
|
+
schemas add them explicitly. No variable resolution, upload or backend serializer
|
|
343
|
+
is supplied. Registry changes do not recreate the managed editor.
|
|
@@ -45,7 +45,7 @@ The `Root` slot mounts the `Viewport`, both `ScrollBar` slots, and the `Corner`
|
|
|
45
45
|
|---|---|---|---|---|---|
|
|
46
46
|
| `asChild` | `boolean` | `false` | no | Extracted from prop defs but the `Root` host always renders a `<div>`. The prop is reserved for future use. | no |
|
|
47
47
|
| `viewportAsChild` | `boolean` | `false` | no | When `true`, the children passed to the root are rendered directly inside the viewport via `Slot`. When `false`, the children are wrapped in a fragment. Use `true` when the scrollable content needs to be the viewport child directly so the host element's own classes do not block overflow inheritance. | no |
|
|
48
|
-
| `size` | `'1' \| '2' \| '3'` | `'1'` | no | Drives `data-size` on the root.
|
|
48
|
+
| `size` | `'1' \| '2' \| '3'` | `'1'` | no | Drives `data-size` on the root. Selects scrollbar thickness: 1 uses scroll-thumb-size, 2 uses 8px, 3 uses 10px. | no |
|
|
49
49
|
| `radius` | `'none' \| 'sm' \| 'md' \| 'lg' \| 'full'` | `'md'` | no | Drives `data-radius` on the root. The CSS file consumes `data-radius` on `.dsx-scroll-area` to control the corner roundness inherited by the viewport. | no |
|
|
50
50
|
| `viewportClassName` | `string` | `undefined` | no | Extra classes appended to the `Viewport` slot. | no |
|
|
51
51
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-scroll-area`. | no |
|
|
@@ -94,7 +94,7 @@ The slot also accepts the full `ComponentPropsWithoutRef<typeof ScrollAreaPrimit
|
|
|
94
94
|
| `data-state` (Radix) | `visible`, `hidden`, `hover`, `scroll` | `.dsx-scroll-area__scrollbar[data-state='visible']` | `scroll-area.css` |
|
|
95
95
|
| `data-orientation` (Radix) | `vertical`, `horizontal` | `.dsx-scroll-area__scrollbar[data-orientation='vertical']`, `.dsx-scroll-area__scrollbar[data-orientation='horizontal']` | `scroll-area.css` |
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
Both size and radius attributes drive the existing CSS variants.
|
|
98
98
|
|
|
99
99
|
**Slot classes:**
|
|
100
100
|
|
|
@@ -118,12 +118,12 @@ The `data-size` and `data-radius` attributes are not consumed by the default CSS
|
|
|
118
118
|
|
|
119
119
|
**Responsive behavior:**
|
|
120
120
|
|
|
121
|
-
- The component
|
|
121
|
+
- The component has no viewport-width media rules. None of its prop defs are `responsive: true`.
|
|
122
122
|
- The component's CSS file is breakpoint-agnostic.
|
|
123
123
|
|
|
124
124
|
**Reduced motion:**
|
|
125
125
|
|
|
126
|
-
- The scrollbar background and thumb transitions use `var(--dsx-motion-duration-fast)` and `var(--dsx-motion-easing-standard)`.
|
|
126
|
+
- The scrollbar background and thumb transitions use `var(--dsx-motion-duration-fast)` and `var(--dsx-motion-easing-standard)`. Its own `prefers-reduced-motion` gate disables scrollbar and thumb transitions. The scroll motion itself is owned by the Radix primitive and respects the user's reduced-motion preference.
|
|
127
127
|
|
|
128
128
|
## Token mapping
|
|
129
129
|
|
|
@@ -152,15 +152,15 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
152
152
|
|
|
153
153
|
| Region | Token | Default | Reduced |
|
|
154
154
|
|---|---|---|---|
|
|
155
|
-
| Scrollbar background | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Background transition on visibility change. |
|
|
156
|
-
| Thumb background and opacity | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Thumb color and opacity transition. |
|
|
155
|
+
| Scrollbar background | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Background transition on visibility change. | Own CSS disables the transition under `prefers-reduced-motion`. |
|
|
156
|
+
| Thumb background and opacity | `var(--dsx-motion-duration-fast)` + `var(--dsx-motion-easing-standard)` | Thumb color and opacity transition. | Own CSS disables the transition under `prefers-reduced-motion`. |
|
|
157
157
|
| Scroll motion | owned by Radix | The scroll motion is the user's pointer or keyboard input; the package does not add its own scroll animation. | Honored by the browser and the Radix primitive. |
|
|
158
158
|
|
|
159
159
|
## Accessibility
|
|
160
160
|
|
|
161
161
|
**Roles:**
|
|
162
162
|
|
|
163
|
-
-
|
|
163
|
+
- Radix preserves native scrolling; its custom tracks are not ARIA scrollbar widgets. A named root makes its auto-mounted viewport tabIndex=0 with an inset focus ring and forwards aria-label/aria-labelledby to its auto-mounted viewport and gives that viewport role=region. Unnamed composite regions do not gain a tabindex attribute. Explicit Viewport props control their own tabIndex.
|
|
164
164
|
|
|
165
165
|
**Keyboard:**
|
|
166
166
|
|
|
@@ -173,11 +173,11 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
173
173
|
|
|
174
174
|
**Focus:**
|
|
175
175
|
|
|
176
|
-
-
|
|
176
|
+
- The viewport paints an inset `var(--dsx-border-width-md)` ring using `var(--dsx-color-primary)` on `:focus-visible`.
|
|
177
177
|
|
|
178
178
|
**Reduced motion:**
|
|
179
179
|
|
|
180
|
-
- The scrollbar transitions
|
|
180
|
+
- The scrollbar and thumb transitions are disabled by their own `prefers-reduced-motion` rules. The scroll motion is owned by the browser and respects the user's reduced-motion preference.
|
|
181
181
|
|
|
182
182
|
**Color and meaning:**
|
|
183
183
|
|
|
@@ -214,6 +214,14 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
214
214
|
| `radius` | select (`none`, `sm`, `md`, `lg`, `full`) | `md` |
|
|
215
215
|
| `viewportAsChild` | boolean | `false` |
|
|
216
216
|
|
|
217
|
+
## Review examples
|
|
218
|
+
|
|
219
|
+
Activity history scrolls vertically; Regional comparison scrolls on both axes.
|
|
220
|
+
Keyboard PageDown/arrows, wheel, named viewport and visible focus are verified
|
|
221
|
+
at desktop and 390/320. Root auto-mounts its viewport; do not nest another one
|
|
222
|
+
unless intentionally composing a second scroll region. Reduced motion disables
|
|
223
|
+
track/thumb transitions in this component CSS.
|
|
224
|
+
|
|
217
225
|
## Wiring notes
|
|
218
226
|
|
|
219
227
|
**Composes from:**
|
|
@@ -127,46 +127,11 @@ Section has no motion. The motion section is intentionally empty.
|
|
|
127
127
|
|
|
128
128
|
- Section is a structural landmark. The accessible name should come from a heading inside the section, an `aria-label`, or an `aria-labelledby` reference.
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
**Default story:**
|
|
133
|
-
|
|
134
|
-
- Renders `Section` with no extra props and a child node. Asserts the root classes are `dsx-section` and `dsx-box`, the host element is a `section`, and `--dsx-section-space` resolves to `var(--dsx-space-2xl)`.
|
|
135
|
-
|
|
136
|
-
**Size story:**
|
|
137
|
-
|
|
138
|
-
- Renders `Section size="1"`, `Section size="2"`, and `Section size="3"`. Asserts the `data-size` attribute and the matching `--dsx-section-space` value (`var(--dsx-space-md)`, `var(--dsx-space-xl)`, `var(--dsx-space-2xl)`).
|
|
139
|
-
|
|
140
|
-
**Space story:**
|
|
141
|
-
|
|
142
|
-
- Renders `Section space="md"` and asserts `--dsx-section-space` resolves to `var(--dsx-space-md)`.
|
|
143
|
-
|
|
144
|
-
**Responsive story:**
|
|
145
|
-
|
|
146
|
-
- Renders `Section size={{ initial: '1', md: '3' }}` and `Section space={{ initial: 'md', lg: '2xl' }}`. Asserts the per-breakpoint `--dsx-section-space-*` custom property and the matching `padding-block` resolution.
|
|
147
|
-
|
|
148
|
-
**Composition story:**
|
|
130
|
+
The matrix and live example use the same outlined content bounds. All three sizes clear space overrides and visibly expose 16/32/48px above and below the content.
|
|
149
131
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
**State story:**
|
|
153
|
-
|
|
154
|
-
- No discrete state. The story renders a default Section with two children.
|
|
155
|
-
|
|
156
|
-
**Token story:**
|
|
157
|
-
|
|
158
|
-
- Section does not honor `data-accent-color`. Render inside a `Theme` wrapper with `accentColor="silver"` and `accentColor="bronze"`. The story asserts the layout is unchanged and any surfaces come from the theme.
|
|
159
|
-
|
|
160
|
-
**A11y story:**
|
|
161
|
-
|
|
162
|
-
- Use `vitest-axe` against the rendered Section. The default render is a `<section>` with text content; tests assert no violations.
|
|
163
|
-
|
|
164
|
-
**Props exposed in the playground controls:**
|
|
132
|
+
## Playground demo spec
|
|
165
133
|
|
|
166
|
-
|
|
167
|
-
|---|---|---|
|
|
168
|
-
| `size` | select | `undefined` |
|
|
169
|
-
| `space` | select | `2xl` |
|
|
134
|
+
The size matrix and live gallery use outlined content bounds with identical horizontal padding. Each explicitly clears space so size 1/2/3 shows 16/32/48px above and below the content. The live content explains what the dashed boundaries mark. Section remains an ordinary named page region, not an interactive control.
|
|
170
135
|
|
|
171
136
|
## Wiring notes
|
|
172
137
|
|
|
@@ -61,7 +61,7 @@ Rules:
|
|
|
61
61
|
- Deselect guard: the Root owns the selection state. Uncontrolled usage seeds internal state from `defaultValue` and passes the resolved value back into Radix as a controlled `value`, so clicking the active item (which fires `""`) can never clear Radix internal state or render the control with no active item. Controlled usage passes `value` straight through; `""` is still swallowed.
|
|
62
62
|
- Activation mode: in `automatic` mode each item's `onFocus` selects its own value when it differs from the current value (the item reads the mode and the current selection from an internal Root context; Radix strips the `value` prop from the DOM, so the Root cannot recover the focused value from the event target). The focus value goes through the same guarded setter, so focus can never empty the selection and tabbing into the group (which lands on the already-selected item) is a no-op. Disabled items never select on focus. In `manual` mode (default) focus never selects; selection happens only on activation. Consumer `onFocus` handlers on the Root and on items keep working in both modes.
|
|
63
63
|
- Choosing a mode: `automatic` is the radio-faithful choice for lightweight view/filter/mode switching. `manual` is required when `onValueChange` drives expensive side effects (network requests, navigation, heavy recompute) that must not fire on focus or hover.
|
|
64
|
-
- Indicator geometry: the Root measures the active `[data-state="on"]` item with `getBoundingClientRect` in a layout effect (before first paint), re-measures on selection change and via `ResizeObserver` on the root and the active item. The offset
|
|
64
|
+
- Indicator geometry: the Root measures the active `[data-state="on"]` item with `getBoundingClientRect` in a layout effect (before first paint), re-measures on selection change and via `ResizeObserver` on the root and the active item. The offset converts the physical-pixel viewport diff into content coordinates (`active.left - root.left - clientLeft + scrollLeft`, and the equivalent top/clientTop/scrollTop calculation). The pill then moves with the scrolled content instead of shifting twice. Physical coordinates remain independent of writing direction. A ready gate holds `transition: none` until the first positioned frame so mount never animates from the origin. Variable-width items are required; the indicator wrapper tracks each item's own width (no equal-width `nth-child` CSS), while its painted `::before` surface keeps a symmetric `space-2xs` inset inside that measured wrapper.
|
|
65
65
|
|
|
66
66
|
## CSS class contract
|
|
67
67
|
|
|
@@ -124,6 +124,8 @@ Rules:
|
|
|
124
124
|
**Size story:**
|
|
125
125
|
|
|
126
126
|
- Renders `size="sm"`, `size="md"`, `size="lg"`. Asserts the matching `data-size`.
|
|
127
|
+
- The matrix supplies a bounded 160px consumer host, capped at available width,
|
|
128
|
+
so every segment has nonzero width. The package continues to fill its parent.
|
|
127
129
|
|
|
128
130
|
**State story:**
|
|
129
131
|
|
|
@@ -202,3 +204,10 @@ Rules:
|
|
|
202
204
|
- [ ] Token bindings resolve at the values `DESIGN.md` describes.
|
|
203
205
|
- [ ] Component is promoted to Main Component under `Primitives`.
|
|
204
206
|
- [ ] Segment height matches `Progress`'s height at every `size` exactly.
|
|
207
|
+
|
|
208
|
+
## Reconciliation stories
|
|
209
|
+
|
|
210
|
+
The playground manifest includes `segmented-meter` so the registered family is
|
|
211
|
+
reachable from `/docs/segmented-meter` and the documentation index.
|
|
212
|
+
|
|
213
|
+
The live capacity example shows all three heights for the same controlled value, visible n-of-m text, use/release actions, and empty/full references. The meter is read-only; controls belong to the consumer.
|
|
@@ -28,7 +28,7 @@ No slots: flat export. The component renders a single Radix `SeparatorPrimitive.
|
|
|
28
28
|
| Prop | Type | Default | Required | Description | Responsive |
|
|
29
29
|
|---|---|---|---|---|---|
|
|
30
30
|
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | no | Sets `data-orientation` on the host and the matching CSS rule. | no |
|
|
31
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | no |
|
|
31
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | no | Retained data-size hook; all sizes paint the canonical 1px non-emphasis divider. | no |
|
|
32
32
|
| `variant` | `'default' \| 'decorative'` | `'default'` | no | When `'decorative'`, applies the `dsx-separator--decorative` modifier class. | no |
|
|
33
33
|
| `color` | `string` | `undefined` | no | Free-form accent color name forwarded to `data-accent-color` on the host. | no |
|
|
34
34
|
| `decorative` | `boolean` | `true` | no | Radix boolean: when true, the host is given `role="none"` and removed from the accessibility tree's semantic structure. When false, the host keeps `role="separator"`. | no |
|
|
@@ -39,7 +39,7 @@ Rules that apply to this row:
|
|
|
39
39
|
|
|
40
40
|
- The component extends `React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>`, so every standard Radix `Separator.Root` attribute is forwarded.
|
|
41
41
|
- `decorative` is the Radix accessibility opt-out. `Separator` defaults to `decorative={true}`; pass `decorative={false}` to expose the separator to assistive tech as a thematic break. The default is intentional: most separators are visual-only and the default should not add noise to the accessibility tree.
|
|
42
|
-
-
|
|
42
|
+
- Size does not alter divider thickness; the 1px policy applies at every size.
|
|
43
43
|
|
|
44
44
|
## CSS class contract
|
|
45
45
|
|
|
@@ -51,8 +51,8 @@ Rules that apply to this row:
|
|
|
51
51
|
|---|---|---|---|
|
|
52
52
|
| `data-orientation` | `horizontal`, `vertical` | `.dsx-separator[data-orientation='horizontal']`, `.dsx-separator[data-orientation='vertical']` | `separator.css` |
|
|
53
53
|
| (no attribute) | (presence) | `dsx-separator--decorative` when `variant === 'decorative'` | `separator.css` |
|
|
54
|
-
| `data-size` | `sm`, `md`, `lg` |
|
|
55
|
-
| `data-accent-color` | (any accent token name) |
|
|
54
|
+
| `data-size` | `sm`, `md`, `lg` | retained attribute; fixed 1px paint | `separator.css` |
|
|
55
|
+
| `data-accent-color` | (any accent token name) | decorative accent-border paint | `separator.css` |
|
|
56
56
|
|
|
57
57
|
**Slot classes:** none.
|
|
58
58
|
|
|
@@ -72,9 +72,10 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
72
72
|
|---|---|---|
|
|
73
73
|
| Background (default) | `var(--dsx-control-separator-color-strong)` | Default line color. |
|
|
74
74
|
| Background (decorative) | `var(--dsx-color-separator-muted)` | Muted line color for the `decorative` variant. |
|
|
75
|
+
| Background (explicit color) | `var(--dsx-color-accent-border)` | Decorative accent rule; overrides the neutral variant color. |
|
|
75
76
|
| Margin block (horizontal) | `var(--dsx-space-sm)` | Vertical breathing room around a horizontal line. |
|
|
76
77
|
| Margin inline (vertical) | `var(--dsx-space-xs)` | Horizontal breathing room around a vertical line. |
|
|
77
|
-
| Border width | `var(--dsx-
|
|
78
|
+
| Border width | `var(--dsx-boundary-divider-width)` | The painted line thickness. |
|
|
78
79
|
| Min height (vertical) | `var(--dsx-size-lg)` | Minimum line length for the vertical orientation. |
|
|
79
80
|
|
|
80
81
|
Rules:
|
|
@@ -82,6 +83,7 @@ Rules:
|
|
|
82
83
|
- No raw color, spacing, radius, or motion values in `separator.css`. The line is a `background` of the host; it is not a border.
|
|
83
84
|
- The default and decorative variants use different tokens. The decorative token is intentionally lighter; the default token is the strong control line color.
|
|
84
85
|
- Alpha is not used. The line colors are solid.
|
|
86
|
+
- Neutral default/decorative dividers deliberately retain their gray colors across accents. Explicit accent dividers use accent-border: step 8 in light appearance and step 11 in dark appearance. Readable ink, focus and selection retain accent-indicator. Neutral aliases rebind to the nearest appearance and gray boundary.
|
|
85
87
|
|
|
86
88
|
## Motion contract
|
|
87
89
|
|
|
@@ -120,49 +122,11 @@ Rules:
|
|
|
120
122
|
|
|
121
123
|
- The separator does not need an accessible name. The Radix primitive handles `aria-hidden` and `role` based on `decorative`. Pair a non-decorative separator with surrounding landmarks (headings, sections) so the thematic break is announced in context.
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
**Default story:**
|
|
126
|
-
|
|
127
|
-
- Renders `Separator`. Asserts the host has `dsx-separator`, `data-orientation="horizontal"`, and `role="none"` (the default `decorative` flag strips the semantic role from the accessibility tree).
|
|
128
|
-
|
|
129
|
-
**Orientation story** (one per orientation):
|
|
130
|
-
|
|
131
|
-
- Renders Separator with `orientation="horizontal"` and `orientation="vertical"`. Asserts the matching `data-orientation` attribute and the matching CSS rule (width vs height).
|
|
132
|
-
|
|
133
|
-
**Size story** (one per size):
|
|
134
|
-
|
|
135
|
-
- Renders Separator with `size="sm"`, `size="md"`, and `size="lg"`. Asserts the matching `data-size` value on the host. The current CSS does not switch the painted thickness per size; the story documents that the attribute is the contract for future overrides.
|
|
136
|
-
|
|
137
|
-
**Variant story** (one per variant):
|
|
138
|
-
|
|
139
|
-
- Renders Separator with `variant="default"` and `variant="decorative"`. Asserts the `dsx-separator--decorative` modifier class is present on the decorative variant and absent on the default.
|
|
140
|
-
|
|
141
|
-
**State story:**
|
|
125
|
+
Matrix cells place each orientation between text, rather than rendering a free-floating line. Live examples show horizontal section division, vertical metadata division, decorative tone and the reserved data-accent-color hook.
|
|
142
126
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
**Composition story:**
|
|
146
|
-
|
|
147
|
-
- Renders Separator inside a `Flex` row to verify the vertical orientation has a meaningful min height and does not collapse to zero.
|
|
148
|
-
|
|
149
|
-
**Token story:**
|
|
150
|
-
|
|
151
|
-
- Renders inside a `Theme` wrapper with `accentColor="amber"`, `accentColor="silver"`, and `accentColor="bronze"`. Asserts the line color is unchanged across accents (the current CSS does not read `data-accent-color`; the story documents the contract for future accent overrides).
|
|
152
|
-
|
|
153
|
-
**A11y story:**
|
|
154
|
-
|
|
155
|
-
- Uses `vitest-axe` against a rendered default Separator. Asserts there are no axe violations.
|
|
156
|
-
|
|
157
|
-
**Props exposed in the playground controls:**
|
|
127
|
+
## Playground demo spec
|
|
158
128
|
|
|
159
|
-
|
|
160
|
-
|---|---|---|
|
|
161
|
-
| `orientation` | select (`horizontal`, `vertical`) | `horizontal` |
|
|
162
|
-
| `size` | select (`sm`, `md`, `lg`) | `md` |
|
|
163
|
-
| `variant` | select (`default`, `decorative`) | `default` |
|
|
164
|
-
| `color` | text | (empty) |
|
|
165
|
-
| `decorative` | boolean | `true` |
|
|
129
|
+
Matrix cells place horizontal or vertical lines between Overview and Details text with a bounded 220px frame. All size hooks remain shown and paint the canonical 1px thickness. The live example includes a horizontal section divider, vertical metadata divider, decorative tone, and an accent line using color="inherit" through the existing data-accent-color hook. The semantic divider uses decorative={false}; the other lines are decorative.
|
|
166
130
|
|
|
167
131
|
## Wiring notes
|
|
168
132
|
|
|
@@ -74,6 +74,7 @@ The roster's `Parent / Slots` column lists every slot above plus `Sidebar.Inset`
|
|
|
74
74
|
| `mobileBreakpoint` | `number` | `768` | no | Viewport width below which the provider treats the device as mobile. The provider also matches `(pointer: coarse)`. | no |
|
|
75
75
|
| `defaultSubmenuMode` | `'click' \| 'hover'` | `'click'` | no | Default toggle mode for every `Sidebar.MenuSubTrigger` under this provider. Individual triggers override per-section. | no |
|
|
76
76
|
| `submenuOpenOnActive` | `boolean` | `true` | no | Default for `openOnActive` on every `Sidebar.MenuSubTrigger` under this provider. | no |
|
|
77
|
+
| `variant` | `'default' \| 'floating'` | `'default'` | no | `floating` draws the inline panel as a rounded, bordered, shadowed glass surface set off from the viewport edge, with a gap around it and between it and the inset, over whatever the page paints behind. It never applies to the mobile drawer: while the sidebar renders as the drawer, the variant has no visual effect and `data-variant` reads `default`. Specified for `collapsible="icon"` and `"none"`; with `"offcanvas"` a collapsed panel hides without a border sliver, and the recovery rail keeps its default look. | no |
|
|
77
78
|
| `className` | `string` | `undefined` | no | Extra classes appended to `dsx-sidebar-provider`. | no |
|
|
78
79
|
| `children` | `React.ReactNode` | `undefined` | no | Provider children. In mobile sheet mode, each Sidebar root preserves its named `<nav>` wrapper, classes, and consumer props inside `Sheet.Content`; sibling inset content remains inline. | no |
|
|
79
80
|
|
|
@@ -186,10 +187,11 @@ Standard React HTML attributes plus the `role="separator"` and `aria-orientation
|
|
|
186
187
|
|
|
187
188
|
### `useSidebar` hook
|
|
188
189
|
|
|
189
|
-
Returns the `SidebarContext` value or a no-op fallback (`expanded: true`, `setExpanded: () => {}`, `mobileSheetOpen: false`, `setMobileSheetOpen: () => {}`, `isMobile: false`) when the consumer renders a sidebar slot outside `Sidebar.Provider`.
|
|
190
|
+
Returns the `SidebarContext` value or a no-op fallback (`expanded: true`, `setExpanded: () => {}`, `mobileSheetOpen: false`, `setMobileSheetOpen: () => {}`, `isMobile: false`, `variant: 'default'`) when the consumer renders a sidebar slot outside `Sidebar.Provider`.
|
|
190
191
|
|
|
191
192
|
Rules:
|
|
192
193
|
|
|
194
|
+
- `variant` is the variant in effect, not the raw prop: `floating` only while the sidebar renders inline. The provider and the root write it as `data-variant`; `Sidebar.Inset` is deliberately unmarked and keeps no surface of its own, so the page behind the panel shows through.
|
|
193
195
|
- The `data-state` and `data-collapsed` attributes are written by `getSidebarDataAttributes` and applied to the `Provider`, the `Root`, and every slot that reads from `useSidebar()`. The `data-state` value is `expanded` or `collapsed`.
|
|
194
196
|
- `Sidebar.MenuButton` and `Sidebar.MenuSubButton` write `data-active` when `isActive` is `true` and wrap string or number children in `<span class="dsx-sidebar__menu-button-text">`. The wrapping span is omitted when `asChild` is set.
|
|
195
197
|
- `Sidebar.Provider` registers a `keydown` listener on `document` for the toggle shortcut. The listener is removed on cleanup and is a no-op when `toggleShortcut` is `false`. The shortcut is `Ctrl+B` on Windows and Linux, `Cmd+B` on macOS.
|
|
@@ -215,7 +217,8 @@ Rules:
|
|
|
215
217
|
| `data-pinned-state` | `expanded`, `collapsed` | Records the persisted/manual state while `data-state` may temporarily be `expanded` for a preview. | `sidebar.css` |
|
|
216
218
|
| `data-transitions-ready` | `true`, `false` | Prevents persisted state hydration from replaying panel motion on route remount. | `sidebar.css` |
|
|
217
219
|
| `data-effect` | `none`, `ambient` | Selects the Sidebar surface effect. | `sidebar.css` |
|
|
218
|
-
| `data-variant` | `
|
|
220
|
+
| `data-variant` (provider, root) | `default`, `floating` | `.dsx-sidebar-provider:where([data-variant='floating'])`, `.dsx-sidebar[data-variant='floating']`: glass panel, offset and gap. Always written; `floating` only while the sidebar renders inline. | `sidebar.css` |
|
|
221
|
+
| `data-variant` (`MenuBadge`) | `ring`, `accent` | Marks a proportional ring or quiet accent `MenuBadge`; text badges omit the attribute. | `sidebar.css` |
|
|
219
222
|
| `data-active` | `true` | `.dsx-sidebar__menu-button[data-active='true']`, `.dsx-sidebar__menu-sub-button[data-active='true']` | `sidebar.css` |
|
|
220
223
|
| `data-state` (sub-trigger) | `open`, `closed` | `:where(.dsx-sidebar__menu-sub-trigger[data-state='open']) > .dsx-sidebar__menu-sub-trigger-chevron { transform: rotate(90deg) }` with `transition-transform` (`:where` keeps it at 0,1,0) | `sidebar.css` |
|
|
221
224
|
| `data-show-icon` | `true`, `false` | (icon visibility inside the skeleton) | `sidebar.css` |
|
|
@@ -287,6 +290,13 @@ Every CSS value the component paints is a `var(--dsx-*)` token.
|
|
|
287
290
|
| Panel ambient effect | `var(--dsx-color-accent-9)` mixed with transparency | Optional subscription-aware accent wash without a literal starfield. |
|
|
288
291
|
| Panel border | `none` (CSS keyword) | The slim shell uses surface contrast and elevation instead of a boxed edge. |
|
|
289
292
|
| Panel shadow | `var(--dsx-effect-shadow-1)` | Panel elevation. |
|
|
293
|
+
| Floating: provider padding and gap | `var(--dsx-space-3)` | The space around the panel and between the panel and the inset. Never a sidebar margin: the preview and pin-docking motion animate `margin-inline-end` and `width`. |
|
|
294
|
+
| Floating: panel offset and height | `var(--dsx-space-3)` (`top`), `calc(100dvh - var(--dsx-space-3) - var(--dsx-space-3))` (`height`) | Keeps the sticky panel inside the same inset on every side. |
|
|
295
|
+
| Floating: panel background | `var(--dsx-color-panel-translucent)` | Glass surface; the ambient effect's gradient still paints over it. |
|
|
296
|
+
| Floating: panel backdrop | `var(--dsx-effect-panel-glass-backdrop-filter)` | Glass blur. |
|
|
297
|
+
| Floating: panel border | `var(--dsx-border-width-sm) solid var(--dsx-panel-border-color)` | Glass edge; dropped (`border-width: 0`) when an `offcanvas` panel is collapsed so a zero-width panel leaves no sliver. |
|
|
298
|
+
| Floating: panel radius | `var(--dsx-rounded-xl)` | Follows the global radius setting. |
|
|
299
|
+
| Floating: panel shadow | `var(--dsx-panel-shadow)` | Floating elevation. |
|
|
290
300
|
| Panel motion duration | `var(--dsx-motion-duration-normal, 250ms)` | Width transition. |
|
|
291
301
|
| Panel motion easing | `var(--dsx-motion-easing-standard, ease)` | Width easing. |
|
|
292
302
|
| Inset flex | `1` (CSS keyword) | Fill remaining width. |
|
|
@@ -392,6 +402,8 @@ Rules:
|
|
|
392
402
|
|
|
393
403
|
- The panel landmark has a default `aria-label="Sidebar"`. The rail and trigger have default `aria-label` values (`Expand sidebar` / `Collapse sidebar`). Override the labels when the panel needs product-specific copy.
|
|
394
404
|
|
|
405
|
+
Submenu parent triggers use `--dsx-rounded-sm`, matching navigation rows rather than the Button pill radius. The playground lab composes Sidebar.Inset with content that changes on navigation and utility actions, so active state has a visible result. The demo bounds its navigation height to 560px and reserves header clearance for the mobile menu control. Routing remains app-owned.
|
|
406
|
+
|
|
395
407
|
## Playground demo spec
|
|
396
408
|
|
|
397
409
|
**Default story:**
|
|
@@ -402,6 +414,7 @@ Rules:
|
|
|
402
414
|
|
|
403
415
|
- Renders the provider with `defaultExpanded={false}`. Asserts `data-state="collapsed"`, `data-collapsed="true"`, and the `dsx-sidebar-default-expanded` class on the panel.
|
|
404
416
|
- Renders a composed fixture with `effect="ambient"` alongside the default `none` surface so the optional token-driven accent wash is visible in the Playground.
|
|
417
|
+
- Renders the provider with `variant="floating"` and asserts `data-variant="floating"` on the provider and the root, no `data-variant` on `Sidebar.Inset`, and `data-variant="default"` while the sidebar renders as the mobile drawer. The docs lab toggles `default` / `floating` over the brand haze (`dsx-brand-ambient`), because a glass panel only reads as glass over something.
|
|
405
418
|
|
|
406
419
|
**State story:**
|
|
407
420
|
|
|
@@ -427,6 +440,7 @@ Rules:
|
|
|
427
440
|
| `defaultExpanded` | boolean | `true` |
|
|
428
441
|
| `hoverExpand` | boolean | `false` |
|
|
429
442
|
| `previewOpen` | boolean | `false` |
|
|
443
|
+
| `variant` | select | `default` |
|
|
430
444
|
|
|
431
445
|
## Wiring notes
|
|
432
446
|
|
|
@@ -447,7 +461,7 @@ Rules:
|
|
|
447
461
|
|
|
448
462
|
**State boundaries:**
|
|
449
463
|
|
|
450
|
-
- Owned by `Sidebar`: the expanded / collapsed state, the temporary hover/focus preview, the persisted state in localStorage or cookies, the mobile detection, the global `Ctrl+B` / `Cmd+B` shortcut, the active menu button flag, the `data-state`, `data-collapsed`, `data-preview-expanded`,
|
|
464
|
+
- Owned by `Sidebar`: the expanded / collapsed state, the temporary hover/focus preview, the persisted state in localStorage or cookies, the mobile detection, the global `Ctrl+B` / `Cmd+B` shortcut, the active menu button flag, the `data-state`, `data-collapsed`, `data-preview-expanded`, `data-pinned-state` and `data-variant` attributes, and the `data-active` attribute.
|
|
451
465
|
- Owned by the consumer: the route map, the active-page detection, the disabled reasons, the auth and permissions policy, and the persistence target.
|
|
452
466
|
|
|
453
467
|
**Boundary rules:**
|