@patternfly/chatbot 2.1.0-prerelease.17
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/@types/index.d.ts +9 -0
- package/dist/cjs/AttachMenu/AttachMenu.d.ts +29 -0
- package/dist/cjs/AttachMenu/AttachMenu.js +33 -0
- package/dist/cjs/AttachMenu/index.d.ts +2 -0
- package/dist/cjs/AttachMenu/index.js +23 -0
- package/dist/cjs/AttachmentEdit/AttachmentEdit.d.ts +22 -0
- package/dist/cjs/AttachmentEdit/AttachmentEdit.js +25 -0
- package/dist/cjs/AttachmentEdit/index.d.ts +2 -0
- package/dist/cjs/AttachmentEdit/index.js +23 -0
- package/dist/cjs/Chatbot/Chatbot.d.ts +23 -0
- package/dist/cjs/Chatbot/Chatbot.js +49 -0
- package/dist/cjs/Chatbot/index.d.ts +2 -0
- package/dist/cjs/Chatbot/index.js +23 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.d.ts +8 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.js +28 -0
- package/dist/cjs/ChatbotAlert/index.d.ts +2 -0
- package/dist/cjs/ChatbotAlert/index.js +23 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.d.ts +9 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.js +27 -0
- package/dist/cjs/ChatbotContent/index.d.ts +2 -0
- package/dist/cjs/ChatbotContent/index.js +23 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +14 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +22 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +52 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +83 -0
- package/dist/cjs/ChatbotConversationHistoryNav/index.d.ts +3 -0
- package/dist/cjs/ChatbotConversationHistoryNav/index.js +24 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.d.ts +9 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.js +35 -0
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +44 -0
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +56 -0
- package/dist/cjs/ChatbotFooter/index.d.ts +3 -0
- package/dist/cjs/ChatbotFooter/index.js +24 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeader.d.ts +9 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeader.js +13 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.d.ts +9 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.js +10 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.d.ts +9 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.js +10 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.d.ts +15 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +14 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +14 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +33 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +33 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +20 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +33 -0
- package/dist/cjs/ChatbotHeader/index.d.ts +8 -0
- package/dist/cjs/ChatbotHeader/index.js +29 -0
- package/dist/cjs/ChatbotModal/ChatbotModal.d.ts +10 -0
- package/dist/cjs/ChatbotModal/ChatbotModal.js +34 -0
- package/dist/cjs/ChatbotModal/index.d.ts +2 -0
- package/dist/cjs/ChatbotModal/index.js +23 -0
- package/dist/cjs/ChatbotPopover/ChatbotPopover.d.ts +4 -0
- package/dist/cjs/ChatbotPopover/ChatbotPopover.js +29 -0
- package/dist/cjs/ChatbotPopover/index.d.ts +2 -0
- package/dist/cjs/ChatbotPopover/index.js +23 -0
- package/dist/cjs/ChatbotToggle/ChatbotToggle.d.ts +20 -0
- package/dist/cjs/ChatbotToggle/ChatbotToggle.js +35 -0
- package/dist/cjs/ChatbotToggle/index.d.ts +2 -0
- package/dist/cjs/ChatbotToggle/index.js +23 -0
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +23 -0
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +40 -0
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.d.ts +1 -0
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +49 -0
- package/dist/cjs/ChatbotWelcomePrompt/index.d.ts +2 -0
- package/dist/cjs/ChatbotWelcomePrompt/index.js +23 -0
- package/dist/cjs/CodeModal/CodeModal.d.ts +34 -0
- package/dist/cjs/CodeModal/CodeModal.js +105 -0
- package/dist/cjs/CodeModal/index.d.ts +2 -0
- package/dist/cjs/CodeModal/index.js +23 -0
- package/dist/cjs/FileDetails/FileDetails.d.ts +922 -0
- package/dist/cjs/FileDetails/FileDetails.js +954 -0
- package/dist/cjs/FileDetails/FileDetails.test.d.ts +1 -0
- package/dist/cjs/FileDetails/FileDetails.test.js +26 -0
- package/dist/cjs/FileDetails/index.d.ts +2 -0
- package/dist/cjs/FileDetails/index.js +23 -0
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.d.ts +21 -0
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.js +22 -0
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.d.ts +1 -0
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.js +61 -0
- package/dist/cjs/FileDetailsLabel/index.d.ts +2 -0
- package/dist/cjs/FileDetailsLabel/index.js +23 -0
- package/dist/cjs/FileDropZone/FileDropZone.d.ts +17 -0
- package/dist/cjs/FileDropZone/FileDropZone.js +28 -0
- package/dist/cjs/FileDropZone/FileDropZone.test.d.ts +1 -0
- package/dist/cjs/FileDropZone/FileDropZone.test.js +19 -0
- package/dist/cjs/FileDropZone/index.d.ts +2 -0
- package/dist/cjs/FileDropZone/index.js +23 -0
- package/dist/cjs/LoadingMessage/LoadingMessage.d.ts +6 -0
- package/dist/cjs/LoadingMessage/LoadingMessage.js +20 -0
- package/dist/cjs/LoadingMessage/LoadingMessage.test.d.ts +1 -0
- package/dist/cjs/LoadingMessage/LoadingMessage.test.js +20 -0
- package/dist/cjs/LoadingMessage/index.d.ts +2 -0
- package/dist/cjs/LoadingMessage/index.js +23 -0
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.d.ts +4 -0
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +61 -0
- package/dist/cjs/Message/ListMessage/ListItemMessage.d.ts +4 -0
- package/dist/cjs/Message/ListMessage/ListItemMessage.js +12 -0
- package/dist/cjs/Message/ListMessage/OrderedListMessage.d.ts +4 -0
- package/dist/cjs/Message/ListMessage/OrderedListMessage.js +13 -0
- package/dist/cjs/Message/ListMessage/UnorderedListMessage.d.ts +4 -0
- package/dist/cjs/Message/ListMessage/UnorderedListMessage.js +13 -0
- package/dist/cjs/Message/Message.d.ts +65 -0
- package/dist/cjs/Message/Message.js +69 -0
- package/dist/cjs/Message/Message.test.d.ts +1 -0
- package/dist/cjs/Message/Message.test.js +239 -0
- package/dist/cjs/Message/MessageLoading.d.ts +5 -0
- package/dist/cjs/Message/MessageLoading.js +13 -0
- package/dist/cjs/Message/TextMessage/TextMessage.d.ts +4 -0
- package/dist/cjs/Message/TextMessage/TextMessage.js +27 -0
- package/dist/cjs/Message/index.d.ts +2 -0
- package/dist/cjs/Message/index.js +23 -0
- package/dist/cjs/MessageBar/AttachButton.d.ts +21 -0
- package/dist/cjs/MessageBar/AttachButton.js +38 -0
- package/dist/cjs/MessageBar/AttachButton.test.d.ts +1 -0
- package/dist/cjs/MessageBar/AttachButton.test.js +66 -0
- package/dist/cjs/MessageBar/MessageBar.d.ts +71 -0
- package/dist/cjs/MessageBar/MessageBar.js +112 -0
- package/dist/cjs/MessageBar/MessageBar.test.d.ts +1 -0
- package/dist/cjs/MessageBar/MessageBar.test.js +237 -0
- package/dist/cjs/MessageBar/MicrophoneButton.d.ts +21 -0
- package/dist/cjs/MessageBar/MicrophoneButton.js +74 -0
- package/dist/cjs/MessageBar/SendButton.d.ts +14 -0
- package/dist/cjs/MessageBar/SendButton.js +32 -0
- package/dist/cjs/MessageBar/SendButton.test.d.ts +1 -0
- package/dist/cjs/MessageBar/SendButton.test.js +54 -0
- package/dist/cjs/MessageBar/StopButton.d.ts +14 -0
- package/dist/cjs/MessageBar/StopButton.js +32 -0
- package/dist/cjs/MessageBar/StopButton.test.d.ts +1 -0
- package/dist/cjs/MessageBar/StopButton.test.js +54 -0
- package/dist/cjs/MessageBar/index.d.ts +5 -0
- package/dist/cjs/MessageBar/index.js +26 -0
- package/dist/cjs/MessageBox/JumpButton.d.ts +11 -0
- package/dist/cjs/MessageBox/JumpButton.js +17 -0
- package/dist/cjs/MessageBox/JumpButton.test.d.ts +1 -0
- package/dist/cjs/MessageBox/JumpButton.test.js +39 -0
- package/dist/cjs/MessageBox/MessageBox.d.ts +17 -0
- package/dist/cjs/MessageBox/MessageBox.js +74 -0
- package/dist/cjs/MessageBox/index.d.ts +3 -0
- package/dist/cjs/MessageBox/index.js +24 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.d.ts +22 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.js +25 -0
- package/dist/cjs/PreviewAttachment/index.d.ts +2 -0
- package/dist/cjs/PreviewAttachment/index.js +23 -0
- package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +20 -0
- package/dist/cjs/ResponseActions/ResponseActionButton.js +12 -0
- package/dist/cjs/ResponseActions/ResponseActions.d.ts +30 -0
- package/dist/cjs/ResponseActions/ResponseActions.js +36 -0
- package/dist/cjs/ResponseActions/ResponseActions.test.d.ts +1 -0
- package/dist/cjs/ResponseActions/ResponseActions.test.js +67 -0
- package/dist/cjs/ResponseActions/index.d.ts +2 -0
- package/dist/cjs/ResponseActions/index.js +23 -0
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +11 -0
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.js +31 -0
- package/dist/cjs/SourceDetailsMenuItem/index.d.ts +2 -0
- package/dist/cjs/SourceDetailsMenuItem/index.js +23 -0
- package/dist/cjs/SourcesCard/SourcesCard.d.ts +34 -0
- package/dist/cjs/SourcesCard/SourcesCard.js +68 -0
- package/dist/cjs/SourcesCard/SourcesCard.test.d.ts +1 -0
- package/dist/cjs/SourcesCard/SourcesCard.test.js +167 -0
- package/dist/cjs/SourcesCard/index.d.ts +2 -0
- package/dist/cjs/SourcesCard/index.js +23 -0
- package/dist/cjs/index.d.ts +48 -0
- package/dist/cjs/index.js +93 -0
- package/dist/css/main.css +1583 -0
- package/dist/css/main.css.map +1 -0
- package/dist/dynamic/AttachMenu/package.json +1 -0
- package/dist/dynamic/AttachmentEdit/package.json +1 -0
- package/dist/dynamic/Chatbot/package.json +1 -0
- package/dist/dynamic/ChatbotAlert/package.json +1 -0
- package/dist/dynamic/ChatbotContent/package.json +1 -0
- package/dist/dynamic/ChatbotConversationHistoryNav/package.json +1 -0
- package/dist/dynamic/ChatbotFooter/package.json +1 -0
- package/dist/dynamic/ChatbotHeader/package.json +1 -0
- package/dist/dynamic/ChatbotModal/package.json +1 -0
- package/dist/dynamic/ChatbotPopover/package.json +1 -0
- package/dist/dynamic/ChatbotToggle/package.json +1 -0
- package/dist/dynamic/ChatbotWelcomePrompt/package.json +1 -0
- package/dist/dynamic/CodeModal/package.json +1 -0
- package/dist/dynamic/FileDetails/package.json +1 -0
- package/dist/dynamic/FileDetailsLabel/package.json +1 -0
- package/dist/dynamic/FileDropZone/package.json +1 -0
- package/dist/dynamic/LoadingMessage/package.json +1 -0
- package/dist/dynamic/Message/package.json +1 -0
- package/dist/dynamic/MessageBar/package.json +1 -0
- package/dist/dynamic/MessageBox/package.json +1 -0
- package/dist/dynamic/PreviewAttachment/package.json +1 -0
- package/dist/dynamic/ResponseActions/package.json +1 -0
- package/dist/dynamic/SourceDetailsMenuItem/package.json +1 -0
- package/dist/dynamic/SourcesCard/package.json +1 -0
- package/dist/esm/AttachMenu/AttachMenu.d.ts +29 -0
- package/dist/esm/AttachMenu/AttachMenu.js +26 -0
- package/dist/esm/AttachMenu/index.d.ts +2 -0
- package/dist/esm/AttachMenu/index.js +2 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.d.ts +22 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.js +18 -0
- package/dist/esm/AttachmentEdit/index.d.ts +2 -0
- package/dist/esm/AttachmentEdit/index.js +2 -0
- package/dist/esm/Chatbot/Chatbot.d.ts +23 -0
- package/dist/esm/Chatbot/Chatbot.js +43 -0
- package/dist/esm/Chatbot/index.d.ts +2 -0
- package/dist/esm/Chatbot/index.js +2 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.d.ts +8 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.js +21 -0
- package/dist/esm/ChatbotAlert/index.d.ts +2 -0
- package/dist/esm/ChatbotAlert/index.js +2 -0
- package/dist/esm/ChatbotContent/ChatbotContent.d.ts +9 -0
- package/dist/esm/ChatbotContent/ChatbotContent.js +20 -0
- package/dist/esm/ChatbotContent/index.d.ts +2 -0
- package/dist/esm/ChatbotContent/index.js +2 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +14 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +15 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +52 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +76 -0
- package/dist/esm/ChatbotConversationHistoryNav/index.d.ts +3 -0
- package/dist/esm/ChatbotConversationHistoryNav/index.js +3 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.d.ts +9 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.js +28 -0
- package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +44 -0
- package/dist/esm/ChatbotFooter/ChatbotFootnote.js +49 -0
- package/dist/esm/ChatbotFooter/index.d.ts +3 -0
- package/dist/esm/ChatbotFooter/index.js +3 -0
- package/dist/esm/ChatbotHeader/ChatbotHeader.d.ts +9 -0
- package/dist/esm/ChatbotHeader/ChatbotHeader.js +6 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.d.ts +9 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.js +3 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.d.ts +9 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.js +3 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.d.ts +15 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +8 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +14 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +26 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +18 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +26 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +20 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +26 -0
- package/dist/esm/ChatbotHeader/index.d.ts +8 -0
- package/dist/esm/ChatbotHeader/index.js +8 -0
- package/dist/esm/ChatbotModal/ChatbotModal.d.ts +10 -0
- package/dist/esm/ChatbotModal/ChatbotModal.js +27 -0
- package/dist/esm/ChatbotModal/index.d.ts +2 -0
- package/dist/esm/ChatbotModal/index.js +2 -0
- package/dist/esm/ChatbotPopover/ChatbotPopover.d.ts +4 -0
- package/dist/esm/ChatbotPopover/ChatbotPopover.js +22 -0
- package/dist/esm/ChatbotPopover/index.d.ts +2 -0
- package/dist/esm/ChatbotPopover/index.js +2 -0
- package/dist/esm/ChatbotToggle/ChatbotToggle.d.ts +20 -0
- package/dist/esm/ChatbotToggle/ChatbotToggle.js +30 -0
- package/dist/esm/ChatbotToggle/index.d.ts +2 -0
- package/dist/esm/ChatbotToggle/index.js +2 -0
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +23 -0
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +33 -0
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.d.ts +1 -0
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +44 -0
- package/dist/esm/ChatbotWelcomePrompt/index.d.ts +2 -0
- package/dist/esm/ChatbotWelcomePrompt/index.js +2 -0
- package/dist/esm/CodeModal/CodeModal.d.ts +34 -0
- package/dist/esm/CodeModal/CodeModal.js +75 -0
- package/dist/esm/CodeModal/index.d.ts +2 -0
- package/dist/esm/CodeModal/index.js +2 -0
- package/dist/esm/FileDetails/FileDetails.d.ts +922 -0
- package/dist/esm/FileDetails/FileDetails.js +947 -0
- package/dist/esm/FileDetails/FileDetails.test.d.ts +1 -0
- package/dist/esm/FileDetails/FileDetails.test.js +21 -0
- package/dist/esm/FileDetails/index.d.ts +2 -0
- package/dist/esm/FileDetails/index.js +2 -0
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.d.ts +21 -0
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.js +15 -0
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.d.ts +1 -0
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.js +56 -0
- package/dist/esm/FileDetailsLabel/index.d.ts +2 -0
- package/dist/esm/FileDetailsLabel/index.js +2 -0
- package/dist/esm/FileDropZone/FileDropZone.d.ts +17 -0
- package/dist/esm/FileDropZone/FileDropZone.js +23 -0
- package/dist/esm/FileDropZone/FileDropZone.test.d.ts +1 -0
- package/dist/esm/FileDropZone/FileDropZone.test.js +14 -0
- package/dist/esm/FileDropZone/index.d.ts +2 -0
- package/dist/esm/FileDropZone/index.js +2 -0
- package/dist/esm/LoadingMessage/LoadingMessage.d.ts +6 -0
- package/dist/esm/LoadingMessage/LoadingMessage.js +13 -0
- package/dist/esm/LoadingMessage/LoadingMessage.test.d.ts +1 -0
- package/dist/esm/LoadingMessage/LoadingMessage.test.js +15 -0
- package/dist/esm/LoadingMessage/index.d.ts +2 -0
- package/dist/esm/LoadingMessage/index.js +2 -0
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.d.ts +4 -0
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +56 -0
- package/dist/esm/Message/ListMessage/ListItemMessage.d.ts +4 -0
- package/dist/esm/Message/ListMessage/ListItemMessage.js +7 -0
- package/dist/esm/Message/ListMessage/OrderedListMessage.d.ts +4 -0
- package/dist/esm/Message/ListMessage/OrderedListMessage.js +8 -0
- package/dist/esm/Message/ListMessage/UnorderedListMessage.d.ts +4 -0
- package/dist/esm/Message/ListMessage/UnorderedListMessage.js +8 -0
- package/dist/esm/Message/Message.d.ts +65 -0
- package/dist/esm/Message/Message.js +62 -0
- package/dist/esm/Message/Message.test.d.ts +1 -0
- package/dist/esm/Message/Message.test.js +234 -0
- package/dist/esm/Message/MessageLoading.d.ts +5 -0
- package/dist/esm/Message/MessageLoading.js +8 -0
- package/dist/esm/Message/TextMessage/TextMessage.d.ts +4 -0
- package/dist/esm/Message/TextMessage/TextMessage.js +22 -0
- package/dist/esm/Message/index.d.ts +2 -0
- package/dist/esm/Message/index.js +2 -0
- package/dist/esm/MessageBar/AttachButton.d.ts +21 -0
- package/dist/esm/MessageBar/AttachButton.js +32 -0
- package/dist/esm/MessageBar/AttachButton.test.d.ts +1 -0
- package/dist/esm/MessageBar/AttachButton.test.js +61 -0
- package/dist/esm/MessageBar/MessageBar.d.ts +71 -0
- package/dist/esm/MessageBar/MessageBar.js +105 -0
- package/dist/esm/MessageBar/MessageBar.test.d.ts +1 -0
- package/dist/esm/MessageBar/MessageBar.test.js +232 -0
- package/dist/esm/MessageBar/MicrophoneButton.d.ts +21 -0
- package/dist/esm/MessageBar/MicrophoneButton.js +67 -0
- package/dist/esm/MessageBar/SendButton.d.ts +14 -0
- package/dist/esm/MessageBar/SendButton.js +25 -0
- package/dist/esm/MessageBar/SendButton.test.d.ts +1 -0
- package/dist/esm/MessageBar/SendButton.test.js +49 -0
- package/dist/esm/MessageBar/StopButton.d.ts +14 -0
- package/dist/esm/MessageBar/StopButton.js +25 -0
- package/dist/esm/MessageBar/StopButton.test.d.ts +1 -0
- package/dist/esm/MessageBar/StopButton.test.js +49 -0
- package/dist/esm/MessageBar/index.d.ts +5 -0
- package/dist/esm/MessageBar/index.js +5 -0
- package/dist/esm/MessageBox/JumpButton.d.ts +11 -0
- package/dist/esm/MessageBox/JumpButton.js +12 -0
- package/dist/esm/MessageBox/JumpButton.test.d.ts +1 -0
- package/dist/esm/MessageBox/JumpButton.test.js +34 -0
- package/dist/esm/MessageBox/MessageBox.d.ts +17 -0
- package/dist/esm/MessageBox/MessageBox.js +68 -0
- package/dist/esm/MessageBox/index.d.ts +3 -0
- package/dist/esm/MessageBox/index.js +3 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.d.ts +22 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.js +18 -0
- package/dist/esm/PreviewAttachment/index.d.ts +2 -0
- package/dist/esm/PreviewAttachment/index.js +2 -0
- package/dist/esm/ResponseActions/ResponseActionButton.d.ts +20 -0
- package/dist/esm/ResponseActions/ResponseActionButton.js +5 -0
- package/dist/esm/ResponseActions/ResponseActions.d.ts +30 -0
- package/dist/esm/ResponseActions/ResponseActions.js +29 -0
- package/dist/esm/ResponseActions/ResponseActions.test.d.ts +1 -0
- package/dist/esm/ResponseActions/ResponseActions.test.js +62 -0
- package/dist/esm/ResponseActions/index.d.ts +2 -0
- package/dist/esm/ResponseActions/index.js +2 -0
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +11 -0
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.js +24 -0
- package/dist/esm/SourceDetailsMenuItem/index.d.ts +2 -0
- package/dist/esm/SourceDetailsMenuItem/index.js +2 -0
- package/dist/esm/SourcesCard/SourcesCard.d.ts +34 -0
- package/dist/esm/SourcesCard/SourcesCard.js +63 -0
- package/dist/esm/SourcesCard/SourcesCard.test.d.ts +1 -0
- package/dist/esm/SourcesCard/SourcesCard.test.js +162 -0
- package/dist/esm/SourcesCard/index.d.ts +2 -0
- package/dist/esm/SourcesCard/index.js +2 -0
- package/dist/esm/index.d.ts +48 -0
- package/dist/esm/index.js +49 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/generate-fed-package-json.js +75 -0
- package/generate-index.js +42 -0
- package/package.json +79 -0
- package/patternfly-a11y.config.js +28 -0
- package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +29 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachMenu.tsx +149 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentEdit.tsx +26 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +13 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +87 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetails.tsx +4 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetailsLabel.tsx +54 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +60 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +75 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +39 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +44 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +25 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +118 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +171 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/PaperclipIcon.svg +10 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/PreviewAttachment.tsx +25 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +37 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/patternfly_avatar.jpg +0 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/user_avatar.jpg +0 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotContainer.tsx +66 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +14 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +26 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +189 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +93 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithActions.tsx +75 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderTitle.tsx +50 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBar.tsx +8 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +148 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarStop.tsx +10 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotModal.tsx +84 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotToggleBasic.tsx +13 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +144 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +38 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/CustomClosedIcon.tsx +89 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/PF-HorizontalLogo-Color.svg +29 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/PF-HorizontalLogo-Reverse.svg +28 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/PF-IconLogo-Color.svg +17 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/PF-IconLogo-Reverse.svg +16 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/SkipToContent.tsx +40 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +336 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +99 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +105 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +473 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +278 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +268 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +437 -0
- package/patternfly-docs/pages/index.js +27 -0
- package/patternfly-docs/patternfly-docs.config.js +8 -0
- package/patternfly-docs/patternfly-docs.css.js +9 -0
- package/patternfly-docs/patternfly-docs.routes.js +12 -0
- package/patternfly-docs/patternfly-docs.source.js +24 -0
- package/release.config.js +18 -0
- package/src/AttachMenu/AttachMenu.scss +62 -0
- package/src/AttachMenu/AttachMenu.tsx +81 -0
- package/src/AttachMenu/index.ts +3 -0
- package/src/AttachmentEdit/AttachmentEdit.tsx +63 -0
- package/src/AttachmentEdit/index.ts +3 -0
- package/src/Chatbot/Chatbot.scss +89 -0
- package/src/Chatbot/Chatbot.tsx +81 -0
- package/src/Chatbot/index.ts +3 -0
- package/src/ChatbotAlert/ChatbotAlert.scss +5 -0
- package/src/ChatbotAlert/ChatbotAlert.tsx +32 -0
- package/src/ChatbotAlert/index.ts +3 -0
- package/src/ChatbotContent/ChatbotContent.scss +23 -0
- package/src/ChatbotContent/ChatbotContent.tsx +23 -0
- package/src/ChatbotContent/index.ts +3 -0
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +62 -0
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +166 -0
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +217 -0
- package/src/ChatbotConversationHistoryNav/index.ts +4 -0
- package/src/ChatbotFooter/ChatbotFooter.scss +54 -0
- package/src/ChatbotFooter/ChatbotFooter.tsx +33 -0
- package/src/ChatbotFooter/ChatbotFootnote.scss +12 -0
- package/src/ChatbotFooter/ChatbotFootnote.tsx +135 -0
- package/src/ChatbotFooter/index.ts +4 -0
- package/src/ChatbotHeader/ChatbotHeader.scss +140 -0
- package/src/ChatbotHeader/ChatbotHeader.tsx +22 -0
- package/src/ChatbotHeader/ChatbotHeaderActions.tsx +15 -0
- package/src/ChatbotHeader/ChatbotHeaderMain.tsx +15 -0
- package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +48 -0
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +73 -0
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +68 -0
- package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +57 -0
- package/src/ChatbotHeader/index.ts +9 -0
- package/src/ChatbotModal/ChatbotModal.scss +93 -0
- package/src/ChatbotModal/ChatbotModal.tsx +43 -0
- package/src/ChatbotModal/index.ts +3 -0
- package/src/ChatbotPopover/ChatbotPopover.scss +27 -0
- package/src/ChatbotPopover/ChatbotPopover.tsx +15 -0
- package/src/ChatbotPopover/index.ts +3 -0
- package/src/ChatbotToggle/ChatbotToggle.scss +26 -0
- package/src/ChatbotToggle/ChatbotToggle.tsx +80 -0
- package/src/ChatbotToggle/index.ts +3 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +48 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +64 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +66 -0
- package/src/ChatbotWelcomePrompt/__snapshots__/ChatbotWelcomePrompt.test.tsx.snap +29 -0
- package/src/ChatbotWelcomePrompt/index.ts +3 -0
- package/src/CodeModal/CodeModal.scss +76 -0
- package/src/CodeModal/CodeModal.tsx +153 -0
- package/src/CodeModal/index.ts +3 -0
- package/src/FileDetails/FileDetails.scss +25 -0
- package/src/FileDetails/FileDetails.test.tsx +23 -0
- package/src/FileDetails/FileDetails.tsx +990 -0
- package/src/FileDetails/__snapshots__/FileDetails.test.tsx.snap +74 -0
- package/src/FileDetails/index.ts +2 -0
- package/src/FileDetailsLabel/FileDetailsLabel.scss +66 -0
- package/src/FileDetailsLabel/FileDetailsLabel.test.tsx +48 -0
- package/src/FileDetailsLabel/FileDetailsLabel.tsx +66 -0
- package/src/FileDetailsLabel/__snapshots__/FileDetailsLabel.test.tsx.snap +90 -0
- package/src/FileDetailsLabel/index.ts +2 -0
- package/src/FileDropZone/FileDropZone.scss +36 -0
- package/src/FileDropZone/FileDropZone.test.tsx +15 -0
- package/src/FileDropZone/FileDropZone.tsx +56 -0
- package/src/FileDropZone/__snapshots__/FileDropZone.test.tsx.snap +18 -0
- package/src/FileDropZone/index.ts +3 -0
- package/src/LoadingMessage/LoadingMessage.test.tsx +16 -0
- package/src/LoadingMessage/LoadingMessage.tsx +27 -0
- package/src/LoadingMessage/__snapshots__/LoadingMessage.test.tsx.snap +52 -0
- package/src/LoadingMessage/index.ts +3 -0
- package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +82 -0
- package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +88 -0
- package/src/Message/ListMessage/ListItemMessage.tsx +11 -0
- package/src/Message/ListMessage/ListMessage.scss +25 -0
- package/src/Message/ListMessage/OrderedListMessage.tsx +17 -0
- package/src/Message/ListMessage/UnorderedListMessage.tsx +15 -0
- package/src/Message/Message.scss +118 -0
- package/src/Message/Message.test.tsx +281 -0
- package/src/Message/Message.tsx +181 -0
- package/src/Message/MessageLoading.scss +53 -0
- package/src/Message/MessageLoading.tsx +15 -0
- package/src/Message/TextMessage/TextMessage.scss +51 -0
- package/src/Message/TextMessage/TextMessage.tsx +17 -0
- package/src/Message/index.ts +3 -0
- package/src/MessageBar/AttachButton.scss +20 -0
- package/src/MessageBar/AttachButton.test.tsx +53 -0
- package/src/MessageBar/AttachButton.tsx +81 -0
- package/src/MessageBar/MessageBar.scss +77 -0
- package/src/MessageBar/MessageBar.test.tsx +318 -0
- package/src/MessageBar/MessageBar.tsx +252 -0
- package/src/MessageBar/MicrophoneButton.scss +48 -0
- package/src/MessageBar/MicrophoneButton.tsx +114 -0
- package/src/MessageBar/SendButton.scss +29 -0
- package/src/MessageBar/SendButton.test.tsx +43 -0
- package/src/MessageBar/SendButton.tsx +54 -0
- package/src/MessageBar/StopButton.scss +22 -0
- package/src/MessageBar/StopButton.test.tsx +42 -0
- package/src/MessageBar/StopButton.tsx +57 -0
- package/src/MessageBar/index.ts +6 -0
- package/src/MessageBox/JumpButton.scss +46 -0
- package/src/MessageBox/JumpButton.test.tsx +26 -0
- package/src/MessageBox/JumpButton.tsx +37 -0
- package/src/MessageBox/MessageBox.scss +36 -0
- package/src/MessageBox/MessageBox.tsx +114 -0
- package/src/MessageBox/index.ts +4 -0
- package/src/PreviewAttachment/PreviewAttachment.tsx +67 -0
- package/src/PreviewAttachment/index.ts +3 -0
- package/src/ResponseActions/ResponseActionButton.tsx +56 -0
- package/src/ResponseActions/ResponseActions.scss +26 -0
- package/src/ResponseActions/ResponseActions.test.tsx +59 -0
- package/src/ResponseActions/ResponseActions.tsx +115 -0
- package/src/ResponseActions/index.ts +3 -0
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.scss +33 -0
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx +36 -0
- package/src/SourceDetailsMenuItem/index.ts +2 -0
- package/src/SourcesCard/SourcesCard.scss +74 -0
- package/src/SourcesCard/SourcesCard.test.tsx +238 -0
- package/src/SourcesCard/SourcesCard.tsx +159 -0
- package/src/SourcesCard/__snapshots__/SourcesCard.test.tsx.snap +34 -0
- package/src/SourcesCard/index.ts +3 -0
- package/src/index.ts +73 -0
- package/src/main.scss +89 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +73 -0
@@ -0,0 +1,336 @@
|
|
1
|
+
---
|
2
|
+
# Sidenav top-level section
|
3
|
+
# should be the same for all markdown files
|
4
|
+
section: PatternFly-AI
|
5
|
+
subsection: ChatBot
|
6
|
+
# Sidenav secondary level section
|
7
|
+
# should be the same for all markdown files
|
8
|
+
id: UI
|
9
|
+
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
|
10
|
+
source: react
|
11
|
+
# If you use typescript, the name of the interface to display props for
|
12
|
+
# These are found through the sourceProps function provided in patternfly-docs.source.js
|
13
|
+
propComponents:
|
14
|
+
[
|
15
|
+
'Chatbot',
|
16
|
+
'ChatbotContent',
|
17
|
+
'MessageBox',
|
18
|
+
'ChatbotWelcomePrompt',
|
19
|
+
'WelcomePrompt',
|
20
|
+
'ChatbotToggle',
|
21
|
+
'ChatbotHeader',
|
22
|
+
'ChatbotHeaderMain',
|
23
|
+
'ChatbotHeaderMenu',
|
24
|
+
'ChatbotHeaderActions',
|
25
|
+
'ChatbotHeaderTitle',
|
26
|
+
'ChatbotHeaderOptionsDropdown',
|
27
|
+
'ChatbotHeaderSelectorDropdown',
|
28
|
+
'ChatbotFooter',
|
29
|
+
'MessageBar',
|
30
|
+
'ChatbotFootnote',
|
31
|
+
'ChatbotFootnotePopover',
|
32
|
+
'ChatbotFootnotePopoverCTA',
|
33
|
+
'ChatbotFootnotePopoverBannerImage',
|
34
|
+
'ChatbotFootnotePopoverLink',
|
35
|
+
'MessageBarWithAttachMenuProps',
|
36
|
+
'SourceDetailsMenuItem',
|
37
|
+
'ChatbotConversationHistoryNav',
|
38
|
+
'Conversation'
|
39
|
+
]
|
40
|
+
sortValue: 2
|
41
|
+
---
|
42
|
+
|
43
|
+
import Chatbot, { ChatbotDisplayMode } from '@patternfly/chatbot/dist/dynamic/Chatbot';
|
44
|
+
import ChatbotContent from '@patternfly/chatbot/dist/dynamic/ChatbotContent';
|
45
|
+
import ChatbotWelcomePrompt from '@patternfly/chatbot/dist/dynamic/ChatbotWelcomePrompt';
|
46
|
+
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
|
47
|
+
import ChatbotToggle from '@patternfly/chatbot/dist/dynamic/ChatbotToggle';
|
48
|
+
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
49
|
+
import AttachmentEdit from '@patternfly/chatbot/dist/dynamic/AttachmentEdit';
|
50
|
+
import FileDetails from '@patternfly/chatbot/dist/dynamic/FileDetails';
|
51
|
+
import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel';
|
52
|
+
import FileDropZone from '@patternfly/chatbot/dist/dynamic/FileDropZone';
|
53
|
+
import { PreviewAttachment } from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
|
54
|
+
import ChatbotAlert from '@patternfly/chatbot/dist/dynamic/ChatbotAlert';
|
55
|
+
import {
|
56
|
+
ChatbotHeader,
|
57
|
+
ChatbotHeaderMain,
|
58
|
+
ChatbotHeaderMenu,
|
59
|
+
ChatbotHeaderActions,
|
60
|
+
ChatbotHeaderTitle,
|
61
|
+
ChatbotHeaderOptionsDropdown,
|
62
|
+
ChatbotHeaderSelectorDropdown
|
63
|
+
} from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
|
64
|
+
import { ChatbotFooter, ChatbotFootnote } from '@patternfly/chatbot/dist/dynamic/ChatbotFooter';
|
65
|
+
import { MessageBar } from '@patternfly/chatbot/dist/dynamic/MessageBar';
|
66
|
+
import SourceDetailsMenuItem from '@patternfly/chatbot/dist/dynamic/SourceDetailsMenuItem';
|
67
|
+
import { ChatbotModal } from '@patternfly/chatbot/dist/dynamic/ChatbotModal';
|
68
|
+
import { BellIcon, CalendarAltIcon, ClipboardIcon, CodeIcon, UploadIcon } from '@patternfly/react-icons';
|
69
|
+
import { useDropzone } from 'react-dropzone';
|
70
|
+
|
71
|
+
import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
|
72
|
+
import { DropdownItem, DropdownList, Checkbox } from '@patternfly/react-core';
|
73
|
+
|
74
|
+
import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
|
75
|
+
import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
|
76
|
+
import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
|
77
|
+
import PFHorizontalLogoColor from './PF-HorizontalLogo-Color.svg';
|
78
|
+
import PFHorizontalLogoReverse from './PF-HorizontalLogo-Reverse.svg';
|
79
|
+
import userAvatar from '../Messages/user_avatar.jpg';
|
80
|
+
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
81
|
+
|
82
|
+
## Structure
|
83
|
+
|
84
|
+
### Container
|
85
|
+
|
86
|
+
The PatternFly chatbot is a separate window that overlays or is embedded within other UI content. This container can be shown and hidden via [the chatbot toggle.](/patternfly-ai/chatbot/ui#toggle)
|
87
|
+
|
88
|
+
The `<Chatbot>` component is the container that encompasses the chatbot experience. It adapts to various display modes (overlay/default, docked, fullscreen, and embedded) and supports both light and dark themes.
|
89
|
+
|
90
|
+
The "embedded" display mode is meant to be used within a [PatternFly page](/components/page) or other container within your product.
|
91
|
+
|
92
|
+
```js file="./ChatbotContainer.tsx" isFullscreen
|
93
|
+
|
94
|
+
```
|
95
|
+
|
96
|
+
### Content and message box
|
97
|
+
|
98
|
+
The `<ChatbotContent>` component is the container that is placed within the `<Chatbot>`, between the [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) and [`<ChatbotFooter>`.](/patternfly-ai/chatbot/ui#footer)
|
99
|
+
<br />
|
100
|
+
<br />
|
101
|
+
`<ChatbotContent>` usually contains a `<ChatbotMessageBox>` for displaying messages.
|
102
|
+
<br />
|
103
|
+
<br />
|
104
|
+
Your code structure should look like this:
|
105
|
+
|
106
|
+
```noLive
|
107
|
+
<Chatbot>
|
108
|
+
<ChatbotHeader ... />
|
109
|
+
<ChatbotContent>
|
110
|
+
<ChatbotMessageBox>
|
111
|
+
...
|
112
|
+
<ChatbotMessageBox>
|
113
|
+
</ChatbotContent>
|
114
|
+
<ChatbotFooter ... />
|
115
|
+
</Chatbot>
|
116
|
+
```
|
117
|
+
|
118
|
+
**Note**: When messages update, it is important to announce new messages to users of assistive technology. To do this, make sure to set the `announcement` prop on `<MessageBox>` whenever you display a new message in `<MessageBox>`. You can view this in action in our [basic chatbot](/patternfly-ai/chatbot/overview/demo#basic-chatbot) and [embedded chatbot](/patternfly-ai/chatbot/overview/demo#embedded-chatbot) demos.
|
119
|
+
|
120
|
+
### Welcome message
|
121
|
+
|
122
|
+
To introduce users to the chatbot experience, display a welcome message before they input their first message. This brief message should follow our [conversation design guidelines](/patternfly-ai/conversation-design) to welcome users to the chatbot experience and encourage them to interact.
|
123
|
+
|
124
|
+
This message can be dismissed once a user sends their first message. To change the arrangement of the message within the message box, specify the `position` in the `<MessageBox>` component.
|
125
|
+
|
126
|
+
```js file="./ChatbotWelcomeInteraction.tsx" isFullscreen
|
127
|
+
|
128
|
+
```
|
129
|
+
|
130
|
+
### Welcome prompt
|
131
|
+
|
132
|
+
To provide users with a more specific direction, you can also include optional welcome prompts.
|
133
|
+
|
134
|
+
```js file="./ChatbotWelcomePrompt.tsx"
|
135
|
+
|
136
|
+
```
|
137
|
+
|
138
|
+
### Skip to content
|
139
|
+
|
140
|
+
To provide page context, we recommend using a "skip to chatbot" button. This allows you to skip past other content on the page, directly to the chatbot content, using a [PatternFly skip to content component](/components/skip-to-content). To display this button, you must tab into the main window.
|
141
|
+
<br />
|
142
|
+
<br />
|
143
|
+
When using default or docked modes, we recommend putting focus on the toggle if the chatbot is closed, and the chatbot when it is open. For fullscreen and embedded, we recommend putting the focus on the first focusable item in the chatbot, such as a menu toggle. This can be seen in our more fully-featured demos for the [default, embedded, and fullscreen chatbot](/patternfly-ai/chatbot/overview/demo#basic-chatbot) and the [embedded chatbot](/patternfly-ai/chatbot/overview/demo#embedded-chatbot).
|
144
|
+
|
145
|
+
```js file="./SkipToContent.tsx" isFullscreen
|
146
|
+
|
147
|
+
```
|
148
|
+
|
149
|
+
## Toggle
|
150
|
+
|
151
|
+
### Basic toggle
|
152
|
+
|
153
|
+
To allow users to open and close the chatbot window as needed, add a toggle.
|
154
|
+
|
155
|
+
```js file="./ChatbotToggleBasic.tsx" isFullscreen
|
156
|
+
|
157
|
+
```
|
158
|
+
|
159
|
+
### Custom toggle icon
|
160
|
+
|
161
|
+
A custom icon can be passed to the toggle. To ensure the icon is visible in both light and dark themes, use an SVG image and set `fill="currentColor"`.
|
162
|
+
|
163
|
+
```js file="./CustomClosedIcon.tsx" isFullscreen
|
164
|
+
|
165
|
+
```
|
166
|
+
|
167
|
+
## Header
|
168
|
+
|
169
|
+
### Header sections
|
170
|
+
|
171
|
+
The chatbot header is persistent, and contains the title for the chatbot window, as well as any related controls and actions.
|
172
|
+
|
173
|
+
The `<ChatbotHeader>` has 2 sections:
|
174
|
+
|
175
|
+
- `<ChatbotHeaderMain>` contains the title and an optional menu toggle:
|
176
|
+
- `<ChatbotHeaderTitle>` handles the layout and display of a title or image at different responsive sizes.
|
177
|
+
- `<ChatbotHeaderMenu>` (optional) is placed on the left side of the header and used to toggle a chat history menu.
|
178
|
+
- `<ChatbotHeaderActions>` contains any additional controls:
|
179
|
+
- The `<ChatbotHeaderSelectorDropdown>` component is a standard PatternFly dropdown that matches the chatbot styles.
|
180
|
+
- The `<ChatbotHeaderOptionsDropdown>` component is a dropdown with a menu toggle that is intended to be used to update chatbot settings (like the display mode).
|
181
|
+
|
182
|
+
Your `<ChatbotHeader>` code structure should look like this:
|
183
|
+
|
184
|
+
```noLive
|
185
|
+
<ChatbotHeader>
|
186
|
+
<ChatbotHeaderMain>
|
187
|
+
<ChatbotHeaderMenu ... />
|
188
|
+
<ChatbotHeaderTitle ... />
|
189
|
+
</ChatbotHeaderMain>
|
190
|
+
<ChatbotHeaderActions>
|
191
|
+
<ChatbotHeaderSelectorDropdown ... />
|
192
|
+
<ChatbotHeaderOptionsDropdown ... />
|
193
|
+
</ChatbotHeaderActions>
|
194
|
+
</ChatbotHeader>
|
195
|
+
```
|
196
|
+
|
197
|
+
### Header title
|
198
|
+
|
199
|
+
By default, `<HeaderTitle>` renders any children that are passed in. Optionally, you can pass in a `displayMode`, `showOnEmbedded`, `showOnDocked`, `showOnFullScreen`, and/or `showOnDefault` to render content conditionally.
|
200
|
+
|
201
|
+
```js file="./ChatbotHeaderTitle.tsx"
|
202
|
+
|
203
|
+
```
|
204
|
+
|
205
|
+
### Header options
|
206
|
+
|
207
|
+
There are a variety of options and customizations you can make to the header, to adjust how information is displayed, or to add additional controls.
|
208
|
+
|
209
|
+
In this example, select the respective checkbox to toggle these features:
|
210
|
+
|
211
|
+
- **Menu:** Users can select the menu toggle to open a menu of additional options or actions.
|
212
|
+
- **Left-aligned logo**
|
213
|
+
- **Centered logo**
|
214
|
+
- **Selector dropdown:** Users can choose from preselected options in a dropdown menu. For example, they can toggle between AI models.
|
215
|
+
- **Options dropdown:** Users can select chatbot options from a menu. For example, they can switch between chatbot display modes.
|
216
|
+
|
217
|
+
```js file="./ChatbotHeaderBasic.tsx"
|
218
|
+
|
219
|
+
```
|
220
|
+
|
221
|
+
## Footer
|
222
|
+
|
223
|
+
### Footnote with popover
|
224
|
+
|
225
|
+
A footnote can be placed in the chatbot footer to communicate any legal disclaimers or information about the chatbot.
|
226
|
+
Footnotes can be static text or a button that opens a popover.
|
227
|
+
|
228
|
+
```js file="./ChatbotFootnote.tsx"
|
229
|
+
|
230
|
+
```
|
231
|
+
|
232
|
+
### Message bar with speech recognition and file attachment
|
233
|
+
|
234
|
+
In Safari and Chrome, you will see a microphone button in the message bar if `hasMicrophoneButton` is passed to `<MessageBar>`. The button will only appear if `'SpeechRecognition'` or `'webkitSpeechRecognition'` are available in `window`. This does not currently work in Firefox.
|
235
|
+
|
236
|
+
By default the message bar supports file uploads via an attach button. Setting `hasAttachButton` to `false` will disable that feature.
|
237
|
+
|
238
|
+
```js file="./ChatbotMessageBar.tsx"
|
239
|
+
|
240
|
+
```
|
241
|
+
|
242
|
+
### Message bar with attach menu appended to attach button
|
243
|
+
|
244
|
+
You can change the behavior of the attach button to open a menu, rather than the default file viewer for your operating system. This menu can display different actions related to attachments.
|
245
|
+
|
246
|
+
Attachments can also be added to the chatbot via [drag and drop.](/patternfly-ai/chatbot/messages#attachment-dropzone)
|
247
|
+
|
248
|
+
```js file="./ChatbotMessageBarAttach.tsx"
|
249
|
+
|
250
|
+
```
|
251
|
+
|
252
|
+
### Footer with message bar and footnote
|
253
|
+
|
254
|
+
A simple footer with a message bar and footnote would have this code structure:
|
255
|
+
|
256
|
+
```noLive
|
257
|
+
<ChatbotFooter>
|
258
|
+
<MessageBar ... />
|
259
|
+
<ChatbotFootnote .../>
|
260
|
+
</ChatbotFooter>
|
261
|
+
```
|
262
|
+
|
263
|
+
```js file="./ChatbotFooter.tsx"
|
264
|
+
|
265
|
+
```
|
266
|
+
|
267
|
+
### Message bar with stop button
|
268
|
+
|
269
|
+
If you are using streaming, you can add a stop button to the message bar that allows users to stop a response from a chatbot.
|
270
|
+
|
271
|
+
To enable the stop button, set `hasStopButton` to `true` and pass in a `handleStopButton` callback function. You can use this callback to trigger an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) configured as part of your API call.
|
272
|
+
|
273
|
+
```js file="./ChatbotMessageBarStop.tsx"
|
274
|
+
|
275
|
+
```
|
276
|
+
|
277
|
+
## Navigation
|
278
|
+
|
279
|
+
### Side nav in a drawer
|
280
|
+
|
281
|
+
The chatbot conversation history is contained in an interactive drawer, where users can interact with previous conversations or start a new conversation.
|
282
|
+
|
283
|
+
The `<ChatbotConversationHistoryNav>` component is a wrapper placed within `<Chatbot>`, which contains all other chatbot components in `drawerContent`. There is a focus trap so users can only tab within the drawer while it is open.
|
284
|
+
|
285
|
+
The code structure will look like this:
|
286
|
+
|
287
|
+
```noLive
|
288
|
+
<Chatbot>
|
289
|
+
<ChatbotConversationHistoryNav
|
290
|
+
...
|
291
|
+
drawerContent={
|
292
|
+
<>
|
293
|
+
<ChatbotContent>
|
294
|
+
<ChatbotMessageBox>
|
295
|
+
...
|
296
|
+
<ChatbotMessageBox>
|
297
|
+
</ChatbotContent>
|
298
|
+
<ChatbotFooter ... />
|
299
|
+
</>
|
300
|
+
}>
|
301
|
+
</ChatbotConversationHistoryNav>
|
302
|
+
</Chatbot>
|
303
|
+
```
|
304
|
+
|
305
|
+
The conversation history drawer looks different depending on the `displayMode` of the parent `<Chatbot>`. (As shown in the [main chatbot demo](/patternfly-ai/chatbot/overview/demo#basic-chatbot).):
|
306
|
+
|
307
|
+
- `Default` and `docked` display modes display the conversation history on top of the rest of the chatbot content, with a PatternFly backdrop between the drawer panel and drawer content.
|
308
|
+
- `Fullscreen` and `embedded` display modes display the conversation history in line with the drawer content.
|
309
|
+
|
310
|
+
### Drawer with search and "new chat" button
|
311
|
+
|
312
|
+
In the conversation history drawer, users can search previous chatbot conversations via an input field. To customize the placeholder text, use `searchInputPlaceholder`. Provide an aria label via `searchInputAriaLabel`.
|
313
|
+
|
314
|
+
They can also start new conversations via a "New chat" button. To customize the button label, use `newChatButtonText`.
|
315
|
+
|
316
|
+
Both the search input field and "New chat" buttons are optional.
|
317
|
+
|
318
|
+
```js file="./ChatbotHeaderDrawer.tsx"
|
319
|
+
|
320
|
+
```
|
321
|
+
|
322
|
+
### Drawer with conversation actions
|
323
|
+
|
324
|
+
Actions can be added to conversations with `menuItems`. Optionally, you can also add a `className` to the menu via `menuClassName`, change the default aria-label and tooltip content via `label`, or add an `onSelect` callback for when a user selects an item.
|
325
|
+
|
326
|
+
```js file="./ChatbotHeaderDrawerWithActions.tsx"
|
327
|
+
|
328
|
+
```
|
329
|
+
|
330
|
+
### Modal
|
331
|
+
|
332
|
+
Based on the [PatternFly modal](/components/modal), this modal adapts to the chatbot display mode and accepts components typically used in a modal. It is primarily used and tested in the context of the attachment modals, but you can customize this modal to adapt it to other use cases as needed. The modal will overlay the chatbot in default and docked modes, and will behave more like a traditional PatternFly modal in fullscreen and embedded modes.
|
333
|
+
|
334
|
+
```js file="./ChatbotModal.tsx" isFullscreen
|
335
|
+
|
336
|
+
```
|
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
# Sidenav top-level section
|
3
|
+
# should be the same for all markdown files
|
4
|
+
section: PatternFly-AI
|
5
|
+
subsection: ChatBot
|
6
|
+
# Sidenav secondary level section
|
7
|
+
# should be the same for all markdown files
|
8
|
+
id: Messages
|
9
|
+
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
|
10
|
+
source: demo
|
11
|
+
sourceLink: https://github.com/patternfly/chatbot/blob/main/packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/demos.md
|
12
|
+
---
|
13
|
+
|
14
|
+
import ChatbotToggle from '@patternfly/chatbot/dist/dynamic/ChatbotToggle';
|
15
|
+
import Chatbot, { ChatbotDisplayMode } from '@patternfly/chatbot/dist/dynamic/Chatbot';
|
16
|
+
import ChatbotContent from '@patternfly/chatbot/dist/dynamic/ChatbotContent';
|
17
|
+
import ChatbotWelcomePrompt from '@patternfly/chatbot/dist/dynamic/ChatbotWelcomePrompt';
|
18
|
+
import ChatbotFooter, { ChatbotFootnote } from '@patternfly/chatbot/dist/dynamic/ChatbotFooter';
|
19
|
+
import MessageBar from '@patternfly/chatbot/dist/dynamic/MessageBar';
|
20
|
+
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
|
21
|
+
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
22
|
+
import FileDropZone from '@patternfly/chatbot/dist/dynamic/FileDropZone';
|
23
|
+
import FileDetailsLabel from '@patternfly/chatbot/dist/dynamic/FileDetailsLabel';
|
24
|
+
import SourceDetailsMenuItem from '@patternfly/chatbot/dist/dynamic/SourceDetailsMenuItem';
|
25
|
+
import PreviewAttachment from '@patternfly/chatbot/dist/dynamic/PreviewAttachment';
|
26
|
+
import AttachmentEdit from '@patternfly/chatbot/dist/dynamic/AttachmentEdit';
|
27
|
+
import { BellIcon, CalendarAltIcon, ClipboardIcon, CodeIcon, UploadIcon } from '@patternfly/react-icons';
|
28
|
+
import { useDropzone } from 'react-dropzone';
|
29
|
+
import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
|
30
|
+
import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
31
|
+
import ChatbotHeader, {
|
32
|
+
ChatbotHeaderMenu,
|
33
|
+
ChatbotHeaderMain,
|
34
|
+
ChatbotHeaderTitle,
|
35
|
+
ChatbotHeaderActions,
|
36
|
+
ChatbotHeaderSelectorDropdown,
|
37
|
+
ChatbotHeaderOptionsDropdown
|
38
|
+
} from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
|
39
|
+
import ChatbotAlert from '@patternfly/chatbot/dist/dynamic/ChatbotAlert';
|
40
|
+
import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
|
41
|
+
import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
|
42
|
+
import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
|
43
|
+
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
44
|
+
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
45
|
+
import userAvatar from '../Messages/user_avatar.jpg';
|
46
|
+
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
47
|
+
|
48
|
+
## Demos
|
49
|
+
|
50
|
+
### Attach via upload button in message bar
|
51
|
+
|
52
|
+
This demo displays unique attachment features, including:
|
53
|
+
|
54
|
+
1. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) components that contain:
|
55
|
+
- An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) with an attachment.
|
56
|
+
- The ability to preview or edit the attachment using the [`<PreviewAttachment>` and `<AttachmentEdit>` components.](/patternfly-ai/chatbot/messages##file-attachments)
|
57
|
+
- A [PatternFly `<Alert>`](/components/alert), customized to be sticky within the chatbot window, which provides success or error messages for attachments.
|
58
|
+
2. `<ChatbotContent>` and `<ChatbotFooter>`, wrapped in a `<FileDropZone>` component to support drag and drop attachments. The footer also:
|
59
|
+
- Displays attached files, using a [`<FileDetailsLabel>`](/patternfly-ai/chatbot/messages#attachment-label) component.
|
60
|
+
- Demonstrates custom handling of file uploads, using the `handleAttach` in `<MessageBar>` and `handleFileDrop` in `<FileDropZone>`.
|
61
|
+
|
62
|
+
This demo includes broader chatbot features, including:
|
63
|
+
|
64
|
+
1. A [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
|
65
|
+
2. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) that updates based on the display mode, with sub-components (including a `<ChatbotHeaderTitle>`).
|
66
|
+
3. The ability to swap display modes via the `<ChatbotHeaderOptionsDropdown>`
|
67
|
+
4. A `<ChatbotContent>` and [`<MessageBox>`](/patternfly-ai/chatbot/uir#content-and-message-box) with:
|
68
|
+
- A `<ChatbotWelcomePrompt>`
|
69
|
+
- The ability to preview or edit the attachment.
|
70
|
+
- An initial bot message
|
71
|
+
5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
|
72
|
+
|
73
|
+
```js file="./ChatbotAttachment.tsx" isFullscreen
|
74
|
+
|
75
|
+
```
|
76
|
+
|
77
|
+
### Attach via menu of options in message bar
|
78
|
+
|
79
|
+
This demo displays unique attachment features, including:
|
80
|
+
|
81
|
+
1. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) components that contain:
|
82
|
+
- A PatternFly [`<Alert>`](/components/alert) to provide success or error messages for attachments.
|
83
|
+
2. `<ChatbotContent>` and `<ChatbotFooter>`, wrapped in a `<FileDropZone>` component to support drag and drop attachments. The footer also:
|
84
|
+
|
85
|
+
- Displays attached files, using a [`<FileDetailsLabel>`](/patternfly-ai/chatbot/ui#attachment-label) component.
|
86
|
+
- Demonstrates custom handling of file uploads, using the `handleAttach` in `<MessageBar>` and `handleFileDrop` in `<FileDropZone>`.
|
87
|
+
- Demonstrates how to define the `attachMenuProps` in the `<MessageBar>` to create a menu that allows users to select the source of an item they're attaching.
|
88
|
+
|
89
|
+
This demo includes broader chatbot features, including:
|
90
|
+
|
91
|
+
1. A [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
|
92
|
+
2. A `<ChatbotContent>` and [`<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
|
93
|
+
- A `<ChatbotWelcomePrompt>`
|
94
|
+
- An initial user message and initial bot message
|
95
|
+
3. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootnote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>`
|
96
|
+
|
97
|
+
```js file="./ChatbotAttachmentMenu.tsx" isFullscreen
|
98
|
+
|
99
|
+
```
|
@@ -0,0 +1,105 @@
|
|
1
|
+
---
|
2
|
+
# Sidenav top-level section
|
3
|
+
# should be the same for all markdown files
|
4
|
+
section: PatternFly-AI
|
5
|
+
subsection: ChatBot
|
6
|
+
# Sidenav secondary level section
|
7
|
+
# should be the same for all markdown files
|
8
|
+
id: Overview
|
9
|
+
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
|
10
|
+
source: demo
|
11
|
+
# If you use typescript, the name of the interface to display props for
|
12
|
+
# These are found through the sourceProps function provided in patternfly-docs.source.js
|
13
|
+
propComponents:
|
14
|
+
[
|
15
|
+
'Chatbot',
|
16
|
+
'ChatbotToggle',
|
17
|
+
'ChatbotContent',
|
18
|
+
'ChatbotWelcomePrompt',
|
19
|
+
'ChatbotFooter',
|
20
|
+
'MessageBar',
|
21
|
+
'ChatbotFootnote',
|
22
|
+
'MessageBox',
|
23
|
+
'Message',
|
24
|
+
'MessageBarWithAttachMenuProps'
|
25
|
+
]
|
26
|
+
sortValue: 2
|
27
|
+
---
|
28
|
+
|
29
|
+
import ChatbotToggle from '@patternfly/chatbot/dist/dynamic/ChatbotToggle';
|
30
|
+
import Chatbot, { ChatbotDisplayMode } from '@patternfly/chatbot/dist/dynamic/Chatbot';
|
31
|
+
import ChatbotContent from '@patternfly/chatbot/dist/dynamic/ChatbotContent';
|
32
|
+
import ChatbotWelcomePrompt from '@patternfly/chatbot/dist/dynamic/ChatbotWelcomePrompt';
|
33
|
+
import ChatbotFooter, { ChatbotFootnote } from '@patternfly/chatbot/dist/dynamic/ChatbotFooter';
|
34
|
+
import MessageBar from '@patternfly/chatbot/dist/dynamic/MessageBar';
|
35
|
+
import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
|
36
|
+
import Message from '@patternfly/chatbot/dist/dynamic/Message';
|
37
|
+
import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
|
38
|
+
|
39
|
+
import ChatbotHeader, {
|
40
|
+
ChatbotHeaderMain,
|
41
|
+
ChatbotHeaderMenu,
|
42
|
+
ChatbotHeaderTitle,
|
43
|
+
ChatbotHeaderActions,
|
44
|
+
ChatbotHeaderSelectorDropdown,
|
45
|
+
ChatbotHeaderOptionsDropdown
|
46
|
+
} from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
|
47
|
+
|
48
|
+
import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
|
49
|
+
import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
|
50
|
+
import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
|
51
|
+
import { BarsIcon } from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
52
|
+
import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
|
53
|
+
import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
|
54
|
+
import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
|
55
|
+
import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
|
56
|
+
import userAvatar from '../Messages/user_avatar.jpg';
|
57
|
+
import patternflyAvatar from '../Messages/patternfly_avatar.jpg';
|
58
|
+
|
59
|
+
### Basic chatbot
|
60
|
+
|
61
|
+
This demo displays a basic chatbot, which includes:
|
62
|
+
|
63
|
+
1. The [`<ChatbotToggle>`](/patternfly-ai/chatbot/ui#toggle) that controls the [`<Chatbot>` container.](/patternfly-ai/chatbot/ui#container)
|
64
|
+
2. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>` that changes its presentation depending on the display mode.
|
65
|
+
3. The ability to swap display modes via `<ChatbotHeaderOptionsDropdown>`
|
66
|
+
4. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
|
67
|
+
|
68
|
+
- A `<ChatbotWelcomePrompt>`
|
69
|
+
- An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages#messages-actions)
|
70
|
+
- Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
|
71
|
+
|
72
|
+
5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
|
73
|
+
|
74
|
+
- [Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
|
75
|
+
- Sending a message to the chatbot.
|
76
|
+
- Receiving a response from a backend AI tool with a loading message state.
|
77
|
+
|
78
|
+
6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) toggled open and closed by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
|
79
|
+
|
80
|
+
7. A "skip to chatbot" button that allows you to skip to the chatbot content via the [PatternFly skip to content component](/patternfly-ai/chatbot/ui#skip-to-content). To display this button you must tab into the main window.
|
81
|
+
|
82
|
+
```js file="./Chatbot.tsx" isFullscreen
|
83
|
+
|
84
|
+
```
|
85
|
+
|
86
|
+
### Embedded chatbot
|
87
|
+
|
88
|
+
This demo displays an embedded chatbot. Embedded chatbots are meant to be placed within a page in your product. This demo includes:
|
89
|
+
|
90
|
+
1. A [PatternFly page](/components/page) with a sidebar, "skip to chatbot" button, and masthead. To display the "skip to chatbot" button you must tab into the main window.
|
91
|
+
2. A [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
|
92
|
+
3. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>`
|
93
|
+
4. [`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
|
94
|
+
- A `<ChatbotWelcomePrompt>`
|
95
|
+
- An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages/#messages-actions)
|
96
|
+
- Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
|
97
|
+
5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
|
98
|
+
- [Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
|
99
|
+
- Sending a message to the chatbot.
|
100
|
+
- Receiving a response from a backend AI tool with a loading message state.
|
101
|
+
6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
|
102
|
+
|
103
|
+
```js file="./EmbeddedChatbot.tsx" isFullscreen
|
104
|
+
|
105
|
+
```
|