@ds-mo/ui 9.0.0 → 9.2.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 +28 -0
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +397 -0
- package/dist/agent.json +2347 -735
- package/dist/angular/ds-agent-activity.d.ts +12 -0
- package/dist/angular/ds-agent-activity.js +38 -0
- package/dist/angular/ds-agent-response.d.ts +12 -0
- package/dist/angular/ds-agent-response.js +38 -0
- package/dist/angular/ds-agent-source-list.d.ts +12 -0
- package/dist/angular/ds-agent-source-list.js +38 -0
- package/dist/angular/ds-agent-tool-call.d.ts +12 -0
- package/dist/angular/ds-agent-tool-call.js +38 -0
- package/dist/angular/ds-attachment-list.d.ts +12 -0
- package/dist/angular/ds-attachment-list.js +38 -0
- package/dist/angular/ds-avatar.d.ts +12 -0
- package/dist/angular/ds-avatar.js +38 -0
- package/dist/angular/ds-code-block.d.ts +12 -0
- package/dist/angular/ds-code-block.js +38 -0
- package/dist/angular/ds-conversation-list-item.d.ts +19 -0
- package/dist/angular/ds-conversation-list-item.js +42 -0
- package/dist/angular/ds-conversation-list-section.d.ts +12 -0
- package/dist/angular/ds-conversation-list-section.js +38 -0
- package/dist/angular/ds-conversation-list.d.ts +12 -0
- package/dist/angular/ds-conversation-list.js +37 -0
- package/dist/angular/ds-markdown.d.ts +12 -0
- package/dist/angular/ds-markdown.js +38 -0
- package/dist/angular/ds-menu.d.ts +6 -1
- package/dist/angular/ds-menu.js +7 -4
- package/dist/angular/ds-message-bubble.d.ts +12 -0
- package/dist/angular/ds-message-bubble.js +38 -0
- package/dist/angular/ds-message-composer.d.ts +23 -0
- package/dist/angular/ds-message-composer.js +49 -0
- package/dist/angular/ds-message-scroller.d.ts +15 -0
- package/dist/angular/ds-message-scroller.js +43 -0
- package/dist/angular/ds-message.d.ts +12 -0
- package/dist/angular/ds-message.js +38 -0
- package/dist/angular/ds-panel-tool-header.d.ts +25 -0
- package/dist/angular/ds-panel-tool-header.js +49 -0
- package/dist/angular/ds-panel-tool-search.d.ts +19 -0
- package/dist/angular/ds-panel-tool-search.js +49 -0
- package/dist/angular/ds-panel-tools.d.ts +30 -1
- package/dist/angular/ds-panel-tools.js +14 -5
- package/dist/angular/ds-swatch-picker.d.ts +15 -0
- package/dist/angular/ds-swatch-picker.js +42 -0
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +18 -0
- package/dist/angular/proxies.d.ts +18 -0
- package/dist/angular/proxies.js +18 -0
- package/dist/components/ds-agent-activity.d.ts +11 -0
- package/dist/components/ds-agent-activity.js +2 -0
- package/dist/components/ds-agent-activity.js.map +1 -0
- package/dist/components/ds-agent-response.d.ts +11 -0
- package/dist/components/ds-agent-response.js +2 -0
- package/dist/components/ds-agent-response.js.map +1 -0
- package/dist/components/ds-agent-source-list.d.ts +11 -0
- package/dist/components/ds-agent-source-list.js +2 -0
- package/dist/components/ds-agent-source-list.js.map +1 -0
- package/dist/components/ds-agent-tool-call.d.ts +11 -0
- package/dist/components/ds-agent-tool-call.js +2 -0
- package/dist/components/ds-agent-tool-call.js.map +1 -0
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-app-shell.js.map +1 -1
- package/dist/components/ds-attachment-list.d.ts +11 -0
- package/dist/components/ds-attachment-list.js +2 -0
- package/dist/components/ds-attachment-list.js.map +1 -0
- package/dist/components/ds-avatar.d.ts +11 -0
- package/dist/components/ds-avatar.js +2 -0
- package/dist/components/ds-avatar.js.map +1 -0
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-shell-data-viz.js +1 -1
- package/dist/components/ds-card.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-bar.js.map +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-line.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.d.ts +11 -0
- package/dist/components/ds-code-block.js +2 -0
- package/dist/components/ds-code-block.js.map +1 -0
- package/dist/components/ds-conversation-list-item.d.ts +11 -0
- package/dist/components/ds-conversation-list-item.js +2 -0
- package/dist/components/ds-conversation-list-item.js.map +1 -0
- package/dist/components/ds-conversation-list-section.d.ts +11 -0
- package/dist/components/ds-conversation-list-section.js +2 -0
- package/dist/components/ds-conversation-list-section.js.map +1 -0
- package/dist/components/ds-conversation-list.d.ts +11 -0
- package/dist/components/ds-conversation-list.js +2 -0
- package/dist/components/ds-conversation-list.js.map +1 -0
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-divider.js.map +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.d.ts +11 -0
- package/dist/components/ds-markdown.js +2 -0
- package/dist/components/ds-markdown.js.map +1 -0
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-bubble.d.ts +11 -0
- package/dist/components/ds-message-bubble.js +2 -0
- package/dist/components/ds-message-bubble.js.map +1 -0
- package/dist/components/ds-message-composer.d.ts +11 -0
- package/dist/components/ds-message-composer.js +2 -0
- package/dist/components/ds-message-composer.js.map +1 -0
- package/dist/components/ds-message-scroller.d.ts +11 -0
- package/dist/components/ds-message-scroller.js +2 -0
- package/dist/components/ds-message-scroller.js.map +1 -0
- package/dist/components/ds-message.d.ts +11 -0
- package/dist/components/ds-message.js +2 -0
- package/dist/components/ds-message.js.map +1 -0
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.d.ts +11 -0
- package/dist/components/ds-panel-tool-header.js +2 -0
- package/dist/components/ds-panel-tool-header.js.map +1 -0
- package/dist/components/ds-panel-tool-search.d.ts +11 -0
- package/dist/components/ds-panel-tool-search.js +2 -0
- package/dist/components/ds-panel-tool-search.js.map +1 -0
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js.map +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js.map +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.d.ts +11 -0
- package/dist/components/ds-swatch-picker.js +2 -0
- package/dist/components/ds-swatch-picker.js.map +1 -0
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tab-group.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/index.d.ts +14 -0
- package/dist/components/p--KbMQblZ.js +2 -0
- package/dist/components/p--KbMQblZ.js.map +1 -0
- package/dist/components/p-2br9YDbG.js +2 -0
- package/dist/components/p-2br9YDbG.js.map +1 -0
- package/dist/components/p-41UAx2eq.js +2 -0
- package/dist/components/p-41UAx2eq.js.map +1 -0
- package/dist/components/p-B1pWGQn1.js +2 -0
- package/dist/components/p-B1pWGQn1.js.map +1 -0
- package/dist/components/p-B7NbIYjS.js +2 -0
- package/dist/components/p-B7NbIYjS.js.map +1 -0
- package/dist/components/p-BBu_Svz7.js +2 -0
- package/dist/components/p-BBu_Svz7.js.map +1 -0
- package/dist/components/p-BEQB8EnB.js +2 -0
- package/dist/components/p-BEQB8EnB.js.map +1 -0
- package/dist/components/{p-CZ9wemOA.js → p-BFWC17em.js} +2 -2
- package/dist/components/{p-KRGBGTu5.js → p-BO6C8abO.js} +2 -2
- package/dist/components/{p-CbS_WWs2.js → p-BSOZXagj.js} +2 -2
- package/dist/components/p-BSOZXagj.js.map +1 -0
- package/dist/components/{p-DT2MK8Kt.js → p-BZAEZENv.js} +2 -2
- package/dist/components/p-BhC1YyId.js +2 -0
- package/dist/components/p-BhC1YyId.js.map +1 -0
- package/dist/components/p-BjtXYFhw.js +2 -0
- package/dist/components/p-BjtXYFhw.js.map +1 -0
- package/dist/components/{p-B-zhgAvL.js → p-Bo5wikia.js} +2 -2
- package/dist/components/p-Bx1G7P6W.js +2 -0
- package/dist/components/p-Bx1G7P6W.js.map +1 -0
- package/dist/components/p-C0sq948W.js +2 -0
- package/dist/components/p-C0sq948W.js.map +1 -0
- package/dist/components/p-CC1C8s6m.js +2 -0
- package/dist/components/p-CC1C8s6m.js.map +1 -0
- package/dist/components/p-CKaJx0IX.js +2 -0
- package/dist/components/p-CKaJx0IX.js.map +1 -0
- package/dist/components/{p-DyZj3k9S.js → p-CZMEhdlA.js} +2 -2
- package/dist/components/{p-BbV68F23.js → p-CiwdnKKp.js} +2 -2
- package/dist/components/{p-BLzivrE3.js → p-CnM9SW_8.js} +2 -2
- package/dist/components/{p-C7UFYvsO.js → p-CuKn9I5f.js} +2 -2
- package/dist/components/p-D1HFMTdC.js +2 -0
- package/dist/components/p-D1HFMTdC.js.map +1 -0
- package/dist/components/p-DFMM60My.js +2 -0
- package/dist/components/p-DFMM60My.js.map +1 -0
- package/dist/components/p-DIsDiGcp.js +2 -0
- package/dist/components/p-DIsDiGcp.js.map +1 -0
- package/dist/components/p-DVsje4AY.js +2 -0
- package/dist/components/p-DVsje4AY.js.map +1 -0
- package/dist/components/p-Di-ThR90.js +2 -0
- package/dist/components/p-Di-ThR90.js.map +1 -0
- package/dist/components/{p-C7RObioO.js → p-Di4HBckb.js} +2 -2
- package/dist/components/p-a9nGf1s6.js +2 -0
- package/dist/components/p-a9nGf1s6.js.map +1 -0
- package/dist/components/p-gidVv1FX.js +2 -0
- package/dist/components/p-gidVv1FX.js.map +1 -0
- package/dist/components/p-l6PmnW_P.js +2 -0
- package/dist/components/p-l6PmnW_P.js.map +1 -0
- package/dist/components/p-rEe-3KR_.js +2 -0
- package/dist/components/p-rEe-3KR_.js.map +1 -0
- package/dist/components/p-t9Ei1kHP.js +2 -0
- package/dist/components/p-t9Ei1kHP.js.map +1 -0
- package/dist/docs/components.json +8097 -3924
- package/dist/lib/components/Menu/menu-placement.d.ts +19 -3
- package/dist/lib/shell/index.d.ts +3 -3
- package/dist/lib/shell/index.js +48 -39
- package/dist/lib/shell/index.js.map +3 -3
- package/dist/lib/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/lib/utils/choice-popup-alignment.d.ts +20 -0
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/index.js +16 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/mcp/cli.js +31409 -0
- package/dist/mcp-data/registry/agent-activity.json +158 -0
- package/dist/mcp-data/registry/agent-response.json +211 -0
- package/dist/mcp-data/registry/agent-source-list.json +153 -0
- package/dist/mcp-data/registry/agent-tool-call.json +213 -0
- package/dist/mcp-data/registry/app-shell.json +210 -0
- package/dist/mcp-data/registry/attachment-list.json +137 -0
- package/dist/mcp-data/registry/avatar.json +136 -0
- package/dist/mcp-data/registry/badge.json +289 -0
- package/dist/mcp-data/registry/banner.json +206 -0
- package/dist/mcp-data/registry/bar-nav.json +341 -0
- package/dist/mcp-data/registry/button-filled.json +386 -0
- package/dist/mcp-data/registry/button-unfilled.json +537 -0
- package/dist/mcp-data/registry/card-data-viz-donut.json +143 -0
- package/dist/mcp-data/registry/card-setting.json +194 -0
- package/dist/mcp-data/registry/card-shell-data-viz.json +173 -0
- package/dist/mcp-data/registry/card.json +126 -0
- package/dist/mcp-data/registry/chart-bar.json +121 -0
- package/dist/mcp-data/registry/chart-donut.json +257 -0
- package/dist/mcp-data/registry/chart-legend.json +209 -0
- package/dist/mcp-data/registry/chart-line.json +153 -0
- package/dist/mcp-data/registry/checkbox.json +361 -0
- package/dist/mcp-data/registry/chip.json +276 -0
- package/dist/mcp-data/registry/code-block.json +150 -0
- package/dist/mcp-data/registry/conversation-list-item.json +265 -0
- package/dist/mcp-data/registry/conversation-list-section.json +139 -0
- package/dist/mcp-data/registry/conversation-list.json +101 -0
- package/dist/mcp-data/registry/divider.json +225 -0
- package/dist/mcp-data/registry/empty-state.json +197 -0
- package/dist/mcp-data/registry/field.json +222 -0
- package/dist/mcp-data/registry/icon.json +242 -0
- package/dist/mcp-data/registry/input.json +597 -0
- package/dist/mcp-data/registry/loader.json +192 -0
- package/dist/mcp-data/registry/markdown.json +141 -0
- package/dist/mcp-data/registry/menu.json +479 -0
- package/dist/mcp-data/registry/message-bubble.json +119 -0
- package/dist/mcp-data/registry/message-composer.json +265 -0
- package/dist/mcp-data/registry/message-scroller.json +217 -0
- package/dist/mcp-data/registry/message.json +255 -0
- package/dist/mcp-data/registry/modal.json +150 -0
- package/dist/mcp-data/registry/panel-nav.json +622 -0
- package/dist/mcp-data/registry/panel-sub-nav.json +249 -0
- package/dist/mcp-data/registry/panel-tool-header.json +342 -0
- package/dist/mcp-data/registry/panel-tool-search.json +387 -0
- package/dist/mcp-data/registry/panel-tools.json +514 -0
- package/dist/mcp-data/registry/radio.json +374 -0
- package/dist/mcp-data/registry/registry.json +6916 -0
- package/dist/mcp-data/registry/select-multi.json +755 -0
- package/dist/mcp-data/registry/select.json +740 -0
- package/dist/mcp-data/registry/shell-gradient-picker.json +195 -0
- package/dist/mcp-data/registry/shell-gradient-swatch.json +215 -0
- package/dist/mcp-data/registry/skeleton.json +282 -0
- package/dist/mcp-data/registry/slider.json +657 -0
- package/dist/mcp-data/registry/swatch-picker.json +231 -0
- package/dist/mcp-data/registry/switch.json +361 -0
- package/dist/mcp-data/registry/tab-group.json +255 -0
- package/dist/mcp-data/registry/tag.json +352 -0
- package/dist/mcp-data/registry/text.json +371 -0
- package/dist/mcp-data/registry/tooltip-data-viz.json +158 -0
- package/dist/mcp-data/registry/tooltip.json +311 -0
- package/dist/react/components.d.ts +18 -0
- package/dist/react/components.js +18 -0
- package/dist/react/ds-agent-activity.d.ts +9 -0
- package/dist/react/ds-agent-activity.js +12 -0
- package/dist/react/ds-agent-response.d.ts +9 -0
- package/dist/react/ds-agent-response.js +12 -0
- package/dist/react/ds-agent-source-list.d.ts +9 -0
- package/dist/react/ds-agent-source-list.js +12 -0
- package/dist/react/ds-agent-tool-call.d.ts +9 -0
- package/dist/react/ds-agent-tool-call.js +12 -0
- package/dist/react/ds-attachment-list.d.ts +9 -0
- package/dist/react/ds-attachment-list.js +12 -0
- package/dist/react/ds-avatar.d.ts +9 -0
- package/dist/react/ds-avatar.js +12 -0
- package/dist/react/ds-code-block.d.ts +9 -0
- package/dist/react/ds-code-block.js +12 -0
- package/dist/react/ds-conversation-list-item.d.ts +14 -0
- package/dist/react/ds-conversation-list-item.js +12 -0
- package/dist/react/ds-conversation-list-section.d.ts +9 -0
- package/dist/react/ds-conversation-list-section.js +12 -0
- package/dist/react/ds-conversation-list.d.ts +9 -0
- package/dist/react/ds-conversation-list.js +12 -0
- package/dist/react/ds-markdown.d.ts +9 -0
- package/dist/react/ds-markdown.js +12 -0
- package/dist/react/ds-menu.d.ts +1 -0
- package/dist/react/ds-menu.js +2 -1
- package/dist/react/ds-message-bubble.d.ts +9 -0
- package/dist/react/ds-message-bubble.js +12 -0
- package/dist/react/ds-message-composer.d.ts +16 -0
- package/dist/react/ds-message-composer.js +16 -0
- package/dist/react/ds-message-scroller.d.ts +12 -0
- package/dist/react/ds-message-scroller.js +12 -0
- package/dist/react/ds-message.d.ts +9 -0
- package/dist/react/ds-message.js +12 -0
- package/dist/react/ds-panel-tool-header.d.ts +17 -0
- package/dist/react/ds-panel-tool-header.js +16 -0
- package/dist/react/ds-panel-tool-search.d.ts +14 -0
- package/dist/react/ds-panel-tool-search.js +16 -0
- package/dist/react/ds-panel-tools.d.ts +10 -0
- package/dist/react/ds-panel-tools.js +3 -0
- package/dist/react/ds-swatch-picker.d.ts +12 -0
- package/dist/react/ds-swatch-picker.js +12 -0
- package/dist/types/components/AgentActivity/AgentActivity.d.ts +14 -0
- package/dist/types/components/AgentResponse/AgentResponse.d.ts +12 -0
- package/dist/types/components/AgentSourceList/AgentSourceList.d.ts +9 -0
- package/dist/types/components/AgentToolCall/AgentToolCall.d.ts +13 -0
- package/dist/types/components/AppShell/AppShell.d.ts +4 -0
- package/dist/types/components/AttachmentList/AttachmentList.d.ts +8 -0
- package/dist/types/components/Avatar/Avatar.d.ts +8 -0
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +11 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +4 -0
- package/dist/types/components/ConversationListItem/ConversationListItem.d.ts +22 -0
- package/dist/types/components/ConversationListSection/ConversationListSection.d.ts +9 -0
- package/dist/types/components/Markdown/Markdown.d.ts +15 -0
- package/dist/types/components/Menu/Menu.d.ts +10 -1
- package/dist/types/components/Menu/menu-placement.d.ts +19 -3
- package/dist/types/components/Menu/menu-types.d.ts +15 -2
- package/dist/types/components/Message/Message.d.ts +17 -0
- package/dist/types/components/MessageBubble/MessageBubble.d.ts +6 -0
- package/dist/types/components/MessageComposer/MessageComposer.d.ts +29 -0
- package/dist/types/components/MessageScroller/MessageScroller.d.ts +37 -0
- package/dist/types/components/PanelNav/PanelNav.d.ts +3 -0
- package/dist/types/components/PanelToolHeader/PanelToolHeader.d.ts +34 -0
- package/dist/types/components/PanelToolSearch/PanelToolSearch.d.ts +35 -0
- package/dist/types/components/PanelTools/PanelTools.d.ts +40 -1
- package/dist/types/components/PanelTools/panel-tools-types.d.ts +20 -0
- package/dist/types/components/PanelTools/panel-tools-utils.d.ts +2 -0
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +2 -5
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -0
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/SwatchPicker/SwatchPicker.d.ts +21 -0
- package/dist/types/components/SwatchPicker/swatch-picker-types.d.ts +26 -0
- package/dist/types/components/conversation-types.d.ts +55 -0
- package/dist/types/components.d.ts +1298 -4
- package/dist/types/shell/index.d.ts +3 -3
- package/dist/types/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/types/utils/choice-list-parts.d.ts +4 -1
- package/dist/types/utils/choice-popup-alignment.d.ts +21 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +9 -2
- package/dist/components/p-Bafp65bw.js +0 -2
- package/dist/components/p-Bafp65bw.js.map +0 -1
- package/dist/components/p-BdnR3jxi.js +0 -2
- package/dist/components/p-BdnR3jxi.js.map +0 -1
- package/dist/components/p-CXF8yd-g.js +0 -2
- package/dist/components/p-CXF8yd-g.js.map +0 -1
- package/dist/components/p-C_cu-HIT.js +0 -2
- package/dist/components/p-C_cu-HIT.js.map +0 -1
- package/dist/components/p-CbS_WWs2.js.map +0 -1
- package/dist/components/p-D0B9uDTP.js +0 -2
- package/dist/components/p-D0B9uDTP.js.map +0 -1
- package/dist/components/p-DF0yLZG_.js +0 -2
- package/dist/components/p-DF0yLZG_.js.map +0 -1
- package/dist/components/p-VKIsOVza.js +0 -2
- package/dist/components/p-VKIsOVza.js.map +0 -1
- /package/dist/components/{p-CZ9wemOA.js.map → p-BFWC17em.js.map} +0 -0
- /package/dist/components/{p-KRGBGTu5.js.map → p-BO6C8abO.js.map} +0 -0
- /package/dist/components/{p-DT2MK8Kt.js.map → p-BZAEZENv.js.map} +0 -0
- /package/dist/components/{p-B-zhgAvL.js.map → p-Bo5wikia.js.map} +0 -0
- /package/dist/components/{p-DyZj3k9S.js.map → p-CZMEhdlA.js.map} +0 -0
- /package/dist/components/{p-BbV68F23.js.map → p-CiwdnKKp.js.map} +0 -0
- /package/dist/components/{p-BLzivrE3.js.map → p-CnM9SW_8.js.map} +0 -0
- /package/dist/components/{p-C7UFYvsO.js.map → p-CuKn9I5f.js.map} +0 -0
- /package/dist/components/{p-C7RObioO.js.map → p-Di4HBckb.js.map} +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "panel-sub-nav",
|
|
4
|
+
"title": "PanelSubNav",
|
|
5
|
+
"description": "Persistent vertical tab navigation for a panel or card side rail, switching adjacent local content with menu-like selected fill and stable text weight.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/panel-sub-nav",
|
|
11
|
+
"source": "src/wc/components/PanelSubNav/PanelSubNav.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "general",
|
|
15
|
+
"status": "stable",
|
|
16
|
+
"summary": "Persistent vertical tab navigation for a panel or card side rail, switching adjacent local content with menu-like selected fill and stable text weight.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A panel or card side rail needs a persistent vertical list that switches adjacent local content.",
|
|
19
|
+
"Each concise text label controls an immediately available tabpanel without changing application routes."
|
|
20
|
+
],
|
|
21
|
+
"avoidWhen": [
|
|
22
|
+
"The navigation is not contained in a panel or card side rail.",
|
|
23
|
+
"Local views should be arranged horizontally; use TabGroup instead.",
|
|
24
|
+
"The choices navigate routes in application shell chrome; use PanelNav or BarNav instead.",
|
|
25
|
+
"The choices are temporary commands or contextual options; use Menu instead.",
|
|
26
|
+
"Rows need icons, subtext, notification dots, nested levels, or section headers."
|
|
27
|
+
],
|
|
28
|
+
"alternatives": [
|
|
29
|
+
{
|
|
30
|
+
"when": "Local panel choices fit a horizontal tab row.",
|
|
31
|
+
"component": "component:ds-tab-group",
|
|
32
|
+
"reason": "TabGroup is the horizontal local-view counterpart."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"when": "The choices are primary application destinations.",
|
|
36
|
+
"component": "component:ds-panel-nav",
|
|
37
|
+
"reason": "PanelNav owns primary application navigation."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"when": "The choices are secondary application routes.",
|
|
41
|
+
"component": "component:ds-bar-nav",
|
|
42
|
+
"reason": "BarNav owns route sections inside AppShell."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"when": "The choices are transient actions or options.",
|
|
46
|
+
"component": "component:ds-menu",
|
|
47
|
+
"reason": "Menu owns temporary popup collections."
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"commonlyComposedWith": [
|
|
51
|
+
"component:ds-card",
|
|
52
|
+
"component:ds-text"
|
|
53
|
+
],
|
|
54
|
+
"accessibility": [
|
|
55
|
+
"Provide an accessible name with aria-label or aria-labelledby.",
|
|
56
|
+
"Give every item a unique id and the id of its controlled tabpanel.",
|
|
57
|
+
"Keep each controlled tabpanel labelled by its matching item id.",
|
|
58
|
+
"Always provide a valid selected item when enabled items exist so exactly one tab and panel are active.",
|
|
59
|
+
"ArrowUp and ArrowDown move and activate selection; Home and End select the first and last available items.",
|
|
60
|
+
"Do not use selected text weight as the selection cue; active fill and primary foreground communicate selection."
|
|
61
|
+
],
|
|
62
|
+
"states": [
|
|
63
|
+
"The parent owns the canonical selected value and panel visibility, and should update both from dsChange.",
|
|
64
|
+
"A missing, empty, or unknown selected value is invalid when enabled items exist; the component does not choose a fallback selection.",
|
|
65
|
+
"Inactive items remain visible but cannot be focused or selected.",
|
|
66
|
+
"Selection is singular and follows keyboard focus.",
|
|
67
|
+
"The omitted default surface treatment is for primary and secondary parent surfaces and uses the brand-active selected fill; pass faint explicitly on faint surfaces to use the neutral active fill.",
|
|
68
|
+
"Rows contain one text label only and do not express nested navigation or grouped hierarchy."
|
|
69
|
+
],
|
|
70
|
+
"responsiveBehavior": [
|
|
71
|
+
"The component remains vertical at every width.",
|
|
72
|
+
"The consuming panel owns responsive adaptation and decides whether to reposition or replace the side rail."
|
|
73
|
+
],
|
|
74
|
+
"frameworkCaveats": {
|
|
75
|
+
"customElements": [
|
|
76
|
+
"Assign items as a JavaScript property because structured arrays are not represented by HTML attributes.",
|
|
77
|
+
"Keep value synchronized to a valid enabled item and update the controlled panel from dsChange."
|
|
78
|
+
],
|
|
79
|
+
"react": [
|
|
80
|
+
"Pass items as an array through the generated wrapper, keep value controlled, and use onDsChange to synchronize the visible panel."
|
|
81
|
+
],
|
|
82
|
+
"angular": [
|
|
83
|
+
"Bind items and a valid value as properties, and handle dsChange to synchronize the visible panel."
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"api": {
|
|
88
|
+
"props": {
|
|
89
|
+
"ariaLabel": {
|
|
90
|
+
"type": "string | null",
|
|
91
|
+
"resolvedType": "null | string",
|
|
92
|
+
"attribute": "aria-label",
|
|
93
|
+
"default": "null",
|
|
94
|
+
"required": false,
|
|
95
|
+
"mutable": false
|
|
96
|
+
},
|
|
97
|
+
"ariaLabelledby": {
|
|
98
|
+
"type": "string | undefined",
|
|
99
|
+
"resolvedType": "string | undefined",
|
|
100
|
+
"attribute": "aria-labelledby",
|
|
101
|
+
"required": false,
|
|
102
|
+
"mutable": false
|
|
103
|
+
},
|
|
104
|
+
"background": {
|
|
105
|
+
"type": "PanelSubNavBackground | undefined",
|
|
106
|
+
"resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"strong\" | \"translucent\" | undefined",
|
|
107
|
+
"attribute": "background",
|
|
108
|
+
"required": false,
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"description": "Actual parent surface context. Omit on primary and secondary surfaces."
|
|
111
|
+
},
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "PanelSubNavItem[]",
|
|
114
|
+
"resolvedType": "PanelSubNavItem[]",
|
|
115
|
+
"default": "[]",
|
|
116
|
+
"required": false,
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"description": "Local panel tabs. Assign this array through the JavaScript property.\nReplace the array reference when items change."
|
|
119
|
+
},
|
|
120
|
+
"value": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"resolvedType": "string",
|
|
123
|
+
"attribute": "value",
|
|
124
|
+
"default": "''",
|
|
125
|
+
"required": false,
|
|
126
|
+
"mutable": true,
|
|
127
|
+
"description": "Required selected item id when enabled items exist. Keep synchronized with the visible panel."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"events": [
|
|
131
|
+
{
|
|
132
|
+
"name": "dsChange",
|
|
133
|
+
"detail": "string",
|
|
134
|
+
"bubbles": true,
|
|
135
|
+
"cancelable": true,
|
|
136
|
+
"composed": true
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"methods": [],
|
|
140
|
+
"slots": []
|
|
141
|
+
},
|
|
142
|
+
"props": {
|
|
143
|
+
"ariaLabel": {
|
|
144
|
+
"type": "string | null",
|
|
145
|
+
"resolvedType": "null | string",
|
|
146
|
+
"attribute": "aria-label",
|
|
147
|
+
"default": "null",
|
|
148
|
+
"required": false,
|
|
149
|
+
"mutable": false
|
|
150
|
+
},
|
|
151
|
+
"ariaLabelledby": {
|
|
152
|
+
"type": "string | undefined",
|
|
153
|
+
"resolvedType": "string | undefined",
|
|
154
|
+
"attribute": "aria-labelledby",
|
|
155
|
+
"required": false,
|
|
156
|
+
"mutable": false
|
|
157
|
+
},
|
|
158
|
+
"background": {
|
|
159
|
+
"type": "PanelSubNavBackground | undefined",
|
|
160
|
+
"resolvedType": "\"always-dark\" | \"bold\" | \"faint\" | \"inverted\" | \"media\" | \"medium\" | \"strong\" | \"translucent\" | undefined",
|
|
161
|
+
"attribute": "background",
|
|
162
|
+
"required": false,
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"description": "Actual parent surface context. Omit on primary and secondary surfaces."
|
|
165
|
+
},
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "PanelSubNavItem[]",
|
|
168
|
+
"resolvedType": "PanelSubNavItem[]",
|
|
169
|
+
"default": "[]",
|
|
170
|
+
"required": false,
|
|
171
|
+
"mutable": false,
|
|
172
|
+
"description": "Local panel tabs. Assign this array through the JavaScript property.\nReplace the array reference when items change."
|
|
173
|
+
},
|
|
174
|
+
"value": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"resolvedType": "string",
|
|
177
|
+
"attribute": "value",
|
|
178
|
+
"default": "''",
|
|
179
|
+
"required": false,
|
|
180
|
+
"mutable": true,
|
|
181
|
+
"description": "Required selected item id when enabled items exist. Keep synchronized with the visible panel."
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"events": [
|
|
185
|
+
{
|
|
186
|
+
"name": "dsChange",
|
|
187
|
+
"detail": "string",
|
|
188
|
+
"bubbles": true,
|
|
189
|
+
"cancelable": true,
|
|
190
|
+
"composed": true
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"methods": [],
|
|
194
|
+
"slots": [],
|
|
195
|
+
"exports": {
|
|
196
|
+
"customElement": "ds-panel-sub-nav",
|
|
197
|
+
"react": "DsPanelSubNav",
|
|
198
|
+
"angular": "DsPanelSubNav"
|
|
199
|
+
},
|
|
200
|
+
"consumption": {
|
|
201
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
202
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
203
|
+
"customElements": {
|
|
204
|
+
"import": "import '@ds-mo/ui/dist/components/ds-panel-sub-nav.js';",
|
|
205
|
+
"example": "<ds-panel-sub-nav></ds-panel-sub-nav>"
|
|
206
|
+
},
|
|
207
|
+
"react": {
|
|
208
|
+
"import": "import { DsPanelSubNav } from '@ds-mo/ui/react';",
|
|
209
|
+
"example": "<DsPanelSubNav />"
|
|
210
|
+
},
|
|
211
|
+
"angular": {
|
|
212
|
+
"import": "import { DsPanelSubNav } from '@ds-mo/ui/angular/ds-panel-sub-nav';",
|
|
213
|
+
"example": "<ds-panel-sub-nav></ds-panel-sub-nav>"
|
|
214
|
+
},
|
|
215
|
+
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: items.",
|
|
216
|
+
"peerDependencies": {
|
|
217
|
+
"required": [
|
|
218
|
+
"@ds-mo/tokens ^3.1.1",
|
|
219
|
+
"@ds-mo/icons ^6.2.0"
|
|
220
|
+
],
|
|
221
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"dependencies": [
|
|
226
|
+
"@ds-mo/ui",
|
|
227
|
+
"@ds-mo/tokens"
|
|
228
|
+
],
|
|
229
|
+
"registryDependencies": [
|
|
230
|
+
"text"
|
|
231
|
+
],
|
|
232
|
+
"files": [
|
|
233
|
+
{
|
|
234
|
+
"path": "src/wc/components/PanelSubNav/PanelSubNav.css",
|
|
235
|
+
"content": "@import '../../utils/control-density.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n display: block;\n width: 100%;\n}\n\n.panel-sub-nav {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n width: 100%;\n}\n\n.panel-sub-nav__item {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--ds-control-gap);\n width: 100%;\n height: var(--ds-control-height);\n padding: 0 var(--ds-control-padding-inline);\n box-sizing: border-box;\n border: none;\n border-radius: var(--ds-control-radius);\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: pointer;\n text-align: left;\n -webkit-user-select: none;\n user-select: none;\n transition: color var(--effect-motion-short-2);\n}\n\n.panel-sub-nav__item--selected {\n color: var(--color-foreground-primary);\n}\n\n.panel-sub-nav__item--on-medium {\n color: var(--color-foreground-on-medium-background-secondary);\n}\n\n.panel-sub-nav__item--on-medium.panel-sub-nav__item--selected {\n color: var(--color-foreground-on-medium-background-primary);\n}\n\n.panel-sub-nav__item--on-bold {\n color: var(--color-foreground-on-bold-background-secondary);\n}\n\n.panel-sub-nav__item--on-bold.panel-sub-nav__item--selected {\n color: var(--color-foreground-on-bold-background-primary);\n}\n\n.panel-sub-nav__item--on-strong {\n color: var(--color-foreground-on-strong-background-secondary);\n}\n\n.panel-sub-nav__item--on-strong.panel-sub-nav__item--selected {\n color: var(--color-foreground-on-strong-background-primary);\n}\n\n.panel-sub-nav__item--on-translucent {\n color: var(--color-translucent-foreground-secondary);\n}\n\n.panel-sub-nav__item--on-translucent.panel-sub-nav__item--selected {\n color: var(--color-translucent-foreground-primary);\n}\n\n.panel-sub-nav__item--on-inverted {\n color: var(--color-inverted-foreground-secondary);\n}\n\n.panel-sub-nav__item--on-inverted.panel-sub-nav__item--selected {\n color: var(--color-inverted-foreground-primary);\n}\n\n.panel-sub-nav__item--on-media {\n color: var(--color-media-foreground-secondary);\n}\n\n.panel-sub-nav__item--on-media.panel-sub-nav__item--selected {\n color: var(--color-media-foreground-primary);\n}\n\n.panel-sub-nav__item--on-always-dark {\n color: var(--color-always-dark-foreground-secondary);\n}\n\n.panel-sub-nav__item--on-always-dark.panel-sub-nav__item--selected {\n color: var(--color-always-dark-foreground-primary);\n}\n\nds-text.panel-sub-nav__label {\n flex: 1;\n min-width: 0;\n padding: 0 var(--ds-control-label-inset);\n}\n",
|
|
236
|
+
"type": "registry:ui"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"path": "src/wc/components/PanelSubNav/PanelSubNav.tsx",
|
|
240
|
+
"content": "import { Component, Prop, Event, EventEmitter, Element, Listen, Watch, h, Host } from '@stencil/core';\nimport type { PanelSubNavItem } from './panel-sub-nav-types';\n\nexport type PanelSubNavBackground =\n | 'faint'\n | 'medium'\n | 'bold'\n | 'strong'\n | 'translucent'\n | 'inverted'\n | 'media'\n | 'always-dark';\n\n@Component({\n tag: 'ds-panel-sub-nav',\n styleUrl: 'PanelSubNav.css',\n scoped: true,\n})\nexport class PanelSubNav {\n @Element() el!: HTMLElement;\n\n /** Required selected item id when enabled items exist. Keep synchronized with the visible panel. */\n @Prop({ mutable: true }) value: string = '';\n /**\n * Local panel tabs. Assign this array through the JavaScript property.\n * Replace the array reference when items change.\n */\n @Prop() items: PanelSubNavItem[] = [];\n /** Actual parent surface context. Omit on primary and secondary surfaces. */\n @Prop() background: PanelSubNavBackground | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n\n private get enabledItems(): PanelSubNavItem[] {\n return this.items.filter(item => !item.isInactive);\n }\n\n private get focusableId(): string {\n return this.enabledItems.some(item => item.id === this.value)\n ? this.value\n : (this.enabledItems[0]?.id ?? '');\n }\n\n private selectItem(id: string) {\n this.value = id;\n this.dsChange.emit(id);\n this.focusItem(id);\n }\n\n private focusItem(id: string) {\n const item = this.el.querySelector(`[data-panel-sub-nav-id=\"${id}\"]`) as HTMLElement | null;\n item?.focus({ preventScroll: true });\n }\n\n @Watch('value')\n onValueChange(next: string, previous: string | undefined) {\n if (previous === undefined || next === previous) return;\n\n requestAnimationFrame(() => {\n const active = document.activeElement as HTMLElement | null;\n if (!active || !this.el.contains(active)) return;\n this.focusItem(this.enabledItems.some(item => item.id === next) ? next : this.focusableId);\n });\n }\n\n private findEnabled(from: number, step: 1 | -1): number {\n const length = this.items.length;\n for (let offset = 1; offset <= length; offset++) {\n const index = (from + step * offset + length * offset) % length;\n if (!this.items[index]?.isInactive) return index;\n }\n return from;\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.enabledItems.length) return;\n\n const focusedId = (event.target as Element | null)\n ?.closest<HTMLElement>('[data-panel-sub-nav-id]')\n ?.dataset['panelSubNavId'];\n const focusedIndex = this.items.findIndex(item => item.id === focusedId);\n const selectedIndex = this.items.findIndex(item => item.id === this.value && !item.isInactive);\n const currentIndex = focusedIndex >= 0\n ? focusedIndex\n : selectedIndex >= 0\n ? selectedIndex\n : (event.key === 'ArrowUp' ? 0 : -1);\n let nextIndex: number | null = null;\n\n if (event.key === 'ArrowDown') {\n nextIndex = this.findEnabled(currentIndex, 1);\n } else if (event.key === 'ArrowUp') {\n nextIndex = this.findEnabled(currentIndex, -1);\n } else if (event.key === 'Home') {\n nextIndex = this.items.findIndex(item => !item.isInactive);\n } else if (event.key === 'End') {\n const reversedIndex = [...this.items].reverse().findIndex(item => !item.isInactive);\n nextIndex = reversedIndex < 0 ? null : this.items.length - 1 - reversedIndex;\n }\n\n if (nextIndex === null || nextIndex < 0) return;\n const next = this.items[nextIndex];\n if (!next || next.isInactive) return;\n\n event.preventDefault();\n this.selectItem(next.id);\n }\n\n render() {\n const focusableId = this.focusableId;\n const background = this.background;\n\n return (\n <Host>\n <div\n class=\"panel-sub-nav\"\n role=\"tablist\"\n aria-orientation=\"vertical\"\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n >\n {this.items.map(item => {\n const isSelected = item.id === this.value;\n return (\n <button\n id={item.id}\n type=\"button\"\n role=\"tab\"\n data-panel-sub-nav-id={item.id}\n class={{\n 'panel-sub-nav__item': true,\n 'panel-sub-nav__item--selected': isSelected,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': !item.isInactive,\n 'ds-interaction-fill--selected': isSelected && !item.isInactive,\n 'ds-interaction-fill--on-faint': background === 'faint',\n 'ds-interaction-fill--on-medium': background === 'medium',\n 'ds-interaction-fill--on-bold': background === 'bold',\n 'ds-interaction-fill--on-strong': background === 'strong',\n 'ds-interaction-fill--on-translucent': background === 'translucent',\n 'ds-interaction-fill--on-inverted': background === 'inverted',\n 'ds-interaction-fill--on-media': background === 'media',\n 'ds-interaction-fill--on-always-dark': background === 'always-dark',\n [`panel-sub-nav__item--on-${background}`]: !!background,\n 'ds-control-inactive': !!item.isInactive,\n }}\n aria-selected={isSelected ? 'true' : 'false'}\n aria-controls={item.panelId}\n aria-disabled={item.isInactive ? 'true' : undefined}\n disabled={item.isInactive}\n tabIndex={item.id === focusableId ? 0 : -1}\n onClick={() => !item.isInactive && this.selectItem(item.id)}\n >\n <ds-text\n class=\"panel-sub-nav__label ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"inherit\"\n >\n {item.label}\n </ds-text>\n </button>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n",
|
|
241
|
+
"type": "registry:ui"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"path": "src/wc/components/PanelSubNav/panel-sub-nav-types.ts",
|
|
245
|
+
"content": "export interface PanelSubNavItem {\n /** Unique tab id. Also used by the controlled panel's aria-labelledby. */\n id: string;\n label: string;\n /** ID of the tabpanel controlled by this item. */\n panelId: string;\n /** Prevent selection and remove the item from keyboard navigation. */\n isInactive?: boolean;\n}\n",
|
|
246
|
+
"type": "registry:ui"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "panel-tool-header",
|
|
4
|
+
"title": "PanelToolHeader",
|
|
5
|
+
"description": "Canonical left-aligned PanelTools header with an optional leading navigation or dismiss action and application-owned trailing icon actions.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/panel-tool-header",
|
|
11
|
+
"source": "src/wc/components/PanelToolHeader/PanelToolHeader.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "general",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Canonical left-aligned PanelTools header with an optional leading navigation or dismiss action and application-owned trailing icon actions.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"PanelTools needs its one shared root or detail header.",
|
|
19
|
+
"A tool header needs a title with optional Back or Close navigation, menu, fullscreen, or other compact icon actions."
|
|
20
|
+
],
|
|
21
|
+
"avoidWhen": [
|
|
22
|
+
"Rendering inside a PanelTools tool body; PanelTools already composes this canonical header above the body.",
|
|
23
|
+
"The header belongs to page content."
|
|
24
|
+
],
|
|
25
|
+
"commonlyComposedWith": [
|
|
26
|
+
"component:ds-button-unfilled"
|
|
27
|
+
],
|
|
28
|
+
"accessibility": [
|
|
29
|
+
"Leading navigation or dismiss actions and trailing icon actions require concise localized names.",
|
|
30
|
+
"The visible heading names the active panel or subview."
|
|
31
|
+
],
|
|
32
|
+
"states": [
|
|
33
|
+
"The title remains left aligned whether the header has no actions, Back, one trailing action, or several trailing actions.",
|
|
34
|
+
"Leading and trailing control zones never shrink; only the title consumes and truncates within the remaining width, with a fixed 4px gap between zones.",
|
|
35
|
+
"Header chrome text is not selectable; actions remain keyboard focusable and interactive.",
|
|
36
|
+
"Adjacent trailing actions keep the shared 4px control gap in drawer and fullscreen presentations.",
|
|
37
|
+
"When fullscreen and overflow actions appear together, author fullscreen before overflow so Ellipses remains the rightmost action.",
|
|
38
|
+
"PanelTools supplies application-owned actions and relays their ids through its shared dsHeaderAction event."
|
|
39
|
+
],
|
|
40
|
+
"responsiveBehavior": [
|
|
41
|
+
"The title truncates between optional leading navigation and trailing action zones."
|
|
42
|
+
],
|
|
43
|
+
"references": [
|
|
44
|
+
{
|
|
45
|
+
"label": "Standalone examples",
|
|
46
|
+
"path": "src/wc/components/PanelToolHeader/PanelToolHeader.stories.ts"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"api": {
|
|
51
|
+
"props": {
|
|
52
|
+
"actions": {
|
|
53
|
+
"type": "PanelToolsHeaderAction[]",
|
|
54
|
+
"resolvedType": "PanelToolsHeaderAction[]",
|
|
55
|
+
"default": "[]",
|
|
56
|
+
"required": false,
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"description": "Trailing application-owned icon actions. When present, these replace the legacy menu action."
|
|
59
|
+
},
|
|
60
|
+
"backAriaLabel": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"resolvedType": "string",
|
|
63
|
+
"attribute": "back-aria-label",
|
|
64
|
+
"default": "'Back'",
|
|
65
|
+
"required": false,
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"description": "Accessible name for the leading navigation or dismiss action."
|
|
68
|
+
},
|
|
69
|
+
"backIcon": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"resolvedType": "string",
|
|
72
|
+
"attribute": "back-icon",
|
|
73
|
+
"default": "'ChevronLeft'",
|
|
74
|
+
"required": false,
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"description": "Canonical icon for the leading navigation or dismiss action."
|
|
77
|
+
},
|
|
78
|
+
"heading": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"resolvedType": "string",
|
|
81
|
+
"attribute": "heading",
|
|
82
|
+
"default": "''",
|
|
83
|
+
"required": false,
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"description": "Visible heading for the active tool view."
|
|
86
|
+
},
|
|
87
|
+
"menuAriaLabel": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"resolvedType": "string",
|
|
90
|
+
"attribute": "menu-aria-label",
|
|
91
|
+
"default": "'More options'",
|
|
92
|
+
"required": false,
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"description": "Accessible name for the options-menu trigger."
|
|
95
|
+
},
|
|
96
|
+
"menuControls": {
|
|
97
|
+
"type": "string | undefined",
|
|
98
|
+
"resolvedType": "string | undefined",
|
|
99
|
+
"attribute": "menu-controls",
|
|
100
|
+
"required": false,
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"description": "Id of the menu controlled by the trigger."
|
|
103
|
+
},
|
|
104
|
+
"menuExpanded": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"resolvedType": "boolean",
|
|
107
|
+
"attribute": "menu-expanded",
|
|
108
|
+
"default": "false",
|
|
109
|
+
"required": false,
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"description": "Whether the controlled menu is open."
|
|
112
|
+
},
|
|
113
|
+
"menuTriggerId": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"resolvedType": "string",
|
|
116
|
+
"attribute": "menu-trigger-id",
|
|
117
|
+
"default": "''",
|
|
118
|
+
"required": false,
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"description": "Stable id placed on the menu trigger host for ds-menu anchoring."
|
|
121
|
+
},
|
|
122
|
+
"showBack": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"resolvedType": "boolean",
|
|
125
|
+
"attribute": "show-back",
|
|
126
|
+
"default": "false",
|
|
127
|
+
"required": false,
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"description": "Show the leading Back action."
|
|
130
|
+
},
|
|
131
|
+
"showMenu": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"resolvedType": "boolean",
|
|
134
|
+
"attribute": "show-menu",
|
|
135
|
+
"default": "true",
|
|
136
|
+
"required": false,
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"description": "Show the trailing options-menu trigger."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"events": [
|
|
142
|
+
{
|
|
143
|
+
"name": "dsAction",
|
|
144
|
+
"detail": "{ id: string; originalEvent: MouseEvent }",
|
|
145
|
+
"bubbles": true,
|
|
146
|
+
"cancelable": true,
|
|
147
|
+
"composed": true
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "dsBack",
|
|
151
|
+
"detail": "MouseEvent",
|
|
152
|
+
"bubbles": true,
|
|
153
|
+
"cancelable": true,
|
|
154
|
+
"composed": true
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "dsMenuToggle",
|
|
158
|
+
"detail": "MouseEvent",
|
|
159
|
+
"bubbles": true,
|
|
160
|
+
"cancelable": true,
|
|
161
|
+
"composed": true
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"methods": [
|
|
165
|
+
{
|
|
166
|
+
"name": "focusMenuTrigger",
|
|
167
|
+
"signature": "focusMenuTrigger() => Promise<void>"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"slots": []
|
|
171
|
+
},
|
|
172
|
+
"props": {
|
|
173
|
+
"actions": {
|
|
174
|
+
"type": "PanelToolsHeaderAction[]",
|
|
175
|
+
"resolvedType": "PanelToolsHeaderAction[]",
|
|
176
|
+
"default": "[]",
|
|
177
|
+
"required": false,
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"description": "Trailing application-owned icon actions. When present, these replace the legacy menu action."
|
|
180
|
+
},
|
|
181
|
+
"backAriaLabel": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"resolvedType": "string",
|
|
184
|
+
"attribute": "back-aria-label",
|
|
185
|
+
"default": "'Back'",
|
|
186
|
+
"required": false,
|
|
187
|
+
"mutable": false,
|
|
188
|
+
"description": "Accessible name for the leading navigation or dismiss action."
|
|
189
|
+
},
|
|
190
|
+
"backIcon": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"resolvedType": "string",
|
|
193
|
+
"attribute": "back-icon",
|
|
194
|
+
"default": "'ChevronLeft'",
|
|
195
|
+
"required": false,
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"description": "Canonical icon for the leading navigation or dismiss action."
|
|
198
|
+
},
|
|
199
|
+
"heading": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"resolvedType": "string",
|
|
202
|
+
"attribute": "heading",
|
|
203
|
+
"default": "''",
|
|
204
|
+
"required": false,
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"description": "Visible heading for the active tool view."
|
|
207
|
+
},
|
|
208
|
+
"menuAriaLabel": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"resolvedType": "string",
|
|
211
|
+
"attribute": "menu-aria-label",
|
|
212
|
+
"default": "'More options'",
|
|
213
|
+
"required": false,
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"description": "Accessible name for the options-menu trigger."
|
|
216
|
+
},
|
|
217
|
+
"menuControls": {
|
|
218
|
+
"type": "string | undefined",
|
|
219
|
+
"resolvedType": "string | undefined",
|
|
220
|
+
"attribute": "menu-controls",
|
|
221
|
+
"required": false,
|
|
222
|
+
"mutable": false,
|
|
223
|
+
"description": "Id of the menu controlled by the trigger."
|
|
224
|
+
},
|
|
225
|
+
"menuExpanded": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"resolvedType": "boolean",
|
|
228
|
+
"attribute": "menu-expanded",
|
|
229
|
+
"default": "false",
|
|
230
|
+
"required": false,
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"description": "Whether the controlled menu is open."
|
|
233
|
+
},
|
|
234
|
+
"menuTriggerId": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"resolvedType": "string",
|
|
237
|
+
"attribute": "menu-trigger-id",
|
|
238
|
+
"default": "''",
|
|
239
|
+
"required": false,
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"description": "Stable id placed on the menu trigger host for ds-menu anchoring."
|
|
242
|
+
},
|
|
243
|
+
"showBack": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"resolvedType": "boolean",
|
|
246
|
+
"attribute": "show-back",
|
|
247
|
+
"default": "false",
|
|
248
|
+
"required": false,
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"description": "Show the leading Back action."
|
|
251
|
+
},
|
|
252
|
+
"showMenu": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"resolvedType": "boolean",
|
|
255
|
+
"attribute": "show-menu",
|
|
256
|
+
"default": "true",
|
|
257
|
+
"required": false,
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"description": "Show the trailing options-menu trigger."
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"events": [
|
|
263
|
+
{
|
|
264
|
+
"name": "dsAction",
|
|
265
|
+
"detail": "{ id: string; originalEvent: MouseEvent }",
|
|
266
|
+
"bubbles": true,
|
|
267
|
+
"cancelable": true,
|
|
268
|
+
"composed": true
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "dsBack",
|
|
272
|
+
"detail": "MouseEvent",
|
|
273
|
+
"bubbles": true,
|
|
274
|
+
"cancelable": true,
|
|
275
|
+
"composed": true
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "dsMenuToggle",
|
|
279
|
+
"detail": "MouseEvent",
|
|
280
|
+
"bubbles": true,
|
|
281
|
+
"cancelable": true,
|
|
282
|
+
"composed": true
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"methods": [
|
|
286
|
+
{
|
|
287
|
+
"name": "focusMenuTrigger",
|
|
288
|
+
"signature": "focusMenuTrigger() => Promise<void>"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"slots": [],
|
|
292
|
+
"exports": {
|
|
293
|
+
"customElement": "ds-panel-tool-header",
|
|
294
|
+
"react": "DsPanelToolHeader",
|
|
295
|
+
"angular": "DsPanelToolHeader"
|
|
296
|
+
},
|
|
297
|
+
"consumption": {
|
|
298
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
299
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
300
|
+
"customElements": {
|
|
301
|
+
"import": "import '@ds-mo/ui/dist/components/ds-panel-tool-header.js';",
|
|
302
|
+
"example": "<ds-panel-tool-header></ds-panel-tool-header>"
|
|
303
|
+
},
|
|
304
|
+
"react": {
|
|
305
|
+
"import": "import { DsPanelToolHeader } from '@ds-mo/ui/react';",
|
|
306
|
+
"example": "<DsPanelToolHeader />"
|
|
307
|
+
},
|
|
308
|
+
"angular": {
|
|
309
|
+
"import": "import { DsPanelToolHeader } from '@ds-mo/ui/angular/ds-panel-tool-header';",
|
|
310
|
+
"example": "<ds-panel-tool-header></ds-panel-tool-header>"
|
|
311
|
+
},
|
|
312
|
+
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: actions.",
|
|
313
|
+
"peerDependencies": {
|
|
314
|
+
"required": [
|
|
315
|
+
"@ds-mo/tokens ^3.1.1",
|
|
316
|
+
"@ds-mo/icons ^6.2.0"
|
|
317
|
+
],
|
|
318
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"dependencies": [
|
|
323
|
+
"@ds-mo/ui",
|
|
324
|
+
"@ds-mo/tokens"
|
|
325
|
+
],
|
|
326
|
+
"registryDependencies": [
|
|
327
|
+
"button-unfilled",
|
|
328
|
+
"text"
|
|
329
|
+
],
|
|
330
|
+
"files": [
|
|
331
|
+
{
|
|
332
|
+
"path": "src/wc/components/PanelToolHeader/PanelToolHeader.css",
|
|
333
|
+
"content": "@import '../../utils/control-density.css';\n\n:host {\n display: block;\n flex: 0 0 auto;\n box-sizing: border-box;\n}\n\n.panel-tool-header {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n height: var(--dimension-size-600);\n padding: var(--dimension-space-100);\n box-sizing: border-box;\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n color: var(--color-foreground-primary);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.panel-tool-header__leading,\n.panel-tool-header__trailing {\n display: flex;\n align-items: center;\n min-width: 0;\n}\n\n.panel-tool-header__leading:empty,\n.panel-tool-header__trailing:empty {\n display: none;\n}\n\n.panel-tool-header__leading {\n flex: 0 0 auto;\n}\n\n.panel-tool-header__trailing {\n flex: 0 0 auto;\n gap: var(--dimension-space-050);\n justify-content: flex-end;\n}\n\nds-text.panel-tool-header__heading {\n display: inline-flex;\n flex: 1 1 0;\n align-items: center;\n width: auto;\n min-width: 0;\n height: var(--ds-control-height);\n padding-inline: calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset));\n box-sizing: border-box;\n text-align: left;\n -webkit-user-select: none;\n user-select: none;\n}\n",
|
|
334
|
+
"type": "registry:ui"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"path": "src/wc/components/PanelToolHeader/PanelToolHeader.tsx",
|
|
338
|
+
"content": "import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport type { PanelToolsHeaderAction } from '../PanelTools/panel-tools-types';\n\n@Component({\n tag: 'ds-panel-tool-header',\n styleUrl: 'PanelToolHeader.css',\n scoped: true,\n})\nexport class PanelToolHeader {\n @Element() el!: HTMLElement;\n\n /** Visible heading for the active tool view. */\n @Prop() heading: string = '';\n /** Show the leading Back action. */\n @Prop() showBack: boolean = false;\n /** Canonical icon for the leading navigation or dismiss action. */\n @Prop() backIcon: string = 'ChevronLeft';\n /** Accessible name for the leading navigation or dismiss action. */\n @Prop() backAriaLabel: string = 'Back';\n /** Show the trailing options-menu trigger. */\n @Prop() showMenu: boolean = true;\n /** Accessible name for the options-menu trigger. */\n @Prop() menuAriaLabel: string = 'More options';\n /** Stable id placed on the menu trigger host for ds-menu anchoring. */\n @Prop() menuTriggerId: string = '';\n /** Id of the menu controlled by the trigger. */\n @Prop() menuControls: string | undefined;\n /** Whether the controlled menu is open. */\n @Prop() menuExpanded: boolean = false;\n /** Trailing application-owned icon actions. When present, these replace the legacy menu action. */\n @Prop() actions: PanelToolsHeaderAction[] = [];\n\n @Event() dsBack!: EventEmitter<MouseEvent>;\n @Event() dsMenuToggle!: EventEmitter<MouseEvent>;\n @Event() dsAction!: EventEmitter<{ id: string; originalEvent: MouseEvent }>;\n\n @Method()\n async focusMenuTrigger() {\n const trigger = this.el.querySelector(\n 'ds-button-unfilled.panel-tool-header__menu, ds-button-unfilled[data-header-action-id=\"menu\"]'\n ) as (HTMLElement & { setFocus?: () => Promise<void> }) | null;\n await trigger?.setFocus?.();\n }\n\n render() {\n const authoredActions = this.actions.length > 0;\n const actions: PanelToolsHeaderAction[] = authoredActions\n ? this.actions\n : this.showMenu\n ? [\n {\n id: 'menu',\n icon: 'Ellipses',\n ariaLabel: this.menuAriaLabel,\n triggerId: this.menuTriggerId,\n controls: this.menuControls,\n expanded: this.menuExpanded,\n haspopup: 'menu',\n },\n ]\n : [];\n\n return (\n <Host>\n <header class=\"panel-tool-header\">\n <div class=\"panel-tool-header__leading\">\n {this.showBack ? (\n <ds-button-unfilled\n class=\"panel-tool-header__back\"\n variant=\"icon\"\n icon={this.backIcon}\n size=\"md\"\n aria-label={this.backAriaLabel}\n activeFill={false}\n hasBorder={false}\n onDsClick={(event: CustomEvent<MouseEvent>) => this.dsBack.emit(event.detail)}\n />\n ) : null}\n </div>\n <ds-text\n class=\"panel-tool-header__heading ds-control--md\"\n as=\"h2\"\n variant=\"text-body-medium\"\n emphasis\n color=\"primary\"\n lineTruncation={1}\n >\n {this.heading}\n </ds-text>\n <div class=\"panel-tool-header__trailing\">\n {actions.map(action => (\n <ds-button-unfilled\n key={action.id}\n id={action.triggerId || undefined}\n data-header-action-id={action.id}\n class={{\n 'panel-tool-header__action': true,\n 'panel-tool-header__menu': action.id === 'menu',\n }}\n variant=\"icon\"\n icon={action.icon}\n size=\"md\"\n aria-label={action.ariaLabel}\n haspopup={action.haspopup}\n controls={action.controls}\n expanded={action.expanded}\n pressed={action.pressed}\n isInactive={action.isInactive}\n activeFill={false}\n hasBorder={false}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n if (!authoredActions && action.id === 'menu')\n this.dsMenuToggle.emit(event.detail);\n this.dsAction.emit({ id: action.id, originalEvent: event.detail });\n }}\n />\n ))}\n </div>\n </header>\n </Host>\n );\n }\n}\n",
|
|
339
|
+
"type": "registry:ui"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|