@pega/cosmos-react-demos 2.1.0 → 2.1.4

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 (353) hide show
  1. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  2. package/jsx/build/AppShell/AppShell.stories.jsx +4 -4
  3. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  4. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  5. package/jsx/core/Avatar/Avatar.stories.jsx +2 -2
  6. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  7. package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
  8. package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
  9. package/jsx/core/Banner/Banner.mocks.jsx +41 -0
  10. package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
  11. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  12. package/jsx/core/Banner/Banner.stories.jsx +1 -39
  13. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  14. package/jsx/core/Button/Button.stories.d.ts.map +1 -1
  15. package/jsx/core/Button/Button.stories.jsx +3 -3
  16. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  17. package/jsx/core/Configuration/Configuration.stories.jsx +1 -1
  18. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  19. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
  20. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
  21. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  22. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  23. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  24. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  25. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  26. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
  27. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
  28. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  29. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
  30. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  31. package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
  32. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  33. package/jsx/core/File/FileDisplay.stories.jsx +37 -2
  34. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  35. package/jsx/core/Flex/Flex.styles.d.ts +2 -2
  36. package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
  37. package/jsx/core/Flex/Flex.styles.js +17 -17
  38. package/jsx/core/Flex/Flex.styles.js.map +1 -1
  39. package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
  40. package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  41. package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
  42. package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
  43. package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
  44. package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
  45. package/jsx/core/Form/Form.mocks.d.ts +8 -0
  46. package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
  47. package/jsx/core/Form/Form.mocks.jsx +138 -0
  48. package/jsx/core/Form/Form.mocks.jsx.map +1 -0
  49. package/jsx/core/Form/Form.stories.d.ts +0 -7
  50. package/jsx/core/Form/Form.stories.d.ts.map +1 -1
  51. package/jsx/core/Form/Form.stories.jsx +3 -137
  52. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  53. package/jsx/core/Grid/Grid.styles.d.ts +2 -2
  54. package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
  55. package/jsx/core/Grid/Grid.styles.js +4 -4
  56. package/jsx/core/Grid/Grid.styles.js.map +1 -1
  57. package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
  58. package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
  59. package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
  60. package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
  61. package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
  62. package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
  63. package/jsx/core/Grid/GridItem.stories.jsx +28 -28
  64. package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
  65. package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
  66. package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
  67. package/jsx/core/Icon/Icon.mocks.jsx +9 -0
  68. package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
  69. package/jsx/core/Icon/Icon.stories.d.ts +1 -0
  70. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  71. package/jsx/core/Icon/Icon.stories.jsx +7 -1
  72. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  73. package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  74. package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
  75. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  76. package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  77. package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  78. package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
  79. package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
  80. package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
  81. package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  82. package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
  83. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
  84. package/jsx/core/Link/Link.stories.d.ts +11 -1
  85. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  86. package/jsx/core/Link/Link.stories.jsx +22 -5
  87. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  88. package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  89. package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
  90. package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
  91. package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
  92. package/jsx/core/List/OrderedList.stories.jsx +10 -10
  93. package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
  94. package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
  95. package/jsx/core/List/UnorderedList.stories.jsx +10 -10
  96. package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
  97. package/jsx/core/Menu/Menu.stories.d.ts +3 -3
  98. package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
  99. package/jsx/core/Menu/Menu.stories.jsx +8 -12
  100. package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
  101. package/jsx/core/Modal/Modal.mocks.jsx +1 -1
  102. package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
  103. package/jsx/core/Number/Number.stories.jsx +1 -1
  104. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  105. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  106. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  107. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
  108. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  109. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
  110. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
  111. package/jsx/core/Popover/Popover.stories.d.ts +1 -2
  112. package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
  113. package/jsx/core/Popover/Popover.stories.jsx +35 -37
  114. package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
  115. package/jsx/core/Rating/Rating.stories.d.ts +4 -1
  116. package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
  117. package/jsx/core/Rating/Rating.stories.jsx +3 -3
  118. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  119. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  120. package/jsx/core/Sentiment/Sentiment.stories.jsx +6 -6
  121. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  122. package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
  123. package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
  124. package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
  125. package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
  126. package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
  127. package/jsx/rte/Editor/Editor.stories.d.ts +3 -3
  128. package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
  129. package/jsx/rte/Editor/Editor.stories.jsx +21 -23
  130. package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
  131. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
  132. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  133. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  134. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  135. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
  136. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
  137. package/jsx/social/Chat/Chat.stories.d.ts +31 -22
  138. package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
  139. package/jsx/social/Chat/Chat.stories.jsx +106 -153
  140. package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
  141. package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
  142. package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
  143. package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
  144. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  145. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  146. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
  147. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
  148. package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
  149. package/jsx/work/CaseView/FileService.mock.jsx +6 -2
  150. package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
  151. package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
  152. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  153. package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
  154. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
  155. package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
  156. package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  157. package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
  158. package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
  159. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  160. package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
  161. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
  162. package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
  163. package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  164. package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
  165. package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
  166. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
  167. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  168. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
  169. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
  170. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  171. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  172. package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
  173. package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
  174. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  175. package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
  176. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  177. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  178. package/lib/build/AppShell/AppShell.stories.js +4 -4
  179. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  180. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  181. package/lib/core/Avatar/Avatar.stories.js +2 -2
  182. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  183. package/lib/core/Banner/Banner.mocks.d.ts +18 -0
  184. package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
  185. package/lib/core/Banner/Banner.mocks.js +36 -0
  186. package/lib/core/Banner/Banner.mocks.js.map +1 -0
  187. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  188. package/lib/core/Banner/Banner.stories.js +4 -33
  189. package/lib/core/Banner/Banner.stories.js.map +1 -1
  190. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  191. package/lib/core/Button/Button.stories.js +2 -2
  192. package/lib/core/Button/Button.stories.js.map +1 -1
  193. package/lib/core/Configuration/Configuration.stories.js +1 -1
  194. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  195. package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
  196. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  197. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  198. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  199. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  200. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  201. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  202. package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
  203. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
  204. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  205. package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
  206. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  207. package/lib/core/File/FileDisplay.stories.d.ts +8 -1
  208. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  209. package/lib/core/File/FileDisplay.stories.js +32 -2
  210. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  211. package/lib/core/Flex/Flex.styles.d.ts +2 -2
  212. package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
  213. package/lib/core/Flex/Flex.styles.js +17 -17
  214. package/lib/core/Flex/Flex.styles.js.map +1 -1
  215. package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
  216. package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  217. package/lib/core/Flex/FlexContainer.stories.js +10 -7
  218. package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
  219. package/lib/core/Flex/FlexItem.stories.js +4 -4
  220. package/lib/core/Flex/FlexItem.stories.js.map +1 -1
  221. package/lib/core/Form/Form.mocks.d.ts +8 -0
  222. package/lib/core/Form/Form.mocks.d.ts.map +1 -0
  223. package/lib/core/Form/Form.mocks.js +97 -0
  224. package/lib/core/Form/Form.mocks.js.map +1 -0
  225. package/lib/core/Form/Form.stories.d.ts +0 -7
  226. package/lib/core/Form/Form.stories.d.ts.map +1 -1
  227. package/lib/core/Form/Form.stories.js +3 -95
  228. package/lib/core/Form/Form.stories.js.map +1 -1
  229. package/lib/core/Grid/Grid.styles.d.ts +2 -2
  230. package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
  231. package/lib/core/Grid/Grid.styles.js +4 -4
  232. package/lib/core/Grid/Grid.styles.js.map +1 -1
  233. package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
  234. package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
  235. package/lib/core/Grid/GridContainer.stories.js +27 -24
  236. package/lib/core/Grid/GridContainer.stories.js.map +1 -1
  237. package/lib/core/Grid/GridItem.stories.d.ts +2 -2
  238. package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
  239. package/lib/core/Grid/GridItem.stories.js +10 -10
  240. package/lib/core/Grid/GridItem.stories.js.map +1 -1
  241. package/lib/core/Icon/Icon.mocks.d.ts +3 -0
  242. package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
  243. package/lib/core/Icon/Icon.mocks.js +10 -0
  244. package/lib/core/Icon/Icon.mocks.js.map +1 -0
  245. package/lib/core/Icon/Icon.stories.d.ts +1 -0
  246. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  247. package/lib/core/Icon/Icon.stories.js +7 -1
  248. package/lib/core/Icon/Icon.stories.js.map +1 -1
  249. package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  250. package/lib/core/IconPicker/IconPicker.stories.js +0 -1
  251. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  252. package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  253. package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  254. package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
  255. package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
  256. package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
  257. package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  258. package/lib/core/Lightbox/Lightbox.stories.js +14 -73
  259. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  260. package/lib/core/Link/Link.stories.d.ts +11 -1
  261. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  262. package/lib/core/Link/Link.stories.js +7 -4
  263. package/lib/core/Link/Link.stories.js.map +1 -1
  264. package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  265. package/lib/core/List/CommaSeparatedList.stories.js +17 -17
  266. package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
  267. package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
  268. package/lib/core/List/OrderedList.stories.js +10 -10
  269. package/lib/core/List/OrderedList.stories.js.map +1 -1
  270. package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
  271. package/lib/core/List/UnorderedList.stories.js +10 -10
  272. package/lib/core/List/UnorderedList.stories.js.map +1 -1
  273. package/lib/core/Menu/Menu.stories.d.ts +3 -3
  274. package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
  275. package/lib/core/Menu/Menu.stories.js +8 -12
  276. package/lib/core/Menu/Menu.stories.js.map +1 -1
  277. package/lib/core/Modal/Modal.mocks.js +1 -1
  278. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  279. package/lib/core/Number/Number.stories.js +1 -1
  280. package/lib/core/Number/Number.stories.js.map +1 -1
  281. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  282. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  283. package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
  284. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  285. package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
  286. package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
  287. package/lib/core/Popover/Popover.stories.d.ts +1 -2
  288. package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
  289. package/lib/core/Popover/Popover.stories.js +24 -25
  290. package/lib/core/Popover/Popover.stories.js.map +1 -1
  291. package/lib/core/Rating/Rating.stories.d.ts +4 -1
  292. package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
  293. package/lib/core/Rating/Rating.stories.js +3 -3
  294. package/lib/core/Rating/Rating.stories.js.map +1 -1
  295. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  296. package/lib/core/Sentiment/Sentiment.stories.js +6 -6
  297. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  298. package/lib/core/SummaryList/SummaryList.stories.js +1 -1
  299. package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
  300. package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
  301. package/lib/core/Toaster/Toaster.stories.js +8 -3
  302. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  303. package/lib/rte/Editor/Editor.stories.d.ts +3 -3
  304. package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
  305. package/lib/rte/Editor/Editor.stories.js +21 -23
  306. package/lib/rte/Editor/Editor.stories.js.map +1 -1
  307. package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
  308. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  309. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  310. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  311. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
  312. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  313. package/lib/social/Chat/Chat.stories.d.ts +33 -22
  314. package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
  315. package/lib/social/Chat/Chat.stories.js +102 -158
  316. package/lib/social/Chat/Chat.stories.js.map +1 -1
  317. package/lib/social/Feed/FeedNewPost.stories.js +1 -1
  318. package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
  319. package/lib/social/Feed/FeedPost.stories.js +1 -1
  320. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  321. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  322. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
  323. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
  324. package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
  325. package/lib/work/CaseView/FileService.mock.js +6 -2
  326. package/lib/work/CaseView/FileService.mock.js.map +1 -1
  327. package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
  328. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  329. package/lib/work/Confirmation/Confirmation.stories.js +12 -4
  330. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  331. package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
  332. package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  333. package/lib/work/Confirmation/Confirmation.styles.js +7 -0
  334. package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
  335. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  336. package/lib/work/SearchResults/SearchResults.stories.js +3 -9
  337. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  338. package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
  339. package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  340. package/lib/work/SearchResults/SearchResults.styles.js +12 -0
  341. package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
  342. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
  343. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  344. package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
  345. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
  346. package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  347. package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  348. package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
  349. package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
  350. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  351. package/lib/work/Timeline/Timeline.stories.js +2 -2
  352. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  353. package/package.json +9 -9
