@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.
Files changed (461) hide show
  1. package/README.md +0 -3
  2. package/custom-elements.json +4827 -2917
  3. package/es/components/card/src/card-footer.d.ts +1 -1
  4. package/es/components/card/src/card-footer.js +2 -1
  5. package/es/components/card/src/card-footer.js.map +1 -1
  6. package/es/components/card/src/card-footer.scss.js +1 -1
  7. package/es/components/card/src/card-steps.d.ts +1 -1
  8. package/es/components/card/src/card-steps.js +2 -1
  9. package/es/components/card/src/card-steps.js.map +1 -1
  10. package/es/components/card/src/card-steps.scss.js +1 -1
  11. package/es/components/card/src/card.d.ts +1 -1
  12. package/es/components/card/src/card.js +2 -1
  13. package/es/components/card/src/card.js.map +1 -1
  14. package/es/components/card/src/card.scss.js +1 -1
  15. package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
  16. package/es/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
  17. package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
  18. package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
  19. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
  20. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
  21. package/es/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
  22. package/es/components/chain-of-thought/src/chain-of-thought.js +3 -2
  23. package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
  24. package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
  25. package/es/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
  26. package/es/components/chain-of-thought/src/tool-call-data.js +2 -1
  27. package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
  28. package/es/components/chat-button/src/chat-button.d.ts +2 -2
  29. package/es/components/chat-button/src/chat-button.js +3 -2
  30. package/es/components/chat-button/src/chat-button.js.map +1 -1
  31. package/es/components/chat-button/src/chat-button.scss.js +1 -1
  32. package/es/components/chat-shell/index.d.ts +2 -0
  33. package/es/components/chat-shell/index.js +1 -0
  34. package/es/components/chat-shell/index.js.map +1 -1
  35. package/es/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
  36. package/es/components/chat-shell/src/aria-announcer-manager.js +104 -0
  37. package/es/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
  38. package/es/components/chat-shell/src/chat-header.d.ts +177 -0
  39. package/es/components/chat-shell/src/chat-header.js +415 -0
  40. package/es/components/chat-shell/src/chat-header.js.map +1 -0
  41. package/es/components/chat-shell/src/chat-header.scss.js +13 -0
  42. package/es/components/chat-shell/src/chat-header.scss.js.map +1 -0
  43. package/es/components/chat-shell/src/corner-manager.d.ts +35 -0
  44. package/es/components/chat-shell/src/corner-manager.js +87 -0
  45. package/es/components/chat-shell/src/corner-manager.js.map +1 -0
  46. package/es/components/chat-shell/src/initialization-manager.d.ts +44 -0
  47. package/es/components/chat-shell/src/initialization-manager.js +88 -0
  48. package/es/components/chat-shell/src/initialization-manager.js.map +1 -0
  49. package/es/components/chat-shell/src/panel.d.ts +14 -1
  50. package/es/components/chat-shell/src/panel.js +32 -4
  51. package/es/components/chat-shell/src/panel.js.map +1 -1
  52. package/es/components/chat-shell/src/panel.scss.js +1 -1
  53. package/es/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
  54. package/es/components/chat-shell/src/resize-observer-manager.js +219 -0
  55. package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -0
  56. package/es/components/chat-shell/src/shell.d.ts +54 -21
  57. package/es/components/chat-shell/src/shell.js +297 -287
  58. package/es/components/chat-shell/src/shell.js.map +1 -1
  59. package/es/components/chat-shell/src/shell.scss.js +1 -1
  60. package/es/components/chat-shell/src/slot-observer.d.ts +53 -0
  61. package/es/components/chat-shell/src/slot-observer.js +156 -0
  62. package/es/components/chat-shell/src/slot-observer.js.map +1 -0
  63. package/es/components/chat-shell/src/types.d.ts +66 -0
  64. package/es/components/chat-shell/src/types.js +8 -0
  65. package/es/components/chat-shell/src/types.js.map +1 -0
  66. package/es/components/chat-shell/src/workspace-manager.d.ts +12 -1
  67. package/es/components/chat-shell/src/workspace-manager.js +42 -2
  68. package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
  69. package/es/components/code-snippet/index.d.ts +3 -2
  70. package/es/components/code-snippet/index.js +1 -1
  71. package/es/components/code-snippet/src/code-snippet.d.ts +58 -15
  72. package/es/components/code-snippet/src/code-snippet.js +261 -95
  73. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  74. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  75. package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
  76. package/es/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
  77. package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
  78. package/es/components/code-snippet/src/codemirror/editor-manager.js +18 -3
  79. package/es/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
  80. package/es/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
  81. package/es/components/code-snippet/src/codemirror/language-controller.js +11 -5
  82. package/es/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
  83. package/es/components/code-snippet/src/codemirror/marker-utils.js +2 -1
  84. package/es/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
  85. package/es/components/code-snippet/src/codemirror/theme.d.ts +12 -0
  86. package/es/components/code-snippet/src/codemirror/theme.js +26 -2
  87. package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
  88. package/es/components/code-snippet/src/dom-utils.d.ts +1 -0
  89. package/es/components/code-snippet/src/dom-utils.js +12 -1
  90. package/es/components/code-snippet/src/dom-utils.js.map +1 -1
  91. package/es/components/code-snippet/src/layout-utils.d.ts +9 -1
  92. package/es/components/code-snippet/src/layout-utils.js +21 -16
  93. package/es/components/code-snippet/src/layout-utils.js.map +1 -1
  94. package/es/components/code-snippet/src/streaming-manager.js +7 -0
  95. package/es/components/code-snippet/src/streaming-manager.js.map +1 -1
  96. package/es/components/feedback/src/feedback-buttons.d.ts +2 -0
  97. package/es/components/feedback/src/feedback-buttons.js +65 -3
  98. package/es/components/feedback/src/feedback-buttons.js.map +1 -1
  99. package/es/components/feedback/src/feedback-buttons.scss.js +13 -0
  100. package/es/components/feedback/src/feedback-buttons.scss.js.map +1 -0
  101. package/es/components/feedback/src/feedback.d.ts +20 -10
  102. package/es/components/feedback/src/feedback.js +114 -20
  103. package/es/components/feedback/src/feedback.js.map +1 -1
  104. package/es/components/feedback/src/feedback.scss.js +1 -1
  105. package/es/components/markdown/src/markdown-renderer.d.ts +31 -21
  106. package/es/components/markdown/src/markdown-renderer.js +57 -48
  107. package/es/components/markdown/src/markdown-renderer.js.map +1 -1
  108. package/es/components/markdown/src/markdown.d.ts +34 -31
  109. package/es/components/markdown/src/markdown.js +221 -138
  110. package/es/components/markdown/src/markdown.js.map +1 -1
  111. package/es/components/markdown/src/markdown.scss.js +1 -1
  112. package/es/components/markdown/src/markdown.template.js +1 -1
  113. package/es/components/markdown/src/utils.d.ts +0 -4
  114. package/es/components/markdown/src/utils.js +1 -7
  115. package/es/components/markdown/src/utils.js.map +1 -1
  116. package/es/components/processing/src/processing.d.ts +1 -1
  117. package/es/components/processing/src/processing.js +2 -1
  118. package/es/components/processing/src/processing.js.map +1 -1
  119. package/es/components/processing/src/processing.scss.js +1 -1
  120. package/es/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
  121. package/es/components/reasoning-steps/src/reasoning-step.js +2 -1
  122. package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  123. package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
  124. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
  125. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
  126. package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
  127. package/es/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
  128. package/es/components/reasoning-steps/src/reasoning-steps.js +3 -5
  129. package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  130. package/es/components/table/src/table-pagination.template.js +3 -2
  131. package/es/components/table/src/table-pagination.template.js.map +1 -1
  132. package/es/components/table/src/table-skeleton.template.js +8 -6
  133. package/es/components/table/src/table-skeleton.template.js.map +1 -1
  134. package/es/components/table/src/table.d.ts +29 -3
  135. package/es/components/table/src/table.js +99 -6
  136. package/es/components/table/src/table.js.map +1 -1
  137. package/es/components/table/src/table.scss.js +1 -1
  138. package/es/components/table/src/table.template.js +11 -2
  139. package/es/components/table/src/table.template.js.map +1 -1
  140. package/es/components/toolbar/src/toolbar.d.ts +32 -5
  141. package/es/components/toolbar/src/toolbar.js +111 -47
  142. package/es/components/toolbar/src/toolbar.js.map +1 -1
  143. package/es/components/toolbar/src/toolbar.scss.js +1 -1
  144. package/es/components/truncated-text/index.d.ts +9 -0
  145. package/es/components/truncated-text/index.js +9 -0
  146. package/es/components/truncated-text/index.js.map +1 -0
  147. package/es/components/truncated-text/src/truncated-text.d.ts +81 -0
  148. package/es/components/truncated-text/src/truncated-text.js +282 -0
  149. package/es/components/truncated-text/src/truncated-text.js.map +1 -0
  150. package/es/components/truncated-text/src/truncated-text.scss.js +13 -0
  151. package/es/components/truncated-text/src/truncated-text.scss.js.map +1 -0
  152. package/es/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
  153. package/es/components/workspace-shell/src/header-collapsible-manager.js +223 -0
  154. package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
  155. package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
  156. package/es/components/workspace-shell/src/workspace-shell-body.js +2 -1
  157. package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
  158. package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
  159. package/es/components/workspace-shell/src/workspace-shell-footer.js +8 -6
  160. package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  161. package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  162. package/es/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
  163. package/es/components/workspace-shell/src/workspace-shell-header.js +88 -14
  164. package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
  165. package/es/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
  166. package/es/components/workspace-shell/src/workspace-shell.d.ts +16 -2
  167. package/es/components/workspace-shell/src/workspace-shell.js +77 -7
  168. package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
  169. package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  170. package/es/globals/scss/common.scss.js +13 -0
  171. package/es/globals/scss/common.scss.js.map +1 -0
  172. package/es/globals/utils/focus-utils.d.ts +57 -0
  173. package/es/globals/utils/focus-utils.js +180 -0
  174. package/es/globals/utils/focus-utils.js.map +1 -0
  175. package/es/react/card.d.ts +3 -6
  176. package/es/react/chain-of-thought-step.d.ts +1 -2
  177. package/es/react/chain-of-thought-toggle.d.ts +1 -2
  178. package/es/react/chain-of-thought.d.ts +1 -2
  179. package/es/react/chat-button.d.ts +2 -2
  180. package/es/react/chat-button.js +1 -1
  181. package/es/react/chat-header.d.ts +73 -0
  182. package/es/react/chat-header.js +55 -0
  183. package/es/react/chat-header.js.map +1 -0
  184. package/es/react/chat-shell.d.ts +1 -2
  185. package/es/react/code-snippet.d.ts +35 -2
  186. package/es/react/code-snippet.js +65 -9
  187. package/es/react/code-snippet.js.map +1 -1
  188. package/es/react/feedback-buttons.d.ts +1 -2
  189. package/es/react/feedback.d.ts +1 -2
  190. package/es/react/markdown.d.ts +1 -2
  191. package/es/react/markdown.js +11 -1
  192. package/es/react/markdown.js.map +1 -1
  193. package/es/react/panel.d.ts +1 -2
  194. package/es/react/processing.d.ts +1 -2
  195. package/es/react/reasoning-step.d.ts +1 -2
  196. package/es/react/reasoning-steps-toggle.d.ts +1 -2
  197. package/es/react/reasoning-steps.d.ts +1 -2
  198. package/es/react/tool-call-data.d.ts +1 -2
  199. package/es/react/toolbar.d.ts +14 -10
  200. package/es/react/toolbar.js +2 -0
  201. package/es/react/toolbar.js.map +1 -1
  202. package/es/react/utils/withWebComponentBridge.d.ts +5 -2
  203. package/es/react/utils/withWebComponentBridge.js +49 -1
  204. package/es/react/utils/withWebComponentBridge.js.map +1 -1
  205. package/es/react/workspace-shell.d.ts +4 -8
  206. package/es/testing/PageObjectId.d.ts +22 -0
  207. package/es/testing/PageObjectId.js +38 -0
  208. package/es/testing/PageObjectId.js.map +1 -0
  209. package/es/typings/overflow-menu.d.ts +30 -0
  210. package/es/typings/overflow-menu.js +8 -0
  211. package/es/typings/overflow-menu.js.map +1 -0
  212. package/es-custom/components/card/src/card-footer.d.ts +1 -1
  213. package/es-custom/components/card/src/card-footer.js +2 -1
  214. package/es-custom/components/card/src/card-footer.js.map +1 -1
  215. package/es-custom/components/card/src/card-footer.scss.js +1 -1
  216. package/es-custom/components/card/src/card-steps.d.ts +1 -1
  217. package/es-custom/components/card/src/card-steps.js +2 -1
  218. package/es-custom/components/card/src/card-steps.js.map +1 -1
  219. package/es-custom/components/card/src/card-steps.scss.js +1 -1
  220. package/es-custom/components/card/src/card.d.ts +1 -1
  221. package/es-custom/components/card/src/card.js +2 -1
  222. package/es-custom/components/card/src/card.js.map +1 -1
  223. package/es-custom/components/card/src/card.scss.js +1 -1
  224. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
  225. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
  226. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
  227. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
  228. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
  229. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
  230. package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
  231. package/es-custom/components/chain-of-thought/src/chain-of-thought.js +3 -2
  232. package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
  233. package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
  234. package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
  235. package/es-custom/components/chain-of-thought/src/tool-call-data.js +2 -1
  236. package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
  237. package/es-custom/components/chat-button/src/chat-button.d.ts +2 -2
  238. package/es-custom/components/chat-button/src/chat-button.js +3 -2
  239. package/es-custom/components/chat-button/src/chat-button.js.map +1 -1
  240. package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
  241. package/es-custom/components/chat-shell/index.d.ts +2 -0
  242. package/es-custom/components/chat-shell/index.js +1 -0
  243. package/es-custom/components/chat-shell/index.js.map +1 -1
  244. package/es-custom/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
  245. package/es-custom/components/chat-shell/src/aria-announcer-manager.js +104 -0
  246. package/es-custom/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
  247. package/es-custom/components/chat-shell/src/chat-header.d.ts +177 -0
  248. package/es-custom/components/chat-shell/src/chat-header.js +415 -0
  249. package/es-custom/components/chat-shell/src/chat-header.js.map +1 -0
  250. package/es-custom/components/chat-shell/src/chat-header.scss.js +13 -0
  251. package/es-custom/components/chat-shell/src/chat-header.scss.js.map +1 -0
  252. package/es-custom/components/chat-shell/src/corner-manager.d.ts +35 -0
  253. package/es-custom/components/chat-shell/src/corner-manager.js +87 -0
  254. package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -0
  255. package/es-custom/components/chat-shell/src/initialization-manager.d.ts +44 -0
  256. package/es-custom/components/chat-shell/src/initialization-manager.js +88 -0
  257. package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -0
  258. package/es-custom/components/chat-shell/src/panel.d.ts +14 -1
  259. package/es-custom/components/chat-shell/src/panel.js +32 -4
  260. package/es-custom/components/chat-shell/src/panel.js.map +1 -1
  261. package/es-custom/components/chat-shell/src/panel.scss.js +1 -1
  262. package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
  263. package/es-custom/components/chat-shell/src/resize-observer-manager.js +219 -0
  264. package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -0
  265. package/es-custom/components/chat-shell/src/shell.d.ts +54 -21
  266. package/es-custom/components/chat-shell/src/shell.js +297 -287
  267. package/es-custom/components/chat-shell/src/shell.js.map +1 -1
  268. package/es-custom/components/chat-shell/src/shell.scss.js +1 -1
  269. package/es-custom/components/chat-shell/src/slot-observer.d.ts +53 -0
  270. package/es-custom/components/chat-shell/src/slot-observer.js +156 -0
  271. package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -0
  272. package/es-custom/components/chat-shell/src/types.d.ts +66 -0
  273. package/es-custom/components/chat-shell/src/types.js +8 -0
  274. package/es-custom/components/chat-shell/src/types.js.map +1 -0
  275. package/es-custom/components/chat-shell/src/workspace-manager.d.ts +12 -1
  276. package/es-custom/components/chat-shell/src/workspace-manager.js +42 -2
  277. package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
  278. package/es-custom/components/code-snippet/index.d.ts +3 -2
  279. package/es-custom/components/code-snippet/index.js +1 -1
  280. package/es-custom/components/code-snippet/src/code-snippet.d.ts +58 -15
  281. package/es-custom/components/code-snippet/src/code-snippet.js +261 -95
  282. package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
  283. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  284. package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
  285. package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
  286. package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
  287. package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +18 -3
  288. package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
  289. package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
  290. package/es-custom/components/code-snippet/src/codemirror/language-controller.js +11 -5
  291. package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
  292. package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +2 -1
  293. package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
  294. package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +12 -0
  295. package/es-custom/components/code-snippet/src/codemirror/theme.js +26 -2
  296. package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
  297. package/es-custom/components/code-snippet/src/dom-utils.d.ts +1 -0
  298. package/es-custom/components/code-snippet/src/dom-utils.js +12 -1
  299. package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -1
  300. package/es-custom/components/code-snippet/src/layout-utils.d.ts +9 -1
  301. package/es-custom/components/code-snippet/src/layout-utils.js +21 -16
  302. package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
  303. package/es-custom/components/code-snippet/src/streaming-manager.js +7 -0
  304. package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -1
  305. package/es-custom/components/feedback/src/feedback-buttons.d.ts +2 -0
  306. package/es-custom/components/feedback/src/feedback-buttons.js +65 -3
  307. package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
  308. package/es-custom/components/feedback/src/feedback-buttons.scss.js +13 -0
  309. package/es-custom/components/feedback/src/feedback-buttons.scss.js.map +1 -0
  310. package/es-custom/components/feedback/src/feedback.d.ts +20 -10
  311. package/es-custom/components/feedback/src/feedback.js +114 -20
  312. package/es-custom/components/feedback/src/feedback.js.map +1 -1
  313. package/es-custom/components/feedback/src/feedback.scss.js +1 -1
  314. package/es-custom/components/markdown/src/markdown-renderer.d.ts +31 -21
  315. package/es-custom/components/markdown/src/markdown-renderer.js +57 -48
  316. package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
  317. package/es-custom/components/markdown/src/markdown.d.ts +34 -31
  318. package/es-custom/components/markdown/src/markdown.js +221 -138
  319. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  320. package/es-custom/components/markdown/src/markdown.scss.js +1 -1
  321. package/es-custom/components/markdown/src/markdown.template.js +1 -1
  322. package/es-custom/components/markdown/src/utils.d.ts +0 -4
  323. package/es-custom/components/markdown/src/utils.js +1 -7
  324. package/es-custom/components/markdown/src/utils.js.map +1 -1
  325. package/es-custom/components/processing/src/processing.d.ts +1 -1
  326. package/es-custom/components/processing/src/processing.js +2 -1
  327. package/es-custom/components/processing/src/processing.js.map +1 -1
  328. package/es-custom/components/processing/src/processing.scss.js +1 -1
  329. package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
  330. package/es-custom/components/reasoning-steps/src/reasoning-step.js +2 -1
  331. package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  332. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
  333. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
  334. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
  335. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
  336. package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
  337. package/es-custom/components/reasoning-steps/src/reasoning-steps.js +3 -5
  338. package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  339. package/es-custom/components/table/src/table-pagination.template.js +3 -2
  340. package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
  341. package/es-custom/components/table/src/table-skeleton.template.js +8 -6
  342. package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
  343. package/es-custom/components/table/src/table.d.ts +29 -3
  344. package/es-custom/components/table/src/table.js +99 -6
  345. package/es-custom/components/table/src/table.js.map +1 -1
  346. package/es-custom/components/table/src/table.scss.js +1 -1
  347. package/es-custom/components/table/src/table.template.js +11 -2
  348. package/es-custom/components/table/src/table.template.js.map +1 -1
  349. package/es-custom/components/toolbar/src/toolbar.d.ts +32 -5
  350. package/es-custom/components/toolbar/src/toolbar.js +111 -47
  351. package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
  352. package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
  353. package/es-custom/components/truncated-text/index.d.ts +9 -0
  354. package/es-custom/components/truncated-text/index.js +9 -0
  355. package/es-custom/components/truncated-text/index.js.map +1 -0
  356. package/es-custom/components/truncated-text/src/truncated-text.d.ts +81 -0
  357. package/es-custom/components/truncated-text/src/truncated-text.js +282 -0
  358. package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -0
  359. package/es-custom/components/truncated-text/src/truncated-text.scss.js +13 -0
  360. package/es-custom/components/truncated-text/src/truncated-text.scss.js.map +1 -0
  361. package/es-custom/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
  362. package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +223 -0
  363. package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
  364. package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
  365. package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -1
  366. package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
  367. package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
  368. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +8 -6
  369. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  370. package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  371. package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
  372. package/es-custom/components/workspace-shell/src/workspace-shell-header.js +88 -14
  373. package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
  374. package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
  375. package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +16 -2
  376. package/es-custom/components/workspace-shell/src/workspace-shell.js +77 -7
  377. package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -1
  378. package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  379. package/es-custom/globals/scss/common.scss.js +13 -0
  380. package/es-custom/globals/scss/common.scss.js.map +1 -0
  381. package/es-custom/globals/utils/focus-utils.d.ts +57 -0
  382. package/es-custom/globals/utils/focus-utils.js +180 -0
  383. package/es-custom/globals/utils/focus-utils.js.map +1 -0
  384. package/es-custom/react/card.d.ts +3 -6
  385. package/es-custom/react/chain-of-thought-step.d.ts +1 -2
  386. package/es-custom/react/chain-of-thought-toggle.d.ts +1 -2
  387. package/es-custom/react/chain-of-thought.d.ts +1 -2
  388. package/es-custom/react/chat-button.d.ts +2 -2
  389. package/es-custom/react/chat-button.js +1 -1
  390. package/es-custom/react/chat-header.d.ts +73 -0
  391. package/es-custom/react/chat-header.js +55 -0
  392. package/es-custom/react/chat-header.js.map +1 -0
  393. package/es-custom/react/chat-shell.d.ts +1 -2
  394. package/es-custom/react/code-snippet.d.ts +35 -2
  395. package/es-custom/react/code-snippet.js +65 -9
  396. package/es-custom/react/code-snippet.js.map +1 -1
  397. package/es-custom/react/feedback-buttons.d.ts +1 -2
  398. package/es-custom/react/feedback.d.ts +1 -2
  399. package/es-custom/react/markdown.d.ts +1 -2
  400. package/es-custom/react/markdown.js +11 -1
  401. package/es-custom/react/markdown.js.map +1 -1
  402. package/es-custom/react/panel.d.ts +1 -2
  403. package/es-custom/react/processing.d.ts +1 -2
  404. package/es-custom/react/reasoning-step.d.ts +1 -2
  405. package/es-custom/react/reasoning-steps-toggle.d.ts +1 -2
  406. package/es-custom/react/reasoning-steps.d.ts +1 -2
  407. package/es-custom/react/tool-call-data.d.ts +1 -2
  408. package/es-custom/react/toolbar.d.ts +14 -10
  409. package/es-custom/react/toolbar.js +2 -0
  410. package/es-custom/react/toolbar.js.map +1 -1
  411. package/es-custom/react/utils/withWebComponentBridge.d.ts +5 -2
  412. package/es-custom/react/utils/withWebComponentBridge.js +49 -1
  413. package/es-custom/react/utils/withWebComponentBridge.js.map +1 -1
  414. package/es-custom/react/workspace-shell.d.ts +4 -8
  415. package/es-custom/testing/PageObjectId.d.ts +22 -0
  416. package/es-custom/testing/PageObjectId.js +38 -0
  417. package/es-custom/testing/PageObjectId.js.map +1 -0
  418. package/es-custom/typings/overflow-menu.d.ts +30 -0
  419. package/es-custom/typings/overflow-menu.js +8 -0
  420. package/es-custom/typings/overflow-menu.js.map +1 -0
  421. package/package.json +6 -4
  422. package/scss/_custom-properties.scss +70 -0
  423. package/scss/_modifiers.scss +231 -0
  424. package/scss/_tokens-component.scss +30 -0
  425. package/scss/_tokens-layout.scss +29 -0
  426. package/scss/_utilities.scss +32 -0
  427. package/scss/common.scss +150 -0
  428. package/scss/grid.scss +11 -0
  429. package/scss/themes.scss +33 -0
  430. package/scss/vars.scss +12 -0
  431. package/telemetry.yml +73 -33
  432. package/es/components/code-snippet/src/code-snippet-card.d.ts +0 -63
  433. package/es/components/code-snippet/src/code-snippet-card.js +0 -187
  434. package/es/components/code-snippet/src/code-snippet-card.js.map +0 -1
  435. package/es/components/feedback/src/feedback-buttons.template.d.ts +0 -4
  436. package/es/components/feedback/src/feedback-buttons.template.js +0 -79
  437. package/es/components/feedback/src/feedback-buttons.template.js.map +0 -1
  438. package/es/components/feedback/src/feedback.template.d.ts +0 -12
  439. package/es/components/feedback/src/feedback.template.js +0 -115
  440. package/es/components/feedback/src/feedback.template.js.map +0 -1
  441. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
  442. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
  443. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
  444. package/es/react/code-snippet-card.d.ts +0 -4
  445. package/es/react/code-snippet-card.js +0 -31
  446. package/es/react/code-snippet-card.js.map +0 -1
  447. package/es-custom/components/code-snippet/src/code-snippet-card.d.ts +0 -63
  448. package/es-custom/components/code-snippet/src/code-snippet-card.js +0 -187
  449. package/es-custom/components/code-snippet/src/code-snippet-card.js.map +0 -1
  450. package/es-custom/components/feedback/src/feedback-buttons.template.d.ts +0 -4
  451. package/es-custom/components/feedback/src/feedback-buttons.template.js +0 -79
  452. package/es-custom/components/feedback/src/feedback-buttons.template.js.map +0 -1
  453. package/es-custom/components/feedback/src/feedback.template.d.ts +0 -12
  454. package/es-custom/components/feedback/src/feedback.template.js +0 -115
  455. package/es-custom/components/feedback/src/feedback.template.js.map +0 -1
  456. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
  457. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
  458. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
  459. package/es-custom/react/code-snippet-card.d.ts +0 -4
  460. package/es-custom/react/code-snippet-card.js +0 -31
  461. package/es-custom/react/code-snippet-card.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { LitElement } from "lit";
