@patternfly/chatbot 6.8.0-prerelease.3 → 6.8.0-prerelease.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +2 -5
  2. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +3 -3
  3. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +1 -1
  4. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +2 -5
  5. package/dist/cjs/ChatbotHeader/ChatbotHeaderNewChatButton.js +2 -2
  6. package/dist/cjs/FileDropZone/FileDropZone.js +1 -1
  7. package/dist/cjs/MarkdownContent/MarkdownContent.js +15 -1
  8. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +2 -2
  9. package/dist/cjs/Message/LinkMessage/LinkMessage.js +5 -1
  10. package/dist/cjs/Message/Message.test.js +1 -18
  11. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.js +2 -5
  12. package/dist/cjs/MessageBar/MessageBar.test.js +1 -1
  13. package/dist/cjs/MessageBox/JumpButton.test.js +2 -2
  14. package/dist/cjs/MessageBox/MessageBox.js +79 -28
  15. package/dist/cjs/MessageBox/MessageBox.test.d.ts +1 -1
  16. package/dist/cjs/MessageBox/MessageBox.test.js +59 -0
  17. package/dist/cjs/ResponseActions/ResponseActionButton.test.js +6 -6
  18. package/dist/cjs/ResponseActions/ResponseActions.test.js +6 -7
  19. package/dist/cjs/SourcesCardBase/SourcesCardBase.js +5 -5
  20. package/dist/cjs/index.d.ts +0 -2
  21. package/dist/cjs/index.js +1 -4
  22. package/dist/css/main.css +0 -13
  23. package/dist/css/main.css.map +1 -1
  24. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +2 -2
  25. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +4 -4
  26. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +2 -2
  27. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +2 -2
  28. package/dist/esm/ChatbotHeader/ChatbotHeaderNewChatButton.js +2 -2
  29. package/dist/esm/FileDropZone/FileDropZone.js +2 -2
  30. package/dist/esm/MarkdownContent/MarkdownContent.js +15 -1
  31. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +2 -2
  32. package/dist/esm/Message/LinkMessage/LinkMessage.js +6 -2
  33. package/dist/esm/Message/Message.test.js +1 -18
  34. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.js +2 -2
  35. package/dist/esm/MessageBar/MessageBar.test.js +2 -2
  36. package/dist/esm/MessageBox/JumpButton.test.js +2 -2
  37. package/dist/esm/MessageBox/MessageBox.js +80 -29
  38. package/dist/esm/MessageBox/MessageBox.test.d.ts +1 -1
  39. package/dist/esm/MessageBox/MessageBox.test.js +59 -0
  40. package/dist/esm/ResponseActions/ResponseActionButton.test.js +7 -7
  41. package/dist/esm/ResponseActions/ResponseActions.test.js +7 -8
  42. package/dist/esm/SourcesCardBase/SourcesCardBase.js +7 -7
  43. package/dist/esm/index.d.ts +0 -2
  44. package/dist/esm/index.js +0 -2
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +2 -2
  47. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +3 -4
  48. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithMarkdownToolResponse.tsx +3 -3
  49. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +3 -3
  50. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +3 -3
  51. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithToolResponse.tsx +5 -5
  52. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +1 -1
  53. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +7 -31
  54. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +4 -6
  55. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +3 -3
  56. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +2 -2
  57. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithPin.tsx +2 -2
  58. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithSearchActions.tsx +3 -3
  59. package/patternfly-docs/content/extensions/chatbot/examples/UI/CompactSettings.tsx +10 -5
  60. package/patternfly-docs/content/extensions/chatbot/examples/UI/Settings.tsx +10 -5
  61. package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +1 -15
  62. package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +2 -4
  63. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +2 -5
  64. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +4 -7
  65. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +4 -6
  66. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +13 -7
  67. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotCompact.tsx +4 -7
  68. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotDisplayMode.tsx +10 -8
  69. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +2 -2
  70. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotScrolling.tsx +4 -8
  71. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotTranscripts.tsx +4 -7
  72. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +2 -2
  73. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +2 -2
  74. package/patternfly-docs/content/extensions/chatbot/examples/demos/WhiteEmbeddedChatbot.tsx +2 -2
  75. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +2 -3
  76. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +4 -4
  77. package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +2 -2
  78. package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +2 -2
  79. package/src/ChatbotHeader/ChatbotHeaderNewChatButton.tsx +2 -3
  80. package/src/FileDropZone/FileDropZone.tsx +2 -2
  81. package/src/MarkdownContent/MarkdownContent.tsx +14 -0
  82. package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +2 -2
  83. package/src/Message/LinkMessage/LinkMessage.tsx +21 -2
  84. package/src/Message/Message.test.tsx +4 -4
  85. package/src/Message/QuickStarts/QuickStartTileDescription.tsx +2 -2
  86. package/src/MessageBar/MessageBar.test.tsx +6 -6
  87. package/src/MessageBox/JumpButton.test.tsx +1 -1
  88. package/src/MessageBox/MessageBox.test.tsx +91 -0
  89. package/src/MessageBox/MessageBox.tsx +137 -40
  90. package/src/ResponseActions/ResponseActionButton.test.tsx +7 -7
  91. package/src/ResponseActions/ResponseActions.test.tsx +7 -8
  92. package/src/SourcesCard/SourcesCard.scss +0 -13
  93. package/src/SourcesCardBase/SourcesCardBase.tsx +7 -32
  94. package/dist/cjs/LoadingMessage/LoadingMessage.d.ts +0 -6
  95. package/dist/cjs/LoadingMessage/LoadingMessage.js +0 -12
  96. package/dist/cjs/LoadingMessage/LoadingMessage.test.d.ts +0 -1
  97. package/dist/cjs/LoadingMessage/LoadingMessage.test.js +0 -20
  98. package/dist/cjs/LoadingMessage/index.d.ts +0 -2
  99. package/dist/cjs/LoadingMessage/index.js +0 -23
  100. package/dist/dynamic/LoadingMessage/package.json +0 -1
  101. package/dist/esm/LoadingMessage/LoadingMessage.d.ts +0 -6
  102. package/dist/esm/LoadingMessage/LoadingMessage.js +0 -5
  103. package/dist/esm/LoadingMessage/LoadingMessage.test.d.ts +0 -1
  104. package/dist/esm/LoadingMessage/LoadingMessage.test.js +0 -15
  105. package/dist/esm/LoadingMessage/index.d.ts +0 -2
  106. package/dist/esm/LoadingMessage/index.js +0 -2
  107. package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachMenu.tsx +0 -149
  108. package/patternfly-docs/content/extensions/chatbot/examples/Messages/PaperclipIcon.svg +0 -10
  109. package/src/LoadingMessage/LoadingMessage.test.tsx +0 -15
  110. package/src/LoadingMessage/LoadingMessage.tsx +0 -27
  111. package/src/LoadingMessage/__snapshots__/LoadingMessage.test.tsx.snap +0 -64
  112. package/src/LoadingMessage/index.ts +0 -3
