@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
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
import { html } from 'lit';
|
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
|
-
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
11
|
-
import ChevronDown16 from '@carbon/icons/es/chevron--down/16.js';
|
|
12
|
-
import prefix from '../../../globals/settings.js';
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Copyright IBM Corp. 2025
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*
|
|
20
|
-
* @license
|
|
21
|
-
*/
|
|
22
|
-
function reasoningStepsToggleTemplate(customElementClass) {
|
|
23
|
-
const { open, disabled, panelID, handleToggleClick, openLabelText, closedLabelText, } = customElementClass;
|
|
24
|
-
const labelText = open ? openLabelText : closedLabelText;
|
|
25
|
-
return html `
|
|
26
|
-
<button
|
|
27
|
-
class="${prefix}--reasoning-steps-toggle"
|
|
28
|
-
type="button"
|
|
29
|
-
aria-expanded=${open ? "true" : "false"}
|
|
30
|
-
aria-controls=${ifDefined(panelID)}
|
|
31
|
-
?disabled=${disabled}
|
|
32
|
-
@click=${handleToggleClick}
|
|
33
|
-
>
|
|
34
|
-
<span class="${prefix}--reasoning-steps-toggle-label">${labelText}</span>
|
|
35
|
-
<span class="${prefix}--reasoning-steps-toggle-caret" aria-hidden="true">
|
|
36
|
-
${iconLoader(ChevronDown16)}
|
|
37
|
-
</span>
|
|
38
|
-
</button>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { reasoningStepsToggleTemplate };
|
|
43
|
-
//# sourceMappingURL=reasoning-steps-toggle.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning-steps-toggle.template.js","sources":["../../../../src/components/reasoning-steps/src/reasoning-steps-toggle.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAUH,SAAS,4BAA4B,CACnC,kBAAiD,EAAA;AAEjD,IAAA,MAAM,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,GAAG,kBAAkB;IAEtB,MAAM,SAAS,GAAG,IAAI,GAAG,aAAa,GAAG,eAAe;AAExD,IAAA,OAAO,IAAI,CAAA;;eAEE,MAAM,CAAA;;AAEC,oBAAA,EAAA,IAAI,GAAG,MAAM,GAAG,OAAO;sBACvB,SAAS,CAAC,OAAO,CAAC;kBACtB,QAAQ;eACX,iBAAiB;;AAEX,mBAAA,EAAA,MAAM,mCAAmC,SAAS,CAAA;qBAClD,MAAM,CAAA;UACjB,UAAU,CAAC,aAAa,CAAC;;;GAGhC;AACH;;;;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import CDSAIChatCodeSnippetCard from "../components/code-snippet/src/code-snippet-card.js";
|
|
3
|
-
declare const CodeSnippetCard: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatCodeSnippetCard>>;
|
|
4
|
-
export default CodeSnippetCard;
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
import { createComponent } from '@lit/react';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import CDSAIChatCodeSnippetCard from '../components/code-snippet/src/code-snippet-card.js';
|
|
11
|
-
import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
|
|
12
|
-
|
|
13
|
-
/*
|
|
14
|
-
* Copyright IBM Corp. 2025
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*
|
|
19
|
-
* @license
|
|
20
|
-
*/
|
|
21
|
-
const CodeSnippetCard = withWebComponentBridge(createComponent({
|
|
22
|
-
tagName: "cds-aichat-code-snippet-card",
|
|
23
|
-
elementClass: CDSAIChatCodeSnippetCard,
|
|
24
|
-
react: React,
|
|
25
|
-
events: {
|
|
26
|
-
onChange: "content-change",
|
|
27
|
-
},
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
export { CodeSnippetCard as default };
|
|
31
|
-
//# sourceMappingURL=code-snippet-card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-snippet-card.js","sources":["../../src/react/code-snippet-card.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,eAAe,GAAG,sBAAsB,CAC5C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,8BAA8B;AACvC,IAAA,YAAY,EAAE,wBAAwB;AACtC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,gBAAgB;AAC3B,KAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
import "../../card/index.js";
|
|
3
|
-
import "./code-snippet.js";
|
|
4
|
-
import { type LineCountFormatter } from "./formatters.js";
|
|
5
|
-
/**
|
|
6
|
-
* AI Chat code snippet wrapper that places the snippet inside a Carbon tile.
|
|
7
|
-
*
|
|
8
|
-
* @element cds-aichat-code-snippet-card
|
|
9
|
-
*/
|
|
10
|
-
declare class CDSAIChatCodeSnippetCard extends LitElement {
|
|
11
|
-
/** Language used for syntax highlighting. */
|
|
12
|
-
language: string;
|
|
13
|
-
/** Whether the snippet should be editable. */
|
|
14
|
-
editable: boolean;
|
|
15
|
-
/** Whether to enable syntax highlighting. */
|
|
16
|
-
highlight: boolean;
|
|
17
|
-
/** Fallback language to use when detection fails. */
|
|
18
|
-
defaultLanguage: string;
|
|
19
|
-
/** Text to copy when clicking the copy button. Defaults to slotted content. */
|
|
20
|
-
copyText: string;
|
|
21
|
-
/** Disable interactions on the snippet. */
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
/** Feedback text shown after copy. */
|
|
24
|
-
feedback: string;
|
|
25
|
-
/** Duration (ms) to show feedback text. */
|
|
26
|
-
feedbackTimeout: number;
|
|
27
|
-
/** Hide the copy button. */
|
|
28
|
-
hideCopyButton: boolean;
|
|
29
|
-
/** Maximum rows to show when collapsed. */
|
|
30
|
-
maxCollapsedNumberOfRows: number;
|
|
31
|
-
/** Maximum rows to show when expanded (0 = unlimited). */
|
|
32
|
-
maxExpandedNumberOfRows: number;
|
|
33
|
-
/** Minimum rows to show when collapsed. */
|
|
34
|
-
minCollapsedNumberOfRows: number;
|
|
35
|
-
/** Minimum rows to show when expanded. */
|
|
36
|
-
minExpandedNumberOfRows: number;
|
|
37
|
-
/** Label for the “show less” control. */
|
|
38
|
-
showLessText: string;
|
|
39
|
-
/** Label for the “show more” control. */
|
|
40
|
-
showMoreText: string;
|
|
41
|
-
/** Tooltip label for the copy action. */
|
|
42
|
-
tooltipContent: string;
|
|
43
|
-
/** Wrap text instead of horizontal scrolling. */
|
|
44
|
-
wrapText: boolean;
|
|
45
|
-
/** Label for folding/collapsing code. */
|
|
46
|
-
foldCollapseLabel: string;
|
|
47
|
-
/** Label for unfolding/expanding code. */
|
|
48
|
-
foldExpandLabel: string;
|
|
49
|
-
/** Formatter for the line count display. */
|
|
50
|
-
getLineCountText: LineCountFormatter;
|
|
51
|
-
/**
|
|
52
|
-
* Handles the content-change event from the inner code snippet and re-dispatches it.
|
|
53
|
-
*/
|
|
54
|
-
private _handleContentChange;
|
|
55
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
56
|
-
}
|
|
57
|
-
declare global {
|
|
58
|
-
interface HTMLElementTagNameMap {
|
|
59
|
-
"cds-aichat-code-snippet-card": CDSAIChatCodeSnippetCard;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export { CDSAIChatCodeSnippetCard };
|
|
63
|
-
export default CDSAIChatCodeSnippetCard;
|
|
@@ -1,187 +0,0 @@
|
|
|
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
|
-
import { __decorate } from 'tslib';
|
|
9
|
-
import { LitElement, html } from 'lit';
|
|
10
|
-
import { property } from 'lit/decorators.js';
|
|
11
|
-
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
|
-
import prefix from '../../../globals/settings.js';
|
|
13
|
-
import '../../card/src/card.js';
|
|
14
|
-
import '../../card/src/card-footer.js';
|
|
15
|
-
import '../../card/src/card-steps.js';
|
|
16
|
-
import './code-snippet.js';
|
|
17
|
-
import { defaultLineCountText } from './formatters.js';
|
|
18
|
-
|
|
19
|
-
/*
|
|
20
|
-
* Copyright IBM Corp. 2025
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*
|
|
25
|
-
* @license
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* AI Chat code snippet wrapper that places the snippet inside a Carbon tile.
|
|
29
|
-
*
|
|
30
|
-
* @element cds-aichat-code-snippet-card
|
|
31
|
-
*/
|
|
32
|
-
let CDSAIChatCodeSnippetCard = class CDSAIChatCodeSnippetCard extends LitElement {
|
|
33
|
-
constructor() {
|
|
34
|
-
super(...arguments);
|
|
35
|
-
/** Language used for syntax highlighting. */
|
|
36
|
-
this.language = "";
|
|
37
|
-
/** Whether the snippet should be editable. */
|
|
38
|
-
this.editable = false;
|
|
39
|
-
/** Whether to enable syntax highlighting. */
|
|
40
|
-
this.highlight = false;
|
|
41
|
-
/** Fallback language to use when detection fails. */
|
|
42
|
-
this.defaultLanguage = "javascript";
|
|
43
|
-
/** Text to copy when clicking the copy button. Defaults to slotted content. */
|
|
44
|
-
this.copyText = "";
|
|
45
|
-
/** Disable interactions on the snippet. */
|
|
46
|
-
this.disabled = false;
|
|
47
|
-
/** Feedback text shown after copy. */
|
|
48
|
-
this.feedback = "Copied!";
|
|
49
|
-
/** Duration (ms) to show feedback text. */
|
|
50
|
-
this.feedbackTimeout = 2000;
|
|
51
|
-
/** Hide the copy button. */
|
|
52
|
-
this.hideCopyButton = false;
|
|
53
|
-
/** Maximum rows to show when collapsed. */
|
|
54
|
-
this.maxCollapsedNumberOfRows = 15;
|
|
55
|
-
/** Maximum rows to show when expanded (0 = unlimited). */
|
|
56
|
-
this.maxExpandedNumberOfRows = 0;
|
|
57
|
-
/** Minimum rows to show when collapsed. */
|
|
58
|
-
this.minCollapsedNumberOfRows = 3;
|
|
59
|
-
/** Minimum rows to show when expanded. */
|
|
60
|
-
this.minExpandedNumberOfRows = 16;
|
|
61
|
-
/** Label for the “show less” control. */
|
|
62
|
-
this.showLessText = "Show less";
|
|
63
|
-
/** Label for the “show more” control. */
|
|
64
|
-
this.showMoreText = "Show more";
|
|
65
|
-
/** Tooltip label for the copy action. */
|
|
66
|
-
this.tooltipContent = "Copy to clipboard";
|
|
67
|
-
/** Wrap text instead of horizontal scrolling. */
|
|
68
|
-
this.wrapText = false;
|
|
69
|
-
/** Label for folding/collapsing code. */
|
|
70
|
-
this.foldCollapseLabel = "Collapse code block";
|
|
71
|
-
/** Label for unfolding/expanding code. */
|
|
72
|
-
this.foldExpandLabel = "Expand code block";
|
|
73
|
-
/** Formatter for the line count display. */
|
|
74
|
-
this.getLineCountText = defaultLineCountText;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Handles the content-change event from the inner code snippet and re-dispatches it.
|
|
78
|
-
*/
|
|
79
|
-
_handleContentChange(event) {
|
|
80
|
-
this.dispatchEvent(new CustomEvent("content-change", {
|
|
81
|
-
detail: event.detail,
|
|
82
|
-
bubbles: true,
|
|
83
|
-
composed: true,
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
return html `
|
|
88
|
-
<cds-aichat-card>
|
|
89
|
-
<div slot="body">
|
|
90
|
-
<cds-aichat-code-snippet
|
|
91
|
-
data-rounded
|
|
92
|
-
language=${this.language}
|
|
93
|
-
default-language=${this.defaultLanguage}
|
|
94
|
-
?editable=${this.editable}
|
|
95
|
-
?highlight=${this.highlight}
|
|
96
|
-
@content-change=${this._handleContentChange}
|
|
97
|
-
copy-text=${this.copyText}
|
|
98
|
-
?disabled=${this.disabled}
|
|
99
|
-
feedback=${this.feedback}
|
|
100
|
-
feedback-timeout=${this.feedbackTimeout}
|
|
101
|
-
?hide-copy-button=${this.hideCopyButton}
|
|
102
|
-
max-collapsed-number-of-rows=${this.maxCollapsedNumberOfRows}
|
|
103
|
-
max-expanded-number-of-rows=${this.maxExpandedNumberOfRows}
|
|
104
|
-
min-collapsed-number-of-rows=${this.minCollapsedNumberOfRows}
|
|
105
|
-
min-expanded-number-of-rows=${this.minExpandedNumberOfRows}
|
|
106
|
-
.getLineCountText=${this.getLineCountText}
|
|
107
|
-
show-less-text=${this.showLessText}
|
|
108
|
-
show-more-text=${this.showMoreText}
|
|
109
|
-
tooltip-content=${this.tooltipContent}
|
|
110
|
-
?wrap-text=${this.wrapText}
|
|
111
|
-
fold-collapse-label=${this.foldCollapseLabel}
|
|
112
|
-
fold-expand-label=${this.foldExpandLabel}
|
|
113
|
-
>
|
|
114
|
-
<slot></slot>
|
|
115
|
-
</cds-aichat-code-snippet>
|
|
116
|
-
</div>
|
|
117
|
-
</cds-aichat-card>
|
|
118
|
-
`;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
__decorate([
|
|
122
|
-
property({ type: String })
|
|
123
|
-
], CDSAIChatCodeSnippetCard.prototype, "language", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
property({ type: Boolean })
|
|
126
|
-
], CDSAIChatCodeSnippetCard.prototype, "editable", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
property({ type: Boolean })
|
|
129
|
-
], CDSAIChatCodeSnippetCard.prototype, "highlight", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
property({ type: String, attribute: "default-language" })
|
|
132
|
-
], CDSAIChatCodeSnippetCard.prototype, "defaultLanguage", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
property({ attribute: "copy-text" })
|
|
135
|
-
], CDSAIChatCodeSnippetCard.prototype, "copyText", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
property({ type: Boolean, reflect: true })
|
|
138
|
-
], CDSAIChatCodeSnippetCard.prototype, "disabled", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property()
|
|
141
|
-
], CDSAIChatCodeSnippetCard.prototype, "feedback", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
property({ type: Number, attribute: "feedback-timeout" })
|
|
144
|
-
], CDSAIChatCodeSnippetCard.prototype, "feedbackTimeout", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
property({ type: Boolean, reflect: true, attribute: "hide-copy-button" })
|
|
147
|
-
], CDSAIChatCodeSnippetCard.prototype, "hideCopyButton", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
property({ attribute: "max-collapsed-number-of-rows" })
|
|
150
|
-
], CDSAIChatCodeSnippetCard.prototype, "maxCollapsedNumberOfRows", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ attribute: "max-expanded-number-of-rows" })
|
|
153
|
-
], CDSAIChatCodeSnippetCard.prototype, "maxExpandedNumberOfRows", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
property({ attribute: "min-collapsed-number-of-rows" })
|
|
156
|
-
], CDSAIChatCodeSnippetCard.prototype, "minCollapsedNumberOfRows", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
property({ attribute: "min-expanded-number-of-rows" })
|
|
159
|
-
], CDSAIChatCodeSnippetCard.prototype, "minExpandedNumberOfRows", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ attribute: "show-less-text" })
|
|
162
|
-
], CDSAIChatCodeSnippetCard.prototype, "showLessText", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
property({ attribute: "show-more-text" })
|
|
165
|
-
], CDSAIChatCodeSnippetCard.prototype, "showMoreText", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
property({ attribute: "tooltip-content" })
|
|
168
|
-
], CDSAIChatCodeSnippetCard.prototype, "tooltipContent", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
property({ type: Boolean, reflect: true, attribute: "wrap-text" })
|
|
171
|
-
], CDSAIChatCodeSnippetCard.prototype, "wrapText", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
property({ attribute: "fold-collapse-label" })
|
|
174
|
-
], CDSAIChatCodeSnippetCard.prototype, "foldCollapseLabel", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
property({ attribute: "fold-expand-label" })
|
|
177
|
-
], CDSAIChatCodeSnippetCard.prototype, "foldExpandLabel", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
property({ attribute: false })
|
|
180
|
-
], CDSAIChatCodeSnippetCard.prototype, "getLineCountText", void 0);
|
|
181
|
-
CDSAIChatCodeSnippetCard = __decorate([
|
|
182
|
-
carbonElement(`${prefix}-code-snippet-card`)
|
|
183
|
-
], CDSAIChatCodeSnippetCard);
|
|
184
|
-
var CDSAIChatCodeSnippetCard$1 = CDSAIChatCodeSnippetCard;
|
|
185
|
-
|
|
186
|
-
export { CDSAIChatCodeSnippetCard, CDSAIChatCodeSnippetCard$1 as default };
|
|
187
|
-
//# sourceMappingURL=code-snippet-card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-snippet-card.js","sources":["../../../../src/components/code-snippet/src/code-snippet-card.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import "@carbon/web-components/es-custom/components/icon-button/index.js";
|
|
2
|
-
import { CDSAIChatFeedbackButtons } from "./feedback-buttons.js";
|
|
3
|
-
declare function feedbackButtonsElementTemplate(customElementClass: CDSAIChatFeedbackButtons): import("lit-html").TemplateResult<1>;
|
|
4
|
-
export { feedbackButtonsElementTemplate };
|
|
@@ -1,79 +0,0 @@
|
|
|
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
|
-
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
|
9
|
-
import { iconLoader } from '@carbon/web-components/es-custom/globals/internal/icon-loader.js';
|
|
10
|
-
import ThumbsDown16 from '@carbon/icons/es/thumbs-down/16.js';
|
|
11
|
-
import ThumbsDownFilled16 from '@carbon/icons/es/thumbs-down--filled/16.js';
|
|
12
|
-
import ThumbsUp16 from '@carbon/icons/es/thumbs-up/16.js';
|
|
13
|
-
import ThumbsUpFilled16 from '@carbon/icons/es/thumbs-up--filled/16.js';
|
|
14
|
-
import { nothing, html } from 'lit';
|
|
15
|
-
import prefix from '../../../globals/settings.js';
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
* Copyright IBM Corp. 2025
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*
|
|
23
|
-
* @license
|
|
24
|
-
*/
|
|
25
|
-
const DEFAULT_POSITIVE_LABEL = "Good response";
|
|
26
|
-
const DEFAULT_NEGATIVE_LABEL = "Bad response";
|
|
27
|
-
function feedbackButtonsElementTemplate(customElementClass) {
|
|
28
|
-
const { isPositiveOpen, isNegativeOpen, isPositiveSelected, isNegativeSelected, hasPositiveDetails, hasNegativeDetails, isPositiveDisabled, isNegativeDisabled, positiveLabel, negativeLabel, panelID, } = customElementClass;
|
|
29
|
-
const handleButtonClick = (isPositive) => {
|
|
30
|
-
customElementClass.handleButtonClick?.call(customElementClass, isPositive);
|
|
31
|
-
};
|
|
32
|
-
return html `<div class="${prefix}--feedback-buttons">
|
|
33
|
-
<cds-custom-icon-button
|
|
34
|
-
class="${prefix}--feedback-buttons-positive"
|
|
35
|
-
size="sm"
|
|
36
|
-
align="top-left"
|
|
37
|
-
kind="ghost"
|
|
38
|
-
role="button"
|
|
39
|
-
?disabled=${isPositiveDisabled}
|
|
40
|
-
aria-expanded="${isPositiveDisabled || !hasPositiveDetails
|
|
41
|
-
? nothing
|
|
42
|
-
: isPositiveOpen}"
|
|
43
|
-
aria-pressed="${isPositiveSelected || nothing}"
|
|
44
|
-
aria-controls="${panelID}-feedback-positive"
|
|
45
|
-
@click="${() => handleButtonClick(true)}"
|
|
46
|
-
>
|
|
47
|
-
<span slot="icon"
|
|
48
|
-
>${iconLoader(isPositiveSelected ? ThumbsUpFilled16 : ThumbsUp16)}</span
|
|
49
|
-
>
|
|
50
|
-
<span slot="tooltip-content"
|
|
51
|
-
>${positiveLabel || DEFAULT_POSITIVE_LABEL}</span
|
|
52
|
-
>
|
|
53
|
-
</cds-custom-icon-button>
|
|
54
|
-
<cds-custom-icon-button
|
|
55
|
-
class="${prefix}--feedback-buttons-negative"
|
|
56
|
-
size="sm"
|
|
57
|
-
align="top-left"
|
|
58
|
-
kind="ghost"
|
|
59
|
-
role="button"
|
|
60
|
-
?disabled=${isNegativeDisabled}
|
|
61
|
-
aria-expanded="${isNegativeDisabled || !hasNegativeDetails
|
|
62
|
-
? nothing
|
|
63
|
-
: isNegativeOpen}"
|
|
64
|
-
aria-pressed="${isNegativeSelected || nothing}"
|
|
65
|
-
aria-controls="${panelID}-feedback-negative"
|
|
66
|
-
@click="${() => handleButtonClick(false)}"
|
|
67
|
-
>
|
|
68
|
-
<span slot="icon"
|
|
69
|
-
>${iconLoader(isNegativeSelected ? ThumbsDownFilled16 : ThumbsDown16)}</span
|
|
70
|
-
>
|
|
71
|
-
<span slot="tooltip-content"
|
|
72
|
-
>${negativeLabel || DEFAULT_NEGATIVE_LABEL}</span
|
|
73
|
-
>
|
|
74
|
-
</cds-custom-icon-button>
|
|
75
|
-
</div>`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export { feedbackButtonsElementTemplate };
|
|
79
|
-
//# sourceMappingURL=feedback-buttons.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-buttons.template.js","sources":["../../../../src/components/feedback/src/feedback-buttons.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH,MAAM,sBAAsB,GAAG,eAAe;AAC9C,MAAM,sBAAsB,GAAG,cAAc;AAE7C,SAAS,8BAA8B,CACrC,kBAA4C,EAAA;IAE5C,MAAM,EACJ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,OAAO,GACR,GAAG,kBAAkB;AAEtB,IAAA,MAAM,iBAAiB,GAAG,CAAC,UAAmB,KAAI;QAChD,kBAAkB,CAAC,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;AAC5E,IAAA,CAAC;IAED,OAAO,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;;eAEnB,MAAM,CAAA;;;;;kBAKH,kBAAkB;uBACb,kBAAkB,IAAI,CAAC;AACtC,UAAE;AACF,UAAE,cAAc,CAAA;AACF,oBAAA,EAAA,kBAAkB,IAAI,OAAO,CAAA;uBAC5B,OAAO,CAAA;AACd,cAAA,EAAA,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAA;;;WAGlC,UAAU,CAAC,kBAAkB,GAAG,gBAAgB,GAAG,UAAU,CAAC,CAAA;;;AAG9D,SAAA,EAAA,aAAa,IAAI,sBAAsB,CAAA;;;;eAInC,MAAM,CAAA;;;;;kBAKH,kBAAkB;uBACb,kBAAkB,IAAI,CAAC;AACtC,UAAE;AACF,UAAE,cAAc,CAAA;AACF,oBAAA,EAAA,kBAAkB,IAAI,OAAO,CAAA;uBAC5B,OAAO,CAAA;AACd,cAAA,EAAA,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAA;;;WAGnC,UAAU,CACX,kBAAkB,GAAG,kBAAkB,GAAG,YAAY,CACvD,CAAA;;;AAGE,SAAA,EAAA,aAAa,IAAI,sBAAsB,CAAA;;;SAGzC;AACT;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "../../markdown/index.js";
|
|
2
|
-
import "@carbon/web-components/es-custom/components/button/index.js";
|
|
3
|
-
import "@carbon/web-components/es-custom/components/chat-button/index.js";
|
|
4
|
-
import "@carbon/web-components/es-custom/components/icon-button/index.js";
|
|
5
|
-
import "@carbon/web-components/es-custom/components/layer/index.js";
|
|
6
|
-
import "@carbon/web-components/es-custom/components/textarea/index.js";
|
|
7
|
-
import { CDSAIChatFeedback } from "./feedback.js";
|
|
8
|
-
/**
|
|
9
|
-
* Lit template for feedback.
|
|
10
|
-
*/
|
|
11
|
-
declare function feedbackElementTemplate(customElementClass: CDSAIChatFeedback): import("lit-html").TemplateResult<1>;
|
|
12
|
-
export { feedbackElementTemplate };
|
|
@@ -1,115 +0,0 @@
|
|
|
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
|
-
import '../../markdown/src/markdown.js';
|
|
9
|
-
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
10
|
-
import '@carbon/web-components/es-custom/components/chat-button/index.js';
|
|
11
|
-
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
|
12
|
-
import '@carbon/web-components/es-custom/components/layer/index.js';
|
|
13
|
-
import '@carbon/web-components/es-custom/components/textarea/index.js';
|
|
14
|
-
import { html } from 'lit';
|
|
15
|
-
import prefix from '../../../globals/settings.js';
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
* Copyright IBM Corp. 2025
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*
|
|
23
|
-
* @license
|
|
24
|
-
*/
|
|
25
|
-
// The maximum number of characters the user is allowed to type into the text area.
|
|
26
|
-
const MAX_TEXT_COUNT = 1000;
|
|
27
|
-
/**
|
|
28
|
-
* Lit template for feedback.
|
|
29
|
-
*/
|
|
30
|
-
function feedbackElementTemplate(customElementClass) {
|
|
31
|
-
const { _handleCancel: handleCancel, _handleSubmit: handleSubmit, _handleTextInput: handleTextInput, _textInput: textInput, _selectedCategories: selectedCategories, _handleCategoryClick: handleCategoryClick, id, isReadonly, isOpen, title, prompt, placeholder, categories, disclaimer, showTextArea, showPrompt, submitLabel, cancelLabel, } = customElementClass;
|
|
32
|
-
const containerClasses = [`${prefix}--container`];
|
|
33
|
-
if (!isOpen) {
|
|
34
|
-
containerClasses.push(`${prefix}--is-closed`);
|
|
35
|
-
}
|
|
36
|
-
return html `<div class="${containerClasses.join(" ")}">
|
|
37
|
-
<div class="${prefix}--title-row">
|
|
38
|
-
<div class="${prefix}--title">
|
|
39
|
-
${title || "Provide additional feedback"}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
${showPrompt
|
|
43
|
-
? html `<div class="${prefix}--prompt">
|
|
44
|
-
${prompt || "What do you think of this response?"}
|
|
45
|
-
</div>`
|
|
46
|
-
: ""}
|
|
47
|
-
${categories?.length
|
|
48
|
-
? html `<div class="${prefix}--categories">
|
|
49
|
-
<ul class="${prefix}--tag-list-container" role="listbox">
|
|
50
|
-
${categories.map((value) => html `<li class="${prefix}--tag-list-item">
|
|
51
|
-
<cds-custom-chat-button
|
|
52
|
-
class="${prefix}--tag-list-button"
|
|
53
|
-
kind="primary"
|
|
54
|
-
size="sm"
|
|
55
|
-
type="button"
|
|
56
|
-
is-quick-action
|
|
57
|
-
role="option"
|
|
58
|
-
aria-pressed="${selectedCategories.has(value)}"
|
|
59
|
-
?is-selected=${selectedCategories.has(value)}
|
|
60
|
-
data-content="${value}"
|
|
61
|
-
?disabled=${isReadonly}
|
|
62
|
-
@click=${handleCategoryClick}
|
|
63
|
-
>
|
|
64
|
-
${value}
|
|
65
|
-
</cds-custom-chat-button>
|
|
66
|
-
</li>`)}
|
|
67
|
-
</ul>
|
|
68
|
-
</div>`
|
|
69
|
-
: ""}
|
|
70
|
-
${showTextArea
|
|
71
|
-
? html `<div class="${prefix}--feedback-text">
|
|
72
|
-
<cds-custom-textarea
|
|
73
|
-
id="${id}-text-area"
|
|
74
|
-
value="${textInput}"
|
|
75
|
-
class="${prefix}--feedback-text-area"
|
|
76
|
-
?disabled=${isReadonly}
|
|
77
|
-
placeholder="${placeholder || "Provide additional feedback..."}"
|
|
78
|
-
rows="3"
|
|
79
|
-
max-count="${MAX_TEXT_COUNT}"
|
|
80
|
-
@input=${handleTextInput}
|
|
81
|
-
></cds-custom-textarea>
|
|
82
|
-
</div>`
|
|
83
|
-
: ""}
|
|
84
|
-
${disclaimer
|
|
85
|
-
? html `<div class="${prefix}--disclaimer">
|
|
86
|
-
<cds-aichat-markdown>${disclaimer}</cds-aichat-markdown>
|
|
87
|
-
</div>`
|
|
88
|
-
: ""}
|
|
89
|
-
<div class="${prefix}--buttons">
|
|
90
|
-
<div class="${prefix}--cancel" data-rounded="bottom-left">
|
|
91
|
-
<cds-custom-button
|
|
92
|
-
?disabled=${isReadonly}
|
|
93
|
-
size="lg"
|
|
94
|
-
kind="secondary"
|
|
95
|
-
@click=${handleCancel}
|
|
96
|
-
>
|
|
97
|
-
${cancelLabel || "Cancel"}
|
|
98
|
-
</cds-custom-button>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="${prefix}--submit" data-rounded="bottom-right">
|
|
101
|
-
<cds-custom-button
|
|
102
|
-
?disabled=${isReadonly}
|
|
103
|
-
size="lg"
|
|
104
|
-
kind="primary"
|
|
105
|
-
@click=${handleSubmit}
|
|
106
|
-
>
|
|
107
|
-
${submitLabel || "Submit"}
|
|
108
|
-
</cds-custom-button>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>`;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { feedbackElementTemplate };
|
|
115
|
-
//# sourceMappingURL=feedback.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.template.js","sources":["../../../../src/components/feedback/src/feedback.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH;AACA,MAAM,cAAc,GAAG,IAAI;AAE3B;;AAEG;AACH,SAAS,uBAAuB,CAAC,kBAAqC,EAAA;IACpE,MAAM,EACJ,aAAa,EAAE,YAAY,EAC3B,aAAa,EAAE,YAAY,EAC3B,gBAAgB,EAAE,eAAe,EACjC,UAAU,EAAE,SAAS,EACrB,mBAAmB,EAAE,kBAAkB,EACvC,oBAAoB,EAAE,mBAAmB,EACzC,EAAE,EACF,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,GACZ,GAAG,kBAAkB;AAEtB,IAAA,MAAM,gBAAgB,GAAG,CAAC,GAAG,MAAM,CAAA,WAAA,CAAa,CAAC;IACjD,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA,WAAA,CAAa,CAAC;IAC/C;IAEA,OAAO,IAAI,CAAA,CAAA,YAAA,EAAe,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;kBACpC,MAAM,CAAA;oBACJ,MAAM,CAAA;AAChB,QAAA,EAAA,KAAK,IAAI,6BAA6B;;;MAG1C;AACA,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;AACrB,UAAA,EAAA,MAAM,IAAI,qCAAqC;AAC5C,cAAA;AACT,UAAE,EAAE;AACJ,IAAA,EAAA,UAAU,EAAE;AACZ,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;uBACV,MAAM,CAAA;cACf,UAAU,CAAC,GAAG,CACd,CAAC,KAAK,KACJ,IAAI,CAAA,CAAA,WAAA,EAAc,MAAM,CAAA;;6BAEX,MAAM,CAAA;;;;;;AAMC,kCAAA,EAAA,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AAC9B,iCAAA,EAAA,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC;oCAC5B,KAAK,CAAA;gCACT,UAAU;6BACb,mBAAmB;;sBAE1B,KAAK;;sBAEL,CACT;;AAEE,cAAA;AACT,UAAE,EAAE;MACJ;AACA,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;;kBAEf,EAAE,CAAA;qBACC,SAAS,CAAA;qBACT,MAAM,CAAA;wBACH,UAAU;AACP,yBAAA,EAAA,WAAW,IAAI,gCAAgC,CAAA;;yBAEjD,cAAc,CAAA;qBAClB,eAAe;;AAErB,cAAA;AACT,UAAE,EAAE;MACJ;AACA,UAAE,IAAI,CAAA,CAAA,YAAA,EAAe,MAAM,CAAA;iCACA,UAAU,CAAA;AAC5B,cAAA;AACT,UAAE,EAAE;kBACQ,MAAM,CAAA;oBACJ,MAAM,CAAA;;sBAEJ,UAAU;;;mBAGb,YAAY;;AAEnB,UAAA,EAAA,WAAW,IAAI,QAAQ;;;oBAGf,MAAM,CAAA;;sBAEJ,UAAU;;;mBAGb,YAAY;;AAEnB,UAAA,EAAA,WAAW,IAAI,QAAQ;;;;SAI1B;AACT;;;;"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
import { html } from 'lit';
|
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
|
-
import { iconLoader } from '@carbon/web-components/es-custom/globals/internal/icon-loader.js';
|
|
11
|
-
import ChevronDown16 from '@carbon/icons/es/chevron--down/16.js';
|
|
12
|
-
import prefix from '../../../globals/settings.js';
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Copyright IBM Corp. 2025
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*
|
|
20
|
-
* @license
|
|
21
|
-
*/
|
|
22
|
-
function reasoningStepsToggleTemplate(customElementClass) {
|
|
23
|
-
const { open, disabled, panelID, handleToggleClick, openLabelText, closedLabelText, } = customElementClass;
|
|
24
|
-
const labelText = open ? openLabelText : closedLabelText;
|
|
25
|
-
return html `
|
|
26
|
-
<button
|
|
27
|
-
class="${prefix}--reasoning-steps-toggle"
|
|
28
|
-
type="button"
|
|
29
|
-
aria-expanded=${open ? "true" : "false"}
|
|
30
|
-
aria-controls=${ifDefined(panelID)}
|
|
31
|
-
?disabled=${disabled}
|
|
32
|
-
@click=${handleToggleClick}
|
|
33
|
-
>
|
|
34
|
-
<span class="${prefix}--reasoning-steps-toggle-label">${labelText}</span>
|
|
35
|
-
<span class="${prefix}--reasoning-steps-toggle-caret" aria-hidden="true">
|
|
36
|
-
${iconLoader(ChevronDown16)}
|
|
37
|
-
</span>
|
|
38
|
-
</button>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { reasoningStepsToggleTemplate };
|
|
43
|
-
//# sourceMappingURL=reasoning-steps-toggle.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning-steps-toggle.template.js","sources":["../../../../src/components/reasoning-steps/src/reasoning-steps-toggle.template.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAUH,SAAS,4BAA4B,CACnC,kBAAiD,EAAA;AAEjD,IAAA,MAAM,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,GAAG,kBAAkB;IAEtB,MAAM,SAAS,GAAG,IAAI,GAAG,aAAa,GAAG,eAAe;AAExD,IAAA,OAAO,IAAI,CAAA;;eAEE,MAAM,CAAA;;AAEC,oBAAA,EAAA,IAAI,GAAG,MAAM,GAAG,OAAO;sBACvB,SAAS,CAAC,OAAO,CAAC;kBACtB,QAAQ;eACX,iBAAiB;;AAEX,mBAAA,EAAA,MAAM,mCAAmC,SAAS,CAAA;qBAClD,MAAM,CAAA;UACjB,UAAU,CAAC,aAAa,CAAC;;;GAGhC;AACH;;;;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import CDSAIChatCodeSnippetCard from "../components/code-snippet/src/code-snippet-card.js";
|
|
3
|
-
declare const CodeSnippetCard: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatCodeSnippetCard>>;
|
|
4
|
-
export default CodeSnippetCard;
|