1
+ import { LitElement, PropertyValues } from "lit";
2
2
  /**
3
3
  * Workspace Shell.
4
4
  *
@@ -11,7 +11,21 @@ import { LitElement } from "lit";
11
11
  *
12
12
  */
13
13
  declare class CDSAIChatWorkspaceShell extends LitElement {
14
- static styles: any;
14
+ static styles: any[];
15
+ /**
16
+ * Enable automatic header collapsible behavior based on available space.
17
+ * When true, the header will automatically become collapsible when the
18
+ * body would have less space than the header. This prop is currently experimental
19
+ * and is subject to future changes.
20
+ *
21
+ * @experimental
22
+ */
23
+ autoCollapsibleHeader: boolean;
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ updated(changedProperties: PropertyValues): void;
27
+ private cleanupHeaderCollapsible;
28
+ private setupHeaderCollapsibleManager;
15
29
  render(): import("lit-html").TemplateResult<1>;
16
30
  }
17
31
  export { CDSAIChatWorkspaceShell };
@@ -7,12 +7,15 @@
7
7
 
8
8
  import { __decorate } from 'tslib';
9
9
  import { LitElement, html } from 'lit';
10
+ import { property } from 'lit/decorators.js';
10
11
  import { carbonElement } from '../../../globals/decorators/carbon-element.js';
