@patternfly/chatbot 6.9.0-prerelease.1 → 6.9.0-prerelease.10

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 (66) hide show
  1. package/dist/cjs/Chatbot/Chatbot.d.ts +2 -0
  2. package/dist/cjs/Chatbot/Chatbot.js +2 -2
  3. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +1 -1
  4. package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +1 -1
  5. package/dist/cjs/ChatbotModal/ChatbotModal.js +1 -1
  6. package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +1 -1
  7. package/dist/cjs/MessageBar/MessageBar.d.ts +1 -1
  8. package/dist/cjs/MessageBar/MessageBar.js +4 -3
  9. package/dist/cjs/MessageBar/SendButton.js +2 -2
  10. package/dist/cjs/SourcesCard/SourcesCard.d.ts +2 -0
  11. package/dist/cjs/SourcesCardBase/SourcesCardBase.d.ts +2 -0
  12. package/dist/cjs/SourcesCardBase/SourcesCardBase.js +2 -2
  13. package/dist/css/main.css +199 -61
  14. package/dist/css/main.css.map +1 -1
  15. package/dist/esm/Chatbot/Chatbot.d.ts +2 -0
  16. package/dist/esm/Chatbot/Chatbot.js +3 -3
  17. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +1 -1
  18. package/dist/esm/ChatbotFooter/ChatbotFootnote.js +1 -1
  19. package/dist/esm/ChatbotModal/ChatbotModal.js +1 -1
  20. package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +1 -1
  21. package/dist/esm/MessageBar/MessageBar.d.ts +1 -1
  22. package/dist/esm/MessageBar/MessageBar.js +4 -3
  23. package/dist/esm/MessageBar/SendButton.js +2 -2
  24. package/dist/esm/SourcesCard/SourcesCard.d.ts +2 -0
  25. package/dist/esm/SourcesCardBase/SourcesCardBase.d.ts +2 -0
  26. package/dist/esm/SourcesCardBase/SourcesCardBase.js +2 -2
  27. package/package.json +9 -9
  28. package/patternfly-docs/content/extensions/chatbot/chatbot.md +1 -0
  29. package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +1 -1
  30. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +31 -0
  31. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +2 -0
  32. package/patternfly-docs/content/extensions/chatbot/examples/demos/Canvas.md +132 -0
  33. package/patternfly-docs/content/extensions/chatbot/examples/demos/Canvas.tsx +615 -0
  34. package/patternfly-docs/content/extensions/chatbot/examples/demos/CanvasWithDockedNav.tsx +697 -0
  35. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +39 -5
  36. package/patternfly-docs/content/extensions/chatbot/examples/demos/FullscreenDockedNav.tsx +385 -0
  37. package/patternfly-docs/patternfly-docs.config.js +1 -1
  38. package/src/Canvas/Canvas.scss +150 -0
  39. package/src/Chatbot/Chatbot.scss +13 -1
  40. package/src/Chatbot/Chatbot.test.tsx +11 -0
  41. package/src/Chatbot/Chatbot.tsx +5 -1
  42. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +91 -77
  43. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +32 -13
  44. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +1 -0
  45. package/src/ChatbotFooter/ChatbotFooternote.test.tsx +50 -0
  46. package/src/ChatbotFooter/ChatbotFootnote.tsx +1 -1
  47. package/src/ChatbotModal/ChatbotModal.tsx +1 -0
  48. package/src/ChatbotToggle/ChatbotToggle.scss +3 -2
  49. package/src/ChatbotToggle/ChatbotToggle.test.tsx +4 -0
  50. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +9 -0
  51. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +4 -2
  52. package/src/FileDetails/__snapshots__/FileDetails.test.tsx.snap +2 -6
  53. package/src/FileDetailsLabel/__snapshots__/FileDetailsLabel.test.tsx.snap +2 -6
  54. package/src/Message/Message.scss +9 -0
  55. package/src/MessageBar/AttachButton.scss +4 -21
  56. package/src/MessageBar/MessageBar.scss +2 -2
  57. package/src/MessageBar/MessageBar.test.tsx +20 -0
  58. package/src/MessageBar/MessageBar.tsx +7 -3
  59. package/src/MessageBar/SendButton.scss +1 -32
  60. package/src/MessageBar/SendButton.tsx +2 -2
  61. package/src/SourcesCard/SourcesCard.scss +6 -0
  62. package/src/SourcesCard/SourcesCard.test.tsx +16 -0
  63. package/src/SourcesCard/SourcesCard.tsx +2 -0
  64. package/src/SourcesCardBase/SourcesCardBase.test.tsx +62 -0
  65. package/src/SourcesCardBase/SourcesCardBase.tsx +8 -0
  66. package/src/main.scss +1 -0
@@ -13,6 +13,8 @@ export interface ChatbotProps {
13
13
  ariaLabel?: string;
14
14
  /** Density of information within the ChatBot */
15
15
  isCompact?: boolean;
16
+ /** Optional navigation rail displayed before the chatbot content */
17
+ dockedNav?: React.ReactNode;
16
18
  }
17
19
  export declare enum ChatbotDisplayMode {
18
20
  default = "default",
@@ -23,8 +23,8 @@ var ChatbotDisplayMode;
23
23
  ChatbotDisplayMode["drawer"] = "drawer";
24
24
  })(ChatbotDisplayMode || (exports.ChatbotDisplayMode = ChatbotDisplayMode = {}));
