@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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Manages ARIA live region announcements for screen readers.
|
|
11
|
+
* Uses a dual-region pattern with a 250ms delay for NVDA compatibility.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AriaAnnouncerManager {
|
|
14
|
+
private ariaLiveRegion1?;
|
|
15
|
+
private ariaLiveRegion2?;
|
|
16
|
+
private useAriaLiveRegion1;
|
|
17
|
+
private pendingAnnouncements;
|
|
18
|
+
private announcementTimeoutId;
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the manager with references to the aria-live regions
|
|
21
|
+
*/
|
|
22
|
+
connect(region1: HTMLDivElement, region2: HTMLDivElement): void;
|
|
23
|
+
/**
|
|
24
|
+
* Clean up resources
|
|
25
|
+
*/
|
|
26
|
+
disconnect(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Announces a message to screen readers via aria-live regions.
|
|
29
|
+
* Uses a dual-region pattern and 250ms delay for NVDA compatibility.
|
|
30
|
+
*/
|
|
31
|
+
announce(message: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Clear any pending announcements
|
|
34
|
+
*/
|
|
35
|
+
private clearPendingAnnouncements;
|
|
36
|
+
/**
|
|
37
|
+
* Performs the actual announcements by writing to aria-live regions
|
|
38
|
+
*/
|
|
39
|
+
private doAnnouncements;
|
|
40
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
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. 2025
|
|
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 ARIA live region announcements for screen readers.
|
|
18
|
+
* Uses a dual-region pattern with a 250ms delay for NVDA compatibility.
|
|
19
|
+
*/
|
|
20
|
+
class AriaAnnouncerManager {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.useAriaLiveRegion1 = true;
|
|
23
|
+
this.pendingAnnouncements = [];
|
|
24
|
+
this.announcementTimeoutId = null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the manager with references to the aria-live regions
|
|
28
|
+
*/
|
|
29
|
+
connect(region1, region2) {
|
|
30
|
+
this.ariaLiveRegion1 = region1;
|
|
31
|
+
this.ariaLiveRegion2 = region2;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Clean up resources
|
|
35
|
+
*/
|
|
36
|
+
disconnect() {
|
|
37
|
+
this.clearPendingAnnouncements();
|
|
38
|
+
this.ariaLiveRegion1 = undefined;
|
|
39
|
+
this.ariaLiveRegion2 = undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Announces a message to screen readers via aria-live regions.
|
|
43
|
+
* Uses a dual-region pattern and 250ms delay for NVDA compatibility.
|
|
44
|
+
*/
|
|
45
|
+
announce(message) {
|
|
46
|
+
if (!message || typeof window === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// Queue the announcement
|
|
50
|
+
this.pendingAnnouncements.push(message);
|
|
51
|
+
// If timeout not already scheduled, schedule it
|
|
52
|
+
if (this.announcementTimeoutId === null) {
|
|
53
|
+
// 250ms delay for NVDA compatibility - prevents focus changes from interrupting announcements
|
|
54
|
+
this.announcementTimeoutId = window.setTimeout(() => {
|
|
55
|
+
this.doAnnouncements();
|
|
56
|
+
}, 250);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Clear any pending announcements
|
|
61
|
+
*/
|
|
62
|
+
clearPendingAnnouncements() {
|
|
63
|
+
if (this.announcementTimeoutId !== null && typeof window !== "undefined") {
|
|
64
|
+
window.clearTimeout(this.announcementTimeoutId);
|
|
65
|
+
this.announcementTimeoutId = null;
|
|
66
|
+
}
|
|
67
|
+
this.pendingAnnouncements = [];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Performs the actual announcements by writing to aria-live regions
|
|
71
|
+
*/
|
|
72
|
+
doAnnouncements() {
|
|
73
|
+
if (this.pendingAnnouncements.length === 0) {
|
|
74
|
+
this.announcementTimeoutId = null;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// Join all pending announcements
|
|
78
|
+
const message = this.pendingAnnouncements.join(" ");
|
|
79
|
+
this.pendingAnnouncements = [];
|
|
80
|
+
this.announcementTimeoutId = null;
|
|
81
|
+
// Get the region to use for this announcement
|
|
82
|
+
const useRegion = this.useAriaLiveRegion1
|
|
83
|
+
? this.ariaLiveRegion1
|
|
84
|
+
: this.ariaLiveRegion2;
|
|
85
|
+
// Get the region to clear
|
|
86
|
+
const clearRegion = this.useAriaLiveRegion1
|
|
87
|
+
? this.ariaLiveRegion2
|
|
88
|
+
: this.ariaLiveRegion1;
|
|
89
|
+
// Write to the active region
|
|
90
|
+
if (useRegion) {
|
|
91
|
+
useRegion.textContent = message;
|
|
92
|
+
}
|
|
93
|
+
// Clear the previous region
|
|
94
|
+
if (clearRegion) {
|
|
95
|
+
clearRegion.textContent = "";
|
|
96
|
+
}
|
|
97
|
+
// Swap which region to use next time
|
|
98
|
+
this.useAriaLiveRegion1 = !this.useAriaLiveRegion1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Made with Bob
|
|
102
|
+
|
|
103
|
+
export { AriaAnnouncerManager };
|
|
104
|
+
//# sourceMappingURL=aria-announcer-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria-announcer-manager.js","sources":["../../../../src/components/chat-shell/src/aria-announcer-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;AAGG;MACU,oBAAoB,CAAA;AAAjC,IAAA,WAAA,GAAA;QAGU,IAAA,CAAA,kBAAkB,GAAG,IAAI;QACzB,IAAA,CAAA,oBAAoB,GAAa,EAAE;QACnC,IAAA,CAAA,qBAAqB,GAAkB,IAAI;IAwFrD;AAtFE;;AAEG;IACH,OAAO,CAAC,OAAuB,EAAE,OAAuB,EAAA;AACtD,QAAA,IAAI,CAAC,eAAe,GAAG,OAAO;AAC9B,QAAA,IAAI,CAAC,eAAe,GAAG,OAAO;IAChC;AAEA;;AAEG;IACH,UAAU,GAAA;QACR,IAAI,CAAC,yBAAyB,EAAE;AAChC,QAAA,IAAI,CAAC,eAAe,GAAG,SAAS;AAChC,QAAA,IAAI,CAAC,eAAe,GAAG,SAAS;IAClC;AAEA;;;AAGG;AACH,IAAA,QAAQ,CAAC,OAAe,EAAA;QACtB,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YAC7C;QACF;;AAGA,QAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC;;AAGvC,QAAA,IAAI,IAAI,CAAC,qBAAqB,KAAK,IAAI,EAAE;;YAEvC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC,UAAU,CAAC,MAAK;gBAClD,IAAI,CAAC,eAAe,EAAE;YACxB,CAAC,EAAE,GAAG,CAAC;QACT;IACF;AAEA;;AAEG;IACK,yBAAyB,GAAA;QAC/B,IAAI,IAAI,CAAC,qBAAqB,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACxE,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,qBAAqB,CAAC;AAC/C,YAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI;QACnC;AACA,QAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE;IAChC;AAEA;;AAEG;IACK,eAAe,GAAA;QACrB,IAAI,IAAI,CAAC,oBAAoB,CAAC,MAAM,KAAK,CAAC,EAAE;AAC1C,YAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI;YACjC;QACF;;QAGA,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC;AACnD,QAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE;AAC9B,QAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI;;AAGjC,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC;cACnB,IAAI,CAAC;AACP,cAAE,IAAI,CAAC,eAAe;;AAGxB,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC;cACrB,IAAI,CAAC;AACP,cAAE,IAAI,CAAC,eAAe;;QAGxB,IAAI,SAAS,EAAE;AACb,YAAA,SAAS,CAAC,WAAW,GAAG,OAAO;QACjC;;QAGA,IAAI,WAAW,EAAE;AACf,YAAA,WAAW,CAAC,WAAW,GAAG,EAAE;QAC9B;;AAGA,QAAA,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,CAAC,kBAAkB;IACpD;AACD;AAED;;;;"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "@carbon/web-components/es/components/button/index.js";
|
|
3
|
+
import "@carbon/web-components/es/components/overflow-menu/index.js";
|
|
4
|
+
import "../../toolbar/src/toolbar.js";
|
|
5
|
+
import type { Action } from "../../toolbar/src/toolbar.js";
|
|
6
|
+
import type { BaseOverflowMenuItem } from "../../../typings/overflow-menu.js";
|
|
7
|
+
/**
|
|
8
|
+
* Navigation overflow menu item configuration.
|
|
9
|
+
* Uses BaseOverflowMenuItem which extends properties from CDSOverflowMenuItem.
|
|
10
|
+
* This type is specifically for navigation menu items (no icon property).
|
|
11
|
+
*/
|
|
12
|
+
export type NavigationOverflowItem = BaseOverflowMenuItem;
|
|
13
|
+
/**
|
|
14
|
+
* Chat Header component that wraps the Toolbar component.
|
|
15
|
+
* Provides a consistent header for chat interfaces with support for
|
|
16
|
+
* navigation, title, actions, and decorators (like AI labels).
|
|
17
|
+
*
|
|
18
|
+
* @element cds-aichat-chat-header
|
|
19
|
+
* @slot navigation - Navigation controls (e.g., back button, overflow menu)
|
|
20
|
+
* @slot title - Title and name content (can also use title/name properties)
|
|
21
|
+
* @slot decorator - Decorative elements like AI labels
|
|
22
|
+
* @slot fixed-actions - Actions that never overflow (allows passing custom components)
|
|
23
|
+
*/
|
|
24
|
+
declare class CdsAiChatChatHeader extends LitElement {
|
|
25
|
+
static styles: any;
|
|
26
|
+
/**
|
|
27
|
+
* Selector strings for finding focusable elements.
|
|
28
|
+
*
|
|
29
|
+
* Design rationale:
|
|
30
|
+
* - BUTTON_SELECTORS: Used for fixed-actions slot. Targets Carbon buttons and native buttons.
|
|
31
|
+
* - NAV_BUTTON_SELECTORS: Used for navigation slot. Includes overflow menu for navigation patterns.
|
|
32
|
+
* - TOOLBAR_ACTION_SELECTOR: Specifically targets toolbar icon buttons (most common action type).
|
|
33
|
+
* - FOCUSABLE_SELECTORS: Fallback selector for any focusable element. Uses "*" because the
|
|
34
|
+
* tryFocus() utility already performs comprehensive validation including:
|
|
35
|
+
* - Visibility checks (display, visibility, hidden, inert, aria-hidden)
|
|
36
|
+
* - Focusability validation (handles standard elements and custom elements with delegatesFocus)
|
|
37
|
+
* - Actual focus verification (checks if document.activeElement changed)
|
|
38
|
+
* This approach avoids duplicating validation logic and properly handles Carbon components.
|
|
39
|
+
*/
|
|
40
|
+
private static readonly BUTTON_SELECTORS;
|
|
41
|
+
private static readonly NAV_BUTTON_SELECTORS;
|
|
42
|
+
private static readonly FOCUSABLE_SELECTORS;
|
|
43
|
+
private static readonly TOOLBAR_ACTION_SELECTOR;
|
|
44
|
+
/**
|
|
45
|
+
* Configuration constants for navigation elements.
|
|
46
|
+
*/
|
|
47
|
+
private static readonly BACK_ICON_CONFIG;
|
|
48
|
+
private static readonly NAV_TOOLTIP_CONFIG;
|
|
49
|
+
/**
|
|
50
|
+
* Attempts to focus an element if it's focusable and not disabled.
|
|
51
|
+
* Uses the enhanced tryFocus utility from focus-utils which checks
|
|
52
|
+
* visibility, accessibility attributes, and proper focusability.
|
|
53
|
+
*
|
|
54
|
+
* @param element - The element to attempt to focus
|
|
55
|
+
* @returns True if focus was successfully set, false otherwise
|
|
56
|
+
*/
|
|
57
|
+
private tryFocusElement;
|
|
58
|
+
/**
|
|
59
|
+
* Attempts to focus buttons within a named slot.
|
|
60
|
+
* Reduces duplication by centralizing slot querying logic.
|
|
61
|
+
*
|
|
62
|
+
* @param slotName - The name of the slot to query
|
|
63
|
+
* @param selectors - CSS selector string for buttons to find
|
|
64
|
+
* @returns True if a button was focused, false otherwise
|
|
65
|
+
*/
|
|
66
|
+
private tryFocusSlotButtons;
|
|
67
|
+
/**
|
|
68
|
+
* Requests focus on the best available focusable element within the component.
|
|
69
|
+
* This method implements a generic focus management pattern that can be used
|
|
70
|
+
* across all web components.
|
|
71
|
+
*
|
|
72
|
+
* Priority order:
|
|
73
|
+
* 1. First enabled button in navigation (either slotted or rendered from properties)
|
|
74
|
+
* 2. First enabled button in fixed-actions slot (usually close button)
|
|
75
|
+
* 3. First enabled action button from toolbar (rendered by actions array)
|
|
76
|
+
* 4. Any other focusable element (last resort)
|
|
77
|
+
*
|
|
78
|
+
* @returns True if focus was successfully set, false otherwise
|
|
79
|
+
*/
|
|
80
|
+
requestFocus(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Array of actions that can overflow into a menu when space is limited.
|
|
83
|
+
*/
|
|
84
|
+
actions: Action[];
|
|
85
|
+
/**
|
|
86
|
+
* Enable overflow behavior for actions.
|
|
87
|
+
*/
|
|
88
|
+
overflow: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Optional header title text to display.
|
|
91
|
+
*/
|
|
92
|
+
headerTitle: string;
|
|
93
|
+
/**
|
|
94
|
+
* Optional name text to display after the title.
|
|
95
|
+
*/
|
|
96
|
+
headerName: string;
|
|
97
|
+
/**
|
|
98
|
+
* Type of navigation to display: 'back', 'overflow', or 'none'.
|
|
99
|
+
*/
|
|
100
|
+
navigationType: "back" | "overflow" | "none";
|
|
101
|
+
/**
|
|
102
|
+
* Icon for the back button (CarbonIcon object with render method).
|
|
103
|
+
*/
|
|
104
|
+
navigationBackIcon?: any;
|
|
105
|
+
/**
|
|
106
|
+
* Label/tooltip text for the back button.
|
|
107
|
+
*/
|
|
108
|
+
navigationBackLabel: string;
|
|
109
|
+
/**
|
|
110
|
+
* Click handler for the back button.
|
|
111
|
+
*/
|
|
112
|
+
navigationBackOnClick?: () => void;
|
|
113
|
+
/**
|
|
114
|
+
* Array of overflow menu items with text and onClick handlers or href.
|
|
115
|
+
*/
|
|
116
|
+
navigationOverflowItems?: NavigationOverflowItem[];
|
|
117
|
+
/**
|
|
118
|
+
* Label/tooltip text for the overflow menu button.
|
|
119
|
+
*/
|
|
120
|
+
navigationOverflowLabel: string;
|
|
121
|
+
/**
|
|
122
|
+
* Icon for the overflow menu button (CarbonIcon object with render method).
|
|
123
|
+
*/
|
|
124
|
+
navigationOverflowIcon?: any;
|
|
125
|
+
/**
|
|
126
|
+
* Click handler for when the overflow menu button is clicked (menu opened).
|
|
127
|
+
*/
|
|
128
|
+
navigationOverflowOnClick?: () => void;
|
|
129
|
+
/**
|
|
130
|
+
* Renders the overflow menu items.
|
|
131
|
+
*/
|
|
132
|
+
private renderOverflowMenuItems;
|
|
133
|
+
/**
|
|
134
|
+
* Checks if back navigation should be rendered.
|
|
135
|
+
* @returns True if back navigation type is set and icon is provided
|
|
136
|
+
*/
|
|
137
|
+
private shouldRenderBackNavigation;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if overflow navigation should be rendered.
|
|
140
|
+
* @returns True if overflow navigation type is set and items are available
|
|
141
|
+
*/
|
|
142
|
+
private shouldRenderOverflowNavigation;
|
|
143
|
+
/**
|
|
144
|
+
* Gets the configuration object for overflow menu icon.
|
|
145
|
+
* @returns Icon loader configuration with class and slot
|
|
146
|
+
*/
|
|
147
|
+
private getOverflowIconConfig;
|
|
148
|
+
/**
|
|
149
|
+
* Renders the back navigation button.
|
|
150
|
+
* @returns Template result for back button
|
|
151
|
+
*/
|
|
152
|
+
private renderBackNavigation;
|
|
153
|
+
/**
|
|
154
|
+
* Renders the overflow navigation menu.
|
|
155
|
+
* @returns Template result for overflow menu
|
|
156
|
+
*/
|
|
157
|
+
private renderOverflowNavigation;
|
|
158
|
+
/**
|
|
159
|
+
* Renders the navigation content based on navigationType.
|
|
160
|
+
* Uses guard clauses and extracted methods for clarity.
|
|
161
|
+
* @returns Template result for navigation or nothing
|
|
162
|
+
*/
|
|
163
|
+
private renderNavigation;
|
|
164
|
+
/**
|
|
165
|
+
* Renders the title content based on headerTitle and headerName properties.
|
|
166
|
+
* @returns Template result for title content or title slot
|
|
167
|
+
*/
|
|
168
|
+
private renderTitle;
|
|
169
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
170
|
+
}
|
|
171
|
+
declare global {
|
|
172
|
+
interface HTMLElementTagNameMap {
|
|
173
|
+
"cds-aichat-chat-header": CdsAiChatChatHeader;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
export { CdsAiChatChatHeader };
|
|
177
|
+
export default CdsAiChatChatHeader;
|