11
12
  import prefix from '../../../globals/settings.js';
13
+ import commonStyles from '../../../globals/scss/common.scss.js';
12
14
  import styles from './workspace-shell.scss.js';
15
+ import { HeaderCollapsibleManager } from './header-collapsible-manager.js';
13
16
 
14
17
  /*
15
- * Copyright IBM Corp. 2025
18
+ * Copyright IBM Corp. 2026
16
19
  *
17
20
  * This source code is licensed under the Apache-2.0 license found in the
18
21
  * LICENSE file in the root directory of this source tree.
@@ -31,21 +34,88 @@ import styles from './workspace-shell.scss.js';
31
34
  *
32
35
  */
33
36
  let CDSAIChatWorkspaceShell = class CDSAIChatWorkspaceShell extends LitElement {
37
+ constructor() {
38
+ super(...arguments);
39
+ /**
40
+ * Enable automatic header collapsible behavior based on available space.
41
+ * When true, the header will automatically become collapsible when the
42
+ * body would have less space than the header. This prop is currently experimental
43
+ * and is subject to future changes.
44
+ *
45
+ * @experimental
46
+ */
47
+ this.autoCollapsibleHeader = false;
48
+ }
49
+ connectedCallback() {
50
+ super.connectedCallback();
51
+ this.setupHeaderCollapsibleManager();
52
+ }
53
+ disconnectedCallback() {
54
+ super.disconnectedCallback();
55
+ this.headerCollapsibleManager?.disconnect();
56
+ }
57
+ updated(changedProperties) {
58
+ super.updated(changedProperties);
59
+ // If autoCollapsibleHeader changes, setup or teardown manager
60
+ if (changedProperties.has("autoCollapsibleHeader")) {
61
+ if (this.autoCollapsibleHeader) {
62
+ this.setupHeaderCollapsibleManager();
63
+ }
64
+ else {
65
+ // Clean up: remove collapsible attribute from header before disconnecting
66
+ this.cleanupHeaderCollapsible();
67
+ this.headerCollapsibleManager?.disconnect();
68
+ this.headerCollapsibleManager = undefined;
69
+ }
70
+ }
71
+ }
72
+ cleanupHeaderCollapsible() {
73
+ if (!this.shadowRoot) {
74
+ return;
75
+ }
76
+ const headerSlot = this.shadowRoot.querySelector('slot[name="header"]');
77
+ const headerElement = headerSlot?.assignedElements()[0];
78
+ if (headerElement) {
79
+ headerElement.removeAttribute("collapsible");
80
+ }
81
+ }
82
+ setupHeaderCollapsibleManager() {
83
+ // Only setup if feature is enabled
84
+ if (!this.autoCollapsibleHeader) {
85
+ return;
86
+ }
87
+ // Don't create a new manager if one already exists
88
+ if (this.headerCollapsibleManager) {
89
+ return;
90
+ }
91
+ this.updateComplete.then(() => {
92
+ if (!this.shadowRoot) {
93
+ return;
94
+ }
95
+ // Double-check in case manager was created while waiting for updateComplete
96
+ if (this.headerCollapsibleManager) {
97
+ return;
98
+ }
99
+ this.headerCollapsibleManager = new HeaderCollapsibleManager(this.shadowRoot, this);
100
+ this.headerCollapsibleManager.connect((state) => {
101
+ this.headerCollapsibleManager?.updateHeaderCollapsible(state.shouldCollapse);
102
+ });
103
+ });
104
+ }
34
105
  render() {
35
106
  return html `
36
107
  <slot name="toolbar"></slot>
37
108
  <slot name="notification"></slot>
38
109
  <slot name="header"></slot>
39
- </div>
40
- <div class="body">
41
- <slot name="body"></slot>
42
- </div>
110
+ <slot name="body"></slot>
43
111
  <slot name="footer"></slot>
44
- </div>
45
112
  `;
46
113
  }
47
114
  };