25
25
  const ChatbotBase = (_a) => {
26
- var { children, displayMode = ChatbotDisplayMode.default, isVisible = true, className, innerRef, ariaLabel, isCompact } = _a, props = __rest(_a, ["children", "displayMode", "isVisible", "className", "innerRef", "ariaLabel", "isCompact"]);
27
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `pf-chatbot pf-chatbot--${displayMode} ${!isVisible ? 'pf-chatbot--hidden' : 'pf-chatbot--visible'} ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}` }, props, { children: isVisible ? ((0, jsx_runtime_1.jsx)("section", { "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : 'Chatbot', className: `pf-chatbot-container pf-chatbot-container--${displayMode} ${!isVisible ? 'pf-chatbot-container--hidden' : ''}`, tabIndex: -1, ref: innerRef, children: children })) : undefined })));
26
+ var { children, displayMode = ChatbotDisplayMode.default, isVisible = true, className, innerRef, ariaLabel, isCompact, dockedNav } = _a, props = __rest(_a, ["children", "displayMode", "isVisible", "className", "innerRef", "ariaLabel", "isCompact", "dockedNav"]);
27
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `pf-chatbot pf-chatbot--${displayMode} ${dockedNav ? 'pf-chatbot--docked-nav' : ''} ${!isVisible ? 'pf-chatbot--hidden' : 'pf-chatbot--visible'} ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}` }, props, { children: isVisible ? ((0, jsx_runtime_1.jsxs)("section", { "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : 'Chatbot', className: `pf-chatbot-container pf-chatbot-container--${displayMode} ${!isVisible ? 'pf-chatbot-container--hidden' : ''}`, tabIndex: -1, ref: innerRef, children: [dockedNav && (0, jsx_runtime_1.jsx)("aside", { className: "pf-chatbot__docked-nav", children: dockedNav }), children] })) : undefined })));
28
28
  };
29
29
  const Chatbot = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(ChatbotBase, Object.assign({ innerRef: ref }, props))));
30
30
  exports.default = Chatbot;
@@ -188,7 +188,7 @@ const ChatbotConversationHistoryNav = (_a) => {
188
188
  };
189
189
  const renderPanelContent = () => {
190
190
  const drawer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.DrawerHead, Object.assign({}, drawerHeadProps, { children: (0, jsx_runtime_1.jsxs)(react_core_1.DrawerActions, Object.assign({ "data-testid": drawerActionsTestId, className: reverseButtonOrder ? 'pf-v6-c-drawer__actions--reversed' : '' }, drawerActionsProps, { children: [(0, jsx_runtime_1.jsx)(react_core_1.DrawerCloseButton, Object.assign({ onClick: onDrawerToggle }, drawerCloseButtonProps)), onNewChat && ((0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ size: isCompact ? 'sm' : undefined, onClick: onNewChat, icon: (0, jsx_runtime_1.jsx)(react_icons_1.RhUiEditFillIcon, {}) }, newChatButtonProps, { children: newChatButtonText })))] })) })), hasDrawerHeadDivider && (0, jsx_runtime_1.jsx)(react_core_1.Divider, { className: "pf-chatbot__heading-divider" }), (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__heading-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__title-container", children: [(0, jsx_runtime_1.jsx)(react_core_1.Icon, { size: "lg", className: "pf-chatbot__title-icon", children: navTitleIcon }), (0, jsx_runtime_1.jsx)(react_core_1.Title, Object.assign({ className: "pf-chatbot__title", headingLevel: "h2" }, navTitleProps, { children: title }))] }), !isLoading && renderSearchAndActions()] }), isLoading ? (0, jsx_runtime_1.jsx)(LoadingState_1.default, Object.assign({}, loadingState)) : renderDrawerContent()] }));
191
- return ((0, jsx_runtime_1.jsx)(react_core_1.DrawerPanelContent, Object.assign({ "aria-live": "polite", focusTrap: { enabled: true }, defaultSize: "384px" }, drawerPanelContentProps, { children: drawer })));
191
+ return ((0, jsx_runtime_1.jsx)(react_core_1.DrawerPanelContent, Object.assign({ "aria-live": "polite", focusTrap: { enabled: true }, defaultSize: "384px", isNoPlainOnGlass: true }, drawerPanelContentProps, { children: drawer })));
192
192
  };
193
193
  // An onKeyDown property must be passed to the Drawer component to handle closing
194
194
  // the drawer panel and deactivating the focus trap via the Escape key.
@@ -23,7 +23,7 @@ const ChatbotPopover_1 = __importDefault(require("../ChatbotPopover/ChatbotPopov
23
23
  const ChatbotFootnote = (_a) => {
24
24
  var _b, _c, _d, _e, _f;
25
25
  var { label, popover, className } = _a, props = __rest(_a, ["label", "popover", "className"]);
26
- if (!(popover === null || popover === void 0 ? void 0 : popover.cta) && !(popover === null || popover === void 0 ? void 0 : popover.showClose)) {
26
+ if (popover && !popover.cta && !popover.showClose) {
27
27
  // eslint-disable-next-line no-console
28
28
  console.error('ChatbotFootnote: You must provide either the popover.cta or popover.showClose props in order to render a button that can close the popover.');
29
29
  }
@@ -18,7 +18,7 @@ const react_core_1 = require("@patternfly/react-core");
18
18
  const Chatbot_1 = require("../Chatbot");
19
19
  const ChatbotModal = (_a) => {
20
20
  var { children, displayMode = Chatbot_1.ChatbotDisplayMode.default, className, isOpen, isCompact } = _a, props = __rest(_a, ["children", "displayMode", "className", "isOpen", "isCompact"]);
21
- const modal = ((0, jsx_runtime_1.jsx)(react_core_1.Modal, Object.assign({ isOpen: isOpen, ouiaId: "ChatbotModal", "aria-labelledby": "chatbot-modal-title", "aria-describedby": "chatbot-modal", className: `pf-chatbot__chatbot-modal pf-chatbot__chatbot-modal--${displayMode} ${isCompact ? 'pf-m-compact' : ''} ${className}`, backdropClassName: "pf-chatbot__chatbot-modal-backdrop" }, props, { children: children })));
21
+ const modal = ((0, jsx_runtime_1.jsx)(react_core_1.Modal, Object.assign({ isOpen: isOpen, ouiaId: "ChatbotModal", "aria-labelledby": "chatbot-modal-title", "aria-describedby": "chatbot-modal", className: `pf-chatbot__chatbot-modal pf-chatbot__chatbot-modal--${displayMode} ${isCompact ? 'pf-m-compact' : ''} ${className}`, backdropClassName: "pf-chatbot__chatbot-modal-backdrop", hasAnimations: false }, props, { children: children })));
22
22
  if ((displayMode === Chatbot_1.ChatbotDisplayMode.fullscreen || displayMode === Chatbot_1.ChatbotDisplayMode.embedded) && isOpen) {
23
23
  return (0, jsx_runtime_1.jsx)("div", { className: "pf-v6-c-backdrop pf-chatbot__backdrop", children: modal });
24
24
  }
@@ -20,7 +20,7 @@ const ChatbotWelcomePrompt = (_a) => {
20
20
  onClickAction: prompt.onClick,
21
21
  selectableActionId: `welcome-prompt-input-${index}`,
22
22
  selectableActionAriaLabelledby: `welcome-prompt-title-${index}`
23
- }, children: (0, jsx_runtime_1.jsx)(react_core_1.CardTitle, { id: `welcome-prompt-title-${index}`, children: prompt.title }) }), prompt.message && (0, jsx_runtime_1.jsx)(react_core_1.CardBody, { children: prompt.message })] }, `welcome-prompt-${index}`))) }))] })));
23
+ }, children: (0, jsx_runtime_1.jsx)(react_core_1.CardTitle, { className: "pf-chatbot__prompt-suggestion-title", id: `welcome-prompt-title-${index}`, children: prompt.title }) }), prompt.message && (0, jsx_runtime_1.jsx)(react_core_1.CardBody, { className: "pf-chatbot__prompt-suggestion-body", children: prompt.message })] }, `welcome-prompt-${index}`))) }))] })));
24
24
  };
