@carbon/ai-chat-components 0.10.0 → 0.11.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 +0 -3
- package/custom-elements.json +4827 -2917
- package/es/components/card/src/card-footer.d.ts +1 -1
- package/es/components/card/src/card-footer.js +2 -1
- package/es/components/card/src/card-footer.js.map +1 -1
- package/es/components/card/src/card-footer.scss.js +1 -1
- package/es/components/card/src/card-steps.d.ts +1 -1
- package/es/components/card/src/card-steps.js +2 -1
- package/es/components/card/src/card-steps.js.map +1 -1
- package/es/components/card/src/card-steps.scss.js +1 -1
- package/es/components/card/src/card.d.ts +1 -1
- package/es/components/card/src/card.js +2 -1
- package/es/components/card/src/card.js.map +1 -1
- package/es/components/card/src/card.scss.js +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.js +3 -2
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.js +2 -1
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es/components/chat-button/src/chat-button.d.ts +2 -2
- package/es/components/chat-button/src/chat-button.js +3 -2
- package/es/components/chat-button/src/chat-button.js.map +1 -1
- package/es/components/chat-button/src/chat-button.scss.js +1 -1
- package/es/components/chat-shell/index.d.ts +2 -0
- package/es/components/chat-shell/index.js +1 -0
- package/es/components/chat-shell/index.js.map +1 -1
- package/es/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
- package/es/components/chat-shell/src/aria-announcer-manager.js +104 -0
- package/es/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
- package/es/components/chat-shell/src/chat-header.d.ts +177 -0
- package/es/components/chat-shell/src/chat-header.js +415 -0
- package/es/components/chat-shell/src/chat-header.js.map +1 -0
- package/es/components/chat-shell/src/chat-header.scss.js +13 -0
- package/es/components/chat-shell/src/chat-header.scss.js.map +1 -0
- package/es/components/chat-shell/src/corner-manager.d.ts +35 -0
- package/es/components/chat-shell/src/corner-manager.js +87 -0
- package/es/components/chat-shell/src/corner-manager.js.map +1 -0
- package/es/components/chat-shell/src/initialization-manager.d.ts +44 -0
- package/es/components/chat-shell/src/initialization-manager.js +88 -0
- package/es/components/chat-shell/src/initialization-manager.js.map +1 -0
- package/es/components/chat-shell/src/panel.d.ts +14 -1
- package/es/components/chat-shell/src/panel.js +32 -4
- package/es/components/chat-shell/src/panel.js.map +1 -1
- package/es/components/chat-shell/src/panel.scss.js +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
- package/es/components/chat-shell/src/resize-observer-manager.js +219 -0
- package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -0
- package/es/components/chat-shell/src/shell.d.ts +54 -21
- package/es/components/chat-shell/src/shell.js +297 -287
- package/es/components/chat-shell/src/shell.js.map +1 -1
- package/es/components/chat-shell/src/shell.scss.js +1 -1
- package/es/components/chat-shell/src/slot-observer.d.ts +53 -0
- package/es/components/chat-shell/src/slot-observer.js +156 -0
- package/es/components/chat-shell/src/slot-observer.js.map +1 -0
- package/es/components/chat-shell/src/types.d.ts +66 -0
- package/es/components/chat-shell/src/types.js +8 -0
- package/es/components/chat-shell/src/types.js.map +1 -0
- package/es/components/chat-shell/src/workspace-manager.d.ts +12 -1
- package/es/components/chat-shell/src/workspace-manager.js +42 -2
- package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +3 -2
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/src/code-snippet.d.ts +58 -15
- package/es/components/code-snippet/src/code-snippet.js +261 -95
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
- package/es/components/code-snippet/src/codemirror/editor-manager.js +18 -3
- package/es/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
- package/es/components/code-snippet/src/codemirror/language-controller.js +11 -5
- package/es/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js +2 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/theme.d.ts +12 -0
- package/es/components/code-snippet/src/codemirror/theme.js +26 -2
- package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es/components/code-snippet/src/dom-utils.d.ts +1 -0
- package/es/components/code-snippet/src/dom-utils.js +12 -1
- package/es/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es/components/code-snippet/src/layout-utils.d.ts +9 -1
- package/es/components/code-snippet/src/layout-utils.js +21 -16
- package/es/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es/components/code-snippet/src/streaming-manager.js +7 -0
- package/es/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.d.ts +2 -0
- package/es/components/feedback/src/feedback-buttons.js +65 -3
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es/components/feedback/src/feedback.d.ts +20 -10
- package/es/components/feedback/src/feedback.js +114 -20
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/markdown/src/markdown-renderer.d.ts +31 -21
- package/es/components/markdown/src/markdown-renderer.js +57 -48
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown.d.ts +34 -31
- package/es/components/markdown/src/markdown.js +221 -138
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/markdown/src/markdown.template.js +1 -1
- package/es/components/markdown/src/utils.d.ts +0 -4
- package/es/components/markdown/src/utils.js +1 -7
- package/es/components/markdown/src/utils.js.map +1 -1
- package/es/components/processing/src/processing.d.ts +1 -1
- package/es/components/processing/src/processing.js +2 -1
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.js +2 -1
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.js +3 -5
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es/components/table/src/table-pagination.template.js +3 -2
- package/es/components/table/src/table-pagination.template.js.map +1 -1
- package/es/components/table/src/table-skeleton.template.js +8 -6
- package/es/components/table/src/table-skeleton.template.js.map +1 -1
- package/es/components/table/src/table.d.ts +29 -3
- package/es/components/table/src/table.js +99 -6
- package/es/components/table/src/table.js.map +1 -1
- package/es/components/table/src/table.scss.js +1 -1
- package/es/components/table/src/table.template.js +11 -2
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +32 -5
- package/es/components/toolbar/src/toolbar.js +111 -47
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/truncated-text/index.d.ts +9 -0
- package/es/components/truncated-text/index.js +9 -0
- package/es/components/truncated-text/index.js.map +1 -0
- package/es/components/truncated-text/src/truncated-text.d.ts +81 -0
- package/es/components/truncated-text/src/truncated-text.js +282 -0
- package/es/components/truncated-text/src/truncated-text.js.map +1 -0
- package/es/components/truncated-text/src/truncated-text.scss.js +13 -0
- package/es/components/truncated-text/src/truncated-text.scss.js.map +1 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.js +223 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js +2 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
- package/es/components/workspace-shell/src/workspace-shell-footer.js +8 -6
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
- package/es/components/workspace-shell/src/workspace-shell-header.js +88 -14
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
- package/es/components/workspace-shell/src/workspace-shell.d.ts +16 -2
- package/es/components/workspace-shell/src/workspace-shell.js +77 -7
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es/globals/scss/common.scss.js +13 -0
- package/es/globals/scss/common.scss.js.map +1 -0
- package/es/globals/utils/focus-utils.d.ts +57 -0
- package/es/globals/utils/focus-utils.js +180 -0
- package/es/globals/utils/focus-utils.js.map +1 -0
- package/es/react/card.d.ts +3 -6
- package/es/react/chain-of-thought-step.d.ts +1 -2
- package/es/react/chain-of-thought-toggle.d.ts +1 -2
- package/es/react/chain-of-thought.d.ts +1 -2
- package/es/react/chat-button.d.ts +2 -2
- package/es/react/chat-button.js +1 -1
- package/es/react/chat-header.d.ts +73 -0
- package/es/react/chat-header.js +55 -0
- package/es/react/chat-header.js.map +1 -0
- package/es/react/chat-shell.d.ts +1 -2
- package/es/react/code-snippet.d.ts +35 -2
- package/es/react/code-snippet.js +65 -9
- package/es/react/code-snippet.js.map +1 -1
- package/es/react/feedback-buttons.d.ts +1 -2
- package/es/react/feedback.d.ts +1 -2
- package/es/react/markdown.d.ts +1 -2
- package/es/react/markdown.js +11 -1
- package/es/react/markdown.js.map +1 -1
- package/es/react/panel.d.ts +1 -2
- package/es/react/processing.d.ts +1 -2
- package/es/react/reasoning-step.d.ts +1 -2
- package/es/react/reasoning-steps-toggle.d.ts +1 -2
- package/es/react/reasoning-steps.d.ts +1 -2
- package/es/react/tool-call-data.d.ts +1 -2
- package/es/react/toolbar.d.ts +14 -10
- package/es/react/toolbar.js +2 -0
- package/es/react/toolbar.js.map +1 -1
- package/es/react/utils/withWebComponentBridge.d.ts +5 -2
- package/es/react/utils/withWebComponentBridge.js +49 -1
- package/es/react/utils/withWebComponentBridge.js.map +1 -1
- package/es/react/workspace-shell.d.ts +4 -8
- package/es/testing/PageObjectId.d.ts +22 -0
- package/es/testing/PageObjectId.js +38 -0
- package/es/testing/PageObjectId.js.map +1 -0
- package/es/typings/overflow-menu.d.ts +30 -0
- package/es/typings/overflow-menu.js +8 -0
- package/es/typings/overflow-menu.js.map +1 -0
- package/es-custom/components/card/src/card-footer.d.ts +1 -1
- package/es-custom/components/card/src/card-footer.js +2 -1
- package/es-custom/components/card/src/card-footer.js.map +1 -1
- package/es-custom/components/card/src/card-footer.scss.js +1 -1
- package/es-custom/components/card/src/card-steps.d.ts +1 -1
- package/es-custom/components/card/src/card-steps.js +2 -1
- package/es-custom/components/card/src/card-steps.js.map +1 -1
- package/es-custom/components/card/src/card-steps.scss.js +1 -1
- package/es-custom/components/card/src/card.d.ts +1 -1
- package/es-custom/components/card/src/card.js +2 -1
- package/es-custom/components/card/src/card.js.map +1 -1
- package/es-custom/components/card/src/card.scss.js +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +3 -2
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +2 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es-custom/components/chat-button/src/chat-button.d.ts +2 -2
- package/es-custom/components/chat-button/src/chat-button.js +3 -2
- package/es-custom/components/chat-button/src/chat-button.js.map +1 -1
- package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
- package/es-custom/components/chat-shell/index.d.ts +2 -0
- package/es-custom/components/chat-shell/index.js +1 -0
- package/es-custom/components/chat-shell/index.js.map +1 -1
- package/es-custom/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js +104 -0
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/chat-header.d.ts +177 -0
- package/es-custom/components/chat-shell/src/chat-header.js +415 -0
- package/es-custom/components/chat-shell/src/chat-header.js.map +1 -0
- package/es-custom/components/chat-shell/src/chat-header.scss.js +13 -0
- package/es-custom/components/chat-shell/src/chat-header.scss.js.map +1 -0
- package/es-custom/components/chat-shell/src/corner-manager.d.ts +35 -0
- package/es-custom/components/chat-shell/src/corner-manager.js +87 -0
- package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/initialization-manager.d.ts +44 -0
- package/es-custom/components/chat-shell/src/initialization-manager.js +88 -0
- package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/panel.d.ts +14 -1
- package/es-custom/components/chat-shell/src/panel.js +32 -4
- package/es-custom/components/chat-shell/src/panel.js.map +1 -1
- package/es-custom/components/chat-shell/src/panel.scss.js +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
- package/es-custom/components/chat-shell/src/resize-observer-manager.js +219 -0
- package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/shell.d.ts +54 -21
- package/es-custom/components/chat-shell/src/shell.js +297 -287
- package/es-custom/components/chat-shell/src/shell.js.map +1 -1
- package/es-custom/components/chat-shell/src/shell.scss.js +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.d.ts +53 -0
- package/es-custom/components/chat-shell/src/slot-observer.js +156 -0
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -0
- package/es-custom/components/chat-shell/src/types.d.ts +66 -0
- package/es-custom/components/chat-shell/src/types.js +8 -0
- package/es-custom/components/chat-shell/src/types.js.map +1 -0
- package/es-custom/components/chat-shell/src/workspace-manager.d.ts +12 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js +42 -2
- package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es-custom/components/code-snippet/index.d.ts +3 -2
- package/es-custom/components/code-snippet/index.js +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +58 -15
- package/es-custom/components/code-snippet/src/code-snippet.js +261 -95
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +18 -3
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +11 -5
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +2 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js +26 -2
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es-custom/components/code-snippet/src/dom-utils.d.ts +1 -0
- package/es-custom/components/code-snippet/src/dom-utils.js +12 -1
- package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +9 -1
- package/es-custom/components/code-snippet/src/layout-utils.js +21 -16
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/streaming-manager.js +7 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +2 -0
- package/es-custom/components/feedback/src/feedback-buttons.js +65 -3
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es-custom/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.d.ts +20 -10
- package/es-custom/components/feedback/src/feedback.js +114 -20
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.scss.js +1 -1
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +31 -21
- package/es-custom/components/markdown/src/markdown-renderer.js +57 -48
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.d.ts +34 -31
- package/es-custom/components/markdown/src/markdown.js +221 -138
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.scss.js +1 -1
- package/es-custom/components/markdown/src/markdown.template.js +1 -1
- package/es-custom/components/markdown/src/utils.d.ts +0 -4
- package/es-custom/components/markdown/src/utils.js +1 -7
- package/es-custom/components/markdown/src/utils.js.map +1 -1
- package/es-custom/components/processing/src/processing.d.ts +1 -1
- package/es-custom/components/processing/src/processing.js +2 -1
- package/es-custom/components/processing/src/processing.js.map +1 -1
- package/es-custom/components/processing/src/processing.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +2 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +3 -5
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es-custom/components/table/src/table-pagination.template.js +3 -2
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
- package/es-custom/components/table/src/table-skeleton.template.js +8 -6
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
- package/es-custom/components/table/src/table.d.ts +29 -3
- package/es-custom/components/table/src/table.js +99 -6
- package/es-custom/components/table/src/table.js.map +1 -1
- package/es-custom/components/table/src/table.scss.js +1 -1
- package/es-custom/components/table/src/table.template.js +11 -2
- package/es-custom/components/table/src/table.template.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.d.ts +32 -5
- package/es-custom/components/toolbar/src/toolbar.js +111 -47
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
- package/es-custom/components/truncated-text/index.d.ts +9 -0
- package/es-custom/components/truncated-text/index.js +9 -0
- package/es-custom/components/truncated-text/index.js.map +1 -0
- package/es-custom/components/truncated-text/src/truncated-text.d.ts +81 -0
- package/es-custom/components/truncated-text/src/truncated-text.js +282 -0
- package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -0
- package/es-custom/components/truncated-text/src/truncated-text.scss.js +13 -0
- package/es-custom/components/truncated-text/src/truncated-text.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +223 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +8 -6
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +88 -14
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +16 -2
- package/es-custom/components/workspace-shell/src/workspace-shell.js +77 -7
- package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es-custom/globals/scss/common.scss.js +13 -0
- package/es-custom/globals/scss/common.scss.js.map +1 -0
- package/es-custom/globals/utils/focus-utils.d.ts +57 -0
- package/es-custom/globals/utils/focus-utils.js +180 -0
- package/es-custom/globals/utils/focus-utils.js.map +1 -0
- package/es-custom/react/card.d.ts +3 -6
- package/es-custom/react/chain-of-thought-step.d.ts +1 -2
- package/es-custom/react/chain-of-thought-toggle.d.ts +1 -2
- package/es-custom/react/chain-of-thought.d.ts +1 -2
- package/es-custom/react/chat-button.d.ts +2 -2
- package/es-custom/react/chat-button.js +1 -1
- package/es-custom/react/chat-header.d.ts +73 -0
- package/es-custom/react/chat-header.js +55 -0
- package/es-custom/react/chat-header.js.map +1 -0
- package/es-custom/react/chat-shell.d.ts +1 -2
- package/es-custom/react/code-snippet.d.ts +35 -2
- package/es-custom/react/code-snippet.js +65 -9
- package/es-custom/react/code-snippet.js.map +1 -1
- package/es-custom/react/feedback-buttons.d.ts +1 -2
- package/es-custom/react/feedback.d.ts +1 -2
- package/es-custom/react/markdown.d.ts +1 -2
- package/es-custom/react/markdown.js +11 -1
- package/es-custom/react/markdown.js.map +1 -1
- package/es-custom/react/panel.d.ts +1 -2
- package/es-custom/react/processing.d.ts +1 -2
- package/es-custom/react/reasoning-step.d.ts +1 -2
- package/es-custom/react/reasoning-steps-toggle.d.ts +1 -2
- package/es-custom/react/reasoning-steps.d.ts +1 -2
- package/es-custom/react/tool-call-data.d.ts +1 -2
- package/es-custom/react/toolbar.d.ts +14 -10
- package/es-custom/react/toolbar.js +2 -0
- package/es-custom/react/toolbar.js.map +1 -1
- package/es-custom/react/utils/withWebComponentBridge.d.ts +5 -2
- package/es-custom/react/utils/withWebComponentBridge.js +49 -1
- package/es-custom/react/utils/withWebComponentBridge.js.map +1 -1
- package/es-custom/react/workspace-shell.d.ts +4 -8
- package/es-custom/testing/PageObjectId.d.ts +22 -0
- package/es-custom/testing/PageObjectId.js +38 -0
- package/es-custom/testing/PageObjectId.js.map +1 -0
- package/es-custom/typings/overflow-menu.d.ts +30 -0
- package/es-custom/typings/overflow-menu.js +8 -0
- package/es-custom/typings/overflow-menu.js.map +1 -0
- package/package.json +6 -4
- package/scss/_custom-properties.scss +70 -0
- package/scss/_modifiers.scss +231 -0
- package/scss/_tokens-component.scss +30 -0
- package/scss/_tokens-layout.scss +29 -0
- package/scss/_utilities.scss +32 -0
- package/scss/common.scss +150 -0
- package/scss/grid.scss +11 -0
- package/scss/themes.scss +33 -0
- package/scss/vars.scss +12 -0
- package/telemetry.yml +73 -33
- package/es/components/code-snippet/src/code-snippet-card.d.ts +0 -63
- package/es/components/code-snippet/src/code-snippet-card.js +0 -187
- package/es/components/code-snippet/src/code-snippet-card.js.map +0 -1
- package/es/components/feedback/src/feedback-buttons.template.d.ts +0 -4
- package/es/components/feedback/src/feedback-buttons.template.js +0 -79
- package/es/components/feedback/src/feedback-buttons.template.js.map +0 -1
- package/es/components/feedback/src/feedback.template.d.ts +0 -12
- package/es/components/feedback/src/feedback.template.js +0 -115
- package/es/components/feedback/src/feedback.template.js.map +0 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
- package/es/react/code-snippet-card.d.ts +0 -4
- package/es/react/code-snippet-card.js +0 -31
- package/es/react/code-snippet-card.js.map +0 -1
- package/es-custom/components/code-snippet/src/code-snippet-card.d.ts +0 -63
- package/es-custom/components/code-snippet/src/code-snippet-card.js +0 -187
- package/es-custom/components/code-snippet/src/code-snippet-card.js.map +0 -1
- package/es-custom/components/feedback/src/feedback-buttons.template.d.ts +0 -4
- package/es-custom/components/feedback/src/feedback-buttons.template.js +0 -79
- package/es-custom/components/feedback/src/feedback-buttons.template.js.map +0 -1
- package/es-custom/components/feedback/src/feedback.template.d.ts +0 -12
- package/es-custom/components/feedback/src/feedback.template.js +0 -115
- package/es-custom/components/feedback/src/feedback.template.js.map +0 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
- package/es-custom/react/code-snippet-card.d.ts +0 -4
- package/es-custom/react/code-snippet-card.js +0 -31
- package/es-custom/react/code-snippet-card.js.map +0 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
*
|
|
11
|
+
* Copyright IBM Corp. 2026
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Manages automatic header collapsible behavior for the workspace shell.
|
|
18
|
+
* Monitors slot heights and determines when the header should be collapsible
|
|
19
|
+
* to ensure the body slot has adequate space.
|
|
20
|
+
*/
|
|
21
|
+
class HeaderCollapsibleManager {
|
|
22
|
+
constructor(shellRoot, hostElement) {
|
|
23
|
+
this.shellRoot = shellRoot;
|
|
24
|
+
this.hostElement = hostElement;
|
|
25
|
+
this.isManagerControlled = false;
|
|
26
|
+
this.hadInitialAttribute = false;
|
|
27
|
+
this.calculationPending = false;
|
|
28
|
+
// Check if header already has collapsible attribute at initialization
|
|
29
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
30
|
+
const headerElement = headerSlot?.assignedElements()[0];
|
|
31
|
+
this.hadInitialAttribute =
|
|
32
|
+
headerElement?.hasAttribute("collapsible") || false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Start observing slot heights and managing collapsible state
|
|
36
|
+
*/
|
|
37
|
+
connect(onStateChange) {
|
|
38
|
+
this.onStateChangeCallback = onStateChange;
|
|
39
|
+
this.setupResizeObserver();
|
|
40
|
+
this.setupSlotChangeListener();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Stop observing and clean up
|
|
44
|
+
*/
|
|
45
|
+
disconnect() {
|
|
46
|
+
this.resizeObserver?.disconnect();
|
|
47
|
+
if (this.throttleTimeout) {
|
|
48
|
+
clearTimeout(this.throttleTimeout);
|
|
49
|
+
}
|
|
50
|
+
this.removeSlotChangeListener();
|
|
51
|
+
this.onStateChangeCallback = undefined;
|
|
52
|
+
this.isManagerControlled = false;
|
|
53
|
+
this.calculationPending = false;
|
|
54
|
+
this.lastState = undefined;
|
|
55
|
+
this.expandedHeaderHeight = undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reset the stored expanded header height.
|
|
59
|
+
* Call this when workspace content changes to recalculate with new header size.
|
|
60
|
+
*/
|
|
61
|
+
reset() {
|
|
62
|
+
this.expandedHeaderHeight = undefined;
|
|
63
|
+
this.lastState = undefined;
|
|
64
|
+
// Trigger a new calculation
|
|
65
|
+
this.calculateCollapsibleState();
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Set up ResizeObserver to monitor all relevant elements
|
|
69
|
+
*/
|
|
70
|
+
setupResizeObserver() {
|
|
71
|
+
if (typeof ResizeObserver === "undefined") {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
75
|
+
// Throttle calculations to max once per 150ms to prevent performance issues
|
|
76
|
+
if (this.throttleTimeout) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.throttleTimeout = window.setTimeout(() => {
|
|
80
|
+
this.throttleTimeout = undefined;
|
|
81
|
+
if (!this.calculationPending) {
|
|
82
|
+
this.calculationPending = true;
|
|
83
|
+
requestAnimationFrame(() => {
|
|
84
|
+
this.calculationPending = false;
|
|
85
|
+
this.calculateCollapsibleState();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, 150);
|
|
89
|
+
});
|
|
90
|
+
// Only observe the host element - this is sufficient to detect size changes
|
|
91
|
+
// Observing individual slots was causing performance issues
|
|
92
|
+
this.resizeObserver.observe(this.hostElement);
|
|
93
|
+
// Initial calculation
|
|
94
|
+
this.calculateCollapsibleState();
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Set up listener for slot content changes to reset when header content changes
|
|
98
|
+
*/
|
|
99
|
+
setupSlotChangeListener() {
|
|
100
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
101
|
+
if (headerSlot) {
|
|
102
|
+
this.slotChangeHandler = () => {
|
|
103
|
+
// Reset expanded height when slot content changes
|
|
104
|
+
this.reset();
|
|
105
|
+
};
|
|
106
|
+
headerSlot.addEventListener("slotchange", this.slotChangeHandler);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Remove slot change listener
|
|
111
|
+
*/
|
|
112
|
+
removeSlotChangeListener() {
|
|
113
|
+
if (this.slotChangeHandler) {
|
|
114
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
115
|
+
if (headerSlot) {
|
|
116
|
+
headerSlot.removeEventListener("slotchange", this.slotChangeHandler);
|
|
117
|
+
}
|
|
118
|
+
this.slotChangeHandler = undefined;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Calculate if header should be collapsible based on available space
|
|
123
|
+
*/
|
|
124
|
+
calculateCollapsibleState() {
|
|
125
|
+
const totalHeight = this.hostElement.offsetHeight;
|
|
126
|
+
// Get individual slot heights
|
|
127
|
+
const toolbarHeight = this.getSlotHeight("toolbar");
|
|
128
|
+
const notificationHeight = this.getSlotHeight("notification");
|
|
129
|
+
const currentHeaderHeight = this.getSlotHeight("header");
|
|
130
|
+
const footerHeight = this.getSlotHeight("footer");
|
|
131
|
+
// Store the expanded header height ONCE when we first see it expanded
|
|
132
|
+
// Never update it after that to avoid flip-flopping
|
|
133
|
+
const headerElement = this.getHeaderElement();
|
|
134
|
+
const isCurrentlyCollapsed = headerElement?.hasAttribute("collapsible");
|
|
135
|
+
// Only store expanded height if we don't have one yet AND header is not collapsed
|
|
136
|
+
if (!this.expandedHeaderHeight &&
|
|
137
|
+
!isCurrentlyCollapsed &&
|
|
138
|
+
currentHeaderHeight > 0) {
|
|
139
|
+
// First time seeing the expanded header, store this as the permanent reference
|
|
140
|
+
this.expandedHeaderHeight = currentHeaderHeight;
|
|
141
|
+
}
|
|
142
|
+
// Use the expanded height for calculations to avoid flip-flopping
|
|
143
|
+
// If we don't have expanded height yet, use current (only happens on very first render)
|
|
144
|
+
const headerHeight = this.expandedHeaderHeight || currentHeaderHeight;
|
|
145
|
+
// Calculate available body height using the EXPANDED header height
|
|
146
|
+
const availableBodyHeight = totalHeight -
|
|
147
|
+
toolbarHeight -
|
|
148
|
+
notificationHeight -
|
|
149
|
+
headerHeight -
|
|
150
|
+
footerHeight;
|
|
151
|
+
// Determine if header should be collapsible
|
|
152
|
+
// Rule: If body would be smaller than expanded header, collapse the header
|
|
153
|
+
const shouldCollapse = availableBodyHeight < headerHeight;
|
|
154
|
+
// Only notify if state actually changed to prevent unnecessary updates
|
|
155
|
+
if (!this.lastState ||
|
|
156
|
+
this.lastState.shouldCollapse !== shouldCollapse ||
|
|
157
|
+
this.lastState.availableBodyHeight !== availableBodyHeight ||
|
|
158
|
+
this.lastState.headerHeight !== headerHeight) {
|
|
159
|
+
this.lastState = {
|
|
160
|
+
shouldCollapse,
|
|
161
|
+
availableBodyHeight,
|
|
162
|
+
headerHeight,
|
|
163
|
+
};
|
|
164
|
+
// Notify callback
|
|
165
|
+
if (this.onStateChangeCallback) {
|
|
166
|
+
this.onStateChangeCallback(this.lastState);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get the header element
|
|
172
|
+
*/
|
|
173
|
+
getHeaderElement() {
|
|
174
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
175
|
+
return headerSlot?.assignedElements()[0] || null;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the total height of elements assigned to a slot
|
|
179
|
+
*/
|
|
180
|
+
getSlotHeight(slotName) {
|
|
181
|
+
const slot = this.shellRoot.querySelector(`slot[name="${slotName}"]`);
|
|
182
|
+
const elements = slot?.assignedElements() || [];
|
|
183
|
+
return elements.reduce((sum, el) => sum + el.offsetHeight, 0);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Check if a header element has a manually set collapsible attribute
|
|
187
|
+
*/
|
|
188
|
+
hasManualOverride() {
|
|
189
|
+
// If attribute existed at initialization, it's a manual override
|
|
190
|
+
if (this.hadInitialAttribute) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
194
|
+
const headerElement = headerSlot?.assignedElements()[0];
|
|
195
|
+
if (!headerElement?.hasAttribute("collapsible")) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
// If manager set it, it's not a manual override
|
|
199
|
+
return !this.isManagerControlled;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Update the header's collapsible attribute
|
|
203
|
+
*/
|
|
204
|
+
updateHeaderCollapsible(shouldCollapse) {
|
|
205
|
+
const headerSlot = this.shellRoot.querySelector('slot[name="header"]');
|
|
206
|
+
const headerElement = headerSlot?.assignedElements()[0];
|
|
207
|
+
if (headerElement && !this.hasManualOverride()) {
|
|
208
|
+
const currentlyHasAttr = headerElement.hasAttribute("collapsible");
|
|
209
|
+
if (shouldCollapse && !currentlyHasAttr) {
|
|
210
|
+
headerElement.setAttribute("collapsible", "");
|
|
211
|
+
this.isManagerControlled = true;
|
|
212
|
+
}
|
|
213
|
+
else if (!shouldCollapse && currentlyHasAttr) {
|
|
214
|
+
headerElement.removeAttribute("collapsible");
|
|
215
|
+
this.isManagerControlled = false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// Made with Bob
|
|
221
|
+
|
|
222
|
+
export { HeaderCollapsibleManager };
|
|
223
|
+
//# sourceMappingURL=header-collapsible-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header-collapsible-manager.js","sources":["../../../../src/components/workspace-shell/src/header-collapsible-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAQH;;;;AAIG;MACU,wBAAwB,CAAA;IAWnC,WAAA,CACmB,SAAqB,EACrB,WAAwB,EAAA;QADxB,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,WAAW,GAAX,WAAW;QAVtB,IAAA,CAAA,mBAAmB,GAAG,KAAK;QAC3B,IAAA,CAAA,mBAAmB,GAAG,KAAK;QAC3B,IAAA,CAAA,kBAAkB,GAAG,KAAK;;QAWhC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAC7C,qBAAqB,CACtB;QACD,MAAM,aAAa,GAAG,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAgB;AACtE,QAAA,IAAI,CAAC,mBAAmB;AACtB,YAAA,aAAa,EAAE,YAAY,CAAC,aAAa,CAAC,IAAI,KAAK;IACvD;AAEA;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;;;"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { LitElement, html } from 'lit';
|
|
10
10
|
import { property } from 'lit/decorators.js';
|
|
11
|
+
import commonStyles from '../../../globals/scss/common.scss.js';
|
|
11
12
|
import styles from './workspace-shell.scss.js';
|
|
12
13
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
13
14
|
import prefix from '../../../globals/settings.js';
|
|
@@ -38,7 +39,7 @@ let CDSAIChatWorkspaceShellBody = class CDSAIChatWorkspaceShellBody extends LitE
|
|
|
38
39
|
return html ` <slot></slot> `;
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
|
-
CDSAIChatWorkspaceShellBody.styles = styles;
|
|
42
|
+
CDSAIChatWorkspaceShellBody.styles = [commonStyles, styles];
|
|
42
43
|
__decorate([
|
|
43
44
|
property({ type: String, reflect: true })
|
|
44
45
|
], CDSAIChatWorkspaceShellBody.prototype, "slot", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell-body.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell-body.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-shell-body.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell-body.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH;;;;;AAKG;AAEH,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,UAAU,CAAA;AAApD,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,MAAM;IAKf;IAHE,MAAM,GAAA;QACJ,OAAO,IAAI,CAAA,CAAA,eAAA,CAAiB;IAC9B;;AAVO,2BAAA,CAAA,MAAM,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC;AAMtC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAC3B,CAAA,EAAA,2BAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAPV,2BAA2B,GAAA,UAAA,CAAA;AADhC,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,qBAAA,CAAuB;AACzC,CAAA,EAAA,2BAA2B,CAYhC;AAGD,oCAAe,2BAA2B;;;;"}
|
|
@@ -16,9 +16,7 @@ export type Action = {
|
|
|
16
16
|
* @fires cds-aichat-workspace-shell-footer-clicked - The custom event fired when footer buttons are clicked.
|
|
17
17
|
*/
|
|
18
18
|
declare class CDSAIChatWorkspaceShellFooter extends LitElement {
|
|
19
|
-
static styles: any;
|
|
20
|
-
private _ro;
|
|
21
|
-
private _isStacked;
|
|
19
|
+
static styles: any[];
|
|
22
20
|
/**
|
|
23
21
|
* Sets default slot value to footer
|
|
24
22
|
*/
|
|
@@ -12,6 +12,7 @@ import '@carbon/web-components/es/components/button/button.js';
|
|
|
12
12
|
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
13
13
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
14
14
|
import prefix from '../../../globals/settings.js';
|
|
15
|
+
import commonStyles from '../../../globals/scss/common.scss.js';
|
|
15
16
|
import styles from './workspace-shell-footer.scss.js';
|
|
16
17
|
|
|
17
18
|
/*
|
|
@@ -30,6 +31,9 @@ import styles from './workspace-shell-footer.scss.js';
|
|
|
30
31
|
let CDSAIChatWorkspaceShellFooter = class CDSAIChatWorkspaceShellFooter extends LitElement {
|
|
31
32
|
constructor() {
|
|
32
33
|
super(...arguments);
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
33
37
|
this._isStacked = false;
|
|
34
38
|
/**
|
|
35
39
|
* Sets default slot value to footer
|
|
@@ -40,16 +44,14 @@ let CDSAIChatWorkspaceShellFooter = class CDSAIChatWorkspaceShellFooter extends
|
|
|
40
44
|
connectedCallback() {
|
|
41
45
|
super.connectedCallback();
|
|
42
46
|
this.setAttribute("data-rounded", "bottom");
|
|
43
|
-
// Observe
|
|
47
|
+
// Observe component's own size changes
|
|
44
48
|
// Use requestAnimationFrame to avoid ResizeObserver loop errors
|
|
45
49
|
this._ro = new ResizeObserver(() => {
|
|
46
50
|
requestAnimationFrame(() => {
|
|
47
51
|
this._updateStacked();
|
|
48
52
|
});
|
|
49
53
|
});
|
|
50
|
-
|
|
51
|
-
this._ro.observe(this.parentElement);
|
|
52
|
-
}
|
|
54
|
+
this._ro.observe(this);
|
|
53
55
|
}
|
|
54
56
|
updated(changedProps) {
|
|
55
57
|
if (changedProps.has("actions")) {
|
|
@@ -100,7 +102,7 @@ let CDSAIChatWorkspaceShellFooter = class CDSAIChatWorkspaceShellFooter extends
|
|
|
100
102
|
.eventButtonClick, init));
|
|
101
103
|
}
|
|
102
104
|
_updateStacked() {
|
|
103
|
-
const shouldStack =
|
|
105
|
+
const shouldStack = this.offsetWidth < 671;
|
|
104
106
|
if (shouldStack !== this._isStacked) {
|
|
105
107
|
this._isStacked = shouldStack;
|
|
106
108
|
// Force re-render so actions get sorted again
|
|
@@ -130,7 +132,7 @@ let CDSAIChatWorkspaceShellFooter = class CDSAIChatWorkspaceShellFooter extends
|
|
|
130
132
|
return `${prefix}-workspace-shell-footer-clicked`;
|
|
131
133
|
}
|
|
132
134
|
};
|
|
133
|
-
CDSAIChatWorkspaceShellFooter.styles = styles;
|
|
135
|
+
CDSAIChatWorkspaceShellFooter.styles = [commonStyles, styles];
|
|
134
136
|
__decorate([
|
|
135
137
|
state()
|
|
136
138
|
], CDSAIChatWorkspaceShellFooter.prototype, "_isStacked", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell-footer.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell-footer.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-shell-footer.js","sources":["../../../../src/components/workspace-shell/src/workspace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,CAoIlC;AAGD,sCAAe,6BAA6B;;;;"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
9
|
|
|
10
|
-
var styles = css([":host([data-rounded=\"\"]),[data-rounded=\"\"]{border-radius:calc(var(--cds-aichat-rounded-modifier-radius) - .0625rem)}:host([data-rounded=\"\"])::part(button),:host([data-rounded=\"\"])::part(link),[data-rounded=\"\"]::part(button),[data-rounded=\"\"]::part(link){border-radius:calc(var(--cds-aichat-rounded-modifier-radius) - .0625rem);outline-offset:-.0625rem}:host([data-rounded=\"\"])>:only-child,[data-rounded=\"\"]>:only-child{border-radius:calc(var(--cds-aichat-rounded-modifier-radius) - .0625rem)}:host([data-rounded=top]),[data-rounded=top]{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-left]),[data-rounded=top-left]{border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-right]),[data-rounded=top-right]{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom]),[data-rounded=bottom]{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-left]),[data-rounded=bottom-left]{border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-right]),[data-rounded=bottom-right]{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:first-child,[data-rounded=top]:not([data-stacked])>:first-child{border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:first-child::part(button),[data-rounded=top]:not([data-stacked])>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:last-child,[data-rounded=top]:not([data-stacked])>:last-child{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:last-child::part(button),[data-rounded=top]:not([data-stacked])>:last-child::part(button){border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-left]:not([data-stacked]))>:first-child,[data-rounded=top-left]:not([data-stacked])>:first-child{border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-left]:not([data-stacked]))>:first-child::part(button),[data-rounded=top-left]:not([data-stacked])>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-right]:not([data-stacked]))>:last-child,[data-rounded=top-right]:not([data-stacked])>:last-child{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-right]:not([data-stacked]))>:last-child::part(button),[data-rounded=top-right]:not([data-stacked])>:last-child::part(button){border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:first-child,[data-rounded=bottom]:not([data-stacked])>:first-child{border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:first-child::part(button),[data-rounded=bottom]:not([data-stacked])>:first-child::part(button){border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:last-child,[data-rounded=bottom]:not([data-stacked])>:last-child{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:last-child::part(button),[data-rounded=bottom]:not([data-stacked])>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-left]:not([data-stacked]))>:first-child,[data-rounded=bottom-left]:not([data-stacked])>:first-child{border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-left]:not([data-stacked]))>:first-child::part(button),[data-rounded=bottom-left]:not([data-stacked])>:first-child::part(button){border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-right]:not([data-stacked]))>:last-child,[data-rounded=bottom-right]:not([data-stacked])>:last-child{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-right]:not([data-stacked]))>:last-child::part(button),[data-rounded=bottom-right]:not([data-stacked])>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top][data-stacked])>:first-child,[data-rounded=top][data-stacked]>:first-child{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top][data-stacked])>:first-child::part(button),[data-rounded=top][data-stacked]>:first-child::part(button){border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-right][data-stacked])>:first-child,[data-rounded=top-right][data-stacked]>:first-child{border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-right][data-stacked])>:first-child::part(button),[data-rounded=top-right][data-stacked]>:first-child::part(button){border-start-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-left][data-stacked])>:first-child,[data-rounded=top-left][data-stacked]>:first-child{border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=top-left][data-stacked])>:first-child::part(button),[data-rounded=top-left][data-stacked]>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-start-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom][data-stacked])>:last-child,[data-rounded=bottom][data-stacked]>:last-child{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom][data-stacked])>:last-child::part(button),[data-rounded=bottom][data-stacked]>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-right][data-stacked])>:last-child,[data-rounded=bottom-right][data-stacked]>:last-child{border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-right][data-stacked])>:last-child::part(button),[data-rounded=bottom-right][data-stacked]>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-end, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-left][data-stacked])>:last-child,[data-rounded=bottom-left][data-stacked]>:last-child{border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host([data-rounded=bottom-left][data-stacked])>:last-child::part(button),[data-rounded=bottom-left][data-stacked]>:last-child::part(button){border-end-start-radius:calc(var(--cds-aichat-rounded-modifier-radius-end-start, var(--cds-aichat-rounded-modifier-radius)) - .0625rem)}:host(cds-aichat-workspace-shell-footer){--cds-aichat-rounded-modifier-radius:0.5rem;align-items:stretch;border-block-start:solid .0625rem var(--cds-border-subtle-00,#e0e0e0);display:grid;margin-block-start:auto}@media (max-width:41.98rem){:host(cds-aichat-workspace-shell-footer){grid-auto-flow:row;grid-template-columns:1fr}}:host(.cds-aichat-workspace-shell-footer__three-buttons){grid-template-columns:50% 25% 25%}@media (max-width:41.98rem){:host(.cds-aichat-workspace-shell-footer__three-buttons){grid-auto-flow:row;grid-template-columns:1fr}}:host(:not(.cds-aichat-workspace-shell-footer__three-buttons)){grid-template-columns:repeat(auto-fit,minmax(80px,auto))}@media (max-width:41.98rem){:host(:not(.cds-aichat-workspace-shell-footer__three-buttons)){grid-auto-flow:row;grid-template-columns:1fr}}"]);
|
|
10
|
+
var styles = css([":host([data-rounded=\"\"]),[data-rounded=\"\"]{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem);border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=\"\"])::part(button),:host([data-rounded=\"\"])::part(link),[data-rounded=\"\"]::part(button),[data-rounded=\"\"]::part(link){border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem);border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem);outline-offset:-.0625rem}:host([data-rounded=\"\"])>:only-child,[data-rounded=\"\"]>:only-child{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem);border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top]),[data-rounded=top]{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-left]),[data-rounded=top-left]{border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-right]),[data-rounded=top-right]{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom]),[data-rounded=bottom]{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-left]),[data-rounded=bottom-left]{border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-right]),[data-rounded=bottom-right]{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:first-child,[data-rounded=top]:not([data-stacked])>:first-child{border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:first-child::part(button),[data-rounded=top]:not([data-stacked])>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:last-child,[data-rounded=top]:not([data-stacked])>:last-child{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top]:not([data-stacked]))>:last-child::part(button),[data-rounded=top]:not([data-stacked])>:last-child::part(button){border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-left]:not([data-stacked]))>:first-child,[data-rounded=top-left]:not([data-stacked])>:first-child{border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-left]:not([data-stacked]))>:first-child::part(button),[data-rounded=top-left]:not([data-stacked])>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-right]:not([data-stacked]))>:last-child,[data-rounded=top-right]:not([data-stacked])>:last-child{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-right]:not([data-stacked]))>:last-child::part(button),[data-rounded=top-right]:not([data-stacked])>:last-child::part(button){border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:first-child,[data-rounded=bottom]:not([data-stacked])>:first-child{border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:first-child::part(button),[data-rounded=bottom]:not([data-stacked])>:first-child::part(button){border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:last-child,[data-rounded=bottom]:not([data-stacked])>:last-child{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom]:not([data-stacked]))>:last-child::part(button),[data-rounded=bottom]:not([data-stacked])>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-left]:not([data-stacked]))>:first-child,[data-rounded=bottom-left]:not([data-stacked])>:first-child{border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-left]:not([data-stacked]))>:first-child::part(button),[data-rounded=bottom-left]:not([data-stacked])>:first-child::part(button){border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-right]:not([data-stacked]))>:last-child,[data-rounded=bottom-right]:not([data-stacked])>:last-child{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-right]:not([data-stacked]))>:last-child::part(button),[data-rounded=bottom-right]:not([data-stacked])>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top][data-stacked])>:first-child,[data-rounded=top][data-stacked]>:first-child{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top][data-stacked])>:first-child::part(button),[data-rounded=top][data-stacked]>:first-child::part(button){border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem);border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-right][data-stacked])>:first-child,[data-rounded=top-right][data-stacked]>:first-child{border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-right][data-stacked])>:first-child::part(button),[data-rounded=top-right][data-stacked]>:first-child::part(button){border-start-end-radius:calc(var(--cds-aichat-border-radius-start-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-left][data-stacked])>:first-child,[data-rounded=top-left][data-stacked]>:first-child{border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=top-left][data-stacked])>:first-child::part(button),[data-rounded=top-left][data-stacked]>:first-child::part(button){border-start-start-radius:calc(var(--cds-aichat-border-radius-start-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom][data-stacked])>:last-child,[data-rounded=bottom][data-stacked]>:last-child{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom][data-stacked])>:last-child::part(button),[data-rounded=bottom][data-stacked]>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem);border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-right][data-stacked])>:last-child,[data-rounded=bottom-right][data-stacked]>:last-child{border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-right][data-stacked])>:last-child::part(button),[data-rounded=bottom-right][data-stacked]>:last-child::part(button){border-end-end-radius:calc(var(--cds-aichat-border-radius-end-end, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-left][data-stacked])>:last-child,[data-rounded=bottom-left][data-stacked]>:last-child{border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-rounded=bottom-left][data-stacked])>:last-child::part(button),[data-rounded=bottom-left][data-stacked]>:last-child::part(button){border-end-start-radius:calc(var(--cds-aichat-border-radius-end-start, var(--cds-aichat-border-radius)) - .0625rem)}:host([data-stacked]),[data-stacked]{display:flex;flex-direction:column}:host(cds-aichat-workspace-shell-footer){align-items:stretch;border-block-start:solid .0625rem var(--cds-border-subtle-00,#e0e0e0);container-type:inline-size;display:grid;margin-block-start:auto}:host(.cds-aichat-workspace-shell-footer__three-buttons){grid-template-columns:50% 25% 25%}:host(:not(.cds-aichat-workspace-shell-footer__three-buttons)){grid-template-columns:repeat(auto-fit,minmax(80px,auto))}@container (max-width: 671px){:host(cds-aichat-workspace-shell-footer){grid-auto-flow:row;grid-template-columns:1fr}:host(.cds-aichat-workspace-shell-footer__three-buttons){grid-template-columns:repeat(3,1fr)}}"]);
|
|
11
11
|
|
|
12
12
|
export { styles as default };
|
|
13
13
|
//# sourceMappingURL=workspace-shell-footer.scss.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
import "../../truncated-text/index.js";
|
|
2
3
|
/**
|
|
3
4
|
* Workspace Shell Header.
|
|
4
5
|
*
|
|
@@ -7,9 +8,10 @@ import { LitElement } from "lit";
|
|
|
7
8
|
* @slot header-description - Represents the description area in the Header.
|
|
8
9
|
* @slot header-action - Represents the action area in the workspace.
|
|
9
10
|
*
|
|
11
|
+
* @fires workspace-header-toggle - Fired when the details element is toggled
|
|
10
12
|
*/
|
|
11
13
|
declare class CDSAIChatWorkspaceShellHeader extends LitElement {
|
|
12
|
-
static styles: any;
|
|
14
|
+
static styles: any[];
|
|
13
15
|
/**
|
|
14
16
|
* Sets default slot value to toolbar
|
|
15
17
|
*/
|
|
@@ -22,6 +24,14 @@ declare class CDSAIChatWorkspaceShellHeader extends LitElement {
|
|
|
22
24
|
* Sets the subTitle text for the Toolbar Component
|
|
23
25
|
*/
|
|
24
26
|
subTitleText: any;
|
|
27
|
+
/**
|
|
28
|
+
* Controls whether the header can be collapsed/expanded.
|
|
29
|
+
* When true, header starts collapsed and can be toggled.
|
|
30
|
+
* When false, header is always fully expanded.
|
|
31
|
+
*/
|
|
32
|
+
collapsible: boolean;
|
|
33
|
+
firstUpdated(): void;
|
|
34
|
+
disconnectedCallback(): void;
|
|
25
35
|
render(): import("lit-html").TemplateResult<1>;
|
|
26
36
|
}
|
|
27
37
|
export { CDSAIChatWorkspaceShellHeader };
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { LitElement, html } from 'lit';
|
|
10
|
-
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { property, query } from 'lit/decorators.js';
|
|
11
11
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
12
|
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import commonStyles from '../../../globals/scss/common.scss.js';
|
|
13
14
|
import styles from './workspace-shell-header.scss.js';
|
|
15
|
+
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
16
|
+
import ChevronDown16 from '@carbon/icons/es/chevron--down/16.js';
|
|
17
|
+
import '../../truncated-text/src/truncated-text.js';
|
|
14
18
|
|
|
15
19
|
/*
|
|
16
20
|
* Copyright IBM Corp. 2025
|
|
@@ -28,6 +32,7 @@ import styles from './workspace-shell-header.scss.js';
|
|
|
28
32
|
* @slot header-description - Represents the description area in the Header.
|
|
29
33
|
* @slot header-action - Represents the action area in the workspace.
|
|
30
34
|
*
|
|
35
|
+
* @fires workspace-header-toggle - Fired when the details element is toggled
|
|
31
36
|
*/
|
|
32
37
|
let CDSAIChatWorkspaceShellHeader = class CDSAIChatWorkspaceShellHeader extends LitElement {
|
|
33
38
|
constructor() {
|
|
@@ -36,30 +41,93 @@ let CDSAIChatWorkspaceShellHeader = class CDSAIChatWorkspaceShellHeader extends
|
|
|
36
41
|
* Sets default slot value to toolbar
|
|
37
42
|
*/
|
|
38
43
|
this.slot = "header";
|
|
44
|
+
/**
|
|
45
|
+
* Controls whether the header can be collapsed/expanded.
|
|
46
|
+
* When true, header starts collapsed and can be toggled.
|
|
47
|
+
* When false, header is always fully expanded.
|
|
48
|
+
*/
|
|
49
|
+
this.collapsible = false;
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
this._handleToggle = () => {
|
|
54
|
+
const isOpen = this._detailsElement?.open || false;
|
|
55
|
+
this.dispatchEvent(new CustomEvent("workspace-header-toggle", {
|
|
56
|
+
detail: { open: isOpen },
|
|
57
|
+
bubbles: true,
|
|
58
|
+
composed: true,
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
firstUpdated() {
|
|
63
|
+
if (this.collapsible && this._detailsElement) {
|
|
64
|
+
this._detailsElement.addEventListener("toggle", this._handleToggle);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
super.disconnectedCallback();
|
|
69
|
+
if (this._detailsElement) {
|
|
70
|
+
this._detailsElement.removeEventListener("toggle", this._handleToggle);
|
|
71
|
+
}
|
|
39
72
|
}
|
|
40
73
|
render() {
|
|
41
|
-
const { titleText, subTitleText } = this;
|
|
74
|
+
const { titleText, subTitleText, collapsible } = this;
|
|
75
|
+
const headerContent = html `
|
|
76
|
+
${subTitleText &&
|
|
77
|
+
html `
|
|
78
|
+
<h3 class="${prefix}-workspace-shell__header-sub-title">
|
|
79
|
+
${subTitleText}
|
|
80
|
+
</h3>
|
|
81
|
+
`}
|
|
82
|
+
<slot name="header-description"></slot>
|
|
83
|
+
<slot name="header-action"></slot>
|
|
84
|
+
`;
|
|
85
|
+
if (collapsible) {
|
|
86
|
+
// Collapsible mode: starts closed, can be toggled
|
|
87
|
+
return html `
|
|
88
|
+
<details
|
|
89
|
+
class="${prefix}-workspace-shell__header-details ${prefix}-workspace-shell__header-content"
|
|
90
|
+
>
|
|
91
|
+
${titleText &&
|
|
92
|
+
html `
|
|
93
|
+
<summary class="${prefix}-workspace-shell__header-summary">
|
|
94
|
+
<h1 class="${prefix}-workspace-shell__header-title">
|
|
95
|
+
<cds-aichat-truncated-text
|
|
96
|
+
value=${titleText}
|
|
97
|
+
lines="1"
|
|
98
|
+
type="tooltip"
|
|
99
|
+
></cds-aichat-truncated-text>
|
|
100
|
+
</h1>
|
|
101
|
+
<span class="${prefix}-workspace-shell__header-chevron">
|
|
102
|
+
${iconLoader(ChevronDown16)}
|
|
103
|
+
</span>
|
|
104
|
+
</summary>
|
|
105
|
+
`}
|
|
106
|
+
<div class="${prefix}-workspace-shell__header-content">
|
|
107
|
+
${headerContent}
|
|
108
|
+
</div>
|
|
109
|
+
</details>
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
112
|
+
// Non-collapsible: render without details/summary
|
|
42
113
|
return html `
|
|
43
114
|
<div class="${prefix}-workspace-shell__header-content">
|
|
44
115
|
${titleText &&
|
|
45
116
|
html `
|
|
46
|
-
<h1 class="${prefix}-workspace-shell__header-title"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
117
|
+
<h1 class="${prefix}-workspace-shell__header-title">
|
|
118
|
+
<cds-aichat-truncated-text
|
|
119
|
+
value=${titleText}
|
|
120
|
+
lines="1"
|
|
121
|
+
type="tooltip"
|
|
122
|
+
></cds-aichat-truncated-text>
|
|
123
|
+
</h1>
|
|
53
124
|
`}
|
|
54
|
-
|
|
55
|
-
</div>
|
|
56
|
-
<div class="${prefix}-workspace-shell__header-action">
|
|
57
|
-
<slot name="header-action"></slot>
|
|
125
|
+
${headerContent}
|
|
58
126
|
</div>
|
|
59
127
|
`;
|
|
60
128
|
}
|
|
61
129
|
};
|
|
62
|
-
CDSAIChatWorkspaceShellHeader.styles = styles;
|
|
130
|
+
CDSAIChatWorkspaceShellHeader.styles = [commonStyles, styles];
|
|
63
131
|
__decorate([
|
|
64
132
|
property({ type: String, reflect: true })
|
|
65
133
|
], CDSAIChatWorkspaceShellHeader.prototype, "slot", void 0);
|
|
@@ -69,6 +137,12 @@ __decorate([
|
|
|
69
137
|
__decorate([
|
|
70
138
|
property({ type: String, attribute: "subtitle-text" })
|
|
71
139
|
], CDSAIChatWorkspaceShellHeader.prototype, "subTitleText", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: Boolean, reflect: true })
|
|
142
|
+
], CDSAIChatWorkspaceShellHeader.prototype, "collapsible", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
query("details")
|
|
145
|
+
], CDSAIChatWorkspaceShellHeader.prototype, "_detailsElement", void 0);
|
|
72
146
|
CDSAIChatWorkspaceShellHeader = __decorate([
|
|
73
147
|
carbonElement(`${prefix}-workspace-shell-header`)
|
|
74
148
|
], CDSAIChatWorkspaceShellHeader);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell-header.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell-header.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-shell-header.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell-header.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAYH;;;;;;;;;AASG;AAEH,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,UAAU,CAAA;AAAtD,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,QAAQ;AAcf;;;;AAIG;QAEH,IAAA,CAAA,WAAW,GAAG,KAAK;AAqBnB;;AAEG;QACK,IAAA,CAAA,aAAa,GAAG,MAAK;YAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,IAAI,KAAK;AAClD,YAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,yBAAyB,EAAE;AACzC,gBAAA,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;AACxB,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CACH;AACH,QAAA,CAAC;IA6DH;IAtFE,YAAY,GAAA;QACV,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,eAAe,EAAE;YAC5C,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC;QACrE;IACF;IAEA,oBAAoB,GAAA;QAClB,KAAK,CAAC,oBAAoB,EAAE;AAC5B,QAAA,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC;QACxE;IACF;IAgBA,MAAM,GAAA;QACJ,M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,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACtB,CAAA,EAAA,6BAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAMZ,UAAA,CAAA;IADP,KAAK,CAAC,SAAS;AAC6B,CAAA,EAAA,6BAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAjCzC,6BAA6B,GAAA,UAAA,CAAA;AADlC,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,uBAAA,CAAyB;AAC3C,CAAA,EAAA,6BAA6B,CAyHlC;AAGD,sCAAe,6BAA6B;;;;"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
9
|
|
|
10
|
-
var styles = css(["
|
|
10
|
+
var styles = css([":host(cds-aichat-workspace-shell-header){border-block-end:solid .0625rem var(--cds-chat-bubble-border,#e0e0e0);color:var(--cds-text-secondary,#525252);font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);padding:1.5rem 2rem}@media (max-width:41.98rem){:host(cds-aichat-workspace-shell-header){gap:16px;grid-auto-flow:row}}:host(cds-aichat-workspace-shell-header) ::marker{content:\"\"}:host(cds-aichat-workspace-shell-header) ::-webkit-details-marker{display:none}.cds-aichat-workspace-shell__header-details{cursor:pointer}.cds-aichat-workspace-shell__header-details:open{overflow:auto}.cds-aichat-workspace-shell__header-details:open .cds-aichat-workspace-shell__header-chevron{transform:rotate(180deg)}.cds-aichat-workspace-shell__header-content{display:flex;flex-direction:column;gap:1rem}.cds-aichat-workspace-shell__header-title{color:var(--cds-text-primary,#161616);font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}.cds-aichat-workspace-shell__header-sub-title{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin-block-start:-.875rem}.cds-aichat-workspace-shell__header-summary{align-items:baseline;display:flex;justify-content:space-between}"]);
|
|
11
11
|
|
|
12
12
|
export { styles as default };
|
|
13
13
|
//# sourceMappingURL=workspace-shell-header.scss.js.map
|