48
- CDSAIChatWorkspaceShell.styles = styles;
115
+ CDSAIChatWorkspaceShell.styles = [commonStyles, styles];
116
+ __decorate([
117
+ property({ type: Boolean, attribute: "auto-collapsible-header" })
118
+ ], CDSAIChatWorkspaceShell.prototype, "autoCollapsibleHeader", void 0);
49
119
  CDSAIChatWorkspaceShell = __decorate([
50
120
  carbonElement(`${prefix}-workspace-shell`)
51
121
  ], CDSAIChatWorkspaceShell);
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-shell.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH;;;;;;;;;;AAUG;AAEH,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU,CAAA;IAG9C,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA;;;;;;;;;;KAUV;IACH;;AAdO,uBAAA,CAAA,MAAM,GAAG,MAAH;AADT,uBAAuB,GAAA,UAAA,CAAA;AAD5B,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB;AACpC,CAAA,EAAA,uBAAuB,CAgB5B;AAGD,gCAAe,uBAAuB;;;;"}
1
+ {"version":3,"file":"workspace-shell.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAUH;;;;;;;;;;AAUG;AAEH,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU,CAAA;AAAhD,IAAA,WAAA,GAAA;;AAGE;;;;;;;AAOG;QAEH,IAAA,CAAA,qBAAqB,GAAG,KAAK;IA2F/B;IApFE,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,6BAA6B,EAAE;IACtC;IAEA,oBAAoB,GAAA;QAClB,KAAK,CAAC,oBAAoB,EAAE;AAC5B,QAAA,IAAI,CAAC,wBAAwB,EAAE,UAAU,EAAE;IAC7C;AAEA,IAAA,OAAO,CAAC,iBAAiC,EAAA;AACvC,QAAA,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;;AAGhC,QAAA,IAAI,iBAAiB,CAAC,GAAG,CAAC,uBAAuB,CAAC,EAAE;AAClD,YAAA,IAAI,IAAI,CAAC,qBAAqB,EAAE;gBAC9B,IAAI,CAAC,6BAA6B,EAAE;YACtC;iBAAO;;gBAEL,IAAI,CAAC,wBAAwB,EAAE;AAC/B,gBAAA,IAAI,CAAC,wBAAwB,EAAE,UAAU,EAAE;AAC3C,gBAAA,IAAI,CAAC,wBAAwB,GAAG,SAAS;YAC3C;QACF;IACF;IAEQ,wBAAwB,GAAA;AAC9B,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB;QACF;QAEA,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAC9C,qBAAqB,CACtB;QACD,MAAM,aAAa,GAAG,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAgB;QAEtE,IAAI,aAAa,EAAE;AACjB,YAAA,aAAa,CAAC,eAAe,CAAC,aAAa,CAAC;QAC9C;IACF;IAEQ,6BAA6B,GAAA;;AAEnC,QAAA,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAC/B;QACF;;AAGA,QAAA,IAAI,IAAI,CAAC,wBAAwB,EAAE;YACjC;QACF;AAEA,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAK;AAC5B,YAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB;YACF;;AAGA,YAAA,IAAI,IAAI,CAAC,wBAAwB,EAAE;gBACjC;YACF;AAEA,YAAA,IAAI,CAAC,wBAAwB,GAAG,IAAI,wBAAwB,CAC1D,IAAI,CAAC,UAAU,EACf,IAAI,CACL;YAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;gBAC9C,IAAI,CAAC,wBAAwB,EAAE,uBAAuB,CACpD,KAAK,CAAC,cAAc,CACrB;AACH,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;IACJ;IAEA,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA;;;;;;KAMV;IACH;;AArGO,uBAAA,CAAA,MAAM,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC;AAWtC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE;AACnC,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,uBAAA,EAAA,MAAA,CAAA;AAZ1B,uBAAuB,GAAA,UAAA,CAAA;AAD5B,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB;AACpC,CAAA,EAAA,uBAAuB,CAuG5B;AAGD,gCAAe,uBAAuB;;;;"}
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { css } from 'lit';
9
9
 
