@patternfly/chatbot 6.8.0-prerelease.7 → 6.8.0-prerelease.9
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/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +46 -5
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +125 -16
- package/dist/cjs/CodeModal/CodeModal.js +5 -0
- package/dist/cjs/MarkdownContent/MarkdownContent.d.ts +26 -7
- package/dist/cjs/MarkdownContent/MarkdownContent.js +79 -166
- package/dist/cjs/MarkdownContent/MarkdownRenderer.d.ts +6 -0
- package/dist/cjs/MarkdownContent/MarkdownRenderer.js +187 -0
- package/dist/cjs/Message/Message.d.ts +3 -4
- package/dist/cjs/Message/Message.js +0 -2
- package/dist/cjs/MessageBox/MessageBox.d.ts +2 -0
- package/dist/cjs/MessageBox/MessageBox.js +7 -2
- package/dist/cjs/index.d.ts +0 -8
- package/dist/cjs/index.js +1 -13
- package/dist/css/main.css +77 -10
- package/dist/css/main.css.map +1 -1
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +46 -5
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +128 -19
- package/dist/esm/CodeModal/CodeModal.js +5 -0
- package/dist/esm/MarkdownContent/MarkdownContent.d.ts +26 -7
- package/dist/esm/MarkdownContent/MarkdownContent.js +52 -165
- package/dist/esm/MarkdownContent/MarkdownRenderer.d.ts +6 -0
- package/dist/esm/MarkdownContent/MarkdownRenderer.js +182 -0
- package/dist/esm/Message/Message.d.ts +3 -4
- package/dist/esm/Message/Message.js +0 -2
- package/dist/esm/MessageBox/MessageBox.d.ts +2 -0
- package/dist/esm/MessageBox/MessageBox.js +7 -2
- package/dist/esm/index.d.ts +0 -8
- package/dist/esm/index.js +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/generate-index.js +41 -16
- package/generate-index.test.js +68 -0
- package/monaco-environment.js +45 -0
- package/package.json +20 -2
- package/patternfly-docs/content/extensions/chatbot/chatbot.md +1 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/monitor-sampleapp-quickstart.ts +1 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithExpandableGroups.tsx +104 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +12 -1
- package/patternfly-docs/content/extensions/chatbot/tree-shaking.md +124 -0
- package/patternfly-docs/monaco-environment.js +45 -0
- package/patternfly-docs/patternfly-docs.css.js +6 -0
- package/src/Chatbot/Chatbot.scss +4 -0
- package/src/ChatbotContent/ChatbotContent.scss +1 -1
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +52 -6
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +551 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +350 -49
- package/src/ChatbotFooter/ChatbotFooter.scss +2 -2
- package/src/ChatbotHeader/ChatbotHeader.scss +4 -0
- package/src/ChatbotModal/ChatbotModal.scss +10 -0
- package/src/ChatbotToggle/ChatbotToggle.scss +6 -0
- package/src/CodeModal/CodeModal.tsx +6 -0
- package/src/DeepThinking/DeepThinking.test.tsx +10 -12
- package/src/MarkdownContent/MarkdownContent.test.tsx +52 -5
- package/src/MarkdownContent/MarkdownContent.tsx +77 -220
- package/src/MarkdownContent/MarkdownRenderer.tsx +235 -0
- package/src/Message/Message.scss +5 -0
- package/src/Message/Message.test.tsx +5 -0
- package/src/Message/Message.tsx +3 -5
- package/src/MessageBox/MessageBox.scss +15 -1
- package/src/MessageBox/MessageBox.tsx +23 -2
- package/src/ResponseActions/ResponseActions.test.tsx +42 -48
- package/src/ToolCall/ToolCall.test.tsx +6 -9
- package/src/ToolResponse/ToolResponse.test.tsx +16 -22
- package/src/index.ts +0 -12
- package/src/test-utils/markdownTestUtils.ts +21 -0
- package/tsconfig.json +6 -1
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +0 -1
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +0 -77
- package/dist/cjs/Chatbot/Chatbot.test.d.ts +0 -1
- package/dist/cjs/Chatbot/Chatbot.test.js +0 -32
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.d.ts +0 -1
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +0 -27
- package/dist/cjs/ChatbotContent/ChatbotContent.test.d.ts +0 -1
- package/dist/cjs/ChatbotContent/ChatbotContent.test.js +0 -22
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.d.ts +0 -1
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +0 -75
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.d.ts +0 -1
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +0 -277
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.d.ts +0 -1
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +0 -27
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.d.ts +0 -1
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +0 -87
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +0 -18
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +0 -18
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +0 -22
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +0 -18
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +0 -22
- package/dist/cjs/ChatbotHeader/ChatbotHeaderNewChatButton.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderNewChatButton.test.js +0 -22
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +0 -46
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +0 -44
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +0 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +0 -55
- package/dist/cjs/ChatbotModal/ChatbotModal.test.d.ts +0 -1
- package/dist/cjs/ChatbotModal/ChatbotModal.test.js +0 -16
- package/dist/cjs/ChatbotToggle/ChatbotToggle.test.d.ts +0 -1
- package/dist/cjs/ChatbotToggle/ChatbotToggle.test.js +0 -64
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.d.ts +0 -1
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +0 -61
- package/dist/cjs/CodeModal/CodeModal.test.d.ts +0 -1
- package/dist/cjs/CodeModal/CodeModal.test.js +0 -34
- package/dist/cjs/Compare/Compare.test.d.ts +0 -1
- package/dist/cjs/Compare/Compare.test.js +0 -18
- package/dist/cjs/DeepThinking/DeepThinking.test.d.ts +0 -1
- package/dist/cjs/DeepThinking/DeepThinking.test.js +0 -146
- package/dist/cjs/FileDetails/FileDetails.test.d.ts +0 -1
- package/dist/cjs/FileDetails/FileDetails.test.js +0 -42
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.d.ts +0 -1
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.js +0 -79
- package/dist/cjs/FileDropZone/FileDropZone.test.d.ts +0 -1
- package/dist/cjs/FileDropZone/FileDropZone.test.js +0 -100
- package/dist/cjs/FilePreview/FilePreview.test.d.ts +0 -1
- package/dist/cjs/FilePreview/FilePreview.test.js +0 -97
- package/dist/cjs/ImagePreview/ImagePreview.test.d.ts +0 -1
- package/dist/cjs/ImagePreview/ImagePreview.test.js +0 -225
- package/dist/cjs/MarkdownContent/MarkdownContent.test.d.ts +0 -1
- package/dist/cjs/MarkdownContent/MarkdownContent.test.js +0 -192
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.test.d.ts +0 -1
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.test.js +0 -131
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.test.d.ts +0 -1
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.test.js +0 -30
- package/dist/cjs/Message/Message.test.d.ts +0 -1
- package/dist/cjs/Message/Message.test.js +0 -1128
- package/dist/cjs/Message/MessageAndActions/MessageAndActions.test.d.ts +0 -1
- package/dist/cjs/Message/MessageAndActions/MessageAndActions.test.js +0 -25
- package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.test.d.ts +0 -1
- package/dist/cjs/Message/MessageAttachments/MessageAttachmentItem.test.js +0 -25
- package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.test.d.ts +0 -1
- package/dist/cjs/Message/MessageAttachments/MessageAttachmentsContainer.test.js +0 -25
- package/dist/cjs/Message/MessageLoading.test.d.ts +0 -1
- package/dist/cjs/Message/MessageLoading.test.js +0 -25
- package/dist/cjs/Message/QuickResponse/QuickResponse.test.d.ts +0 -1
- package/dist/cjs/Message/QuickResponse/QuickResponse.test.js +0 -109
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.d.ts +0 -1
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.js +0 -76
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.d.ts +0 -1
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +0 -181
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.d.ts +0 -1
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +0 -243
- package/dist/cjs/MessageBar/AttachButton.test.d.ts +0 -1
- package/dist/cjs/MessageBar/AttachButton.test.js +0 -152
- package/dist/cjs/MessageBar/MessageBar.test.d.ts +0 -1
- package/dist/cjs/MessageBar/MessageBar.test.js +0 -338
- package/dist/cjs/MessageBar/SendButton.test.d.ts +0 -1
- package/dist/cjs/MessageBar/SendButton.test.js +0 -58
- package/dist/cjs/MessageBar/StopButton.test.d.ts +0 -1
- package/dist/cjs/MessageBar/StopButton.test.js +0 -58
- package/dist/cjs/MessageBox/JumpButton.test.d.ts +0 -1
- package/dist/cjs/MessageBox/JumpButton.test.js +0 -39
- package/dist/cjs/MessageBox/MessageBox.test.d.ts +0 -1
- package/dist/cjs/MessageBox/MessageBox.test.js +0 -294
- package/dist/cjs/MessageDivider/MessageDivider.test.d.ts +0 -1
- package/dist/cjs/MessageDivider/MessageDivider.test.js +0 -29
- package/dist/cjs/Onboarding/Onboarding.test.d.ts +0 -1
- package/dist/cjs/Onboarding/Onboarding.test.js +0 -80
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +0 -1
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +0 -50
- package/dist/cjs/ResponseActions/ResponseActionButton.test.d.ts +0 -1
- package/dist/cjs/ResponseActions/ResponseActionButton.test.js +0 -54
- package/dist/cjs/ResponseActions/ResponseActions.test.d.ts +0 -1
- package/dist/cjs/ResponseActions/ResponseActions.test.js +0 -455
- package/dist/cjs/ResponseActions/ResponseActionsGroups.test.d.ts +0 -1
- package/dist/cjs/ResponseActions/ResponseActionsGroups.test.js +0 -25
- package/dist/cjs/Settings/SettingsForm.test.d.ts +0 -1
- package/dist/cjs/Settings/SettingsForm.test.js +0 -35
- package/dist/cjs/SourcesCard/SourcesCard.test.d.ts +0 -1
- package/dist/cjs/SourcesCard/SourcesCard.test.js +0 -39
- package/dist/cjs/SourcesCardBase/SourcesCardBase.test.d.ts +0 -1
- package/dist/cjs/SourcesCardBase/SourcesCardBase.test.js +0 -199
- package/dist/cjs/TermsOfUse/TermsOfUse.test.d.ts +0 -1
- package/dist/cjs/TermsOfUse/TermsOfUse.test.js +0 -77
- package/dist/cjs/ToolCall/ToolCall.test.d.ts +0 -1
- package/dist/cjs/ToolCall/ToolCall.test.js +0 -201
- package/dist/cjs/ToolResponse/ToolResponse.test.d.ts +0 -1
- package/dist/cjs/ToolResponse/ToolResponse.test.js +0 -184
- package/dist/cjs/__mocks__/monaco-editor.d.ts +0 -11
- package/dist/cjs/__mocks__/monaco-editor.js +0 -18
- package/dist/cjs/__mocks__/rehype-external-links.d.ts +0 -2
- package/dist/cjs/__mocks__/rehype-external-links.js +0 -4
- package/dist/cjs/__mocks__/rehype-highlight.d.ts +0 -2
- package/dist/cjs/__mocks__/rehype-highlight.js +0 -4
- package/dist/cjs/__mocks__/rehype-sanitize.d.ts +0 -2
- package/dist/cjs/__mocks__/rehype-sanitize.js +0 -4
- package/dist/cjs/__mocks__/rehype-unwrap-images.d.ts +0 -2
- package/dist/cjs/__mocks__/rehype-unwrap-images.js +0 -4
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +0 -1
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +0 -72
- package/dist/esm/Chatbot/Chatbot.test.d.ts +0 -1
- package/dist/esm/Chatbot/Chatbot.test.js +0 -27
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.d.ts +0 -1
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +0 -22
- package/dist/esm/ChatbotContent/ChatbotContent.test.d.ts +0 -1
- package/dist/esm/ChatbotContent/ChatbotContent.test.js +0 -17
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.d.ts +0 -1
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +0 -70
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.d.ts +0 -1
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +0 -272
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.d.ts +0 -1
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +0 -22
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.d.ts +0 -1
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +0 -82
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +0 -13
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +0 -13
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +0 -20
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +0 -13
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +0 -20
- package/dist/esm/ChatbotHeader/ChatbotHeaderNewChatButton.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderNewChatButton.test.js +0 -20
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +0 -44
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +0 -42
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +0 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +0 -50
- package/dist/esm/ChatbotModal/ChatbotModal.test.d.ts +0 -1
- package/dist/esm/ChatbotModal/ChatbotModal.test.js +0 -11
- package/dist/esm/ChatbotToggle/ChatbotToggle.test.d.ts +0 -1
- package/dist/esm/ChatbotToggle/ChatbotToggle.test.js +0 -59
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.d.ts +0 -1
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +0 -56
- package/dist/esm/CodeModal/CodeModal.test.d.ts +0 -1
- package/dist/esm/CodeModal/CodeModal.test.js +0 -29
- package/dist/esm/Compare/Compare.test.d.ts +0 -1
- package/dist/esm/Compare/Compare.test.js +0 -13
- package/dist/esm/DeepThinking/DeepThinking.test.d.ts +0 -1
- package/dist/esm/DeepThinking/DeepThinking.test.js +0 -141
- package/dist/esm/FileDetails/FileDetails.test.d.ts +0 -1
- package/dist/esm/FileDetails/FileDetails.test.js +0 -37
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.d.ts +0 -1
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.js +0 -74
- package/dist/esm/FileDropZone/FileDropZone.test.d.ts +0 -1
- package/dist/esm/FileDropZone/FileDropZone.test.js +0 -95
- package/dist/esm/FilePreview/FilePreview.test.d.ts +0 -1
- package/dist/esm/FilePreview/FilePreview.test.js +0 -92
- package/dist/esm/ImagePreview/ImagePreview.test.d.ts +0 -1
- package/dist/esm/ImagePreview/ImagePreview.test.js +0 -220
- package/dist/esm/MarkdownContent/MarkdownContent.test.d.ts +0 -1
- package/dist/esm/MarkdownContent/MarkdownContent.test.js +0 -187
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.test.d.ts +0 -1
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.test.js +0 -126
- package/dist/esm/Message/ErrorMessage/ErrorMessage.test.d.ts +0 -1
- package/dist/esm/Message/ErrorMessage/ErrorMessage.test.js +0 -25
- package/dist/esm/Message/Message.test.d.ts +0 -1
- package/dist/esm/Message/Message.test.js +0 -1123
- package/dist/esm/Message/MessageAndActions/MessageAndActions.test.d.ts +0 -1
- package/dist/esm/Message/MessageAndActions/MessageAndActions.test.js +0 -20
- package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.test.d.ts +0 -1
- package/dist/esm/Message/MessageAttachments/MessageAttachmentItem.test.js +0 -20
- package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.test.d.ts +0 -1
- package/dist/esm/Message/MessageAttachments/MessageAttachmentsContainer.test.js +0 -20
- package/dist/esm/Message/MessageLoading.test.d.ts +0 -1
- package/dist/esm/Message/MessageLoading.test.js +0 -20
- package/dist/esm/Message/QuickResponse/QuickResponse.test.d.ts +0 -1
- package/dist/esm/Message/QuickResponse/QuickResponse.test.js +0 -104
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.d.ts +0 -1
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.js +0 -48
- package/dist/esm/Message/UserFeedback/UserFeedback.test.d.ts +0 -1
- package/dist/esm/Message/UserFeedback/UserFeedback.test.js +0 -176
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.d.ts +0 -1
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +0 -238
- package/dist/esm/MessageBar/AttachButton.test.d.ts +0 -1
- package/dist/esm/MessageBar/AttachButton.test.js +0 -147
- package/dist/esm/MessageBar/MessageBar.test.d.ts +0 -1
- package/dist/esm/MessageBar/MessageBar.test.js +0 -333
- package/dist/esm/MessageBar/SendButton.test.d.ts +0 -1
- package/dist/esm/MessageBar/SendButton.test.js +0 -53
- package/dist/esm/MessageBar/StopButton.test.d.ts +0 -1
- package/dist/esm/MessageBar/StopButton.test.js +0 -53
- package/dist/esm/MessageBox/JumpButton.test.d.ts +0 -1
- package/dist/esm/MessageBox/JumpButton.test.js +0 -34
- package/dist/esm/MessageBox/MessageBox.test.d.ts +0 -1
- package/dist/esm/MessageBox/MessageBox.test.js +0 -289
- package/dist/esm/MessageDivider/MessageDivider.test.d.ts +0 -1
- package/dist/esm/MessageDivider/MessageDivider.test.js +0 -24
- package/dist/esm/Onboarding/Onboarding.test.d.ts +0 -1
- package/dist/esm/Onboarding/Onboarding.test.js +0 -75
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +0 -1
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +0 -48
- package/dist/esm/ResponseActions/ResponseActionButton.test.d.ts +0 -1
- package/dist/esm/ResponseActions/ResponseActionButton.test.js +0 -49
- package/dist/esm/ResponseActions/ResponseActions.test.d.ts +0 -1
- package/dist/esm/ResponseActions/ResponseActions.test.js +0 -450
- package/dist/esm/ResponseActions/ResponseActionsGroups.test.d.ts +0 -1
- package/dist/esm/ResponseActions/ResponseActionsGroups.test.js +0 -20
- package/dist/esm/Settings/SettingsForm.test.d.ts +0 -1
- package/dist/esm/Settings/SettingsForm.test.js +0 -33
- package/dist/esm/SourcesCard/SourcesCard.test.d.ts +0 -1
- package/dist/esm/SourcesCard/SourcesCard.test.js +0 -34
- package/dist/esm/SourcesCardBase/SourcesCardBase.test.d.ts +0 -1
- package/dist/esm/SourcesCardBase/SourcesCardBase.test.js +0 -194
- package/dist/esm/TermsOfUse/TermsOfUse.test.d.ts +0 -1
- package/dist/esm/TermsOfUse/TermsOfUse.test.js +0 -72
- package/dist/esm/ToolCall/ToolCall.test.d.ts +0 -1
- package/dist/esm/ToolCall/ToolCall.test.js +0 -196
- package/dist/esm/ToolResponse/ToolResponse.test.d.ts +0 -1
- package/dist/esm/ToolResponse/ToolResponse.test.js +0 -179
- package/dist/esm/__mocks__/monaco-editor.d.ts +0 -11
- package/dist/esm/__mocks__/monaco-editor.js +0 -18
- package/dist/esm/__mocks__/rehype-external-links.d.ts +0 -2
- package/dist/esm/__mocks__/rehype-external-links.js +0 -2
- package/dist/esm/__mocks__/rehype-highlight.d.ts +0 -2
- package/dist/esm/__mocks__/rehype-highlight.js +0 -2
- package/dist/esm/__mocks__/rehype-sanitize.d.ts +0 -2
- package/dist/esm/__mocks__/rehype-sanitize.js +0 -2
- package/dist/esm/__mocks__/rehype-unwrap-images.d.ts +0 -2
- package/dist/esm/__mocks__/rehype-unwrap-images.js +0 -2
|
@@ -48,7 +48,7 @@ import MessageDivider from '@patternfly/chatbot/dist/dynamic/MessageDivider';
|
|
|
48
48
|
import ToolCall from '@patternfly/chatbot/dist/dynamic/ToolCall';
|
|
49
49
|
import ResponseActions, { ResponseActionsGroups } from '@patternfly/chatbot/dist/dynamic/ResponseActions';
|
|
50
50
|
import ToolResponse from '@patternfly/chatbot/dist/dynamic/ToolResponse';
|
|
51
|
-
import { rehypeCodeBlockToggle } from '@patternfly/chatbot/dist/
|
|
51
|
+
import { rehypeCodeBlockToggle } from '@patternfly/chatbot/dist/dynamic/Message';
|
|
52
52
|
import SourcesCard from '@patternfly/chatbot/dist/dynamic/SourcesCard';
|
|
53
53
|
import { RhUiArrowCircleDownFillIcon, RhUiArrowRightIcon, RhUiCheckCircleFillIcon, RhUiCopyFillIcon, RhUiExportIcon, RhMicronsInformationFillIcon, OutlinedQuestionCircleIcon, RhUiRedoIcon, RhUiBuildFillIcon, RhUiQuestionMarkCircleIcon } from '@patternfly/react-icons';
|
|
54
54
|
import patternflyAvatar from './patternfly_avatar.jpg';
|
|
@@ -59,7 +59,7 @@ import FileDropZone from '@patternfly/chatbot/dist/dynamic/FileDropZone';
|
|
|
59
59
|
import { PreviewAttachment } from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
|
|
60
60
|
import ChatbotAlert from '@patternfly/chatbot/dist/dynamic/ChatbotAlert';
|
|
61
61
|
import { explorePipelinesQuickStart } from './explore-pipeline-quickstart.ts';
|
|
62
|
-
import { monitorSampleAppQuickStart } from '
|
|
62
|
+
import { monitorSampleAppQuickStart } from './monitor-sampleapp-quickstart.ts';
|
|
63
63
|
import userAvatar from './user_avatar.svg';
|
|
64
64
|
import squareImg from './PF-social-color-square.svg';
|
|
65
65
|
import { CSSProperties, useState, Fragment, FunctionComponent, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent, Ref, isValidElement, cloneElement, Children, ReactNode, useRef, useEffect } from 'react';
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
SelectList,
|
|
20
20
|
SelectOption
|
|
21
21
|
} from '@patternfly/react-core';
|
|
22
|
-
import { rehypeCodeBlockToggle } from '@patternfly/chatbot/dist/
|
|
22
|
+
import { rehypeCodeBlockToggle } from '@patternfly/chatbot/dist/dynamic/Message';
|
|
23
23
|
|
|
24
24
|
export const UserMessageExample: FunctionComponent = () => {
|
|
25
25
|
const messageInputRef = useRef<HTMLTextAreaElement>(null);
|
package/patternfly-docs/content/extensions/chatbot/examples/Messages/monitor-sampleapp-quickstart.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { monitorSampleAppQuickStart } from '../../../../../../src/Message/QuickStarts/monitor-sampleapp-quickstart.ts';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { useState, FunctionComponent } from 'react';
|
|
2
|
+
import { ChatbotDisplayMode } from '@patternfly/chatbot/dist/dynamic/Chatbot';
|
|
3
|
+
import ChatbotConversationHistoryNav, {
|
|
4
|
+
Conversation,
|
|
5
|
+
ConversationGroup
|
|
6
|
+
} from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
|
|
7
|
+
import { Checkbox } from '@patternfly/react-core';
|
|
8
|
+
|
|
9
|
+
const pinnedChats: Conversation[] = [
|
|
10
|
+
{
|
|
11
|
+
id: '1',
|
|
12
|
+
text: 'Red Hat products and services'
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
const recentChats: Conversation[] = [
|
|
17
|
+
{
|
|
18
|
+
id: '2',
|
|
19
|
+
text: 'Enterprise Linux installation and setup'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: '3',
|
|
23
|
+
text: 'Troubleshoot system crash'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: '4',
|
|
27
|
+
text: 'Ansible security and updates'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: '5',
|
|
31
|
+
text: 'Red Hat certification'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: '6',
|
|
35
|
+
text: 'Lightspeed user documentation'
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const savedPrompts: Conversation[] = [
|
|
40
|
+
{
|
|
41
|
+
id: '7',
|
|
42
|
+
text: 'Summarize this document'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: '8',
|
|
46
|
+
text: 'Draft a release announcement'
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const VISIBLE_CHAT_COUNT = 3;
|
|
51
|
+
|
|
52
|
+
export const ChatbotHeaderDrawerWithExpandableGroupsDemo: FunctionComponent = () => {
|
|
53
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
54
|
+
const [isSavedPromptsExpanded, setIsSavedPromptsExpanded] = useState(false);
|
|
55
|
+
const [isShowingAllChats, setIsShowingAllChats] = useState(false);
|
|
56
|
+
|
|
57
|
+
const conversations: ConversationGroup[] = [
|
|
58
|
+
{
|
|
59
|
+
id: 'pinned',
|
|
60
|
+
label: 'Pinned chats',
|
|
61
|
+
items: pinnedChats
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'chats',
|
|
65
|
+
label: 'Chats',
|
|
66
|
+
items: recentChats,
|
|
67
|
+
showAll: {
|
|
68
|
+
visibleCount: VISIBLE_CHAT_COUNT,
|
|
69
|
+
isExpanded: isShowingAllChats,
|
|
70
|
+
onToggle: setIsShowingAllChats,
|
|
71
|
+
label: isShowingAllChats ? 'Show less' : 'Show all'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'saved-prompts',
|
|
76
|
+
label: 'Saved prompts',
|
|
77
|
+
expandable: {
|
|
78
|
+
isExpanded: isSavedPromptsExpanded,
|
|
79
|
+
onToggle: setIsSavedPromptsExpanded
|
|
80
|
+
},
|
|
81
|
+
items: savedPrompts
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
<Checkbox
|
|
88
|
+
label="Display drawer"
|
|
89
|
+
isChecked={isOpen}
|
|
90
|
+
onChange={() => setIsOpen(!isOpen)}
|
|
91
|
+
id="expandable-groups-drawer-visible"
|
|
92
|
+
name="expandable-groups-drawer-visible"
|
|
93
|
+
/>
|
|
94
|
+
<ChatbotConversationHistoryNav
|
|
95
|
+
displayMode={ChatbotDisplayMode.embedded}
|
|
96
|
+
onDrawerToggle={() => setIsOpen(!isOpen)}
|
|
97
|
+
isDrawerOpen={isOpen}
|
|
98
|
+
setIsDrawerOpen={setIsOpen}
|
|
99
|
+
conversations={conversations}
|
|
100
|
+
drawerContent={<div>Drawer content</div>}
|
|
101
|
+
/>
|
|
102
|
+
</>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
@@ -35,7 +35,8 @@ propComponents:
|
|
|
35
35
|
'MessageBarWithAttachMenuProps',
|
|
36
36
|
'SourceDetailsMenuItem',
|
|
37
37
|
'ChatbotConversationHistoryNav',
|
|
38
|
-
'Conversation'
|
|
38
|
+
'Conversation',
|
|
39
|
+
'ConversationGroup'
|
|
39
40
|
]
|
|
40
41
|
sortValue: 2
|
|
41
42
|
---
|
|
@@ -401,6 +402,16 @@ To help users track important conversations, add a "pin" option to the conversat
|
|
|
401
402
|
|
|
402
403
|
```
|
|
403
404
|
|
|
405
|
+
### Grouped and expandable conversation history
|
|
406
|
+
|
|
407
|
+
For grouped chat history, pass a `ConversationGroup[]` to describe each section's label, items, and behavior. Each group's `items` array accepts `Conversation` objects or custom menu content such as a **Show all** action. Use `expandable` on a group to make that section expandable, and `footer` for content rendered after the group's menu list.
|
|
408
|
+
|
|
409
|
+
The object form `{ [groupLabel: string]: Conversation[] }` remains supported as shorthand for simple static groups.
|
|
410
|
+
|
|
411
|
+
```js file="./ChatbotHeaderDrawerWithExpandableGroups.tsx"
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
|
|
404
415
|
### Renaming conversations in chat history drawer
|
|
405
416
|
|
|
406
417
|
You can allow users to rename a conversation in the chat history drawer by implementing a modal that opens upon clicking a "Rename" (or similar) action. When doing so, you must ensure the following:
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: Tree-shaking
|
|
3
|
+
title: Tree-shaking
|
|
4
|
+
section: extensions
|
|
5
|
+
subsection: ChatBot
|
|
6
|
+
sortValue: 80
|
|
7
|
+
source: TreeShaking
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Note:** The PatternFly ChatBot extension lives in its own package [`@patternfly/chatbot`](https://www.npmjs.com/package/@patternfly/chatbot).
|
|
11
|
+
|
|
12
|
+
When you add ChatBot to your application, you want the bundler to include only the components you actually use — not the entire library or every PatternFly icon. ChatBot is designed to support tree-shaking when imported correctly.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Recommended import pattern
|
|
17
|
+
|
|
18
|
+
Import each component from its dynamic entry point:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import ChatbotToggle from '@patternfly/chatbot/dist/dynamic/ChatbotToggle';
|
|
22
|
+
import ChatbotHeader from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Named imports from the root barrel also tree-shake with modern bundlers:
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { ChatbotToggle } from '@patternfly/chatbot';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Sub-components can be imported from the same entry point:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import ChatbotHeader, {
|
|
35
|
+
ChatbotHeaderMenu,
|
|
36
|
+
ChatbotHeaderMain,
|
|
37
|
+
} from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Per-component `dist/dynamic` imports are preferred for faster builds and for components excluded from the root barrel (`CodeModal`, `PreviewAttachment`, `AttachmentEdit`).
|
|
41
|
+
|
|
42
|
+
## What to avoid
|
|
43
|
+
|
|
44
|
+
Do **not** use wildcard imports from the package root:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
// Avoid — may pull in the entire library
|
|
48
|
+
import * as Chatbot from '@patternfly/chatbot';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Icon imports
|
|
52
|
+
|
|
53
|
+
Which PatternFly icons end up in your bundle depends on **which ChatBot components you import**, not on whether ChatBot source code or your app uses barrel or deep icon paths. Importing `ChatbotToggle` via `dist/dynamic` includes only the icons that component uses.
|
|
54
|
+
|
|
55
|
+
## CSS import
|
|
56
|
+
|
|
57
|
+
ChatBot styles are side-effectful and must be imported explicitly:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import '@patternfly/chatbot/dist/css/main.css';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Place this import after your PatternFly CSS imports so ChatBot overrides apply correctly.
|
|
64
|
+
|
|
65
|
+
## Monaco editor (`CodeModal`, attachment preview and edit)
|
|
66
|
+
|
|
67
|
+
`CodeModal` (used by `PreviewAttachment` and `AttachmentEdit`) lazy-loads Monaco. Web workers must be configured before the modal opens. Import the package worker helper once at application startup:
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
import '@patternfly/chatbot/monaco-environment';
|
|
71
|
+
import PreviewAttachment from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`CodeModal`, `PreviewAttachment`, and `AttachmentEdit` are excluded from the root barrel so Monaco stays out of root-barrel bundles. Import them from dynamic entry points:
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import PreviewAttachment from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
|
|
78
|
+
import AttachmentEdit from '@patternfly/chatbot/dist/dynamic/AttachmentEdit';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`monaco-editor` and `@monaco-editor/react` are peer dependencies when you use these components.
|
|
82
|
+
|
|
83
|
+
## Markdown rendering (`Message`, `MarkdownContent`)
|
|
84
|
+
|
|
85
|
+
`MarkdownContent` lazy-loads its markdown parser so lightweight imports avoid pulling in `react-markdown`, syntax highlighting, and related dependencies until they are needed. That async chunk is roughly 400 KB.
|
|
86
|
+
|
|
87
|
+
`MessageBox` automatically preloads the markdown renderer and coordinates rendering so existing messages do not each flash an individual loading state — message chrome (avatars, timestamps, and so on) appears immediately, and markdown content fills in once the chunk is ready.
|
|
88
|
+
|
|
89
|
+
For chatbots that display messages on first render, you can call `preloadMarkdownRenderer()` earlier in your application — such as in your app's entry point or route loader — so the chunk is already loaded by the time the chatbot mounts:
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
// App.tsx or route loader — call once at startup
|
|
93
|
+
import { preloadMarkdownRenderer } from '@patternfly/chatbot/dist/dynamic/MarkdownContent';
|
|
94
|
+
|
|
95
|
+
preloadMarkdownRenderer();
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Migration: root barrel changes
|
|
99
|
+
|
|
100
|
+
The following modules are **not** re-exported from the root barrel (`@patternfly/chatbot`). They were removed so Monaco and internal utilities stay out of default bundles. Update existing root imports to subpath entry points:
|
|
101
|
+
|
|
102
|
+
| Module | Before (no longer works) | After |
|
|
103
|
+
|--------|--------------------------|-------|
|
|
104
|
+
| `CodeModal` | `import { CodeModal } from '@patternfly/chatbot'` | `import CodeModal from '@patternfly/chatbot/dist/dynamic/CodeModal'` |
|
|
105
|
+
| `PreviewAttachment` | `import { PreviewAttachment } from '@patternfly/chatbot'` | `import PreviewAttachment from '@patternfly/chatbot/dist/dynamic/PreviewAttachment'` |
|
|
106
|
+
| `AttachmentEdit` | `import { AttachmentEdit } from '@patternfly/chatbot'` | `import AttachmentEdit from '@patternfly/chatbot/dist/dynamic/AttachmentEdit'` |
|
|
107
|
+
| `tracking` | `import { getTrackingProviders } from '@patternfly/chatbot'` | `import { getTrackingProviders } from '@patternfly/chatbot/dist/dynamic/tracking'` |
|
|
108
|
+
|
|
109
|
+
All other components remain available from the root barrel and continue to tree-shake when your bundler respects the package `sideEffects` field.
|
|
110
|
+
|
|
111
|
+
When using `CodeModal`, `PreviewAttachment`, or `AttachmentEdit`, also import the Monaco worker helper once at application startup:
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
import '@patternfly/chatbot/monaco-environment';
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## How ChatBot supports tree-shaking
|
|
118
|
+
|
|
119
|
+
- **ESM output** with a `module` field pointing to `dist/esm/`
|
|
120
|
+
- **`sideEffects`** in `package.json` so bundlers can drop unused re-exports from the root barrel while preserving CSS and the documentation-site style entry (`patternfly-docs/**`)
|
|
121
|
+
- **Per-component dynamic entry points** at `dist/dynamic/<Component>/`
|
|
122
|
+
- **Unbundled compilation** — icons and dependencies remain as external imports for your bundler to resolve
|
|
123
|
+
- **`exports`** field maps public subpaths for bundler-friendly resolution
|
|
124
|
+
- **Explicit CSS imports** (see above)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* global globalThis */
|
|
2
|
+
// Docs-site worker setup for rspack/webpack. Paths target hoisted monaco-editor in the
|
|
3
|
+
// workspace root (../../../node_modules/...). npm consumers should import
|
|
4
|
+
// @patternfly/chatbot/monaco-environment instead (../../monaco-editor/... layout).
|
|
5
|
+
// Each branch must use inline new Worker(new URL(...)) so rspack emits worker chunks.
|
|
6
|
+
const workerOptions = { type: 'module' };
|
|
7
|
+
|
|
8
|
+
if (typeof globalThis !== 'undefined' && !globalThis.MonacoEnvironment?.getWorker) {
|
|
9
|
+
globalThis.MonacoEnvironment = {
|
|
10
|
+
getWorker(_workerId, label) {
|
|
11
|
+
switch (label) {
|
|
12
|
+
case 'json':
|
|
13
|
+
return new Worker(
|
|
14
|
+
new URL('../../../node_modules/monaco-editor/esm/vs/language/json/json.worker.js', import.meta.url),
|
|
15
|
+
workerOptions
|
|
16
|
+
);
|
|
17
|
+
case 'css':
|
|
18
|
+
case 'scss':
|
|
19
|
+
case 'less':
|
|
20
|
+
return new Worker(
|
|
21
|
+
new URL('../../../node_modules/monaco-editor/esm/vs/language/css/css.worker.js', import.meta.url),
|
|
22
|
+
workerOptions
|
|
23
|
+
);
|
|
24
|
+
case 'html':
|
|
25
|
+
case 'handlebars':
|
|
26
|
+
case 'razor':
|
|
27
|
+
return new Worker(
|
|
28
|
+
new URL('../../../node_modules/monaco-editor/esm/vs/language/html/html.worker.js', import.meta.url),
|
|
29
|
+
workerOptions
|
|
30
|
+
);
|
|
31
|
+
case 'typescript':
|
|
32
|
+
case 'javascript':
|
|
33
|
+
return new Worker(
|
|
34
|
+
new URL('../../../node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js', import.meta.url),
|
|
35
|
+
workerOptions
|
|
36
|
+
);
|
|
37
|
+
default:
|
|
38
|
+
return new Worker(
|
|
39
|
+
new URL('../../../node_modules/monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url),
|
|
40
|
+
workerOptions
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// Patternfly
|
|
2
|
+
// Monaco workers for CodeModal attachment examples — load before any editor opens.
|
|
3
|
+
// The docs framework aliases this file as the global client entry (client-styles), so
|
|
4
|
+
// side-effect imports belong here even though the filename suggests CSS only.
|
|
5
|
+
// Uses patternfly-docs/monaco-environment.js (monorepo node_modules paths), not the package export.
|
|
6
|
+
// This file must stay side-effectful — see package.json "sideEffects" ("patternfly-docs/**").
|
|
7
|
+
import './monaco-environment.js';
|
|
2
8
|
import '@patternfly/patternfly/patternfly.css';
|
|
3
9
|
// Patternfly utilities
|
|
4
10
|
import '@patternfly/patternfly/patternfly-addons.css';
|
package/src/Chatbot/Chatbot.scss
CHANGED
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
var(--pf-t--global--background--color--secondary--default)
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
&:not(&--default):has(.pf-chatbot__content.pf-m-primary) {
|
|
53
|
+
background-color: var(--pf-t--global--background--color--primary--default);
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
:root:where(.pf-v6-theme-felt):not(.pf-v6-theme-glass) {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.pf-chatbot:not(.pf-chatbot--default) {
|
|
22
|
-
.pf-chatbot__content {
|
|
22
|
+
.pf-chatbot__content:not(.pf-m-primary) {
|
|
23
23
|
background-color: var(
|
|
24
24
|
--pf-t--global--background--color--glass--primary--default,
|
|
25
25
|
var(--pf-t--global--background--color--secondary--default)
|
|
@@ -60,12 +60,8 @@
|
|
|
60
60
|
--pf-v6-c-menu__item-main--ColumnGap: var(--pf-t--global--spacer--md);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title
|
|
64
|
-
|
|
65
|
-
font-weight: var(--pf-t--global--font--weight--body--bold);
|
|
66
|
-
font-size: var(--pf-t--global--icon--size--font--sm);
|
|
67
|
-
--pf-v6-c-menu__group-title--PaddingInlineStart: var(--pf-t--global--spacer--sm);
|
|
68
|
-
--pf-v6-c-menu__group-title--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
|
|
63
|
+
.pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title,
|
|
64
|
+
.pf-chatbot__menu-item-header--expandable .pf-chatbot__menu-group-toggle {
|
|
69
65
|
position: -webkit-sticky;
|
|
70
66
|
position: sticky;
|
|
71
67
|
top: 0;
|
|
@@ -73,6 +69,46 @@
|
|
|
73
69
|
z-index: var(--pf-t--global--z-index--md);
|
|
74
70
|
}
|
|
75
71
|
|
|
72
|
+
.pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title,
|
|
73
|
+
.pf-chatbot__menu-item-header--expandable .pf-chatbot__menu-group-toggle > .pf-v6-c-expandable-section__toggle {
|
|
74
|
+
color: var(--pf-t--global--text--color--subtle);
|
|
75
|
+
font-weight: var(--pf-t--global--font--weight--body--bold);
|
|
76
|
+
font-size: var(--pf-t--global--icon--size--font--sm);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pf-chatbot__menu-group-toggle {
|
|
80
|
+
padding-block-start: var(--pf-t--global--spacer--xs);
|
|
81
|
+
padding-block-end: var(--pf-t--global--spacer--xs);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title {
|
|
85
|
+
--pf-v6-c-menu__group-title--PaddingInlineStart: var(--pf-t--global--spacer--sm);
|
|
86
|
+
--pf-v6-c-menu__group-title--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.pf-chatbot__menu-item-header--expandable .pf-chatbot__menu-group-toggle {
|
|
90
|
+
width: 100%;
|
|
91
|
+
|
|
92
|
+
.pf-v6-c-expandable-section__toggle {
|
|
93
|
+
margin: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pf-v6-c-button.pf-m-link {
|
|
97
|
+
--pf-v6-c-button--BorderRadius: var(--pf-t--global--border--radius--small);
|
|
98
|
+
--pf-v6-c-button--PaddingInlineStart: var(--pf-t--global--spacer--sm);
|
|
99
|
+
--pf-v6-c-button--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
|
|
100
|
+
color: inherit;
|
|
101
|
+
font-weight: inherit;
|
|
102
|
+
font-size: inherit;
|
|
103
|
+
justify-content: flex-start;
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.pf-v6-c-expandable-section__toggle-icon {
|
|
108
|
+
color: var(--pf-t--global--text--color--subtle);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
76
112
|
.pf-chatbot__menu-item {
|
|
77
113
|
--pf-v6-c-menu__item--PaddingInlineStart: var(--pf-t--global--spacer--sm);
|
|
78
114
|
--pf-v6-c-menu__item--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
|
|
@@ -86,6 +122,16 @@
|
|
|
86
122
|
border-radius: var(--pf-t--global--border--radius--small);
|
|
87
123
|
}
|
|
88
124
|
|
|
125
|
+
// "Show all" / "Show less" toggle
|
|
126
|
+
// Rendered as a regular MenuItem positioned after the (conditionally rendered)
|
|
127
|
+
// overflow items, so it participates in the menu's normal roving tabindex and
|
|
128
|
+
// arrow-key navigation, and stays in a fixed position at the bottom of the list.
|
|
129
|
+
.pf-chatbot__menu-show-all-toggle {
|
|
130
|
+
color: var(--pf-t--global--text--color--link--default);
|
|
131
|
+
font-size: var(--pf-t--global--font--size--body--default);
|
|
132
|
+
font-weight: var(--pf-t--global--font--weight--body--default);
|
|
133
|
+
}
|
|
134
|
+
|
|
89
135
|
li.pf-chatbot__menu-item:hover::after {
|
|
90
136
|
position: absolute;
|
|
91
137
|
inset: 0;
|