25
25
  exports.ChatbotWelcomePrompt = ChatbotWelcomePrompt;
26
26
  exports.default = exports.ChatbotWelcomePrompt;
@@ -11,7 +11,7 @@ export interface MessageBarWithAttachMenuProps {
11
11
  /** Items in menu */
12
12
  attachMenuItems: React.ReactNode;
13
13
  /** A callback for when the attachment menu toggle is clicked */
14
- onAttachMenuToggleClick: () => void;
14
+ onAttachMenuToggleClick?: () => void;
15
15
  /** A callback for when the input value in the menu changes. */
16
16
  onAttachMenuInputChange?: (value: string) => void;
17
17
  /** Function callback called when user selects item in menu. */
@@ -206,8 +206,9 @@ const MessageBarBase = (_a) => {
206
206
  setIsComposing(false);
207
207
  }, []);
208
208
  const handleAttachMenuToggle = () => {
209
+ var _a;
209
210
  (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.setIsAttachMenuOpen) && (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.setIsAttachMenuOpen(!(attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.isAttachMenuOpen)));
210
- attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuToggleClick();
211
+ (_a = attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuToggleClick) === null || _a === void 0 ? void 0 : _a.call(attachMenuProps);
211
212
  };
212
213
  const handleSpeechRecognition = (message) => {
213
214
  setMessage(message);
@@ -219,7 +220,7 @@ const MessageBarBase = (_a) => {
219
220
  return ((0, jsx_runtime_1.jsx)(AttachButton_1.AttachButton, Object.assign({ onAttachAccepted: handleAttach, isDisabled: isListeningMessage, tooltipContent: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _a === void 0 ? void 0 : _a.tooltipContent, inputTestId: (_b = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _b === void 0 ? void 0 : _b.inputTestId, isCompact: isCompact, tooltipProps: (_c = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _c === void 0 ? void 0 : _c.tooltipProps, allowedFileTypes: allowedFileTypes, minSize: minSize, maxSize: maxSize, maxFiles: maxFiles, isAttachmentDisabled: isAttachmentDisabled, onAttach: onAttach, onAttachRejected: onAttachRejected, validator: validator, dropzoneProps: dropzoneProps }, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach, (_d = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _d === void 0 ? void 0 : _d.props)));
220
221
  }
221
222
  if (attachMenuProps) {
222
- return ((0, jsx_runtime_1.jsx)(AttachButton_1.AttachButton, Object.assign({ ref: attachButtonRef, onClick: handleAttachMenuToggle, isDisabled: isListeningMessage, tooltipContent: (_e = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _e === void 0 ? void 0 : _e.tooltipContent, isCompact: isCompact, tooltipProps: (_f = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _f === void 0 ? void 0 : _f.tooltipProps, allowedFileTypes: allowedFileTypes, minSize: minSize, maxSize: maxSize, maxFiles: maxFiles, isAttachmentDisabled: isAttachmentDisabled, onAttach: onAttach, onAttachRejected: onAttachRejected, validator: validator, dropzoneProps: dropzoneProps }, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach)));
223
+ return ((0, jsx_runtime_1.jsx)(AttachButton_1.AttachButton, Object.assign({ ref: attachButtonRef, onClick: handleAttachMenuToggle, isDisabled: isListeningMessage, tooltipContent: (_e = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _e === void 0 ? void 0 : _e.tooltipContent, isCompact: isCompact, tooltipProps: (_f = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach) === null || _f === void 0 ? void 0 : _f.tooltipProps, allowedFileTypes: allowedFileTypes, minSize: minSize, maxSize: maxSize, maxFiles: maxFiles, isAttachmentDisabled: isAttachmentDisabled, onAttach: onAttach, onAttachRejected: onAttachRejected, validator: validator, dropzoneProps: dropzoneProps }, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.attach, { isClicked: attachMenuProps.isAttachMenuOpen, "aria-expanded": attachMenuProps.isAttachMenuOpen })));
223
224
  }
224
225
  };
225
226
  const isAttachButtonAtStart = attachButtonPosition === 'start';
@@ -238,7 +239,7 @@ const MessageBarBase = (_a) => {
238
239
  (_a = attachButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
239
240
  attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.setIsAttachMenuOpen(isAttachMenuOpen);
240
241
  (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange) && (attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOpenChange(isAttachMenuOpen));
241
- }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: 8 }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder }, attachMenuProps)));
242
+ }, onOpenChangeKeys: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuOnOpenChangeKeys, onSelect: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.onAttachMenuSelect }, (attachMenuProps && { handleTextInputChange: attachMenuProps.onAttachMenuInputChange }), { popperProps: { direction: 'up', distance: 8 }, searchInputPlaceholder: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.attachMenuInputPlaceholder, menuSearchProps: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.menuSearchProps, menuSearchInputProps: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.menuSearchInputProps, searchInputProps: attachMenuProps === null || attachMenuProps === void 0 ? void 0 : attachMenuProps.searchInputProps })));
242
243
  }
243
244
  return ((0, jsx_runtime_1.jsx)("div", { className: (0, react_styles_1.css)('pf-chatbot__message-bar', isPrimary && 'pf-m-primary', isMultiline && 'pf-m-multiline', className), children: messageBarContents }));
244
245
  };
@@ -15,12 +15,12 @@ exports.SendButton = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  // Import PatternFly components
17
17
  const react_core_1 = require("@patternfly/react-core");
18
- const paper_plane_icon_1 = require("@patternfly/react-icons/dist/esm/icons/paper-plane-icon");
18
+ const rh_ui_send_fill_icon_1 = require("@patternfly/react-icons/dist/esm/icons/rh-ui-send-fill-icon");
19
19
  const SendButton = (_a) => {
20
20
  var { className, onClick, tooltipProps, tooltipContent = 'Send', isCompact } = _a, props = __rest(_a, ["className", "onClick", "tooltipProps", "tooltipContent", "isCompact"]);
21
21
  return ((0, jsx_runtime_1.jsx)(react_core_1.Tooltip, Object.assign({ id: "pf-chatbot__tooltip--send", content: tooltipContent, position: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.position) || 'top', entryDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.entryDelay) || 0, exitDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.exitDelay) || 0, distance: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.distance) || 8, animationDuration: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.animationDuration) || 0,
22
22
  // prevents VO announcements of both aria label and tooltip