10
- var styles = css(["a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{font-feature-settings:\"liga\" 1;border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{background-color:var(--cds-background,#fff);color:var(--cds-text-primary,#161616);line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif;font-weight:400;text-rendering:optimizeLegibility}code{font-family:IBM Plex Mono,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,monospace}strong{font-weight:600}@media screen and (-ms-high-contrast:active){svg{fill:ButtonText}}h1{font-size:var(--cds-heading-06-font-size,2.625rem);font-weight:var(--cds-heading-06-font-weight,300);letter-spacing:var(--cds-heading-06-letter-spacing,0);line-height:var(--cds-heading-06-line-height,1.199)}h2{font-size:var(--cds-heading-05-font-size,2rem);font-weight:var(--cds-heading-05-font-weight,400);letter-spacing:var(--cds-heading-05-letter-spacing,0);line-height:var(--cds-heading-05-line-height,1.25)}h3{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}h4{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}h5{font-size:var(--cds-heading-02-font-size,1rem);font-weight:var(--cds-heading-02-font-weight,600);letter-spacing:var(--cds-heading-02-letter-spacing,0);line-height:var(--cds-heading-02-line-height,1.5)}h6{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}p{font-size:var(--cds-body-02-font-size,1rem);font-weight:var(--cds-body-02-font-weight,400);letter-spacing:var(--cds-body-02-letter-spacing,0);line-height:var(--cds-body-02-line-height,1.5)}a{color:var(--cds-link-primary,#0062fe)}em{font-style:italic}.workspace{block-size:100%;display:flex;flex-direction:row;inline-size:100%;max-block-size:100%;max-inline-size:100%;overflow:hidden}.body{flex-grow:1}:host(cds-aichat-workspace-shell){background-color:var(--cds-chat-shell-background);block-size:100%;border:.0625rem solid var(--cds-chat-bubble-border,#e0e0e0);border-radius:.5rem;box-shadow:-10px 0 100px -24px var(--cds-ai-popover-shadow-outer-01,rgba(0,67,206,.06)),0 10px 40px -24px var(--cds-ai-popover-shadow-outer-02,rgba(0,0,0,.04));box-sizing:border-box!important;color:var(--cds-text-secondary,#525252);display:flex;flex-direction:column;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);inline-size:100%;letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);overflow:hidden}:host(cds-aichat-workspace-shell) slot[name=toolbar]{min-inline-size:0}:host(cds-aichat-workspace-shell) ::slotted([slot=notification]){box-sizing:border-box;max-inline-size:100%!important}::slotted(cds-aichat-toolbar){border-block-end:.0625rem solid var(--cds-chat-bubble-border);box-sizing:border-box;display:grid;inline-size:100%;max-inline-size:100%;min-inline-size:0}.cds-aichat-workspace-shell__toolbar-action{display:grid;grid-auto-columns:2.5rem;grid-auto-flow:column}.cds-aichat-workspace-shell__toolbar-action ::slotted(cds-ai-label){block-size:2.5rem}:host(cds-aichat-workspace-shell-body){block-size:100%;display:block;min-block-size:0;overflow:auto;padding:1.5rem 2rem}"]);
10
+ var styles = css([":host(cds-aichat-workspace-shell){background-color:var(--cds-chat-shell-background);block-size:100%;border:.0625rem solid var(--cds-chat-bubble-border,#e0e0e0);border-radius:.5rem;box-shadow:-10px 0 100px -24px var(--cds-ai-popover-shadow-outer-01,rgba(0,67,206,.06)),0 10px 40px -24px var(--cds-ai-popover-shadow-outer-02,rgba(0,0,0,.04));box-sizing:border-box!important;color:var(--cds-text-secondary,#525252);display:flex;flex-direction:column;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);inline-size:100%;letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);min-block-size:25rem}:host(cds-aichat-workspace-shell) slot[name=toolbar]{flex-shrink:0;min-inline-size:0}:host(cds-aichat-workspace-shell) slot[name=notification]{flex-shrink:0}:host(cds-aichat-workspace-shell) ::slotted([slot=notification]){box-sizing:border-box;max-inline-size:100%!important}:host(cds-aichat-workspace-shell) slot[name=header]{flex-shrink:0}:host(cds-aichat-workspace-shell) slot[name=body]{flex:1 1 auto;min-block-size:0}:host(cds-aichat-workspace-shell) slot[name=footer]{flex-shrink:0}::slotted(cds-aichat-toolbar){border-block-end:.0625rem solid var(--cds-chat-bubble-border);box-sizing:border-box;inline-size:100%;max-inline-size:100%;min-inline-size:0}.cds-aichat-workspace-shell__toolbar-action{display:grid;grid-auto-columns:2.5rem;grid-auto-flow:column}.cds-aichat-workspace-shell__toolbar-action ::slotted(cds-ai-label){block-size:2.5rem}:host(cds-aichat-workspace-shell-body){display:flex;flex-direction:column;min-block-size:0;overflow:auto;padding:1.5rem 2rem}"]);
11
11
 
12
12
  export { styles as default };
13
13
  //# sourceMappingURL=workspace-shell.scss.js.map