@@ -83,7 +83,7 @@ export const RichTextEditorMDDemo = (args) => {
83
83
  }));
84
84
  }
85
85
  };
86
- return (_jsx(RichTextEditor, { searchTriggers: [{ trigger: '@', regex: String.raw `[a-zA-Z]*(?: [a-zA-Z]*)?` }], onSearch: searchUsers, getSearchItemReplacement: (id) => {
86
+ return (_jsx(RichTextEditor, { searchTriggers: [{ trigger: '@', regex: '[a-zA-Z]*(?: [a-zA-Z]*)?' }], onSearch: searchUsers, getSearchItemReplacement: (id) => {
87
87
  const item = demoUsers.find(({ id: itemId }) => itemId === id);
88
88
  if (!item)
89
89
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.stories.js","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextEditor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAA4C,MAAM,wBAAwB,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,cAAc;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACnC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI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AG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,MAAC,IAAI,eACH,KAAC,WAAW,cACV,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAI,WACrD,EACd,KAAC,UAAU,cACT,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,oDAE3D,WACE,YACR,EACP,KAAC,cAAc,IACb,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE;oBACP,gBAAgB;oBAChB,SAAS;oBACT,QAAQ;oBACR,OAAO;oBACP,QAAQ;oBACR,OAAO;oBACP,gBAAgB;oBAChB,aAAa;iBACd,WACD,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useRef } from 'react';\n\nimport {\n Button,\n Flex,\n MenuItemProps,\n Text,\n Card,\n CardContent,\n CardFooter,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { RichTextEditor, RichTextEditorProps, RichTextEditorState } from '@pega/cosmos-react-rte';\n\nimport { demoUsers } from './RichTextEditor.mocks';\n\nexport default {\n title: 'RTE/RichTextEditor',\n component: RichTextEditor,\n args: {\n label: 'Rich text editor',\n labelHidden: false,\n info: 'The rich text editor can be used in forms, comments, and documents',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const RichTextEditorDemo: Story<RichTextEditorProps> = (args: RichTextEditorProps) => {\n const editorRef = useRef<RichTextEditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const overwriteText = () => {\n editorRef.current?.insertHtml('<p>Hello world!</p>', true);\n };\n\n const insertText = () => {\n editorRef.current?.insertText('Hi mom!');\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n defaultValue='<body><!-- I will break the RTE --><p> Life is stress free.</p><p> Life is stress free.</p></body>'\n />\n <Flex container={{ gap: 1 }}>\n <Button onClick={overwriteText}>\n Overwrite RTE value with &#39;Hello world!&#39; HTML\n </Button>\n <Button onClick={insertText} label='RTE Must be focused for insert text to work'>\n Insert &#39;Hi mom!&#39;\n </Button>\n </Flex>\n </Flex>\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorMDDemo: Story<RichTextEditorProps> = (args: RichTextEditorProps) => {\n const [users, setUsers] = useState<MenuItemProps[]>(demoUsers);\n\n const searchUsers = (event: { search: string; trigger: string }) => {\n if (event.trigger === '@') {\n setUsers(\n demoUsers.filter(user => {\n return user.primary.toLowerCase().includes(event.search.toLowerCase());\n })\n );\n }\n };\n\n return (\n <RichTextEditor\n searchTriggers={[{ trigger: '@', regex: String.raw`[a-zA-Z]*(?: [a-zA-Z]*)?` }]}\n onSearch={searchUsers}\n getSearchItemReplacement={(id: string) => {\n const item = demoUsers.find(({ id: itemId }) => itemId === id);\n\n if (!item) return undefined;\n\n return {\n markdown: `@${item.id}:${item.primary}:user:`,\n text: item.primary\n };\n }}\n menu={users.length ? { items: users } : undefined}\n autoFocus\n markdownOnly\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<RichTextEditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <RichTextEditor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label='Rich text editor'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n />\n </Flex>\n );\n};\n"]}
1
+ {"version":3,"file":"RichTextEditor.stories.js","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextEditor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,IAAI,EAEJ,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAA4C,MAAM,wBAAwB,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,cAAc;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,WAAW,EAAE,EAAE,OAAO,EA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useState, useRef } from 'react';\n\nimport {\n Button,\n Flex,\n MenuItemProps,\n Text,\n Card,\n CardContent,\n CardFooter,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { RichTextEditor, RichTextEditorProps, RichTextEditorState } from '@pega/cosmos-react-rte';\n\nimport { demoUsers } from './RichTextEditor.mocks';\n\nexport default {\n title: 'RTE/RichTextEditor',\n component: RichTextEditor,\n args: {\n label: 'Rich text editor',\n labelHidden: false,\n info: 'The rich text editor can be used in forms, comments, and documents',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const RichTextEditorDemo: Story<RichTextEditorProps> = (args: RichTextEditorProps) => {\n const editorRef = useRef<RichTextEditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const overwriteText = () => {\n editorRef.current?.insertHtml('<p>Hello world!</p>', true);\n };\n\n const insertText = () => {\n editorRef.current?.insertText('Hi mom!');\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n defaultValue='<body><!-- I will break the RTE --><p> Life is stress free.</p><p> Life is stress free.</p></body>'\n />\n <Flex container={{ gap: 1 }}>\n <Button onClick={overwriteText}>\n Overwrite RTE value with &#39;Hello world!&#39; HTML\n </Button>\n <Button onClick={insertText} label='RTE Must be focused for insert text to work'>\n Insert &#39;Hi mom!&#39;\n </Button>\n </Flex>\n </Flex>\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorMDDemo: Story<RichTextEditorProps> = (args: RichTextEditorProps) => {\n const [users, setUsers] = useState<MenuItemProps[]>(demoUsers);\n\n const searchUsers = (event: { search: string; trigger: string }) => {\n if (event.trigger === '@') {\n setUsers(\n demoUsers.filter(user => {\n return user.primary.toLowerCase().includes(event.search.toLowerCase());\n })\n );\n }\n };\n\n return (\n <RichTextEditor\n searchTriggers={[{ trigger: '@', regex: '[a-zA-Z]*(?: [a-zA-Z]*)?' }]}\n onSearch={searchUsers}\n getSearchItemReplacement={(id: string) => {\n const item = demoUsers.find(({ id: itemId }) => itemId === id);\n\n if (!item) return undefined;\n\n return {\n markdown: `@${item.id}:${item.primary}:user:`,\n text: item.primary\n };\n }}\n menu={users.length ? { items: users } : undefined}\n autoFocus\n markdownOnly\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<RichTextEditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <RichTextEditor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label='Rich text editor'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n />\n </Flex>\n );\n};\n"]}
@@ -2,6 +2,7 @@
2
2
  import { Meta } from '@storybook/react';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
+ export declare const RichTextViewerDemo: () => JSX.Element;
5
6
  export declare const RichTextViewerHTMLDemo: () => JSX.Element;
6
7
  export declare const RichTextViewerMDDemo: () => JSX.Element;
7
8
  //# sourceMappingURL=RichTextViewer.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextViewer.stories.d.ts","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextViewer.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAcxC,wBAGU;AAEV,eAAO,MAAM,sBAAsB,mBAuBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,mBA4DhC,CAAC"}
1
+ {"version":3,"file":"RichTextViewer.stories.d.ts","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextViewer.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAcxC,wBAGU;AAEV,eAAO,MAAM,kBAAkB,mBAuB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAuBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,mBA4DhC,CAAC"}
@@ -8,6 +8,19 @@ export default {
8
8
  title: 'RTE/RichTextViewer',
9
9
  component: RichTextViewer
10
10
  };
11
+ export const RichTextViewerDemo = () => {
12
+ const editorRef = useRef(null);
13
+ const [content, setContent] = useState('[]');
14
+ return (_jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(RichTextEditor, { ref: editorRef, toolbar: [
15
+ 'inline-styling',
16
+ 'headers',
17
+ 'tables',
18
+ 'links',
19
+ 'lists',
20
+ 'cut-copy-paste',
21
+ 'indentation'
22
+ ], onChange: () => setContent(editorRef.current?.getRichText() || '') }, void 0), _jsx(RichTextViewer, { content: content, type: 'richtext' }, void 0)] }, void 0));
23
+ };
11
24
  export const RichTextViewerHTMLDemo = () => {
12
25
  const editorRef = useRef(null);
13
26
  const [content, setContent] = useState('');
@@ -35,7 +48,7 @@ export const RichTextViewerMDDemo = () => {
35
48
  }));
36
49
  }
37
50
  };
38
- return (_jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(RichTextEditor, { ref: editorRef, searchTriggers: [{ trigger: '@', regex: String.raw `[a-zA-Z]*(?: [a-zA-Z]*)?` }], onSearch: searchUsers, getSearchItemReplacement: (id) => {
51
+ return (_jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(RichTextEditor, { ref: editorRef, searchTriggers: [{ trigger: '@', regex: '[a-zA-Z]*(?: [a-zA-Z]*)?' }], onSearch: searchUsers, getSearchItemReplacement: (id) => {
39
52
  const item = demoUsers.find(({ id: itemId }) => itemId === id);
40
53
  if (!item)
41
54
  return undefined;
@@ -43,7 +56,7 @@ export const RichTextViewerMDDemo = () => {
43
56
  markdown: `@${item.id}:${item.primary}:user:`,
44
57
  text: item.primary
45
58
  };
46
- }, menu: users.length ? { items: users } : undefined, autoFocus: true, markdownOnly: true, defaultValue: '# Try writing some of your own markdown and see how it renders!\n\nYou can interact with mentions such as @deans:Seth DeAngelo:user:\n\nThere is built in support for #tags as well!\n\nComponent renderings can also be conditionally overwritten: [Link](https://www.google.com) -- [Link with preview](https://www.pega.com)', onChange: () => setContent(editorRef.current?.getPlainText() || '') }, void 0), _jsx(RichTextViewer, { content: content, type: 'markdown', interactionRenderers: [MentionButtonConfig, HashtagButtonConfig], markdownMap: {
59
+ }, menu: users.length ? { items: users } : undefined, autoFocus: true, markdownOnly: true, defaultValue: '# Try writing some of your own markdown and see how it renders!\n\nYou can interact with mentions such as @deans:Seth DeAngelo:user:\n\nThere is built in support for #tags: as well!\n\nComponent renderings can also be conditionally overwritten: [Link](https://www.google.com) -- [Link with preview](https://www.pega.com)', onChange: () => setContent(editorRef.current?.getPlainText() || '') }, void 0), _jsx(RichTextViewer, { content: content, type: 'markdown', interactionRenderers: [MentionButtonConfig, HashtagButtonConfig], markdownMap: {
47
60
  link: (linkToken) => {
48
61
  if (linkToken.href?.includes('www.pega.com'))
49
62
  return LinkComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextViewer.stories.js","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextViewer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EACL,cAAc,EACd,cAAc,EAGf,MAAM,wBAAwB,CAAC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AC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,WACnE,EAEF,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,UAAU,EACf,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,EAChE,WAAW,EAAE;oBACX,IAAI,EAAE,CAAC,SAA2B,EAAE,EAAE;wBACpC,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC;4BAAE,OAAO,aAAa,CAAC;oBACrE,CAAC;iBACF,WACD,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useRef, useState } from 'react';\n\nimport { Flex, Link, MenuItemProps } from '@pega/cosmos-react-core';\nimport { HashtagButtonConfig, MentionButtonConfig } from '@pega/cosmos-react-social';\nimport {\n RichTextEditor,\n RichTextViewer,\n RichTextEditorState,\n TokenMap\n} from '@pega/cosmos-react-rte';\n\nimport { demoUsers } from './RichTextEditor.mocks';\n\nexport default {\n title: 'RTE/RichTextViewer',\n component: RichTextViewer\n} as Meta;\n\nexport const RichTextViewerHTMLDemo = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState('');\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onChange={() => setContent(editorRef.current?.getHtml() || '')}\n />\n\n <RichTextViewer content={content} type='html' />\n </Flex>\n );\n};\n\nexport const RichTextViewerMDDemo = () => {\n const LinkComponent = ({ token }: { token: TokenMap['link'] }) => {\n return (\n <Link href={token.href} previewable>\n {token.text}\n </Link>\n );\n };\n\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState('');\n const [users, setUsers] = useState<MenuItemProps[]>(demoUsers);\n\n const searchUsers = (event: { search: string; trigger: string }) => {\n if (event.trigger === '@') {\n setUsers(\n demoUsers.filter(user => {\n return user.primary.toLowerCase().includes(event.search.toLowerCase());\n })\n );\n }\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n searchTriggers={[{ trigger: '@', regex: String.raw`[a-zA-Z]*(?: [a-zA-Z]*)?` }]}\n onSearch={searchUsers}\n getSearchItemReplacement={(id: string) => {\n const item = demoUsers.find(({ id: itemId }) => itemId === id);\n\n if (!item) return undefined;\n\n return {\n markdown: `@${item.id}:${item.primary}:user:`,\n text: item.primary\n };\n }}\n menu={users.length ? { items: users } : undefined}\n autoFocus\n markdownOnly\n defaultValue={\n '# Try writing some of your own markdown and see how it renders!\\n\\nYou can interact with mentions such as @deans:Seth DeAngelo:user:\\n\\nThere is built in support for #tags as well!\\n\\nComponent renderings can also be conditionally overwritten: [Link](https://www.google.com) -- [Link with preview](https://www.pega.com)'\n }\n onChange={() => setContent(editorRef.current?.getPlainText() || '')}\n />\n\n <RichTextViewer\n content={content}\n type='markdown'\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n markdownMap={{\n link: (linkToken: TokenMap['link']) => {\n if (linkToken.href?.includes('www.pega.com')) return LinkComponent;\n }\n }}\n />\n </Flex>\n );\n};\n"]}
1
+ {"version":3,"file":"RichTextViewer.stories.js","sourceRoot":"","sources":["../../../src/rte/RichTextEditor/RichTextViewer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EACL,cAAc,EACd,cAAc,EAGf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3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,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC;oBAE/D,IAAI,CAAC,IAAI;wBAAE,OAAO,SAAS,CAAC;oBAE5B,OAAO;wBACL,QAAQ,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,OAAO,QAAQ;wBAC7C,IAAI,EAAE,IAAI,CAAC,OAAO;qBACnB,CAAC;gBACJ,CAAC,EACD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EACjD,SAAS,QACT,YAAY,QACZ,YAAY,EACV,kUAAkU,EAEpU,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,WACnE,EAEF,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,UAAU,EACf,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,EAChE,WAAW,EAAE;oBACX,IAAI,EAAE,CAAC,SAA2B,EAAE,EAAE;wBACpC,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC;4BAAE,OAAO,aAAa,CAAC;oBACrE,CAAC;iBACF,WACD,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useRef, useState } from 'react';\n\nimport { Flex, Link, MenuItemProps } from '@pega/cosmos-react-core';\nimport { HashtagButtonConfig, MentionButtonConfig } from '@pega/cosmos-react-social';\nimport {\n RichTextEditor,\n RichTextViewer,\n RichTextEditorState,\n TokenMap\n} from '@pega/cosmos-react-rte';\n\nimport { demoUsers } from './RichTextEditor.mocks';\n\nexport default {\n title: 'RTE/RichTextViewer',\n component: RichTextViewer\n} as Meta;\n\nexport const RichTextViewerDemo = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState('[]');\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onChange={() => setContent(editorRef.current?.getRichText() || '')}\n />\n\n <RichTextViewer content={content} type='richtext' />\n </Flex>\n );\n};\n\nexport const RichTextViewerHTMLDemo = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState('');\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onChange={() => setContent(editorRef.current?.getHtml() || '')}\n />\n\n <RichTextViewer content={content} type='html' />\n </Flex>\n );\n};\n\nexport const RichTextViewerMDDemo = () => {\n const LinkComponent = ({ token }: { token: TokenMap['link'] }) => {\n return (\n <Link href={token.href} previewable>\n {token.text}\n </Link>\n );\n };\n\n const editorRef = useRef<RichTextEditorState>(null);\n const [content, setContent] = useState('');\n const [users, setUsers] = useState<MenuItemProps[]>(demoUsers);\n\n const searchUsers = (event: { search: string; trigger: string }) => {\n if (event.trigger === '@') {\n setUsers(\n demoUsers.filter(user => {\n return user.primary.toLowerCase().includes(event.search.toLowerCase());\n })\n );\n }\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <RichTextEditor\n ref={editorRef}\n searchTriggers={[{ trigger: '@', regex: '[a-zA-Z]*(?: [a-zA-Z]*)?' }]}\n onSearch={searchUsers}\n getSearchItemReplacement={(id: string) => {\n const item = demoUsers.find(({ id: itemId }) => itemId === id);\n\n if (!item) return undefined;\n\n return {\n markdown: `@${item.id}:${item.primary}:user:`,\n text: item.primary\n };\n }}\n menu={users.length ? { items: users } : undefined}\n autoFocus\n markdownOnly\n defaultValue={\n '# Try writing some of your own markdown and see how it renders!\\n\\nYou can interact with mentions such as @deans:Seth DeAngelo:user:\\n\\nThere is built in support for #tags: as well!\\n\\nComponent renderings can also be conditionally overwritten: [Link](https://www.google.com) -- [Link with preview](https://www.pega.com)'\n }\n onChange={() => setContent(editorRef.current?.getPlainText() || '')}\n />\n\n <RichTextViewer\n content={content}\n type='markdown'\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n markdownMap={{\n link: (linkToken: TokenMap['link']) => {\n if (linkToken.href?.includes('www.pega.com')) return LinkComponent;\n }\n }}\n />\n </Flex>\n );\n};\n"]}
@@ -1,43 +1,54 @@
1
1
  /// <reference types="react" />
2
- import { ChatProps } from '@pega/cosmos-react-social';
3
- declare const _default: {
4
- title: string;
5
- component: import("react").FunctionComponent<ChatProps & import("@pega/cosmos-react-core").ForwardProps>;
6
- };
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { MessageProps } from '@pega/cosmos-react-social';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
7
5
  export default _default;
8
6
  /** *********************** ChatHeader component - START *********************** */
9
- export declare const chatHeader: () => JSX.Element;
7
+ export declare const ChatHeaderDemo: () => JSX.Element;
10
8
  /** ***************************** ChatHeader component - END ******************* */
11
9
  /** **************************** MessageList component - START ************************* */
12
- export declare const MessageList: () => JSX.Element;
10
+ export declare const MessageListDemo: () => JSX.Element;
13
11
  /** **************************** MessageList component - END **************************** */
14
12
  /** ***************************** Message component - START ********************** */
15
- export declare const messageComponent: () => JSX.Element;
13
+ export declare const MessageDemo: Story<MessageProps>;
16
14
  /** ***************************** Message component - END *********************** */
17
15
  /** **************************** SystemMessage component - START ***************** */
18
- export declare const systemMessage: () => JSX.Element;
16
+ export declare const SystemMessageDemo: () => JSX.Element;
19
17
  /** ***************************** SystemMessage component - END ******************** */
20
18
  /** ***************************** TypeIndicator component - START ****************** */
21
- export declare const typeIndicator: () => JSX.Element;
19
+ interface TypeIndicatorDemoProps {
20
+ message?: string;
21
+ }
22
+ export declare const TypeIndicatorDemo: Story<TypeIndicatorDemoProps>;
22
23
  /** *************************** TypeIndicator component - END *********************** */
23
24
  /** ************************** ChatTranscripts component - START ********************* */
24
- export declare const chatTranscripts: () => JSX.Element[];
25
+ export declare const ChatTranscriptsDemo: () => JSX.Element[];
25
26
  /** **************************** ChatTranscripts component - END ************************ */
26
27
  /** *************************** TranscriptMessage component - START ****************** */
27
- export declare const transcriptMessage: () => JSX.Element;
28
+ export declare const TranscriptMessageDemo: () => JSX.Element;
28
29
  /** *************************** TranscriptMessage component - END ******************** */
29
30
  /** *************************** SuggestedReplyPicker component - START ****************** */
30
- export declare const suggestedReplyPickerComponent: () => JSX.Element;
31
+ export declare const SuggestedReplyPickerDemo: () => JSX.Element;
31
32
  /** *************************** SuggestedReplyPicker component - END ****************** */
32
33
  /** ******************************* ChatComposer component - START ************************ */
33
- export declare const chatComposer: () => JSX.Element;
34
- export declare const StandardChat: {
35
- ({ chatWidth }: {
36
- chatWidth: string;
37
- }): JSX.Element;
38
- parameters: {
39
- layout: string;
40
- };
41
- };
34
+ interface ChatComposerDemoProps {
35
+ maxAttachments?: number;
36
+ }
37
+ export declare const ChatComposerDemo: Story<ChatComposerDemoProps>;
38
+ /** *********************************** ChatComposer component - END ********************** */
39
+ /** *********************************** Standard Chat component - START ******************** */
40
+ interface StandardChatProps {
41
+ maxAttachments?: number;
42
+ chatWidth?: string;
43
+ selectedChannel?: string;
44
+ showChatBanner?: boolean;
45
+ disableChat?: boolean;
46
+ simulateConversation?: boolean;
47
+ message?: string;
48
+ placeholder?: string;
49
+ defaultMessage?: string;
50
+ maxLength?: number;
51
+ }
52
+ export declare const StandardChat: Story<StandardChatProps>;
42
53
  /** *************************** Standard Chat component - END ************************ */
43
54
  //# sourceMappingURL=Chat.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Chat/Chat.stories.tsx"],"names":[],"mappings":";AA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