@@ -43,10 +43,12 @@ import ChatbotHeader, {
43
43
  } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
44
44
  import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
45
45
  import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
46
- import { BarsIcon } from '@patternfly/react-icons';
47
- import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
48
- import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
49
- import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
46
+ import {
47
+ RhUiMenuBarsIcon,
48
+ RhUiExpandIcon,
49
+ RhUiOpenDrawerRightIcon,
50
+ RhUiRestoreWindowIcon
51
+ } from '@patternfly/react-icons';
50
52
  import userAvatar from '../Messages/user_avatar.svg';
51
53
  import '@patternfly/react-core/dist/styles/base.css';
52
54
  import '@patternfly/chatbot/dist/css/main.css';
@@ -263,7 +265,7 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
263
265
  onSidebarToggle={() => setIsSidebarOpen(!isSidebarOpen)}
264
266
  id="fill-nav-toggle"
265
267
  >
266
- <BarsIcon />
268
+ <RhUiMenuBarsIcon />
267
269
  </PageToggleButton>
268
270
  </MastheadToggle>
269
271
  <MastheadBrand>
@@ -365,7 +367,7 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
365
367
  <DropdownItem
366
368
  value={ChatbotDisplayMode.default}
367
369
  key="switchDisplayOverlay"
368
- icon={<OutlinedWindowRestoreIcon aria-hidden />}
370
+ icon={<RhUiRestoreWindowIcon aria-hidden />}
369
371
  isSelected={displayMode === ChatbotDisplayMode.default}
370
372
  >
371
373
  <span>Overlay</span>
@@ -373,7 +375,7 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
373
375
  <DropdownItem
374
376
  value={ChatbotDisplayMode.drawer}
375
377
  key="switchDisplayDock"
376
- icon={<OpenDrawerRightIcon aria-hidden />}
378
+ icon={<RhUiOpenDrawerRightIcon aria-hidden />}
377
379
  isSelected={displayMode === ChatbotDisplayMode.drawer}
378
380
  >
379
381
  <span>Drawer</span>