@@ -0,0 +1,13 @@
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 { css } from 'lit';
9
+
10
+ var commonStyles = css([".cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}:host{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px;border:0;box-sizing:border-box;font-family:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}:host *,:host :after,:host :before{box-sizing:inherit}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:1em;margin:0;padding:0;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:none}table{border-collapse:collapse;border-spacing:0}"]);
11
+
12
+ export { commonStyles as default };
13
+ //# sourceMappingURL=common.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Gets the deepest active element, traversing through all shadow DOM boundaries.
3
+ * This handles nested shadow roots, slotted elements, and will return the actual
4
+ * focused element regardless of how many shadow DOM levels exist.
5
+ *
6
+ * @returns The deepest active element, or null if no element has focus
7
+ */
8
+ declare function getDeepActiveElement(): Element | null;
9
+ /**
10
+ * Checks if an element should be ignored due to visibility or accessibility attributes.
11
+ *
12
+ * @param element - The DOM element to check
13
+ * @param exceptions - Array of selectors to ignore when checking the element (e.g., 'dialog', '[popover]')
14
+ * @returns True if the element should be ignored by focus management, false otherwise
15
+ */
16
+ declare function isElementInvisible(element: Element, exceptions?: string[]): boolean;
17
+ /**
18
+ * Checks if an element is focusable. An element is considered focusable if it matches
19
+ * standard focusable elements criteria (such as buttons, inputs, etc., that are not disabled
20
+ * and do not have a negative tabindex) or is a custom element with a shadow root that delegates focus.
21
+ * Based on https://gist.github.com/oscarmarina/9ce95f491a4c53ed01d989de4a87c0c9
22
+ *
23
+ * @param element - The DOM element to check for focusability
24
+ * @returns True if the element is focusable, false otherwise
25
+ */
26
+ declare function isFocusable(element: Element): boolean;
27
+ /**
28
+ * Attempts to focus an element if it's focusable, visible, and not disabled.
29
+ * This is an enhanced version that checks visibility, accessibility attributes,
30
+ * and proper focusability before attempting to set focus. It is shadow DOM aware
31
+ * and handles slotted elements correctly.
32
+ *
33
+ * @param element - The element to attempt to focus
34
+ * @param exceptions - Array of selectors to ignore when checking visibility (e.g., 'dialog', '[popover]')
35
+ * @returns True if focus was successfully set, false otherwise
36
+ */
37
+ declare function tryFocus(element: Element | null | undefined, exceptions?: string[]): boolean;
38
+ /**
39
+ * Traverse the composed tree from the root, selecting elements that meet the provided filter criteria.
40
+ * This function properly handles Shadow DOM boundaries.
41
+ * Based on https://github.com/JanMiksovsky/elix/blob/main/src/core/dom.js#L320
42
+ *
43
+ * @param node - The root node for traversal
44
+ * @param whatToShow - NodeFilter code for node types to include (use 0 to retrieve all nodes)
45
+ * @param filter - Filters nodes. Child nodes are considered even if parent does not satisfy the filter
46
+ * @param skipNode - Determines whether to skip a node and its children
47
+ * @returns An iterator yielding nodes meeting the filter criteria
48
+ */
49
+ declare function walkComposedTree(node: Node, whatToShow?: number, filter?: (node: Node) => boolean, skipNode?: (node: Node) => boolean): IterableIterator<Node>;
50
+ /**
51
+ * Retrieves the first and last focusable children of a node using a TreeWalker.
52
+ *
53
+ * @param walker - The TreeWalker object used to traverse the node's children
54
+ * @returns A tuple containing the first and last focusable children. If no focusable children are found, `null` is returned for both
55
+ */
56
+ declare function getFirstAndLastFocusableChildren(walker: IterableIterator<HTMLElement>): [first: HTMLElement | null, last: HTMLElement | null];
57
+ export { getDeepActiveElement, isElementInvisible, isFocusable, tryFocus, walkComposedTree, getFirstAndLastFocusableChildren, };
@@ -0,0 +1,180 @@
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
+ * Copyright IBM Corp. 2026
10
+ *
11
+ * This source code is licensed under the Apache-2.0 license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ *
14
+ * @license
15
+ */
16
+ /**
17
+ * Gets the deepest active element, traversing through all shadow DOM boundaries.
18
+ * This handles nested shadow roots, slotted elements, and will return the actual
19
+ * focused element regardless of how many shadow DOM levels exist.
20
+ *
21
+ * @returns The deepest active element, or null if no element has focus
22
+ */
23
+ function getDeepActiveElement() {
24
+ let activeElement = document.activeElement;
25
+ // Traverse through all shadow DOM levels and handle slotted elements
26
+ while (activeElement) {
27
+ // If the active element is a slot, get the actual assigned element that has focus
28
+ if (activeElement instanceof HTMLSlotElement) {
29
+ const assignedElements = activeElement.assignedElements({
30
+ flatten: true,
31
+ });
32
+ // Find which assigned element actually has focus
33
+ const focusedAssigned = assignedElements.find((el) => {
34
+ if (el.shadowRoot?.activeElement) {
35
+ return true;
36
+ }
37
+ return (el === document.activeElement || el.contains(document.activeElement));
38
+ });
39
+ if (focusedAssigned) {
40
+ activeElement = focusedAssigned;
41
+ continue;
42
+ }
43
+ }
44
+ // Check if there's a shadow root with an active element
45
+ const shadowRoot = activeElement.shadowRoot;
46
+ if (shadowRoot?.activeElement) {
47
+ activeElement = shadowRoot.activeElement;
48
+ continue;
49
+ }
50
+ // No deeper level found
51
+ break;
52
+ }
53
+ return activeElement;
54
+ }
55
+ /**
56
+ * Checks if an element should be ignored due to visibility or accessibility attributes.
57
+ *
58
+ * @param element - The DOM element to check
59
+ * @param exceptions - Array of selectors to ignore when checking the element (e.g., 'dialog', '[popover]')
60
+ * @returns True if the element should be ignored by focus management, false otherwise
61
+ */
62
+ function isElementInvisible(element, exceptions = ["dialog", "[popover]"]) {
63
+ if (!element || !(element instanceof HTMLElement)) {
64
+ return false;
65
+ }
66
+ if (exceptions.length > 0 && element.matches(exceptions.join(","))) {
67
+ return false;
68
+ }
69
+ const computedStyle = window.getComputedStyle(element);
70
+ const isStyleHidden = computedStyle.display === "none" || computedStyle.visibility === "hidden";
71
+ const isAttributeHidden = element.matches('[disabled], [hidden], [inert], [aria-hidden="true"]');
72
+ return isStyleHidden || isAttributeHidden;
73
+ }
74
+ /**
75
+ * Checks if an element is focusable. An element is considered focusable if it matches
76
+ * standard focusable elements criteria (such as buttons, inputs, etc., that are not disabled
77
+ * and do not have a negative tabindex) or is a custom element with a shadow root that delegates focus.
78
+ * Based on https://gist.github.com/oscarmarina/9ce95f491a4c53ed01d989de4a87c0c9
79
+ *
80
+ * @param element - The DOM element to check for focusability
81
+ * @returns True if the element is focusable, false otherwise
82
+ */
83
+ function isFocusable(element) {
84
+ if (!(element instanceof HTMLElement)) {
85
+ return false;
86
+ }
87
+ // https://stackoverflow.com/a/30753870/76472
88
+ const knownFocusableElements = 'a[href],area[href],button:not([disabled]),details,iframe,object,input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[contentEditable="true"],[tabindex]:not([tabindex^="-"])';
89
+ if (element.matches(knownFocusableElements)) {
90
+ return true;
91
+ }
92
+ const isDisabledCustomElement = element.localName.includes("-") &&
93
+ element.matches('[disabled], [aria-disabled="true"]');
94
+ if (isDisabledCustomElement) {
95
+ return false;
96
+ }
97
+ return element.shadowRoot?.delegatesFocus ?? false;
98
+ }
99
+ /**
100
+ * Attempts to focus an element if it's focusable, visible, and not disabled.
101
+ * This is an enhanced version that checks visibility, accessibility attributes,
102
+ * and proper focusability before attempting to set focus. It is shadow DOM aware
103
+ * and handles slotted elements correctly.
104
+ *
105
+ * @param element - The element to attempt to focus
106
+ * @param exceptions - Array of selectors to ignore when checking visibility (e.g., 'dialog', '[popover]')
107
+ * @returns True if focus was successfully set, false otherwise
108
+ */
109
+ function tryFocus(element, exceptions) {
110
+ if (!element || !(element instanceof HTMLElement)) {
111
+ return false;
112
+ }
113
+ // Check if element is invisible or should be ignored
114
+ if (isElementInvisible(element, exceptions)) {
115
+ return false;
116
+ }
117
+ // Check if element is focusable
118
+ if (!isFocusable(element)) {
119
+ return false;
120
+ }
121
+ // Get the current deep active element (shadow DOM aware)
122
+ const previousActiveElement = getDeepActiveElement();
123
+ // Only call focus if the element doesn't already have focus
124
+ if (previousActiveElement !== element) {
125
+ element.focus();
126
+ }
127
+ // Verify focus was actually set by checking the deep active element
128
+ // This works across shadow DOM boundaries, with slotted elements, and delegatesFocus configurations
129
+ const currentActiveElement = getDeepActiveElement();
130
+ return (currentActiveElement === element || element.contains(currentActiveElement));
131
+ }
132
+ /**
133
+ * Traverse the composed tree from the root, selecting elements that meet the provided filter criteria.
134
+ * This function properly handles Shadow DOM boundaries.
135
+ * Based on https://github.com/JanMiksovsky/elix/blob/main/src/core/dom.js#L320
136
+ *
137
+ * @param node - The root node for traversal
138
+ * @param whatToShow - NodeFilter code for node types to include (use 0 to retrieve all nodes)
139
+ * @param filter - Filters nodes. Child nodes are considered even if parent does not satisfy the filter
140
+ * @param skipNode - Determines whether to skip a node and its children
141
+ * @returns An iterator yielding nodes meeting the filter criteria
142
+ */
143
+ function* walkComposedTree(node, whatToShow = 0, filter = () => true, skipNode = () => false) {
144
+ if ((whatToShow && node.nodeType !== whatToShow) || skipNode(node)) {
145
+ return;
146
+ }
147
+ if (filter(node)) {
148
+ yield node;
149
+ }
150
+ const children =
151
+ // eslint-disable-next-line no-nested-ternary
152
+ node instanceof HTMLElement && node.shadowRoot
153
+ ? node.shadowRoot.children
154
+ : node instanceof HTMLSlotElement
155
+ ? node.assignedNodes({ flatten: true })
156
+ : node.childNodes;
157
+ for (const child of children) {
158
+ yield* walkComposedTree(child, whatToShow, filter, skipNode);
159
+ }
160
+ }
161
+ /**
162
+ * Retrieves the first and last focusable children of a node using a TreeWalker.
163
+ *
164
+ * @param walker - The TreeWalker object used to traverse the node's children
165
+ * @returns A tuple containing the first and last focusable children. If no focusable children are found, `null` is returned for both
166
+ */
167
+ function getFirstAndLastFocusableChildren(walker) {
168
+ let firstFocusableChild = null;
169
+ let lastFocusableChild = null;
170
+ for (const currentNode of walker) {
171
+ if (!firstFocusableChild) {
172
+ firstFocusableChild = currentNode;
173
+ }
174
+ lastFocusableChild = currentNode;
175
+ }
176
+ return [firstFocusableChild, lastFocusableChild];
177
+ }
178
+
179
+ export { getDeepActiveElement, getFirstAndLastFocusableChildren, isElementInvisible, isFocusable, tryFocus, walkComposedTree };
180
+ //# sourceMappingURL=focus-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-utils.js","sources":["../../../src/globals/utils/focus-utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;AAMG;AACH,SAAS,oBAAoB,GAAA;AAC3B,IAAA,IAAI,aAAa,GAAG,QAAQ,CAAC,aAAa;;IAG1C,OAAO,aAAa,EAAE;;AAEpB,QAAA,IAAI,aAAa,YAAY,eAAe,EAAE;AAC5C,YAAA,MAAM,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAC;AACtD,gBAAA,OAAO,EAAE,IAAI;AACd,aAAA,CAAC;;YAEF,MAAM,eAAe,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAI;AACnD,gBAAA,IAAK,EAAU,CAAC,UAAU,EAAE,aAAa,EAAE;AACzC,oBAAA,OAAO,IAAI;gBACb;AACA,gBAAA,QACE,EAAE,KAAK,QAAQ,CAAC,aAAa,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;AAExE,YAAA,CAAC,CAAC;YACF,IAAI,eAAe,EAAE;gBACnB,aAAa,GAAG,eAAe;gBAC/B;YACF;QACF;;AAGA,QAAA,MAAM,UAAU,GAAI,aAAqB,CAAC,UAAU;AACpD,QAAA,IAAI,UAAU,EAAE,aAAa,EAAE;AAC7B,YAAA,aAAa,GAAG,UAAU,CAAC,aAAa;YACxC;QACF;;QAGA;IACF;AAEA,IAAA,OAAO,aAAa;AACtB;AAEA;;;;;;AAMG;AACH,SAAS,kBAAkB,CACzB,OAAgB,EAChB,aAAuB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAA;IAE9C,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;AACjD,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;AAClE,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC;AACtD,IAAA,MAAM,aAAa,GACjB,aAAa,CAAC,OAAO,KAAK,MAAM,IAAI,aAAa,CAAC,UAAU,KAAK,QAAQ;IAC3E,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CACvC,qDAAqD,CACtD;IAED,OAAO,aAAa,IAAI,iBAAiB;AAC3C;AAEA;;;;;;;;AAQG;AACH,SAAS,WAAW,CAAC,OAAgB,EAAA;AACnC,IAAA,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;AACrC,QAAA,OAAO,KAAK;IACd;;IAGA,MAAM,sBAAsB,GAC1B,gMAAgM;AAElM,IAAA,IAAI,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;AAC3C,QAAA,OAAO,IAAI;IACb;IAEA,MAAM,uBAAuB,GAC3B,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC/B,QAAA,OAAO,CAAC,OAAO,CAAC,oCAAoC,CAAC;IAEvD,IAAI,uBAAuB,EAAE;AAC3B,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,OAAO,OAAO,CAAC,UAAU,EAAE,cAAc,IAAI,KAAK;AACpD;AAEA;;;;;;;;;AASG;AACH,SAAS,QAAQ,CACf,OAAmC,EACnC,UAAqB,EAAA;IAErB,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;AACjD,QAAA,OAAO,KAAK;IACd;;AAGA,IAAA,IAAI,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;AAC3C,QAAA,OAAO,KAAK;IACd;;AAGA,IAAA,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;AACzB,QAAA,OAAO,KAAK;IACd;;AAGA,IAAA,MAAM,qBAAqB,GAAG,oBAAoB,EAAE;;AAGpD,IAAA,IAAI,qBAAqB,KAAK,OAAO,EAAE;QACrC,OAAO,CAAC,KAAK,EAAE;IACjB;;;AAIA,IAAA,MAAM,oBAAoB,GAAG,oBAAoB,EAAE;AACnD,IAAA,QACE,oBAAoB,KAAK,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;AAE9E;AAEA;;;;;;;;;;AAUG;AACH,UAAU,gBAAgB,CACxB,IAAU,EACV,UAAU,GAAG,CAAC,EACd,SAAkC,MAAM,IAAI,EAC5C,WAAoC,MAAM,KAAK,EAAA;AAE/C,IAAA,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,KAAK,QAAQ,CAAC,IAAI,CAAC,EAAE;QAClE;IACF;AAEA,IAAA,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;AAChB,QAAA,MAAM,IAAI;IACZ;AAEA,IAAA,MAAM,QAAQ;;AAEZ,IAAA,IAAI,YAAY,WAAW,IAAI,IAAI,CAAC;AAClC,UAAE,IAAI,CAAC,UAAU,CAAC;UAChB,IAAI,YAAY;cACd,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AACtC,cAAE,IAAI,CAAC,UAAU;AAEvB,IAAA,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;AAC5B,QAAA,OAAO,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC9D;AACF;AAEA;;;;;AAKG;AACH,SAAS,gCAAgC,CACvC,MAAqC,EAAA;IAErC,IAAI,mBAAmB,GAAuB,IAAI;IAClD,IAAI,kBAAkB,GAAuB,IAAI;AAEjD,IAAA,KAAK,MAAM,WAAW,IAAI,MAAM,EAAE;QAChC,IAAI,CAAC,mBAAmB,EAAE;YACxB,mBAAmB,GAAG,WAAW;QACnC;QACA,kBAAkB,GAAG,WAAW;IAClC;AAEA,IAAA,OAAO,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;AAClD;;;;"}
@@ -1,9 +1,6 @@
1
1
  import React from "react";