23
- aria: "none" }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ variant: "plain", className: `pf-chatbot__button--send ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}`, "aria-label": props['aria-label'] || 'Send', onClick: onClick, icon: (0, jsx_runtime_1.jsx)(react_core_1.Icon, { iconSize: isCompact ? 'lg' : 'xl', isInline: true, children: (0, jsx_runtime_1.jsx)(paper_plane_icon_1.PaperPlaneIcon, {}) }), size: isCompact ? 'sm' : undefined }, props)) })));
23
+ aria: "none" }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ variant: "plain", className: `pf-chatbot__button--send ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}`, "aria-label": props['aria-label'] || 'Send', onClick: onClick, icon: (0, jsx_runtime_1.jsx)(react_core_1.Icon, { iconSize: isCompact ? 'lg' : 'xl', isInline: true, children: (0, jsx_runtime_1.jsx)(rh_ui_send_fill_icon_1.RhUiSendFillIcon, {}) }), size: isCompact ? 'sm' : undefined }, props)) })));
24
24
  };
25
25
  exports.SendButton = SendButton;
26
26
  exports.default = exports.SendButton;
@@ -35,6 +35,8 @@ export interface SourcesCardProps extends CardProps {
35
35
  footer?: React.ReactNode;
36
36
  /** Additional props passed to Truncate component */
37
37
  truncateProps?: TruncateProps;
38
+ /** Additional content applied to the beginning of the sources card header, such as a label */
39
+ headerContent?: React.ReactNode;
38
40
  }[];
39
41
  /** Label for the English word "source" */
40
42
  sourceWord?: string;
@@ -35,6 +35,8 @@ export interface SourcesCardBaseProps extends CardProps {
35
35
  footer?: React.ReactNode;
36
36
  /** Additional props passed to Truncate component */
37
37
  truncateProps?: TruncateProps;
38
+ /** Additional content applied to the beginning of the sources card header, such as a label */
39
+ headerContent?: React.ReactNode;
38
40
  }[];
39
41
  /** Accessible label for the button which moves to the next page. */
40
42
  toNextPageAriaLabel?: string;
@@ -36,14 +36,14 @@ const SourcesCardBase = (_a) => {
36
36
  };
