@patternfly/chatbot 6.9.0-prerelease.1 → 6.9.0-prerelease.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Chatbot/Chatbot.d.ts +2 -0
- package/dist/cjs/Chatbot/Chatbot.js +2 -2
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +1 -1
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/cjs/ChatbotModal/ChatbotModal.js +1 -1
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +1 -1
- package/dist/cjs/MessageBar/MessageBar.d.ts +1 -1
- package/dist/cjs/MessageBar/MessageBar.js +4 -3
- package/dist/cjs/MessageBar/SendButton.js +2 -2
- package/dist/cjs/SourcesCard/SourcesCard.d.ts +2 -0
- package/dist/cjs/SourcesCardBase/SourcesCardBase.d.ts +2 -0
- package/dist/cjs/SourcesCardBase/SourcesCardBase.js +2 -2
- package/dist/css/main.css +201 -66
- package/dist/css/main.css.map +1 -1
- package/dist/esm/Chatbot/Chatbot.d.ts +2 -0
- package/dist/esm/Chatbot/Chatbot.js +3 -3
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +1 -1
- package/dist/esm/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/esm/ChatbotModal/ChatbotModal.js +1 -1
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +1 -1
- package/dist/esm/MessageBar/MessageBar.d.ts +1 -1
- package/dist/esm/MessageBar/MessageBar.js +4 -3
- package/dist/esm/MessageBar/SendButton.js +2 -2
- package/dist/esm/SourcesCard/SourcesCard.d.ts +2 -0
- package/dist/esm/SourcesCardBase/SourcesCardBase.d.ts +2 -0
- package/dist/esm/SourcesCardBase/SourcesCardBase.js +2 -2
- package/package.json +9 -9
- package/patternfly-docs/content/extensions/chatbot/chatbot.md +1 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +31 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +2 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Canvas.md +132 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Canvas.tsx +615 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/CanvasWithDockedNav.tsx +697 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +39 -5
- package/patternfly-docs/content/extensions/chatbot/examples/demos/FullscreenDockedNav.tsx +385 -0
- package/patternfly-docs/patternfly-docs.config.js +1 -1
- package/src/Canvas/Canvas.scss +150 -0
- package/src/Chatbot/Chatbot.scss +13 -1
- package/src/Chatbot/Chatbot.test.tsx +11 -0
- package/src/Chatbot/Chatbot.tsx +5 -1
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +91 -77
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +32 -13
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +1 -0
- package/src/ChatbotFooter/ChatbotFooternote.test.tsx +50 -0
- package/src/ChatbotFooter/ChatbotFootnote.tsx +1 -1
- package/src/ChatbotModal/ChatbotModal.scss +2 -7
- package/src/ChatbotModal/ChatbotModal.tsx +1 -0
- package/src/ChatbotToggle/ChatbotToggle.scss +3 -2
- package/src/ChatbotToggle/ChatbotToggle.test.tsx +4 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +9 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +4 -2
- package/src/FileDetails/__snapshots__/FileDetails.test.tsx.snap +2 -6
- package/src/FileDetailsLabel/__snapshots__/FileDetailsLabel.test.tsx.snap +2 -6
- package/src/Message/Message.scss +9 -0
- package/src/MessageBar/AttachButton.scss +4 -21
- package/src/MessageBar/MessageBar.scss +2 -2
- package/src/MessageBar/MessageBar.test.tsx +20 -0
- package/src/MessageBar/MessageBar.tsx +7 -3
- package/src/MessageBar/SendButton.scss +1 -32
- package/src/MessageBar/SendButton.tsx +2 -2
- package/src/SourcesCard/SourcesCard.scss +6 -0
- package/src/SourcesCard/SourcesCard.test.tsx +16 -0
- package/src/SourcesCard/SourcesCard.tsx +2 -0
- package/src/SourcesCardBase/SourcesCardBase.test.tsx +62 -0
- package/src/SourcesCardBase/SourcesCardBase.tsx +8 -0
- 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.
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
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)(
|
|
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.
|
|
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.
|
|
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--
|
|
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-
|
|
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;
|
|
@@ -705,11 +723,8 @@
|
|
|
705
723
|
padding-block-end: var(--pf-t--global--spacer--sm);
|
|
706
724
|
}
|
|
707
725
|
|
|
708
|
-
:root:where(.pf-v6-theme-glass) .pf-
|
|
709
|
-
--pf-v6-c-modal-box--BackgroundColor: var(
|
|
710
|
-
--pf-t--global--background--color--glass--primary--default,
|
|
711
|
-
var(--pf-t--global--background--color--secondary--default)
|
|
712
|
-
);
|
|
726
|
+
:root:where(.pf-v6-theme-glass) .pf-chatbot__code-modal {
|
|
727
|
+
--pf-v6-c-modal-box--BackgroundColor: var(--pf-t--global--background--color--floating--secondary--default);
|
|
713
728
|
}
|
|
714
729
|
|
|
715
730
|
@media screen and (max-width: 600px) {
|
|
@@ -784,6 +799,7 @@
|
|
|
784
799
|
position: fixed;
|
|
785
800
|
inset-block-end: var(--pf-t--global--spacer--md);
|
|
786
801
|
inset-inline-end: var(--pf-t--global--spacer--md);
|
|
802
|
+
--pf-v6-c-button--BorderRadius: 0;
|
|
787
803
|
--pf-v6-c-button--m-plain--BackgroundColor: var(--pf-t--global--background--color--floating--default);
|
|
788
804
|
--pf-v6-c-button--m-plain--hover--BackgroundColor: var(--pf-t--global--background--color--floating--hover);
|
|
789
805
|
--pf-v6-c-button--m-plain--m-clicked--BackgroundColor: var(--pf-t--global--background--color--floating--clicked);
|
|
@@ -818,8 +834,8 @@
|
|
|
818
834
|
--pf-v6-c-button--m-plain--BackgroundColor: var(--pf-t--global--background--color--secondary--clicked);
|
|
819
835
|
}
|
|
820
836
|
|
|
821
|
-
.pf-chatbot__button--round {
|
|
822
|
-
|
|
837
|
+
.pf-chatbot__button.pf-chatbot__button--round {
|
|
838
|
+
--pf-v6-c-button--BorderRadius: var(--pf-t--global--border--radius--pill);
|
|
823
839
|
width: 3rem;
|
|
824
840
|
height: 3rem;
|
|
825
841
|
}
|
|
@@ -849,6 +865,13 @@
|
|
|
849
865
|
flex: 1;
|
|
850
866
|
overflow: visible;
|
|
851
867
|
height: 100%;
|
|
868
|
+
min-width: 0;
|
|
869
|
+
}
|
|
870
|
+
.pf-chatbot--layout--welcome .pf-chatbot__prompt-suggestion-body {
|
|
871
|
+
overflow-wrap: anywhere;
|
|
872
|
+
}
|
|
873
|
+
.pf-chatbot--layout--welcome .pf-chatbot__prompt-suggestion-title {
|
|
874
|
+
--pf-v6-c-card__title-text--OverflowWrap: anywhere;
|
|
852
875
|
}
|
|
853
876
|
|
|
854
877
|
.pf-chatbot--layout--welcome.pf-m-compact {
|
|
@@ -866,6 +889,140 @@
|
|
|
866
889
|
align-items: baseline;
|
|
867
890
|
}
|
|
868
891
|
}
|
|
892
|
+
.pf-chatbot__canvas {
|
|
893
|
+
--pf-chatbot__canvas--BackgroundColor: var(--pf-t--global--background--color--secondary--default);
|
|
894
|
+
--pf-chatbot__canvas--Padding: var(--pf-t--global--spacer--lg);
|
|
895
|
+
display: flex;
|
|
896
|
+
flex-direction: column;
|
|
897
|
+
flex: 1;
|
|
898
|
+
min-height: 0;
|
|
899
|
+
height: 100%;
|
|
900
|
+
background-color: var(--pf-chatbot__canvas--BackgroundColor);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
:where(.pf-v6-theme-glass) .pf-chatbot__canvas {
|
|
904
|
+
--pf-chatbot__canvas--BackgroundColor: var(--pf-t--global--background--color--glass--primary--default);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.pf-chatbot__canvas-docked-nav {
|
|
908
|
+
border-inline-end: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--subtle);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.pf-chatbot__canvas-drawer {
|
|
912
|
+
flex: 1;
|
|
913
|
+
min-height: 0;
|
|
914
|
+
height: 100%;
|
|
915
|
+
background-color: var(--pf-chatbot__canvas--BackgroundColor);
|
|
916
|
+
--pf-v6-c-drawer__panel--Opacity: 1;
|
|
917
|
+
--pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
918
|
+
--pf-v6-c-drawer__panel--m-inline--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
919
|
+
--pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
920
|
+
--pf-v6-c-drawer__panel--m-glass--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
921
|
+
--pf-v6-c-code-editor__main--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
922
|
+
}
|
|
923
|
+
.pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main,
|
|
924
|
+
.pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel,
|
|
925
|
+
.pf-chatbot__canvas-drawer > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel .pf-v6-c-drawer__panel-main {
|
|
926
|
+
background-color: var(--pf-chatbot__canvas--BackgroundColor);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
@media screen and (min-width: 48rem) {
|
|
930
|
+
.pf-v6-c-drawer.pf-m-inline.pf-chatbot__canvas-drawer {
|
|
931
|
+
--pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
932
|
+
--pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
.pf-chatbot__canvas-body {
|
|
936
|
+
height: 100%;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.pf-chatbot__canvas-column {
|
|
940
|
+
display: flex;
|
|
941
|
+
flex-direction: column;
|
|
942
|
+
height: 100%;
|
|
943
|
+
min-height: 0;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.pf-chatbot__canvas-chat-content {
|
|
947
|
+
padding-block-start: var(--pf-t--global--spacer--lg);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
.pf-chatbot__canvas-chat-footer {
|
|
951
|
+
padding-block-end: var(--pf-t--global--spacer--md);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.pf-chatbot__canvas-section {
|
|
955
|
+
display: flex;
|
|
956
|
+
flex-direction: column;
|
|
957
|
+
flex: 1;
|
|
958
|
+
min-height: 0;
|
|
959
|
+
height: 100%;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.pf-chatbot__canvas-panel {
|
|
963
|
+
height: 100%;
|
|
964
|
+
overflow: hidden;
|
|
965
|
+
background-color: var(--pf-chatbot__canvas--BackgroundColor);
|
|
966
|
+
--pf-v6-c-drawer__panel--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
967
|
+
--pf-v6-c-drawer__panel--m-inline--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
968
|
+
--pf-v6-c-drawer__panel--m-inline--md--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
969
|
+
--pf-v6-c-drawer__panel--m-glass--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
970
|
+
--pf-v6-c-drawer__panel--PaddingBlockStart: 0;
|
|
971
|
+
--pf-v6-c-drawer__panel--PaddingBlockEnd: 0;
|
|
972
|
+
--pf-v6-c-drawer__panel--RowGap: 0;
|
|
973
|
+
}
|
|
974
|
+
.pf-chatbot__canvas-panel .pf-v6-c-drawer__panel-main {
|
|
975
|
+
display: flex;
|
|
976
|
+
flex-direction: column;
|
|
977
|
+
min-height: 0;
|
|
978
|
+
height: 100%;
|
|
979
|
+
}
|
|
980
|
+
.pf-chatbot__canvas-panel .pf-chatbot__canvas-panel-body {
|
|
981
|
+
display: flex;
|
|
982
|
+
flex-direction: column;
|
|
983
|
+
flex: 1;
|
|
984
|
+
min-height: 0;
|
|
985
|
+
padding-block-end: var(--pf-chatbot__canvas--Padding);
|
|
986
|
+
padding-inline: var(--pf-chatbot__canvas--Padding);
|
|
987
|
+
box-sizing: border-box;
|
|
988
|
+
background-color: var(--pf-chatbot__canvas--BackgroundColor);
|
|
989
|
+
}
|
|
990
|
+
.pf-chatbot__canvas-panel .pf-chatbot__canvas-head {
|
|
991
|
+
width: 100%;
|
|
992
|
+
grid-template-columns: minmax(0, 1fr) max-content;
|
|
993
|
+
--pf-v6-c-drawer__head--PaddingBlockStart: var(--pf-chatbot__canvas--Padding);
|
|
994
|
+
--pf-v6-c-drawer__head--PaddingBlockEnd: var(--pf-t--global--spacer--lg);
|
|
995
|
+
--pf-v6-c-drawer__head--PaddingInlineStart: var(--pf-chatbot__canvas--Padding);
|
|
996
|
+
--pf-v6-c-drawer__head--PaddingInlineEnd: var(--pf-chatbot__canvas--Padding);
|
|
997
|
+
}
|
|
998
|
+
.pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions {
|
|
999
|
+
grid-column: 2;
|
|
1000
|
+
justify-self: end;
|
|
1001
|
+
align-self: start;
|
|
1002
|
+
width: max-content;
|
|
1003
|
+
--pf-v6-c-drawer__actions--MarginBlockStart: 0;
|
|
1004
|
+
--pf-v6-c-drawer__actions--MarginInlineEnd: 0;
|
|
1005
|
+
}
|
|
1006
|
+
.pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions .pf-v6-c-button {
|
|
1007
|
+
border-radius: var(--pf-t--global--border--radius--pill);
|
|
1008
|
+
justify-content: center;
|
|
1009
|
+
align-items: center;
|
|
1010
|
+
}
|
|
1011
|
+
.pf-chatbot__canvas-panel .pf-chatbot__canvas-head .pf-v6-c-drawer__actions .pf-v6-c-button::before {
|
|
1012
|
+
border-radius: inherit;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.pf-chatbot__canvas-editor {
|
|
1016
|
+
display: flex;
|
|
1017
|
+
flex: 1;
|
|
1018
|
+
flex-direction: column;
|
|
1019
|
+
min-height: 0;
|
|
1020
|
+
height: 100%;
|
|
1021
|
+
}
|
|
1022
|
+
.pf-chatbot__canvas-editor .pf-v6-c-code-editor {
|
|
1023
|
+
--pf-v6-c-code-editor__main--BackgroundColor: var(--pf-chatbot__canvas--BackgroundColor);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
869
1026
|
.pf-chatbot__code-modal .pf-v6-c-code-editor {
|
|
870
1027
|
--pf-v6-c-code-editor__main--BackgroundColor: #1f1f1f;
|
|
871
1028
|
--pf-v6-c-code-editor__main--BorderEndStartRadius: 0;
|
|
@@ -1318,10 +1475,15 @@
|
|
|
1318
1475
|
gap: var(--pf-t--global--spacer--sm);
|
|
1319
1476
|
}
|
|
1320
1477
|
.pf-chatbot__message-meta .pf-chatbot__message-name {
|
|
1478
|
+
display: flex;
|
|
1321
1479
|
font-family: var(--pf-v6-c-content--heading--FontFamily, redhatdisplayvf, redhatdisplay, helvetica, arial, sans-serif);
|
|
1322
1480
|
font-weight: 600;
|
|
1323
1481
|
font-size: var(--pf-t--global--font--size--sm);
|
|
1324
1482
|
}
|
|
1483
|
+
.pf-chatbot__message-meta .pf-chatbot__message-name::after {
|
|
1484
|
+
content: "";
|
|
1485
|
+
flex: 0 0 1px;
|
|
1486
|
+
}
|
|
1325
1487
|
.pf-chatbot__message-meta .pf-v6-c-label {
|
|
1326
1488
|
--pf-v6-c-label--FontSize: var(--pf-t--global--font--size--xs);
|
|
1327
1489
|
font-weight: var(--pf-t--global--font--weight--body--bold);
|
|
@@ -2159,20 +2321,11 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
|
|
|
2159
2321
|
width: 3rem;
|
|
2160
2322
|
height: 3rem;
|
|
2161
2323
|
}
|
|
2162
|
-
.pf-v6-c-button.pf-chatbot__button--attach .pf-v6-c-
|
|
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 {
|
|
2324
|
+
.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
2325
|
background-color: var(--pf-t--global--color--brand--clicked);
|
|
2170
2326
|
}
|
|
2171
|
-
.pf-v6-c-button.pf-chatbot__button--attach:
|
|
2172
|
-
color: var(--pf-t--global--icon--color--
|
|
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);
|
|
2327
|
+
.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 {
|
|
2328
|
+
color: var(--pf-t--global--icon--color--on-brand--default);
|
|
2176
2329
|
}
|
|
2177
2330
|
|
|
2178
2331
|
.pf-v6-c-button.pf-chatbot__button--attach.pf-m-compact {
|
|
@@ -2223,31 +2376,7 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
|
|
|
2223
2376
|
padding: var(--pf-t--global--spacer--md);
|
|
2224
2377
|
width: 3rem;
|
|
2225
2378
|
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);
|
|
2379
|
+
--pf-v6-c-button--m-plain__icon--Color: var(--pf-t--global--color--brand--default);
|
|
2251
2380
|
}
|
|
2252
2381
|
|
|
2253
2382
|
@keyframes motionSendButton {
|
|
@@ -2324,11 +2453,11 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
|
|
|
2324
2453
|
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
2454
|
}
|
|
2326
2455
|
.pf-chatbot__message-bar:hover::after {
|
|
2327
|
-
border-color: var(--pf-t--global--border--color--
|
|
2456
|
+
border-color: var(--pf-t--global--border--color--hover);
|
|
2328
2457
|
border-width: var(--pf-t--global--border--width--control--hover);
|
|
2329
2458
|
}
|
|
2330
2459
|
.pf-chatbot__message-bar:focus-within::after {
|
|
2331
|
-
border-color: var(--pf-t--global--border--color--
|
|
2460
|
+
border-color: var(--pf-t--global--border--color--clicked);
|
|
2332
2461
|
border-width: var(--pf-t--global--border--width--control--clicked);
|
|
2333
2462
|
}
|
|
2334
2463
|
.pf-chatbot__message-bar-actions {
|
|
@@ -2808,6 +2937,12 @@ li[id*=user-content-fn-]:has(> span > span > .pf-chatbot__message-text + .pf-cha
|
|
|
2808
2937
|
text-overflow: ellipsis;
|
|
2809
2938
|
}
|
|
2810
2939
|
|
|
2940
|
+
.pf-chatbot__sources-header-content-container {
|
|
2941
|
+
display: inline-flex;
|
|
2942
|
+
width: fit-content;
|
|
2943
|
+
margin-block-end: var(--pf-t--global--spacer--sm);
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2811
2946
|
.pf-chatbot__sources-card-title-container {
|
|
2812
2947
|
display: flex;
|
|
2813
2948
|
flex-direction: column;
|