2
- import CDSAIChatCard from "../components/card/src/card.js";
3
- import CDSAIChatCardFooter from "../components/card/src/card-footer.js";
4
- import CDSAIChatCardSteps from "../components/card/src/card-steps.js";
5
- declare const Card: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatCard>>;
6
- declare const CardFooter: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatCardFooter>>;
7
- declare const CardSteps: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatCardSteps>>;
2
+ declare const Card: React.ComponentType<any>;
3
+ declare const CardFooter: React.ComponentType<any>;
4
+ declare const CardSteps: React.ComponentType<any>;
8
5
  export { Card, CardFooter, CardSteps };
9
6
  export default Card;
@@ -1,4 +1,3 @@
1
1
  import React from "react";
2
- import { CDSAIChatChainOfThoughtStep } from "../components/chain-of-thought/src/chain-of-thought-step.js";
3
- declare const ChainOfThoughtStep: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatChainOfThoughtStep>>;
2
+ declare const ChainOfThoughtStep: React.ComponentType<any>;
4
3
  export default ChainOfThoughtStep;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import CDSAIChatChainOfThoughtToggle from "../components/chain-of-thought/src/chain-of-thought-toggle.js";
3
2
  import { type ChainOfThoughtToggleEventDetail } from "../components/chain-of-thought/defs.js";
4
- declare const ChainOfThoughtToggle: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatChainOfThoughtToggle>>;
3
+ declare const ChainOfThoughtToggle: React.ComponentType<any>;
5
4
  export type { ChainOfThoughtToggleEventDetail };