37
37
  const renderUncontrolledSourceCard = (source, index) => {
38
38
  var _a;
39
- return ((0, jsx_runtime_1.jsx)("li", { className: "pf-chatbot__sources-list-item", style: { '--pf-chatbot-sources-card-max-width': cardMaxWidth }, children: (0, jsx_runtime_1.jsxs)(react_core_1.Card, Object.assign({ isFullHeight: true, isCompact: isCompact, className: "pf-chatbot__sources-card" }, props, { children: [(0, jsx_runtime_1.jsx)(react_core_1.CardTitle, Object.assign({ className: "pf-chatbot__sources-card-title" }, cardTitleProps, { children: (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__sources-card-title-container", children: [(0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ component: "a", variant: react_core_1.ButtonVariant.link, href: source.link, icon: source.isExternal ? (0, jsx_runtime_1.jsx)(react_icons_1.RhMicronsExternalLinkIcon, {}) : undefined, iconPosition: "end", isInline: true, rel: source.isExternal ? 'noreferrer' : undefined, target: source.isExternal ? '_blank' : undefined, onClick: (_a = source.onClick) !== null && _a !== void 0 ? _a : undefined }, source.titleProps, { children: renderTitle(source.title, index, source.truncateProps) })), source.subtitle && (0, jsx_runtime_1.jsx)("span", { className: "pf-chatbot__sources-card-subtitle", children: source.subtitle })] }) })), source.body && ((0, jsx_runtime_1.jsx)(react_core_1.CardBody, Object.assign({ className: `pf-chatbot__sources-card-body ${source.footer ? 'pf-chatbot__compact-sources-card-body' : undefined}` }, cardBodyProps, { children: source.hasShowMore ? (
39
+ return ((0, jsx_runtime_1.jsx)("li", { className: "pf-chatbot__sources-list-item", style: { '--pf-chatbot-sources-card-max-width': cardMaxWidth }, children: (0, jsx_runtime_1.jsxs)(react_core_1.Card, Object.assign({ isFullHeight: true, isCompact: isCompact, className: "pf-chatbot__sources-card" }, props, { children: [(0, jsx_runtime_1.jsxs)(react_core_1.CardTitle, Object.assign({ className: "pf-chatbot__sources-card-title" }, cardTitleProps, { children: [source.headerContent && ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-header-content-container", children: source.headerContent })), (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__sources-card-title-container", children: [(0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ component: "a", variant: react_core_1.ButtonVariant.link, href: source.link, icon: source.isExternal ? (0, jsx_runtime_1.jsx)(react_icons_1.RhMicronsExternalLinkIcon, {}) : undefined, iconPosition: "end", isInline: true, rel: source.isExternal ? 'noreferrer' : undefined, target: source.isExternal ? '_blank' : undefined, onClick: (_a = source.onClick) !== null && _a !== void 0 ? _a : undefined }, source.titleProps, { children: renderTitle(source.title, index, source.truncateProps) })), source.subtitle && (0, jsx_runtime_1.jsx)("span", { className: "pf-chatbot__sources-card-subtitle", children: source.subtitle })] })] })), source.body && ((0, jsx_runtime_1.jsx)(react_core_1.CardBody, Object.assign({ className: `pf-chatbot__sources-card-body ${source.footer ? 'pf-chatbot__compact-sources-card-body' : undefined}` }, cardBodyProps, { children: source.hasShowMore ? (
40
40
  // prevents extra VO announcements of button text - parent Message has aria-live
41
41
  (0, jsx_runtime_1.jsx)("div", { "aria-live": "off", children: (0, jsx_runtime_1.jsx)(react_core_1.ExpandableSection, { variant: react_core_1.ExpandableSectionVariant.truncate, toggleTextCollapsed: showMoreWords, toggleTextExpanded: showLessWords, truncateMaxLines: 2, children: source.body }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-body-text", children: source.body })) }))), source.footer && ((0, jsx_runtime_1.jsx)(react_core_1.CardFooter, Object.assign({ className: "pf-chatbot__sources-card-footer" }, cardFooterProps, { children: source.footer })))] })) }, index));
42
42
  };
43
43
  if (layout === 'wrap') {
44
44
  return ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-base pf-m-wrap", children: (0, jsx_runtime_1.jsx)("ul", { className: "pf-chatbot__sources-list", role: "list", children: sources.map((source, index) => renderUncontrolledSourceCard(source, index)) }) }));
45
45
  }
46
- return ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-base", children: (0, jsx_runtime_1.jsxs)(react_core_1.Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__sources-card" }, props, { children: [(0, jsx_runtime_1.jsx)(react_core_1.CardTitle, Object.assign({ className: "pf-chatbot__sources-card-title" }, cardTitleProps, { children: (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__sources-card-title-container", children: [(0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ component: "a", variant: react_core_1.ButtonVariant.link, href: sources[page - 1].link, icon: sources[page - 1].isExternal ? (0, jsx_runtime_1.jsx)(react_icons_1.RhMicronsExternalLinkIcon, {}) : undefined, iconPosition: "end", isInline: true, rel: sources[page - 1].isExternal ? 'noreferrer' : undefined, target: sources[page - 1].isExternal ? '_blank' : undefined, onClick: (_b = sources[page - 1].onClick) !== null && _b !== void 0 ? _b : undefined }, sources[page - 1].titleProps, { children: renderTitle(sources[page - 1].title, undefined, sources[page - 1].truncateProps) })), sources[page - 1].subtitle && ((0, jsx_runtime_1.jsx)("span", { className: "pf-chatbot__sources-card-subtitle", children: sources[page - 1].subtitle }))] }) })), sources[page - 1].body && ((0, jsx_runtime_1.jsx)(react_core_1.CardBody, Object.assign({ className: `pf-chatbot__sources-card-body ${sources[page - 1].footer ? 'pf-chatbot__compact-sources-card-body' : undefined}` }, cardBodyProps, { children: sources[page - 1].hasShowMore ? (
46
+ return ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-base", children: (0, jsx_runtime_1.jsxs)(react_core_1.Card, Object.assign({ isCompact: isCompact, className: "pf-chatbot__sources-card" }, props, { children: [(0, jsx_runtime_1.jsxs)(react_core_1.CardTitle, Object.assign({ className: "pf-chatbot__sources-card-title" }, cardTitleProps, { children: [sources[page - 1].headerContent && ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-header-content-container", children: sources[page - 1].headerContent })), (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__sources-card-title-container", children: [(0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ component: "a", variant: react_core_1.ButtonVariant.link, href: sources[page - 1].link, icon: sources[page - 1].isExternal ? (0, jsx_runtime_1.jsx)(react_icons_1.RhMicronsExternalLinkIcon, {}) : undefined, iconPosition: "end", isInline: true, rel: sources[page - 1].isExternal ? 'noreferrer' : undefined, target: sources[page - 1].isExternal ? '_blank' : undefined, onClick: (_b = sources[page - 1].onClick) !== null && _b !== void 0 ? _b : undefined }, sources[page - 1].titleProps, { children: renderTitle(sources[page - 1].title, undefined, sources[page - 1].truncateProps) })), sources[page - 1].subtitle && ((0, jsx_runtime_1.jsx)("span", { className: "pf-chatbot__sources-card-subtitle", children: sources[page - 1].subtitle }))] })] })), sources[page - 1].body && ((0, jsx_runtime_1.jsx)(react_core_1.CardBody, Object.assign({ className: `pf-chatbot__sources-card-body ${sources[page - 1].footer ? 'pf-chatbot__compact-sources-card-body' : undefined}` }, cardBodyProps, { children: sources[page - 1].hasShowMore ? (
47
47
  // prevents extra VO announcements of button text - parent Message has aria-live
48
48
  (0, jsx_runtime_1.jsx)("div", { "aria-live": "off", children: (0, jsx_runtime_1.jsx)(react_core_1.ExpandableSection, { variant: react_core_1.ExpandableSectionVariant.truncate, toggleText: isExpanded ? showLessWords : showMoreWords, onToggle: onToggle, isExpanded: isExpanded, truncateMaxLines: 2, children: sources[page - 1].body }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-body-text", children: sources[page - 1].body })) }))), sources[page - 1].footer ? ((0, jsx_runtime_1.jsx)(react_core_1.CardFooter, Object.assign({ className: "pf-chatbot__sources-card-footer" }, cardFooterProps, { children: sources[page - 1].footer }))) : (sources.length > 1 && ((0, jsx_runtime_1.jsx)(react_core_1.CardFooter, Object.assign({ className: "pf-chatbot__sources-card-footer-container" }, cardFooterProps, { children: (0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__sources-card-footer", children: (0, jsx_runtime_1.jsxs)("nav", { className: `pf-chatbot__sources-card-footer-buttons ${className}`, "aria-label": paginationAriaLabel, children: [(0, jsx_runtime_1.jsx)(react_core_1.Button, { variant: react_core_1.ButtonVariant.plain, isCircle: true, isDisabled: isDisabled || page === 1, "data-action": "previous", onClick: (event) => {
49
49
  const newPage = page >= 1 ? page - 1 : 1;
package/dist/css/main.css CHANGED
@@ -161,6 +161,13 @@
161
161
  }
162
162
  }
163
163
 
164
+ .pf-chatbot--docked-nav .pf-chatbot-container {
165
+ flex-direction: row;
166
+ }
167
+ .pf-chatbot--docked-nav .pf-chatbot__header-container {
168
+ display: none;
169
+ }
170
+
164
171
  .pf-chatbot-container--embedded {
165
172
  min-height: 100%;
166
173
  }
@@ -360,19 +367,21 @@
360
367
  }
361
368
 
362
369
  .pf-chatbot__history.pf-v6-c-drawer {
363
- --pf-v6-c-drawer__panel--MinWidth: 24rem;
364
- --pf-v6-c-drawer__panel--xl--MinWidth: 24rem;
365
370
  height: 70vh;
366
371
  }
367
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__panel {
372
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel {
373
+ --pf-v6-c-drawer__panel--MinWidth: 24rem;
374
+ --pf-v6-c-drawer__panel--xl--MinWidth: 24rem;
368
375
  --pf-v6-c-drawer__panel--BackgroundColor: var(--pf-t--global--background--color--floating--default);
376
+ --pf-v6-c-drawer__panel--m-inline--BackgroundColor: var(--pf-t--global--background--color--floating--default);
377
+ --pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-t--global--background--color--floating--default);
369
378
  --pf-v6-c-drawer__panel--PaddingBlockStart: var(--pf-t--global--spacer--lg);
370
379
  --pf-v6-c-drawer__panel--PaddingBlockEnd: var(--pf-t--global--spacer--lg);
371
380
  --pf-v6-c-drawer__panel--RowGap: var(--pf-t--global--spacer--gap--group-to-group--vertical--default);
372
381
  overflow-x: hidden;
373
382
  overflow-y: hidden;
374
383
  }
375
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__head {
384
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__head {
376
385
  --pf-v6-c-drawer__head--PaddingBlockStart: 0;
377
386
  --pf-v6-c-drawer__head--PaddingBlockEnd: 0;
378
387
  --pf-v6-c-drawer__head--PaddingInlineStart: var(--pf-t--global--spacer--lg);
@@ -382,7 +391,7 @@
382
391
  justify-content: space-between;
383
392
  height: var(--pf-t--global--spacer--2xl);
384
393
  }
385
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__actions {
394
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__actions {
386
395
  --pf-v6-c-drawer__actions--MarginBlockStart: 0;
387
396
  --pf-v6-c-drawer__actions--MarginInlineEnd: 0;
388
397
  display: flex;
@@ -392,17 +401,17 @@
392
401
  width: 100%;
393
402
  height: 100%;
394
403
  }
395
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__actions--reversed {
404
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__actions--reversed {
396
405
  flex-direction: row-reverse;
397
406
  }
398
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__close .pf-v6-c-button {
407
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__close .pf-v6-c-button {
399
408
  width: var(--pf-t--global--spacer--2xl);
400
409
  height: var(--pf-t--global--spacer--2xl);
401
410
  border-radius: var(--pf-t--global--border--radius--pill);
402
411
  justify-content: center;
403
412
  align-items: center;
404
413
  }
405
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__body {
414
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__body {
406
415
  --pf-v6-c-drawer__panel__body--PaddingBlockStart: 0;
407
416
  --pf-v6-c-drawer__panel__body--PaddingBlockEnd: 0;
408
417
  --pf-v6-c-drawer__panel__body--PaddingInlineStart: var(--pf-t--global--spacer--lg);
@@ -412,9 +421,15 @@
412
421
  flex-direction: column;
413
422
  height: 70vh;
414
423
  }
415
- .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__panel.pf-m-resizable .pf-v6-c-drawer__panel-main {
424
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel.pf-m-resizable .pf-v6-c-drawer__panel-main {
416
425
  row-gap: var(--pf-v6-c-drawer__panel--RowGap);
417
426
  }
427
+ .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__content > .pf-v6-c-drawer__body {
428
+ overflow-y: auto;
429
+ display: flex;
430
+ flex-direction: column;
431
+ height: 70vh;
432
+ }
418
433
 
419
434
  .pf-chatbot--docked .pf-chatbot__history.pf-v6-c-drawer {
420
435
  height: 100vh;
@@ -424,19 +439,22 @@
424
439
  .pf-chatbot--fullscreen .pf-chatbot__history.pf-v6-c-drawer {
425
440
  height: 100vh;
426
441
  }
427
- .pf-chatbot--drawer .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__body,
428
- .pf-chatbot--fullscreen .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__body {
442
+ .pf-chatbot--drawer .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__content > .pf-v6-c-drawer__body,
443
+ .pf-chatbot--drawer .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__body,
444
+ .pf-chatbot--fullscreen .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__content > .pf-v6-c-drawer__body,
445
+ .pf-chatbot--fullscreen .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__body {
429
446
  width: 100%;
430
447
  }
431
448
 
432
449
  .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer {
433
450
  height: 100%;
434
451
  }
435
- .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__body {
452
+ .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__content > .pf-v6-c-drawer__body,
453
+ .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__body {
436
454
  width: 100%;
437
455
  height: 100%;
438
456
  }
439
- .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer .pf-v6-c-drawer__panel {
457
+ .pf-chatbot--embedded .pf-chatbot__history.pf-v6-c-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel {
440
458
  height: 100%;
441
459
  }
442
460
 
@@ -461,25 +479,22 @@
461
479
  align-self: stretch;
462
480
  }
463
481
 
464
- .pf-chatbot__history.pf-m-compact .pf-v6-c-drawer__main .pf-v6-c-drawer__panel {
482
+ .pf-chatbot__history.pf-m-compact > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel {
465
483
  --pf-v6-c-drawer__panel--PaddingBlockStart: var(--pf-t--global--spacer--sm);
466
484
  --pf-v6-c-drawer__panel--PaddingBlockEnd: var(--pf-t--global--spacer--sm);
467
485
  --pf-v6-c-drawer__head--PaddingInlineStart: var(--pf-t--global--spacer--md);
468
486
  --pf-v6-c-drawer__head--PaddingInlineEnd: var(--pf-t--global--spacer--md);
469
487
  --pf-v6-c-drawer__panel--RowGap: var(--pf-t--global--spacer--md);
470
488
  }
471
- .pf-chatbot__history.pf-m-compact .pf-v6-c-drawer__main .pf-v6-c-drawer__body {
489
+ .pf-chatbot__history.pf-m-compact > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__body {
472
490
  --pf-v6-c-drawer__panel__body--PaddingInlineStart: var(--pf-t--global--spacer--md);
473
491
  --pf-v6-c-drawer__panel__body--PaddingInlineEnd: var(--pf-t--global--spacer--md);
474
492
  }
475
- .pf-chatbot__history.pf-m-compact .pf-chatbot__menu-item {
476
- font-size: var(--pf-t--global--font--size--body--md);
477
- }
478
- .pf-chatbot__history.pf-m-compact .pf-v6-c-drawer__head {
493
+ .pf-chatbot__history.pf-m-compact > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__head {
479
494
  --pf-v6-c-drawer__head--PaddingInlineStart: var(--pf-t--global--spacer--lg);
480
495
  --pf-v6-c-drawer__head--PaddingInlineEnd: var(--pf-t--global--spacer--lg);
481
496
  }
482
- .pf-chatbot__history.pf-m-compact .pf-v6-c-drawer__close .pf-v6-c-button {
497
+ .pf-chatbot__history.pf-m-compact > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__close .pf-v6-c-button {
483
498
  width: 2rem;
484
499
  height: 2rem;
485
500
  --pf-v6-c-button--m-plain--PaddingInlineEnd: var(--pf-t--global--spacer--xs);
@@ -487,6 +502,9 @@
487
502
  --pf-v6-c-button--PaddingBlockStart: var(--pf-t--global--spacer--xs);
488
503
  --pf-v6-c-button--PaddingBlockEnd: var(--pf-t--global--spacer--xs);
489
504
  }
505
+ .pf-chatbot__history.pf-m-compact .pf-chatbot__menu-item {
506
+ font-size: var(--pf-t--global--font--size--body--md);
507
+ }
490
508
 
491
509
  .pf-chatbot__footnote {
492
510
  align-self: center;
@@ -784,6 +802,7 @@
784
802
  position: fixed;
785
803
  inset-block-end: var(--pf-t--global--spacer--md);
786
804
  inset-inline-end: var(--pf-t--global--spacer--md);
805
+ --pf-v6-c-button--BorderRadius: 0;
787
806
  --pf-v6-c-button--m-plain--BackgroundColor: var(--pf-t--global--background--color--floating--default);
788
807
  --pf-v6-c-button--m-plain--hover--BackgroundColor: var(--pf-t--global--background--color--floating--hover);
789
808
  --pf-v6-c-button--m-plain--m-clicked--BackgroundColor: var(--pf-t--global--background--color--floating--clicked);
@@ -818,8 +837,8 @@
818
837
  --pf-v6-c-button--m-plain--BackgroundColor: var(--pf-t--global--background--color--secondary--clicked);
819
838
  }
820
839
 
821
- .pf-chatbot__button--round {
822
- border-radius: var(--pf-t--global--border--radius--pill);
840
+ .pf-chatbot__button.pf-chatbot__button--round {
841
+ --pf-v6-c-button--BorderRadius: var(--pf-t--global--border--radius--pill);
823
842
  width: 3rem;
824
843
  height: 3rem;
825
844
  }
@@ -849,6 +868,13 @@
849
868
  flex: 1;
850
869
  overflow: visible;
851
870
  height: 100%;
871
+ min-width: 0;
872
+ }
873
+ .pf-chatbot--layout--welcome .pf-chatbot__prompt-suggestion-body {
874
+ overflow-wrap: anywhere;
875
+ }
876
+ .pf-chatbot--layout--welcome .pf-chatbot__prompt-suggestion-title {
877
+ --pf-v6-c-card__title-text--OverflowWrap: anywhere;
852
878
  }
853
879
 
854
880
  .pf-chatbot--layout--welcome.pf-m-compact {
@@ -866,6 +892,140 @@
866
892
  align-items: baseline;
867
893
  }
868
894
  }
895
+ .pf-chatbot__canvas {
896
+ --pf-chatbot__canvas--BackgroundColor: var(--pf-t--global--background--color--secondary--default);
897
+ --pf-chatbot__canvas--Padding: var(--pf-t--global--spacer--lg);
898
+ display: flex;
899
+ flex-direction: column;
900
+ flex: 1;
901
+ min-height: 0;
902
+ height: 100%;
903
+ background-color: var(--pf-chatbot__canvas--BackgroundColor);
904
+ }
905
+
906
+ :where(.pf-v6-theme-glass) .pf-chatbot__canvas {
907
+ --pf-chatbot__canvas--BackgroundColor: var(--pf-t--global--background--color--glass--primary--default);
908
+ }
909
+
910
+ .pf-chatbot__canvas-docked-nav {
911
+ border-inline-end: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--subtle);
912
+ }
913
+
914
+ .pf-chatbot__canvas-drawer {
915
+ flex: 1;
916
+ min-height: 0;
917
+ height: 100%;
918
+ background-color: var(--pf-chatbot__canvas--BackgroundColor);
919
+ --pf-v6-c-drawer__panel--Opacity: 1;
920
+ --pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
921
+ --pf-v6-c-drawer__panel--m-inline--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
922
+ --pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
923
+ --pf-v6-c-drawer__panel--m-glass--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
924
+ --pf-v6-c-code-editor__main--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
925
+ }
926
+ .pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main,
927
+ .pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel,
928
+ .pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__panel-main {
929
+ background-color: var(--pf-chatbot__canvas--BackgroundColor);
930
+ }
931
+
932
+ @media screen and (min-width: 48rem) {
933
+ .pf-v6-c-drawer.pf-m-inline.pf-chatbot__canvas-drawer {
934
+ --pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
935
+ --pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
936
+ }
937
+ }
938
+ .pf-chatbot__canvas-body {
939
+ height: 100%;
940
+ }
941
+
942
+ .pf-chatbot__canvas-column {
943
+ display: flex;
944
+ flex-direction: column;
945
+ height: 100%;
946
+ min-height: 0;
947
+ }
948
+
949
+ .pf-chatbot__canvas-chat-content {
950
+ padding-block-start: var(--pf-t--global--spacer--lg);
951
+ }
952
+
953
+ .pf-chatbot__canvas-chat-footer {
954
+ padding-block-end: var(--pf-t--global--spacer--md);
955
+ }
956
+
957
+ .pf-chatbot__canvas-section {
958
+ display: flex;
959
+ flex-direction: column;
960
+ flex: 1;
961
+ min-height: 0;
962
+ height: 100%;
963
+ }
964
+
965
+ .pf-chatbot__canvas-panel {
966
+ height: 100%;
967
+ overflow: hidden;
968
+ background-color: var(--pf-chatbot__canvas--BackgroundColor);
969
+ --pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
970
+ --pf-v6-c-drawer__panel--m-inline--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
971
+ --pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
972
+ --pf-v6-c-drawer__panel--m-glass--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
973
+ --pf-v6-c-drawer__panel--PaddingBlockStart: 0;
974
+ --pf-v6-c-drawer__panel--PaddingBlockEnd: 0;
975
+ --pf-v6-c-drawer__panel--RowGap: 0;
976
+ }
977
+ .pf-chatbot__canvas-panel .pf-v6-c-drawer__panel-main {
978
+ display: flex;
979
+ flex-direction: column;
980
+ min-height: 0;
981
+ height: 100%;
982
+ }
983
+ .pf-chatbot__canvas-panel .pf-chatbot__canvas-panel-body {
984
+ display: flex;
985
+ flex-direction: column;
986
+ flex: 1;
987
+ min-height: 0;
988
+ padding-block-end: var(--pf-chatbot__canvas--Padding);
989
+ padding-inline: var(--pf-chatbot__canvas--Padding);
990
+ box-sizing: border-box;
991
+ background-color: var(--pf-chatbot__canvas--BackgroundColor);
992
+ }
993
+ .pf-chatbot__canvas-panel .pf-chatbot__canvas-head {
994
+ width: 100%;
995
+ grid-template-columns: minmax(0, 1fr) max-content;
996
+ --pf-v6-c-drawer__head--PaddingBlockStart: var(--pf-chatbot__canvas--Padding);
997
+ --pf-v6-c-drawer__head--PaddingBlockEnd: var(--pf-t--global--spacer--lg);
998
+ --pf-v6-c-drawer__head--PaddingInlineStart: var(--pf-chatbot__canvas--Padding);
999
+ --pf-v6-c-drawer__head--PaddingInlineEnd: var(--pf-chatbot__canvas--Padding);
1000
+ }
1001
+ .pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions {
1002
+ grid-column: 2;
1003
+ justify-self: end;
1004
+ align-self: start;
1005
+ width: max-content;
1006
+ --pf-v6-c-drawer__actions--MarginBlockStart: 0;
1007
+ --pf-v6-c-drawer__actions--MarginInlineEnd: 0;
1008
+ }
1009
+ .pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions .pf-v6-c-button {
1010
+ border-radius: var(--pf-t--global--border--radius--pill);
1011
+ justify-content: center;
1012
+ align-items: center;
1013
+ }
1014
+ .pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions .pf-v6-c-button::before {
1015
+ border-radius: inherit;
1016
+ }
1017
+
1018
+ .pf-chatbot__canvas-editor {
1019
+ display: flex;
1020
+ flex: 1;
1021
+ flex-direction: column;
1022
+ min-height: 0;
1023
+ height: 100%;
1024
+ }
1025
+ .pf-chatbot__canvas-editor .pf-v6-c-code-editor {
1026
+ --pf-v6-c-code-editor__main--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
1027
+ }
1028
+
869
1029
  .pf-chatbot__code-modal .pf-v6-c-code-editor {
870
1030
  --pf-v6-c-code-editor__main--BackgroundColor: #1f1f1f;
871
1031
  --pf-v6-c-code-editor__main--BorderEndStartRadius: 0;
@@ -1318,10 +1478,15 @@
1318
1478
  gap: var(--pf-t--global--spacer--sm);
1319
1479
  }
1320
1480
  .pf-chatbot__message-meta .pf-chatbot__message-name {
1481
+ display: flex;
1321
1482
  font-family: var(--pf-v6-c-content--heading--FontFamily, redhatdisplayvf, redhatdisplay, helvetica, arial, sans-serif);
1322
1483
  font-weight: 600;
1323
1484
  font-size: var(--pf-t--global--font--size--sm);
1324
1485
  }
1486
+ .pf-chatbot__message-meta .pf-chatbot__message-name::after {
1487
+ content: "";
1488
+ flex: 0 0 1px;
1489
+ }
1325
1490
  .pf-chatbot__message-meta .pf-v6-c-label {
1326
1491
  --pf-v6-c-label--FontSize: var(--pf-t--global--font--size--xs);
1327
1492
  font-weight: var(--pf-t--global--font--weight--body--bold);
@@ -2159,20 +2324,11 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
2159
2324
  width: 3rem;
2160
2325
  height: 3rem;
2161
2326
  }
2162
- .pf-v6-c-button.pf-chatbot__button--attach .pf-v6-c-button__icon {
2163
- color: var(--pf-t--global--icon--color--subtle);
2164
- }
2165
- .pf-v6-c-button.pf-chatbot__button--attach:hover .pf-v6-c-button__icon {
2166
- color: var(--pf-t--global--icon--color--regular);
2167
- }
2168
- .pf-v6-c-button.pf-chatbot__button--attach:active, .pf-v6-c-button.pf-chatbot__button--attach:focus {
2327
+ .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked, .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked:hover, .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked:focus {
2169
2328
  background-color: var(--pf-t--global--color--brand--clicked);
2170
2329
  }
2171
- .pf-v6-c-button.pf-chatbot__button--attach:active .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach:focus .pf-v6-c-button__icon {
2172
- color: var(--pf-t--global--icon--color--inverse);
2173
- }
2174
- .pf-v6-c-button.pf-chatbot__button--attach:active:hover .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach:active:focus .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach:focus:hover .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach:focus:focus .pf-v6-c-button__icon {
2175
- color: var(--pf-t--global--icon--color--inverse);
2330
+ .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked:hover .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--attach.pf-m-clicked:focus .pf-v6-c-button__icon {
2331
+ color: var(--pf-t--global--icon--color--on-brand--default);
2176
2332
  }
2177
2333
 
2178
2334
  .pf-v6-c-button.pf-chatbot__button--attach.pf-m-compact {
@@ -2223,31 +2379,7 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
2223
2379
  padding: var(--pf-t--global--spacer--md);
2224
2380
  width: 3rem;
2225
2381
  height: 3rem;
2226
- }
2227
- .pf-v6-c-button.pf-chatbot__button--send .pf-v6-c-button__icon {
2228
- --pf-v6-c-button__icon--Color: var(--pf-t--global--color--brand--default);
2229
- }
2230
- .pf-v6-c-button.pf-chatbot__button--send:hover, .pf-v6-c-button.pf-chatbot__button--send:focus {
2231
- background-color: rgba(146, 197, 249, 0.25);
2232
- color: var(--pf-t--global--color--brand--hover);
2233
- }
2234
- .pf-v6-c-button.pf-chatbot__button--send:hover .pf-v6-c-button__icon, .pf-v6-c-button.pf-chatbot__button--send:focus .pf-v6-c-button__icon {
2235
- color: var(--pf-t--global--color--brand--hover);
2236
- }
2237
-
2238
- .pf-v6-theme-dark .pf-v6-c-button.pf-chatbot__button--send {
2239
- background-color: var(--pf-t--global--color--brand--default);
2240
- }
2241
- .pf-v6-theme-dark .pf-v6-c-button.pf-chatbot__button--send .pf-v6-c-button__icon {
2242
- --pf-v6-c-button__icon--Color: var(--pf-t--global--icon--color--inverse);
2243
- }
2244
- .pf-v6-theme-dark .pf-v6-c-button:disabled.pf-chatbot__button--send:disabled {
2245
- --pf-v6-c-button--disabled--Color: var(--pf-t--global--icon--color--disabled);
2246
- background-color: var(--pf-t--global--background--color--disabled--default);
2247
- }
2248
- .pf-v6-theme-dark .pf-v6-c-button.pf-chatbot__button--send:hover,
2249
- .pf-v6-theme-dark .pf-v6-c-button.pf-chatbot__button--send:focus {
2250
- background-color: rgba(146, 197, 249, 0.25);
2382
+ --pf-v6-c-button--m-plain__icon--Color: var(--pf-t--global--color--brand--default);
2251
2383
  }
2252
2384
 
2253
2385
  @keyframes motionSendButton {
@@ -2324,11 +2456,11 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
2324
2456
  transition: border-color var(--pf-t--global--motion--timing-function--accelerate) var(--pf-t--global--motion--duration--sm), border-width var(--pf-t--global--motion--timing-function--accelerate) var(--pf-t--global--motion--duration--sm);
2325
2457
  }
2326
2458
  .pf-chatbot__message-bar:hover::after {
2327
- border-color: var(--pf-t--global--border--color--control--hover);
2459
+ border-color: var(--pf-t--global--border--color--hover);
2328
2460
  border-width: var(--pf-t--global--border--width--control--hover);
2329
2461
  }
2330
2462
  .pf-chatbot__message-bar:focus-within::after {
2331
- border-color: var(--pf-t--global--border--color--control--clicked);
2463
+ border-color: var(--pf-t--global--border--color--clicked);
2332
2464
  border-width: var(--pf-t--global--border--width--control--clicked);
2333
2465
  }
2334
2466
  .pf-chatbot__message-bar-actions {
@@ -2808,6 +2940,12 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
2808
2940
  text-overflow: ellipsis;
2809
2941
  }
2810
2942
 
2943
+ .pf-chatbot__sources-header-content-container {
2944
+ display: inline-flex;
2945
+ width: fit-content;
2946
+ margin-block-end: var(--pf-t--global--spacer--sm);
2947
+ }
2948
+
2811
2949
  .pf-chatbot__sources-card-title-container {
2812
2950
  display: flex;
2813
2951
  flex-direction: column;