@@ -381,7 +383,7 @@ export const ChatbotDisplayModeDemo: FunctionComponent = () => {
381
383
  <DropdownItem
382
384
  value={ChatbotDisplayMode.fullscreen}
383
385
  key="switchDisplayFullscreen"
384
- icon={<ExpandIcon aria-hidden />}
386
+ icon={<RhUiExpandIcon aria-hidden />}
385
387
  isSelected={displayMode === ChatbotDisplayMode.fullscreen}
386
388
  >
387
389
  <span>Fullscreen</span>
@@ -39,7 +39,7 @@ import ChatbotHeader, {
39
39
  } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
40
40
  import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
41
41
  import PFIconLogoReverse from '../UI/PF-IconLogo-Reverse.svg';
42
- import { BarsIcon } from '@patternfly/react-icons';
42
+ import { RhUiMenuBarsIcon } from '@patternfly/react-icons';
43
43
  import userAvatar from '../Messages/user_avatar.svg';
44
44
  import '@patternfly/react-core/dist/styles/base.css';
45
45
  import '@patternfly/chatbot/dist/css/main.css';
@@ -290,7 +290,7 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
290
290
  onSidebarToggle={() => setIsSidebarOpen(!isSidebarOpen)}
291
291
  id="fill-nav-toggle"
292
292
  >
293
- <BarsIcon />
293
+ <RhUiMenuBarsIcon />
294
294
  </PageToggleButton>
295
295
  </MastheadToggle>
296
296
  <MastheadBrand>
@@ -21,11 +21,7 @@ import ChatbotHeader, {
21
21
  ChatbotHeaderSelectorDropdown,
22
22
  ChatbotHeaderOptionsDropdown
23
23
  } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
24
-
25
- import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
26
- import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
27
- import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
28
-
24
+ import { RhUiExpandIcon, RhUiOpenDrawerRightIcon, RhUiRestoreWindowIcon } from '@patternfly/react-icons';
29
25
  import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
30
26
  import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
31
27
  import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
@@ -450,7 +446,7 @@ export const ChatbotScrollingDemo: React.FunctionComponent = () => {
450
446
  <DropdownItem
451
447
  value={ChatbotDisplayMode.default}
452
448
  key="switchDisplayOverlay"
453
- icon={<OutlinedWindowRestoreIcon aria-hidden />}
449
+ icon={<RhUiRestoreWindowIcon aria-hidden />}
454
450
  isSelected={displayMode === ChatbotDisplayMode.default}
455
451
  >
456
452
  <span>Overlay</span>
@@ -458,7 +454,7 @@ export const ChatbotScrollingDemo: React.FunctionComponent = () => {
458
454
  <DropdownItem
459
455
  value={ChatbotDisplayMode.docked}
460
456
  key="switchDisplayDock"
461
- icon={<OpenDrawerRightIcon aria-hidden />}
457
+ icon={<RhUiOpenDrawerRightIcon aria-hidden />}
462
458
  isSelected={displayMode === ChatbotDisplayMode.docked}
463
459
  >
464
460
  <span>Dock to window</span>
@@ -466,7 +462,7 @@ export const ChatbotScrollingDemo: React.FunctionComponent = () => {
466
462
  <DropdownItem
467
463
  value={ChatbotDisplayMode.fullscreen}
468
464
  key="switchDisplayFullscreen"
469
- icon={<ExpandIcon aria-hidden />}
465
+ icon={<RhUiExpandIcon aria-hidden />}
470
466
  isSelected={displayMode === ChatbotDisplayMode.fullscreen}
471
467
  >
472
468
  <span>Fullscreen</span>
@@ -21,10 +21,7 @@ import ChatbotHeader, {
21
21
  ChatbotHeaderOptionsDropdown
22
22
  } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
23
23
 
24
- import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
25
- import OpenDrawerRightIcon from '@patternfly/react-icons/dist/esm/icons/open-drawer-right-icon';
26
- import OutlinedWindowRestoreIcon from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon';
27
-
24
+ import { RhUiExpandIcon, RhUiOpenDrawerRightIcon, RhUiRestoreWindowIcon } from '@patternfly/react-icons';
28
25
  import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
29
26
  import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
30
27
  import PFIconLogoColor from '../UI/PF-IconLogo-Color.svg';
@@ -470,7 +467,7 @@ export const ChatbotDemo: FunctionComponent = () => {
470
467
  <DropdownItem
471
468
  value={ChatbotDisplayMode.default}
472
469
  key="switchDisplayOverlay"
473
- icon={<OutlinedWindowRestoreIcon aria-hidden />}
470
+ icon={<RhUiRestoreWindowIcon aria-hidden />}
474
471
  isSelected={displayMode === ChatbotDisplayMode.default}
475
472
  >
476
473
  <span>Overlay</span>
@@ -478,7 +475,7 @@ export const ChatbotDemo: FunctionComponent = () => {
478
475
  <DropdownItem
479
476
  value={ChatbotDisplayMode.docked}
480
477
  key="switchDisplayDock"
481
- icon={<OpenDrawerRightIcon aria-hidden />}
478
+ icon={<RhUiOpenDrawerRightIcon aria-hidden />}
482
479
  isSelected={displayMode === ChatbotDisplayMode.docked}
483
480
  >
484
481
  <span>Dock to window</span>
@@ -486,7 +483,7 @@ export const ChatbotDemo: FunctionComponent = () => {
486
483
  <DropdownItem
487
484
  value={ChatbotDisplayMode.fullscreen}
488
485
  key="switchDisplayFullscreen"
489
- icon={<ExpandIcon aria-hidden />}
486
+ icon={<RhUiExpandIcon aria-hidden />}
490
487
  isSelected={displayMode === ChatbotDisplayMode.fullscreen}
491
488
  >
492
489
  <span>Fullscreen</span>
@@ -37,7 +37,7 @@ import ChatbotHeader, {
37
37
 
38
38
  import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
39
39
  import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
40
- import { BarsIcon } from '@patternfly/react-icons';
40
+ import { RhUiMenuBarsIcon } from '@patternfly/react-icons';
41
41
  import userAvatar from '../Messages/user_avatar.svg';
42
42
  import '@patternfly/react-core/dist/styles/base.css';
43
43
  import '@patternfly/chatbot/dist/css/main.css';
@@ -282,7 +282,7 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
282
282
  onSidebarToggle={() => setIsSidebarOpen(!isSidebarOpen)}
283
283
  id="fill-nav-toggle"
284
284
  >
285
- <BarsIcon />
285
+ <RhUiMenuBarsIcon />
286
286
  </PageToggleButton>
287
287
  </MastheadToggle>
288
288
  <MastheadBrand>
@@ -20,7 +20,7 @@ import MessageBox from '@patternfly/chatbot/dist/dynamic/MessageBox';
20
20
  import Message, { MessageProps } from '@patternfly/chatbot/dist/dynamic/Message';
21
21
  import ChatbotHeader, { ChatbotHeaderMain, ChatbotHeaderTitle } from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';
22
22
  import Compare from '@patternfly/chatbot/dist/dynamic/Compare';
23
- import { BarsIcon } from '@patternfly/react-icons';
23
+ import { RhUiMenuBarsIcon } from '@patternfly/react-icons';
24
24
  import userAvatar from '../Messages/user_avatar.svg';
25
25
  import '@patternfly/react-core/dist/styles/base.css';
26
26
  import '@patternfly/chatbot/dist/css/main.css';
@@ -155,7 +155,7 @@ export const EmbeddedComparisonChatbotDemo: FunctionComponent = () => {
155
155
  onSidebarToggle={() => setIsSidebarOpen(!isSidebarOpen)}
156
156
  id="fill-nav-toggle"
157
157
  >
158
- <BarsIcon />
158
+ <RhUiMenuBarsIcon />
159
159
  </PageToggleButton>
160
160
  </MastheadToggle>
161
161
  <MastheadBrand>
@@ -37,7 +37,7 @@ import ChatbotHeader, {
37
37
 
38
38
  import PFHorizontalLogoColor from '../UI/PF-HorizontalLogo-Color.svg';
39
39
  import PFHorizontalLogoReverse from '../UI/PF-HorizontalLogo-Reverse.svg';
40
- import { BarsIcon } from '@patternfly/react-icons';
40
+ import { RhUiMenuBarsIcon } from '@patternfly/react-icons';
41
41
  import userAvatar from '../Messages/user_avatar.svg';
42
42
  import '@patternfly/react-core/dist/styles/base.css';
43
43
  import '@patternfly/chatbot/dist/css/main.css';
@@ -296,7 +296,7 @@ export const EmbeddedChatbotDemo: FunctionComponent = () => {
296
296
  onSidebarToggle={() => setIsSidebarOpen(!isSidebarOpen)}
297
297
  id="fill-nav-toggle"
298
298
  >
299
- <BarsIcon />
299
+ <RhUiMenuBarsIcon />
300
300
  </PageToggleButton>
301
301
  </MastheadToggle>
302
302
  <MastheadBrand>
@@ -7,8 +7,7 @@ import { useState } from 'react';
7
7
 
8
8
  // Import PatternFly components
9
9
  import { MenuToggleElement, Tooltip, MenuToggle, Dropdown, DropdownProps } from '@patternfly/react-core';
10
-
11
- import EllipsisIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
10
+ import { RhUiEllipsisVerticalFillIcon } from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon';
12
11
 
13
12
  export interface ChatbotConversationHistoryDropdownProps extends Omit<DropdownProps, 'toggle'> {
14
13
  /** Dropdown items rendered in conversation settings dropdown */
@@ -53,7 +52,7 @@ export const ChatbotConversationHistoryDropdown: FunctionComponent<ChatbotConver
53
52
  id={id}
54
53
  role="menuitem"
55
54
  >
56
- <EllipsisIcon />
55
+ <RhUiEllipsisVerticalFillIcon />
57
56
  </MenuToggle>
58
57
  </Tooltip>
59
58
  );
@@ -45,7 +45,7 @@ import {
45
45
  MenuContentProps
46
46
  } from '@patternfly/react-core';
47
47
 
48
- import { OutlinedClockIcon, OutlinedCommentAltIcon, PenToSquareIcon } from '@patternfly/react-icons';
48
+ import { RhUiClockIcon, RhUiCommentIcon, RhUiEditFillIcon } from '@patternfly/react-icons';
49
49
  import { ChatbotDisplayMode } from '../Chatbot/Chatbot';
50
50
  import ConversationHistoryDropdown from './ChatbotConversationHistoryDropdown';
51
51
  import LoadingState from './LoadingState';
@@ -195,7 +195,7 @@ export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversatio
195
195
  isCompact,
196
196
  title = 'Chat history',
197
197
  navTitleProps,
198
- navTitleIcon = <OutlinedClockIcon />,
198
+ navTitleIcon = <RhUiClockIcon />,
199
199
  searchInputScreenReaderText,
200
200
  searchActionStart,
201
201
  searchActionEnd,
@@ -218,7 +218,7 @@ export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversatio
218
218
  <MenuItem
219
219
  className={`pf-chatbot__menu-item ${activeItemId && activeItemId === conversation.id ? 'pf-chatbot__menu-item--active' : ''}`}
220
220
  itemId={conversation.id}
221
- {...(conversation.noIcon ? {} : { icon: conversation.icon ?? <OutlinedCommentAltIcon /> })}
221
+ {...(conversation.noIcon ? {} : { icon: conversation.icon ?? <RhUiCommentIcon /> })}
222
222
  /* eslint-disable indent */
223
223
  {...(conversation.menuItems
224
224
  ? {
@@ -354,7 +354,7 @@ export const ChatbotConversationHistoryNav: FunctionComponent<ChatbotConversatio
354
354
  <Button
355
355
  size={isCompact ? 'sm' : undefined}
356
356
  onClick={onNewChat}
357
- icon={<PenToSquareIcon />}
357
+ icon={<RhUiEditFillIcon />}
358
358
  {...newChatButtonProps}
359
359
  >
360
360
  {newChatButtonText}
@@ -2,7 +2,7 @@ import type { Ref, FunctionComponent } from 'react';
2
2
  import { forwardRef } from 'react';
3
3
 
4
4
  import { Button, ButtonProps, Icon, Tooltip, TooltipProps } from '@patternfly/react-core';
5
- import { CloseIcon } from '@patternfly/react-icons';
5
+ import { RhMicronsCloseIcon } from '@patternfly/react-icons';
6
6
 
7
7
  export interface ChatbotHeaderCloseButtonProps extends ButtonProps {
8
8
  /** Callback function for when button is clicked */
@@ -47,7 +47,7 @@ const ChatbotHeaderCloseButtonBase: FunctionComponent<ChatbotHeaderCloseButtonPr
47
47
  ref={innerRef}
48
48
  icon={
49
49
  <Icon size={isCompact ? 'lg' : 'xl'} isInline>
50
- <CloseIcon />
50
+ <RhMicronsCloseIcon />
51
51
  </Icon>
52
52
  }
53
53
  size={isCompact ? 'sm' : undefined}
@@ -2,7 +2,7 @@ import type { Ref, FunctionComponent } from 'react';
2
2
  import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
3
3
 
4
4
  import { Button, ButtonProps, Icon, Tooltip, TooltipProps } from '@patternfly/react-core';
5
- import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
5
+ import { RhUiMenuBarsIcon } from '@patternfly/react-icons/dist/esm/icons/rh-ui-menu-bars-icon';
6
6
 
7
7
  export interface ChatbotHeaderMenuProps extends ButtonProps {
8
8
  /** Callback function to attach to menu toggle on top right of chatbot header. */
@@ -69,7 +69,7 @@ const ChatbotHeaderMenuBase: FunctionComponent<ChatbotHeaderMenuProps> = ({
69
69
  ref={innerRef ?? buttonRef}
70
70
  icon={
71
71
  <Icon size={isCompact ? 'lg' : 'xl'} isInline>
72
- <BarsIcon />
72
+ <RhUiMenuBarsIcon />
73
73
  </Icon>
74
74
  }
75
75
  size={isCompact ? 'sm' : undefined}
@@ -2,8 +2,7 @@ import type { Ref, FunctionComponent } from 'react';
2
2
  import { forwardRef } from 'react';
3
3
 
4
4
  import { Button, ButtonProps, Icon, Tooltip, TooltipProps } from '@patternfly/react-core';
5
- import { PenToSquareIcon } from '@patternfly/react-icons/dist/esm/icons/pen-to-square-icon';
6
-
5
+ import { RhUiEditFillIcon } from '@patternfly/react-icons/dist/esm/icons/rh-ui-edit-fill-icon';
7
6
  export interface ChatbotHeaderNewChatButtonProps extends ButtonProps {
8
7
  /** Callback function for when button is clicked */
9
8
  onClick: () => void;
@@ -47,7 +46,7 @@ const ChatbotHeaderNewChatButtonBase: FunctionComponent<ChatbotHeaderNewChatButt
47
46
  ref={innerRef}
48
47
  icon={
49
48
  <Icon size={isCompact ? 'lg' : 'xl'} isInline>
50
- <PenToSquareIcon />
49
+ <RhUiEditFillIcon />
51
50
  </Icon>
52
51
  }
53
52
  size={isCompact ? 'sm' : undefined}
@@ -2,7 +2,7 @@ import { MultipleFileUpload, MultipleFileUploadMain } from '@patternfly/react-co
2
2
  import type { FunctionComponent } from 'react';
3
3
  import { useState } from 'react';
4
4
  import { ChatbotDisplayMode } from '../Chatbot';
5
- import { UploadIcon } from '@patternfly/react-icons';
5
+ import { RhUiUploadIcon } from '@patternfly/react-icons';
6
6
  import { Accept, DropEvent, FileError, FileRejection } from 'react-dropzone';
7
7
 
8
8
  export interface FileDropZoneProps {
@@ -59,7 +59,7 @@ const FileDropZone: FunctionComponent<FileDropZoneProps> = ({
59
59
  const renderDropZone = () => (
60
60
  <>
61
61
  <MultipleFileUploadMain
62
- titleIcon={<UploadIcon />}
62
+ titleIcon={<RhUiUploadIcon />}
63
63
  titleText="Drag and drop your file here"
64
64
  infoText={infoText}
65
65
  isUploadButtonHidden
@@ -257,6 +257,20 @@ export const MarkdownContent: FunctionComponent<MarkdownContentProps> = ({
257
257
  remarkRehypeOptions={{
258
258
  // removes sr-only class from footnote labels applied by default
259
259
  footnoteLabelProperties: { className: [''] },
260
+ // omit default ↩ text; backref icon is rendered in LinkMessage
261
+ footnoteBackContent: (_referenceIndex, rereferenceIndex) => {
262
+ if (rereferenceIndex > 1) {
263
+ return [
264
+ {
265
+ type: 'element',
266
+ tagName: 'sup',
267
+ properties: {},
268
+ children: [{ type: 'text', value: String(rereferenceIndex) }]
269
+ }
270
+ ];
271
+ }
272
+ return [];
273
+ },
260
274
  ...reactMarkdownProps?.remarkRehypeOptions
261
275
  }}
262
276
  disallowedElements={disallowedElements}
@@ -18,8 +18,8 @@ import {
18
18
  } from '@patternfly/react-core';
19
19
 
20
20
  import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon';
21
- import { CopyIcon } from '@patternfly/react-icons/dist/esm/icons/copy-icon';
22
21
  import { css } from '@patternfly/react-styles';
22
+ import { RhUiCopyFillIcon } from '@patternfly/react-icons';
23
23
 
24
24
  export interface CodeBlockMessageProps {
25
25
  /** Content rendered in code block */
@@ -142,7 +142,7 @@ const CodeBlockMessage = ({
142
142
  className="pf-chatbot__button--copy"
143
143
  onClick={(event) => handleCopy(event, children)}
144
144
  >
145
- {copied ? <CheckIcon /> : <CopyIcon />}
145
+ {copied ? <CheckIcon /> : <RhUiCopyFillIcon />}
146
146
  </Button>
147
147
  <Tooltip id={tooltipID} content="Copy" position="top" triggerRef={buttonRef} />
148
148
  </CodeBlockAction>
@@ -3,10 +3,12 @@
3
3
  // ============================================================================
4
4
 
5
5
  import { Button, ButtonProps } from '@patternfly/react-core';
6
- import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons';
6
+ import { RhMicronsExternalLinkIcon, RhUiBackwardsIcon } from '@patternfly/react-icons';
7
7
  import { ExtraProps } from 'react-markdown';
8
8
  import { css } from '@patternfly/react-styles';
9
9
 
10
+ const isFootnoteBackref = (className?: string) => className?.includes('data-footnote-backref');
11
+
10
12
  export interface LinkMessageProps {
11
13
  /** Flag indicating that the content should retain message styles when using Markdown. */
12
14
  shouldRetainStyles?: boolean;
@@ -26,7 +28,7 @@ const LinkMessage = ({
26
28
  component="a"
27
29
  variant="link"
28
30
  href={href}
29
- icon={<ExternalLinkSquareAltIcon />}
31
+ icon={<RhMicronsExternalLinkIcon />}
30
32
  iconPosition="end"
31
33
  isInline
32
34
  target={target}
@@ -40,6 +42,23 @@ const LinkMessage = ({
40
42
  );
41
43
  }
42
44
 
45
+ if (isFootnoteBackref(props.className)) {
46
+ return (
47
+ <Button
48
+ isInline
49
+ component="a"
50
+ href={href}
51
+ variant="link"
52
+ id={id}
53
+ icon={<RhUiBackwardsIcon />}
54
+ {...props}
55
+ className={css(shouldRetainStyles && 'pf-m-markdown', props?.className)}
56
+ >
57
+ {children}
58
+ </Button>
59
+ );
60
+ }
61
+
43
62
  return (
44
63
  // need to explicitly call this out or id doesn't seem to get passed - required for footnotes
45
64
  <Button
@@ -11,6 +11,7 @@ import { DeepThinkingProps } from '../DeepThinking';
11
11
 
12
12
  // Mock the icon components
13
13
  jest.mock('@patternfly/react-icons', () => ({
14
+ ...jest.requireActual('@patternfly/react-icons'),
14
15
  RhUiLikeIcon: () => <div>RhUiLikeIcon</div>,
15
16
  RhUiLikeFillIcon: () => <div>RhUiLikeFillIcon</div>,
16
17
  RhUiDislikeIcon: () => <div>RhUiDislikeIcon</div>,
@@ -23,10 +24,9 @@ jest.mock('@patternfly/react-icons', () => ({
23
24
  RhUiVolumeUpFillIcon: () => <div>RhUiVolumeUpFillIcon</div>,
24
25
  RhUiExportIcon: () => <div>RhUiExportIcon</div>,
25
26
  RhUiExportFillIcon: () => <div>RhUiExportFillIcon</div>,
26
- CheckIcon: () => <div>CheckIcon</div>,
27
- CloseIcon: () => <div>CloseIcon</div>,
28
- ExternalLinkSquareAltIcon: () => <div>ExternalLinkSquareAltIcon</div>,
29
- TimesIcon: () => <div>TimesIcon</div>
27
+ RhMicronsInformationFillIcon: () => <div>RhMicronsInformationFillIcon</div>,
28
+ RhUiBackwardsIcon: () => <div>RhUiBackwardsIcon</div>,
29
+ RhMicronsExternalLinkIcon: () => <div>RhMicronsExternalLinkIcon</div>
30
30
  }));
31
31
 
32
32
  const ALL_ACTIONS = [
@@ -1,7 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  import { useRef } from 'react';
3
3
  import { Button, Flex, pluralize, Popover } from '@patternfly/react-core';
4
- import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
4
+ import { RhMicronsInformationFillIcon } from '@patternfly/react-icons';
5
5
 
6
6
  interface QuickStartTileDescriptionProps {
7
7
  /** QuickStart description */
@@ -57,7 +57,7 @@ const QuickStartTileDescription: FC<QuickStartTileDescriptionProps> = ({
57
57
  }}
58
58
  aria-label={quickStartButtonAriaLabel}
59
59
  >
60
- <InfoCircleIcon />
60
+ <RhMicronsInformationFillIcon />
61
61
  </Button>
62
62
  <Popover
63
63
  aria-label={pluralizedPrereq}
@@ -6,7 +6,7 @@ import {
6
6
  MenuSearchInputProps,
7
7
  MenuSearchProps
8
8
  } from '@patternfly/react-core';
9
- import { BellIcon, CalendarAltIcon, ClipboardIcon, CodeIcon } from '@patternfly/react-icons';
9
+ import { RhUiAttentionBellIcon, RhUiCalendarIcon, RhUiClipboardIcon, RhUiCodeIcon } from '@patternfly/react-icons';
10
10
  import { render, screen } from '@testing-library/react';
11
11
  import userEvent from '@testing-library/user-event';
12
12
  import { createRef } from 'react';
@@ -43,19 +43,19 @@ const ATTACH_MENU_ITEMS = [
43
43
  </DropdownList>,
44
44
  <DropdownGroup key="group2">
45
45
  <DropdownList>
46
- <DropdownItem value="Alerts" id="1" icon={<BellIcon />}>
46
+ <DropdownItem value="Alerts" id="1" icon={<RhUiAttentionBellIcon />}>
47
47
  Alerts
48
48
  </DropdownItem>
49
- <DropdownItem value="Events" id="2" icon={<CalendarAltIcon />}>
49
+ <DropdownItem value="Events" id="2" icon={<RhUiCalendarIcon />}>
50
50
  Events
51
51
  </DropdownItem>
52
- <DropdownItem value="Logs" id="3" icon={<ClipboardIcon />}>
52
+ <DropdownItem value="Logs" id="3" icon={<RhUiClipboardIcon />}>
53
53
  Logs
54
54
  </DropdownItem>
55
- <DropdownItem value="YAML - Status" id="4" icon={<CodeIcon />}>
55
+ <DropdownItem value="YAML - Status" id="4" icon={<RhUiCodeIcon />}>
56
56
  YAML - Status
57
57
  </DropdownItem>
58
- <DropdownItem value="YAML - All contents" id="5" icon={<CodeIcon />}>
58
+ <DropdownItem value="YAML - All contents" id="5" icon={<RhUiCodeIcon />}>
59
59
  YAML - All contents
60
60
  </DropdownItem>
61
61
  </DropdownList>
@@ -18,7 +18,7 @@ describe('JumpButton', () => {
18
18
  await userEvent.click(screen.getByRole('button', { name: /Back to bottom/i }));
19
19
  expect(spy).toHaveBeenCalledTimes(1);
20
20
  });
21
- it('should be hidden if isHidden prop is used', async () => {
21
+ it('should be hidden if isHidden prop is used', () => {
22
22
  render(<JumpButton position="bottom" onClick={jest.fn()} isHidden />);
23
23
  expect(screen.queryByRole('button', { name: /Back to bottom/i })).toBeFalsy();
24
24
  });
@@ -1,5 +1,6 @@
1
1
  import { createRef } from 'react';
2
2
  import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
3
+ import '@testing-library/jest-dom';
3
4
  import { MessageBox, MessageBoxHandle } from './MessageBox';
4
5
  import userEvent from '@testing-library/user-event';
5
6
 
@@ -313,4 +314,94 @@ describe('MessageBox', () => {
313
314
 
314
315
  expect(ref.current?.isSmartScrollActive()).toBe(true);
315
316
  });
317
+
318
+ it('should keep auto-scroll active during programmatic scroll to bottom', async () => {
319
+ const ref = createRef<MessageBoxHandle>();
320
+ render(
321
+ <MessageBox ref={ref} enableSmartScroll>
322
+ <div>Test message content</div>
323
+ </MessageBox>
324
+ );
325
+
326
+ const element = ref.current!;
327
+ Object.defineProperty(element, 'scrollHeight', { configurable: true, value: 1000 });
328
+ Object.defineProperty(element, 'clientHeight', { configurable: true, value: 300 });
329
+ Object.defineProperty(element, 'scrollTop', { configurable: true, value: 0, writable: true });
330
+
331
+ act(() => {
332
+ ref.current?.scrollToBottom({ behavior: 'smooth' });
333
+ });
334
+
335
+ expect(ref.current?.isSmartScrollActive()).toBe(true);
336
+
337
+ act(() => {
338
+ element.scrollTop = 500;
339
+ element.dispatchEvent(new Event('scroll', { bubbles: true }));
340
+ });
341
+
342
+ expect(ref.current?.isSmartScrollActive()).toBe(true);
343
+ });
344
+
345
+ it('should not scroll to bottom on initial layout when the message box is at the top', () => {
346
+ render(
347
+ <MessageBox enableSmartScroll>
348
+ <div>Tall message content</div>
349
+ </MessageBox>
350
+ );
351
+
352
+ const region = screen.getByRole('region');
353
+ Object.defineProperty(region, 'scrollHeight', { configurable: true, value: 1000 });
354
+ Object.defineProperty(region, 'clientHeight', { configurable: true, value: 300 });
355
+ Object.defineProperty(region, 'scrollTop', { configurable: true, value: 0, writable: true });
356
+
357
+ act(() => {
358
+ region.dispatchEvent(new Event('scroll'));
359
+ });
360
+
361
+ expect(region.scrollTop).toBe(0);
362
+ });
363
+
364
+ it('should show the bottom jump button at the top on initial load when overflowing', async () => {
365
+ render(
366
+ <MessageBox enableSmartScroll>
367
+ <div>Tall message content</div>
368
+ </MessageBox>
369
+ );
370
+
371
+ const region = screen.getByRole('region');
372
+ Object.defineProperty(region, 'scrollHeight', { configurable: true, value: 1000 });
373
+ Object.defineProperty(region, 'clientHeight', { configurable: true, value: 300 });
374
+ Object.defineProperty(region, 'scrollTop', { configurable: true, value: 0, writable: true });
375
+
376
+ act(() => {
377
+ region.dispatchEvent(new Event('scroll'));
378
+ });
379
+
380
+ await waitFor(() => {
381
+ expect(screen.queryByRole('button', { name: /Back to top/i })).toBeFalsy();
382
+ expect(screen.getByRole('button', { name: /Back to bottom/i })).toBeTruthy();
383
+ });
384
+ });
385
+
386
+ it('should hide the bottom jump button while smart scroll is actively following content', async () => {
387
+ render(
388
+ <MessageBox enableSmartScroll>
389
+ <div>Test message content</div>
390
+ </MessageBox>
391
+ );
392
+
393
+ const region = screen.getByRole('region');
394
+ Object.defineProperty(region, 'scrollHeight', { configurable: true, value: 1000 });
395
+ Object.defineProperty(region, 'clientHeight', { configurable: true, value: 300 });
396
+ Object.defineProperty(region, 'scrollTop', { configurable: true, value: 640, writable: true });
397
+
398
+ act(() => {
399
+ region.dispatchEvent(new Event('scroll'));
400
+ });
401
+
402
+ await waitFor(() => {
403
+ expect(screen.getByRole('button', { name: /Back to top/i })).toBeTruthy();
404
+ expect(screen.queryByRole('button', { name: /Back to bottom/i })).toBeFalsy();
405
+ });
406
+ });
316
407
  });