6
5
  export default ChainOfThoughtToggle;
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- import CDSAIChatChainOfThought from "../components/chain-of-thought/src/chain-of-thought.js";
3
2
  import { type ChainOfThoughtOnToggle, ChainOfThoughtStepStatus, type ChainOfThoughtStepToggleEventDetail, type ChainOfThoughtToggleEventDetail } from "../components/chain-of-thought/defs.js";
4
- declare const ChainOfThought: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatChainOfThought>>;
3
+ declare const ChainOfThought: React.ComponentType<any>;
5
4
  export type { ChainOfThoughtOnToggle, ChainOfThoughtStepToggleEventDetail, ChainOfThoughtToggleEventDetail, };
6
5
  export { ChainOfThoughtStepStatus };
7
6
  export default ChainOfThought;
@@ -7,7 +7,7 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import React from "react";
10
- import AIChatButton, { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLTIP_ALIGNMENT, CHAT_BUTTON_TOOLTIP_POSITION } from "../components/chat-button/src/chat-button.js";
11
- declare const ChatButton: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<AIChatButton>>;
10
+ import { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLTIP_ALIGNMENT, CHAT_BUTTON_TOOLTIP_POSITION } from "../components/chat-button/src/chat-button.js";
11
+ declare const ChatButton: React.ComponentType<any>;
12
12
  export default ChatButton;
13
13
  export { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLTIP_ALIGNMENT, CHAT_BUTTON_TOOLTIP_POSITION, };
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import AIChatButton from '../components/chat-button/src/chat-button.js';
11
11
  import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
12
  export { CHAT_BUTTON_SIZE } from '../components/chat-button/defs.js';
13
- export { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_POSITION, BUTTON_TYPE as CHAT_BUTTON_TYPE } from '@carbon/web-components/es/components/button/button.js';
13
+ export { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TOOLTIP_ALIGNMENT as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TOOLTIP_POSITION as CHAT_BUTTON_TOOLTIP_POSITION, BUTTON_TYPE as CHAT_BUTTON_TYPE } from '@carbon/web-components/es/components/button/button.js';
14
14
 
15
15
  /**
16
16
  * @license
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import type { ToolbarAction } from "./toolbar.js";
3
+ export interface ChatHeaderProps {
4
+ /** Array of actions that can overflow into a menu when space is limited. */
5
+ actions?: ToolbarAction[];
6
+ /** Enable overflow behavior for actions. */
7
+ overflow?: boolean;
8
+ /** Optional header title text to display. */
9
+ headerTitle?: string;
10
+ /** Optional name text to display after the title. */
11
+ headerName?: string;
12
+ /** Type of navigation to display: 'back', 'overflow', or 'none'. */
13
+ navigationType?: "back" | "overflow" | "none";
14
+ /** Icon for the back button (CarbonIcon object). */
15
+ navigationBackIcon?: any;
16
+ /** Label/tooltip text for the back button. */
17
+ navigationBackLabel?: string;
18
+ /** Click handler for the back button. */
19
+ navigationBackOnClick?: () => void;
20
+ /** Array of overflow menu items with text and onClick handlers. */
21
+ navigationOverflowItems?: Array<{
22
+ text: string;
23
+ onClick?: () => void;
24
+ href?: string;
25
+ target?: string;
26
+ disabled?: boolean;
27
+ testId?: string;
28
+ }>;
29
+ /** Label/tooltip text for the overflow menu button. */
30
+ navigationOverflowLabel?: string;
31
+ /** ARIA label for the overflow menu. */
32
+ navigationOverflowAriaLabel?: string;
33
+ /** Click handler for when the overflow menu button is clicked (menu opened). */
34
+ navigationOverflowOnClick?: () => void;
35
+ }
36
+ /**
37
+ * Extended interface that includes the imperative handle methods.
38
+ * Use with React.useRef<ChatHeaderHandle>() to access focus management.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * const headerRef = useRef<ChatHeaderHandle>(null);
43
+ *
44
+ * const handleFocusRequest = () => {
45
+ * const focused = headerRef.current?.requestFocus();
46
+ * if (!focused) {
47
+ * // Try focusing somewhere else, like the input field
48
+ * inputRef.current?.focus();
49
+ * }
50
+ * };
51
+ * ```
52
+ */
53
+ export interface ChatHeaderHandle {
54
+ /**
55
+ * Requests focus on the best available focusable element within the component.
56
+ * Returns true if focus was successfully set, false otherwise.
57
+ *
58
+ * Priority order:
59
+ * 1. First enabled button in fixed-actions slot (usually close button)
60
+ * 2. First enabled button in navigation slot (back button or overflow menu)
61
+ * 3. First enabled action button from actions array
62
+ * 4. Any other focusable element
63
+ */
64
+ requestFocus(): boolean;
65
+ }
66
+ /**
67
+ * ChatHeader component with automatic icon transformation support.
68
+ *
69
+ * Accepts navigation icons as either CarbonIcon objects or React icon components from @carbon/icons-react.
70
+ * React icons are automatically transformed to the CarbonIcon format expected by the web component.
71
+ */
72
+ declare const ChatHeader: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
73
+ export default ChatHeader;
@@ -0,0 +1,55 @@
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 { jsx } from 'react/jsx-runtime';
9
+ import { createComponent } from '@lit/react';
10
+ import React from 'react';
11
+ import CdsAiChatChatHeader from '../components/chat-shell/src/chat-header.js';
12
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
13
+ import { transformReactIconToCarbonIcon } from './utils/iconTransform.js';
14
+
15
+ // Base chat header component from @lit/react
16
+ const BaseChatHeader = withWebComponentBridge(createComponent({
17
+ tagName: "cds-aichat-chat-header",
18
+ elementClass: CdsAiChatChatHeader,
19
+ react: React,
20
+ }));
21
+ /**
22
+ * ChatHeader component with automatic icon transformation support.
23
+ *
24
+ * Accepts navigation icons as either CarbonIcon objects or React icon components from @carbon/icons-react.
25
+ * React icons are automatically transformed to the CarbonIcon format expected by the web component.
26
+ */
27
+ const ChatHeader = React.forwardRef((props, ref) => {
28
+ const { navigationBackIcon, navigationOverflowIcon, actions, ...restProps } = props;
29
+ // Transform navigation icons if they're React components
30
+ const transformedNavigationBackIcon = React.useMemo(() => {
31
+ return navigationBackIcon
32
+ ? transformReactIconToCarbonIcon(navigationBackIcon, 16)
33
+ : undefined;
34
+ }, [navigationBackIcon]);
35
+ const transformedNavigationOverflowIcon = React.useMemo(() => {
36
+ return navigationOverflowIcon
37
+ ? transformReactIconToCarbonIcon(navigationOverflowIcon, 16)
38
+ : undefined;
39
+ }, [navigationOverflowIcon]);
40
+ // Transform action icons if actions are provided
41
+ const transformedActions = React.useMemo(() => {
42
+ if (!actions) {
43
+ return undefined;
44
+ }
45
+ return actions.map((action) => ({
46
+ ...action,
47
+ icon: transformReactIconToCarbonIcon(action.icon, 16),
48
+ }));
49
+ }, [actions]);
50
+ return (jsx(BaseChatHeader, { ref: ref, navigationBackIcon: transformedNavigationBackIcon, navigationOverflowIcon: transformedNavigationOverflowIcon, actions: transformedActions, ...restProps }));
51
+ });
52
+ ChatHeader.displayName = "ChatHeader";
53
+
54
+ export { ChatHeader as default };
55
+ //# sourceMappingURL=chat-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-header.js","sources":["../../src/react/chat-header.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AA4FA;AACA,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC,CACH;AAED;;;;;AAKG;AACH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAW,CAAC,KAAK,EAAE,GAAG,KAAI;AAC3D,IAAA,MAAM,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GACzE,KAAK;;AAGP,IAAA,MAAM,6BAA6B,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AACvD,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,kBAAkB,EAAE,EAAE;cACrD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAExB,IAAA,MAAM,iCAAiC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AAC3D,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,sBAAsB,EAAE,EAAE;cACzD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC;;AAG5B,IAAA,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;QAC5C,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,SAAS;QAClB;QAEA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAqB,MAAM;AAC7C,YAAA,GAAG,MAAM;YACT,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,SAAA,CAAC,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,QACEA,IAAC,cAAc,EAAA,EACb,GAAG,EAAE,GAAG,EACR,kBAAkB,EAAE,6BAA6B,EACjD,sBAAsB,EAAE,iCAAiC,EACzD,OAAO,EAAE,kBAAkB,EAAA,GACvB,SAAS,EAAA,CACb;AAEN,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}