@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.0

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 (580) hide show
  1. package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
  2. package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  3. package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
  4. package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
  5. package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
  6. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  7. package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
  8. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  9. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  10. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  11. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  12. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  13. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  14. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  15. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
  16. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
  17. package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
  18. package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  19. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  20. package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
  21. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
  22. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  23. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
  24. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  25. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  26. package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
  27. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  28. package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
  29. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  30. package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
  31. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  32. package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
  33. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  34. package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
  35. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  36. package/jsx/core/Badges/Status.stories.d.ts +5 -0
  37. package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
  38. package/jsx/core/Badges/Status.stories.jsx +25 -1
  39. package/jsx/core/Badges/Status.stories.jsx.map +1 -1
  40. package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
  41. package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
  42. package/jsx/core/Banner/Banner.mocks.jsx +41 -0
  43. package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
  44. package/jsx/core/Banner/Banner.stories.d.ts +5 -1
  45. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  46. package/jsx/core/Banner/Banner.stories.jsx +22 -39
  47. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  48. package/jsx/core/Button/Button.stories.d.ts +8 -0
  49. package/jsx/core/Button/Button.stories.d.ts.map +1 -1
  50. package/jsx/core/Button/Button.stories.jsx +32 -3
  51. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  52. package/jsx/core/Card/Card.stories.d.ts +5 -0
  53. package/jsx/core/Card/Card.stories.d.ts.map +1 -1
  54. package/jsx/core/Card/Card.stories.jsx +30 -1
  55. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  56. package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
  57. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  58. package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
  59. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  60. package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
  61. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  62. package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
  63. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  64. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
  65. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
  66. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  67. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  68. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  69. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  70. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  71. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
  72. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
  73. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  74. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
  75. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  76. package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
  77. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  78. package/jsx/core/File/FileDisplay.stories.jsx +37 -2
  79. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  80. package/jsx/core/Flex/Flex.styles.d.ts +2 -2
  81. package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
  82. package/jsx/core/Flex/Flex.styles.js +17 -17
  83. package/jsx/core/Flex/Flex.styles.js.map +1 -1
  84. package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
  85. package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  86. package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
  87. package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
  88. package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
  89. package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
  90. package/jsx/core/Form/Form.mocks.d.ts +8 -0
  91. package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
  92. package/jsx/core/Form/Form.mocks.jsx +138 -0
  93. package/jsx/core/Form/Form.mocks.jsx.map +1 -0
  94. package/jsx/core/Form/Form.stories.d.ts +10 -7
  95. package/jsx/core/Form/Form.stories.d.ts.map +1 -1
  96. package/jsx/core/Form/Form.stories.jsx +44 -138
  97. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  98. package/jsx/core/Grid/Grid.styles.d.ts +2 -2
  99. package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
  100. package/jsx/core/Grid/Grid.styles.js +4 -4
  101. package/jsx/core/Grid/Grid.styles.js.map +1 -1
  102. package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
  103. package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
  104. package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
  105. package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
  106. package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
  107. package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
  108. package/jsx/core/Grid/GridItem.stories.jsx +28 -28
  109. package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
  110. package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
  111. package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
  112. package/jsx/core/Icon/Icon.mocks.jsx +9 -0
  113. package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
  114. package/jsx/core/Icon/Icon.stories.d.ts +1 -0
  115. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  116. package/jsx/core/Icon/Icon.stories.jsx +7 -1
  117. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  118. package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  119. package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
  120. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  121. package/jsx/core/Input/Input.stories.d.ts +9 -0
  122. package/jsx/core/Input/Input.stories.d.ts.map +1 -1
  123. package/jsx/core/Input/Input.stories.jsx +40 -1
  124. package/jsx/core/Input/Input.stories.jsx.map +1 -1
  125. package/jsx/core/Label/Label.stories.d.ts +4 -0
  126. package/jsx/core/Label/Label.stories.d.ts.map +1 -1
  127. package/jsx/core/Label/Label.stories.jsx +18 -1
  128. package/jsx/core/Label/Label.stories.jsx.map +1 -1
  129. package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  130. package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  131. package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
  132. package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
  133. package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
  134. package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  135. package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
  136. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
  137. package/jsx/core/Link/Link.stories.d.ts +11 -1
  138. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  139. package/jsx/core/Link/Link.stories.jsx +22 -5
  140. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  141. package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  142. package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
  143. package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
  144. package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
  145. package/jsx/core/List/OrderedList.stories.jsx +10 -10
  146. package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
  147. package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
  148. package/jsx/core/List/UnorderedList.stories.jsx +10 -10
  149. package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
  150. package/jsx/core/Menu/Menu.stories.d.ts +3 -3
  151. package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
  152. package/jsx/core/Menu/Menu.stories.jsx +8 -12
  153. package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
  154. package/jsx/core/Modal/Modal.mocks.jsx +1 -1
  155. package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
  156. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  157. package/jsx/core/Number/Number.stories.jsx +1 -4
  158. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  159. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  160. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  161. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
  162. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  163. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
  164. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
  165. package/jsx/core/Popover/Popover.stories.d.ts +1 -2
  166. package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
  167. package/jsx/core/Popover/Popover.stories.jsx +35 -37
  168. package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
  169. package/jsx/core/Progress/Progress.stories.d.ts +4 -0
  170. package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
  171. package/jsx/core/Progress/Progress.stories.jsx +22 -1
  172. package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
  173. package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
  174. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  175. package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
  176. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  177. package/jsx/core/Rating/Rating.stories.d.ts +8 -1
  178. package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
  179. package/jsx/core/Rating/Rating.stories.jsx +21 -4
  180. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  181. package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
  182. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  183. package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
  184. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
  185. package/jsx/core/Select/Select.stories.d.ts +8 -0
  186. package/jsx/core/Select/Select.stories.d.ts.map +1 -1
  187. package/jsx/core/Select/Select.stories.jsx +35 -1
  188. package/jsx/core/Select/Select.stories.jsx.map +1 -1
  189. package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
  190. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  191. package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
  192. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  193. package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
  194. package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
  195. package/jsx/core/Switch/Switch.stories.d.ts +7 -0
  196. package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
  197. package/jsx/core/Switch/Switch.stories.jsx +34 -1
  198. package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
  199. package/jsx/core/Table/Table.stories.d.ts +25 -0
  200. package/jsx/core/Table/Table.stories.d.ts.map +1 -1
  201. package/jsx/core/Table/Table.stories.jsx +120 -1
  202. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  203. package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
  204. package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
  205. package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
  206. package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
  207. package/jsx/core/Text/Text.stories.d.ts +19 -0
  208. package/jsx/core/Text/Text.stories.d.ts.map +1 -1
  209. package/jsx/core/Text/Text.stories.jsx +112 -1
  210. package/jsx/core/Text/Text.stories.jsx.map +1 -1
  211. package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
  212. package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
  213. package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
  214. package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
  215. package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
  216. package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
  217. package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
  218. package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
  219. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  220. package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
  221. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  222. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
  223. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  224. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  225. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
  226. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  227. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  228. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  229. package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
  230. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  231. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  232. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  233. package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
  234. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  235. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
  236. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  237. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  238. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  239. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
  240. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
  241. package/jsx/social/Chat/Chat.stories.d.ts +31 -22
  242. package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
  243. package/jsx/social/Chat/Chat.stories.jsx +106 -153
  244. package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
  245. package/jsx/social/Email/Email.mocks.d.ts +1 -2
  246. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  247. package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
  248. package/jsx/social/Email/Email.mocks.js.map +1 -0
  249. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  250. package/jsx/social/Email/Email.stories.jsx +7 -8
  251. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  252. package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
  253. package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
  254. package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
  255. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  256. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  257. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
  258. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
  259. package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
  260. package/jsx/work/CaseView/FileService.mock.jsx +6 -2
  261. package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
  262. package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
  263. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  264. package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
  265. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
  266. package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
  267. package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  268. package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
  269. package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
  270. package/jsx/work/Details/Details.stories.jsx +3 -3
  271. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  272. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  273. package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
  274. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
  275. package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
  276. package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  277. package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
  278. package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
  279. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
  280. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  281. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
  282. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
  283. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  284. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  285. package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
  286. package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
  287. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  288. package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
  289. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  290. package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
  291. package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  292. package/lib/build/AppHeader/AppHeader.stories.js +46 -13
  293. package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
  294. package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
  295. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  296. package/lib/build/AppShell/AppShell.stories.js +46 -13
  297. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  298. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  299. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  300. package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  301. package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  302. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  303. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  304. package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
  305. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
  306. package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
  307. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  308. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  309. package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
  310. package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
  311. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  312. package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
  313. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  314. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  315. package/lib/build/Workbench/Workbench.stories.js +15 -17
  316. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  317. package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
  318. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  319. package/lib/core/AppShell/AppShell.stories.js +23 -1
  320. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  321. package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
  322. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  323. package/lib/core/Avatar/Avatar.stories.js +30 -5
  324. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  325. package/lib/core/Badges/Status.stories.d.ts +5 -0
  326. package/lib/core/Badges/Status.stories.d.ts.map +1 -1
  327. package/lib/core/Badges/Status.stories.js +23 -1
  328. package/lib/core/Badges/Status.stories.js.map +1 -1
  329. package/lib/core/Banner/Banner.mocks.d.ts +18 -0
  330. package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
  331. package/lib/core/Banner/Banner.mocks.js +36 -0
  332. package/lib/core/Banner/Banner.mocks.js.map +1 -0
  333. package/lib/core/Banner/Banner.stories.d.ts +5 -1
  334. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  335. package/lib/core/Banner/Banner.stories.js +21 -33
  336. package/lib/core/Banner/Banner.stories.js.map +1 -1
  337. package/lib/core/Button/Button.stories.d.ts +8 -0
  338. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  339. package/lib/core/Button/Button.stories.js +29 -2
  340. package/lib/core/Button/Button.stories.js.map +1 -1
  341. package/lib/core/Card/Card.stories.d.ts +5 -0
  342. package/lib/core/Card/Card.stories.d.ts.map +1 -1
  343. package/lib/core/Card/Card.stories.js +19 -1
  344. package/lib/core/Card/Card.stories.js.map +1 -1
  345. package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
  346. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  347. package/lib/core/Checkbox/Checkbox.stories.js +52 -1
  348. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  349. package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
  350. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  351. package/lib/core/Configuration/Configuration.stories.js +62 -3
  352. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  353. package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
  354. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  355. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  356. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  357. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  358. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  359. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  360. package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
  361. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
  362. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  363. package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
  364. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  365. package/lib/core/File/FileDisplay.stories.d.ts +8 -1
  366. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  367. package/lib/core/File/FileDisplay.stories.js +32 -2
  368. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  369. package/lib/core/Flex/Flex.styles.d.ts +2 -2
  370. package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
  371. package/lib/core/Flex/Flex.styles.js +17 -17
  372. package/lib/core/Flex/Flex.styles.js.map +1 -1
  373. package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
  374. package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  375. package/lib/core/Flex/FlexContainer.stories.js +10 -7
  376. package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
  377. package/lib/core/Flex/FlexItem.stories.js +4 -4
  378. package/lib/core/Flex/FlexItem.stories.js.map +1 -1
  379. package/lib/core/Form/Form.mocks.d.ts +8 -0
  380. package/lib/core/Form/Form.mocks.d.ts.map +1 -0
  381. package/lib/core/Form/Form.mocks.js +97 -0
  382. package/lib/core/Form/Form.mocks.js.map +1 -0
  383. package/lib/core/Form/Form.stories.d.ts +10 -7
  384. package/lib/core/Form/Form.stories.d.ts.map +1 -1
  385. package/lib/core/Form/Form.stories.js +42 -96
  386. package/lib/core/Form/Form.stories.js.map +1 -1
  387. package/lib/core/Grid/Grid.styles.d.ts +2 -2
  388. package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
  389. package/lib/core/Grid/Grid.styles.js +4 -4
  390. package/lib/core/Grid/Grid.styles.js.map +1 -1
  391. package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
  392. package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
  393. package/lib/core/Grid/GridContainer.stories.js +27 -24
  394. package/lib/core/Grid/GridContainer.stories.js.map +1 -1
  395. package/lib/core/Grid/GridItem.stories.d.ts +2 -2
  396. package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
  397. package/lib/core/Grid/GridItem.stories.js +10 -10
  398. package/lib/core/Grid/GridItem.stories.js.map +1 -1
  399. package/lib/core/Icon/Icon.mocks.d.ts +3 -0
  400. package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
  401. package/lib/core/Icon/Icon.mocks.js +10 -0
  402. package/lib/core/Icon/Icon.mocks.js.map +1 -0
  403. package/lib/core/Icon/Icon.stories.d.ts +1 -0
  404. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  405. package/lib/core/Icon/Icon.stories.js +7 -1
  406. package/lib/core/Icon/Icon.stories.js.map +1 -1
  407. package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  408. package/lib/core/IconPicker/IconPicker.stories.js +0 -1
  409. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  410. package/lib/core/Input/Input.stories.d.ts +9 -0
  411. package/lib/core/Input/Input.stories.d.ts.map +1 -1
  412. package/lib/core/Input/Input.stories.js +38 -1
  413. package/lib/core/Input/Input.stories.js.map +1 -1
  414. package/lib/core/Label/Label.stories.d.ts +4 -0
  415. package/lib/core/Label/Label.stories.d.ts.map +1 -1
  416. package/lib/core/Label/Label.stories.js +16 -1
  417. package/lib/core/Label/Label.stories.js.map +1 -1
  418. package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  419. package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  420. package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
  421. package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
  422. package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
  423. package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  424. package/lib/core/Lightbox/Lightbox.stories.js +14 -73
  425. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  426. package/lib/core/Link/Link.stories.d.ts +11 -1
  427. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  428. package/lib/core/Link/Link.stories.js +7 -4
  429. package/lib/core/Link/Link.stories.js.map +1 -1
  430. package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  431. package/lib/core/List/CommaSeparatedList.stories.js +17 -17
  432. package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
  433. package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
  434. package/lib/core/List/OrderedList.stories.js +10 -10
  435. package/lib/core/List/OrderedList.stories.js.map +1 -1
  436. package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
  437. package/lib/core/List/UnorderedList.stories.js +10 -10
  438. package/lib/core/List/UnorderedList.stories.js.map +1 -1
  439. package/lib/core/Menu/Menu.stories.d.ts +3 -3
  440. package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
  441. package/lib/core/Menu/Menu.stories.js +8 -12
  442. package/lib/core/Menu/Menu.stories.js.map +1 -1
  443. package/lib/core/Modal/Modal.mocks.js +1 -1
  444. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  445. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  446. package/lib/core/Number/Number.stories.js +1 -4
  447. package/lib/core/Number/Number.stories.js.map +1 -1
  448. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  449. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  450. package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
  451. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  452. package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
  453. package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
  454. package/lib/core/Popover/Popover.stories.d.ts +1 -2
  455. package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
  456. package/lib/core/Popover/Popover.stories.js +24 -25
  457. package/lib/core/Popover/Popover.stories.js.map +1 -1
  458. package/lib/core/Progress/Progress.stories.d.ts +4 -0
  459. package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
  460. package/lib/core/Progress/Progress.stories.js +18 -1
  461. package/lib/core/Progress/Progress.stories.js.map +1 -1
  462. package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
  463. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  464. package/lib/core/RadioButton/RadioButton.stories.js +51 -1
  465. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  466. package/lib/core/Rating/Rating.stories.d.ts +8 -1
  467. package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
  468. package/lib/core/Rating/Rating.stories.js +19 -4
  469. package/lib/core/Rating/Rating.stories.js.map +1 -1
  470. package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
  471. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  472. package/lib/core/SearchInput/SearchInput.stories.js +16 -1
  473. package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
  474. package/lib/core/Select/Select.stories.d.ts +8 -0
  475. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  476. package/lib/core/Select/Select.stories.js +28 -1
  477. package/lib/core/Select/Select.stories.js.map +1 -1
  478. package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
  479. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  480. package/lib/core/Sentiment/Sentiment.stories.js +34 -7
  481. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  482. package/lib/core/SummaryList/SummaryList.stories.js +1 -1
  483. package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
  484. package/lib/core/Switch/Switch.stories.d.ts +7 -0
  485. package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
  486. package/lib/core/Switch/Switch.stories.js +32 -1
  487. package/lib/core/Switch/Switch.stories.js.map +1 -1
  488. package/lib/core/Table/Table.stories.d.ts +25 -0
  489. package/lib/core/Table/Table.stories.d.ts.map +1 -1
  490. package/lib/core/Table/Table.stories.js +113 -1
  491. package/lib/core/Table/Table.stories.js.map +1 -1
  492. package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
  493. package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
  494. package/lib/core/Tabs/Tabs.stories.js +30 -1
  495. package/lib/core/Tabs/Tabs.stories.js.map +1 -1
  496. package/lib/core/Text/Text.stories.d.ts +19 -0
  497. package/lib/core/Text/Text.stories.d.ts.map +1 -1
  498. package/lib/core/Text/Text.stories.js +102 -2
  499. package/lib/core/Text/Text.stories.js.map +1 -1
  500. package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
  501. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
  502. package/lib/core/TextArea/TextArea.stories.js +20 -1
  503. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  504. package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
  505. package/lib/core/Toaster/Toaster.stories.js +8 -3
  506. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  507. package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
  508. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  509. package/lib/core/Tooltip/Tooltip.stories.js +20 -1
  510. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  511. package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
  512. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  513. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  514. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
  515. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  516. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  517. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  518. package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
  519. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  520. package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  521. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  522. package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
  523. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  524. package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
  525. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  526. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  527. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  528. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
  529. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  530. package/lib/social/Chat/Chat.stories.d.ts +33 -22
  531. package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
  532. package/lib/social/Chat/Chat.stories.js +102 -158
  533. package/lib/social/Chat/Chat.stories.js.map +1 -1
  534. package/lib/social/Email/Email.mocks.d.ts +1 -2
  535. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  536. package/lib/social/Email/Email.mocks.js +1 -3
  537. package/lib/social/Email/Email.mocks.js.map +1 -1
  538. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  539. package/lib/social/Email/Email.stories.js +7 -8
  540. package/lib/social/Email/Email.stories.js.map +1 -1
  541. package/lib/social/Feed/FeedNewPost.stories.js +1 -1
  542. package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
  543. package/lib/social/Feed/FeedPost.stories.js +1 -1
  544. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  545. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  546. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
  547. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
  548. package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
  549. package/lib/work/CaseView/FileService.mock.js +6 -2
  550. package/lib/work/CaseView/FileService.mock.js.map +1 -1
  551. package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
  552. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  553. package/lib/work/Confirmation/Confirmation.stories.js +12 -4
  554. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  555. package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
  556. package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  557. package/lib/work/Confirmation/Confirmation.styles.js +7 -0
  558. package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
  559. package/lib/work/Details/Details.stories.js +3 -3
  560. package/lib/work/Details/Details.stories.js.map +1 -1
  561. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  562. package/lib/work/SearchResults/SearchResults.stories.js +3 -9
  563. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  564. package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
  565. package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  566. package/lib/work/SearchResults/SearchResults.styles.js +12 -0
  567. package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
  568. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
  569. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  570. package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
  571. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
  572. package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  573. package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  574. package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
  575. package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
  576. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  577. package/lib/work/Timeline/Timeline.stories.js +2 -2
  578. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  579. package/package.json +16 -16
  580. package/jsx/social/Email/Email.mocks.jsx.map +0 -1
@@ -0,0 +1,59 @@
1
+ export const mockAPIImageResources = [
2
+ {
3
+ id: 'photo-1497752531616-c3afd9760a11',
4
+ name: 'Image 1',
5
+ description: 'Descriptive text about Image 1',
6
+ mime_type: 'image/avif',
7
+ media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
8
+ },
9
+ {
10
+ id: 'photo-1470093851219-69951fcbb533',
11
+ name: 'Image 2',
12
+ description: 'Descriptive text about Image 2',
13
+ mime_type: 'image/avif',
14
+ media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
15
+ },
16
+ {
17
+ id: 'photo-1447684808650-354ae64db5b8',
18
+ name: 'Image 3',
19
+ description: 'Descriptive text about Image 3',
20
+ mime_type: 'image/avif',
21
+ media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
22
+ },
23
+ {
24
+ id: 'photo-1425082661705-1834bfd09dca',
25
+ name: 'Image 4',
26
+ description: 'Descriptive text about Image 4',
27
+ mime_type: 'image/avif',
28
+ media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
29
+ },
30
+ {
31
+ id: 'photo-1494256997604-768d1f608cac',
32
+ name: 'Image 5',
33
+ description: 'Descriptive text about Image 5',
34
+ mime_type: 'image/avif',
35
+ media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
36
+ },
37
+ {
38
+ id: 'photo-1500694216671-a4e54fc4b513',
39
+ name: 'Image 6',
40
+ description: 'Descriptive text about Image 6',
41
+ mime_type: 'image/avif',
42
+ media_url: 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'
43
+ },
44
+ {
45
+ id: 'photo-1638292597251-6fe6b2ba50f9',
46
+ name: 'Image 7',
47
+ description: 'Descriptive text about Image 7',
48
+ mime_type: 'image/avif',
49
+ media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
50
+ }
51
+ ];
52
+ export const mockBadImageResource = {
53
+ id: 'error',
54
+ name: 'Some image',
55
+ description: 'Descriptive text about Some image',
56
+ mime_type: 'image/avif',
57
+ media_url: ''
58
+ };
59
+ //# sourceMappingURL=Lightbox.mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lightbox.mocks.js","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.mocks.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,gKAAgK;KACnK;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,mCAAmC;IAEhD,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,EAAE;CACd,CAAC","sourcesContent":["export const mockAPIImageResources = [\n {\n id: 'photo-1497752531616-c3afd9760a11',\n name: 'Image 1',\n description: 'Descriptive text about Image 1',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1470093851219-69951fcbb533',\n name: 'Image 2',\n description: 'Descriptive text about Image 2',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1447684808650-354ae64db5b8',\n name: 'Image 3',\n description: 'Descriptive text about Image 3',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'\n },\n {\n id: 'photo-1425082661705-1834bfd09dca',\n name: 'Image 4',\n description: 'Descriptive text about Image 4',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'\n },\n {\n id: 'photo-1494256997604-768d1f608cac',\n name: 'Image 5',\n description: 'Descriptive text about Image 5',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'\n },\n {\n id: 'photo-1500694216671-a4e54fc4b513',\n name: 'Image 6',\n description: 'Descriptive text about Image 6',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'\n },\n {\n id: 'photo-1638292597251-6fe6b2ba50f9',\n name: 'Image 7',\n description: 'Descriptive text about Image 7',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'\n }\n];\n\nexport const mockBadImageResource = {\n id: 'error',\n name: 'Some image',\n description: 'Descriptive text about Some image',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url: ''\n};\n"]}
@@ -1,9 +1,10 @@
1
- /// <reference types="react" />
2
- import { Meta } from '@storybook/react';
1
+ import { Meta, Story } from '@storybook/react';
3
2
  declare const _default: Meta<import("@storybook/react").Args>;
4
3
  export default _default;
5
- export declare const MultiImage: () => JSX.Element;
6
- export declare const SingleImage: () => JSX.Element;
7
- export declare const MultiImageWithCycling: () => JSX.Element;
8
- export declare const ImageLoadError: () => JSX.Element;
4
+ interface LightboxStoryProps {
5
+ limit?: number;
6
+ cycle?: boolean;
7
+ error?: boolean;
8
+ }
9
+ export declare const LightboxDemo: Story<LightboxStoryProps>;
9
10
  //# sourceMappingURL=Lightbox.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lightbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAWxC,wBAGU;AAwIV,eAAO,MAAM,UAAU,mBAA6B,CAAC;AACrD,eAAO,MAAM,WAAW,mBAAuC,CAAC;AAChE,eAAO,MAAM,qBAAqB,mBAAmC,CAAC;AACtE,eAAO,MAAM,cAAc,mBAAmC,CAAC"}
1
+ {"version":3,"file":"Lightbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAa/C,wBAGU;AAEV,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAqDlD,CAAC"}
@@ -1,72 +1,15 @@
1
1
  import { useRef, useState } from 'react';
2
2
  import { Button, DateTimeDisplay, Lightbox } from '@pega/cosmos-react-core';
3
+ import { mockAPIImageResources, mockBadImageResource } from './Lightbox.mocks';
3
4
  export default {
4
5
  title: 'Core/Lightbox',
5
6
  component: Lightbox
6
7
  };
7
- const mockAPIImageResources = [
8
- {
9
- id: 'photo-1497752531616-c3afd9760a11',
10
- name: 'Image 1',
11
- description: 'Descriptive text about Image 1',
12
- mime_type: 'image/avif',
13
- media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
14
- },
15
- {
16
- id: 'photo-1470093851219-69951fcbb533',
17
- name: 'Image 2',
18
- description: 'Descriptive text about Image 2',
19
- mime_type: 'image/avif',
20
- media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
21
- },
22
- {
23
- id: 'photo-1447684808650-354ae64db5b8',
24
- name: 'Image 3',
25
- description: 'Descriptive text about Image 3',
26
- mime_type: 'image/avif',
27
- media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
28
- },
29
- {
30
- id: 'photo-1425082661705-1834bfd09dca',
31
- name: 'Image 4',
32
- description: 'Descriptive text about Image 4',
33
- mime_type: 'image/avif',
34
- media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
35
- },
36
- {
37
- id: 'photo-1494256997604-768d1f608cac',
38
- name: 'Image 5',
39
- description: 'Descriptive text about Image 5',
40
- mime_type: 'image/avif',
41
- media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
42
- },
43
- {
44
- id: 'photo-1500694216671-a4e54fc4b513',
45
- name: 'Image 6',
46
- description: 'Descriptive text about Image 6',
47
- mime_type: 'image/avif',
48
- media_url: 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'
49
- },
50
- {
51
- id: 'photo-1638292597251-6fe6b2ba50f9',
52
- name: 'Image 7',
53
- description: 'Descriptive text about Image 7',
54
- mime_type: 'image/avif',
55
- media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
56
- }
57
- ];
58
- const mockBadImageResource = {
59
- id: 'error',
60
- name: 'Some image',
61
- description: 'Descriptive text about Some image',
62
- mime_type: 'image/avif',
63
- media_url: ''
64
- };
65
- const BaseLightboxDemo = ({ cycle, limit, error }) => {
8
+ export const LightboxDemo = (args) => {
66
9
  const demoButtonRef = useRef(null);
67
10
  const [images, setImages] = useState(null);
68
11
  const onClick = () => {
69
- setImages((error ? [mockBadImageResource] : mockAPIImageResources.slice(0, limit)).map(({ id, name, description, mime_type, media_url }) => {
12
+ setImages((args.error ? [mockBadImageResource] : mockAPIImageResources.slice(0, args.limit)).map(({ id, name, description, mime_type, media_url }) => {
70
13
  return {
71
14
  id,
72
15
  name,
@@ -93,14 +36,20 @@ const BaseLightboxDemo = ({ cycle, limit, error }) => {
93
36
  <Button ref={demoButtonRef} onClick={onClick} autoFocus>
94
37
  Open Lightbox
95
38
  </Button>
96
- {images && (<Lightbox items={images} cycle={cycle} onAfterClose={() => {
39
+ {images && (<Lightbox items={images} cycle={args.cycle || undefined} onAfterClose={() => {
97
40
  setImages(null);
98
41
  demoButtonRef.current?.focus();
99
42
  }} onItemDownload={onItemDownload}/>)}
100
43
  </>);
101
44
  };
102
- export const MultiImage = () => <BaseLightboxDemo />;
103
- export const SingleImage = () => <BaseLightboxDemo limit={1}/>;
104
- export const MultiImageWithCycling = () => <BaseLightboxDemo cycle/>;
105
- export const ImageLoadError = () => <BaseLightboxDemo error/>;
45
+ LightboxDemo.args = {
46
+ limit: 7,
47
+ cycle: false,
48
+ error: false
49
+ };
50
+ LightboxDemo.argTypes = {
51
+ limit: { control: { type: 'number' } },
52
+ cycle: { control: { type: 'boolean' } },
53
+ error: { control: { type: 'boolean' } }
54
+ };
106
55
  //# sourceMappingURL=Lightbox.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lightbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EAGT,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAEV,MAAM,qBAAqB,GAAG;IAC5B;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAE7C,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE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;MACF,EAAE,MAAM,CACR;MAAA,CAAC,MAAM,IAAI,CACT,CAAC,QAAQ,CACP,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,GAAG,EAAE;gBACjB,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YACjC,CAAC,CAAC,CACF,cAAc,CAAC,CAAC,cAAc,CAAC,EAC/B,CACH,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,AAAD,EAAG,CAAC;AACrD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAG,CAAC;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAG,CAAC;AACtE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAG,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useRef, useState } from 'react';\n\nimport {\n Button,\n DateTimeDisplay,\n Lightbox,\n LightboxProps,\n LightboxItem\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Lightbox',\n component: Lightbox\n} as Meta;\n\nconst mockAPIImageResources = [\n {\n id: 'photo-1497752531616-c3afd9760a11',\n name: 'Image 1',\n description: 'Descriptive text about Image 1',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1470093851219-69951fcbb533',\n name: 'Image 2',\n description: 'Descriptive text about Image 2',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'\n },\n {\n id: 'photo-1447684808650-354ae64db5b8',\n name: 'Image 3',\n description: 'Descriptive text about Image 3',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'\n },\n {\n id: 'photo-1425082661705-1834bfd09dca',\n name: 'Image 4',\n description: 'Descriptive text about Image 4',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'\n },\n {\n id: 'photo-1494256997604-768d1f608cac',\n name: 'Image 5',\n description: 'Descriptive text about Image 5',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'\n },\n {\n id: 'photo-1500694216671-a4e54fc4b513',\n name: 'Image 6',\n description: 'Descriptive text about Image 6',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'\n },\n {\n id: 'photo-1638292597251-6fe6b2ba50f9',\n name: 'Image 7',\n description: 'Descriptive text about Image 7',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url:\n 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'\n }\n];\n\nconst mockBadImageResource = {\n id: 'error',\n name: 'Some image',\n description: 'Descriptive text about Some image',\n // cSpell:disable-next-line\n mime_type: 'image/avif',\n media_url: ''\n};\n\nconst BaseLightboxDemo = ({\n cycle,\n limit,\n error\n}: Pick<LightboxProps, 'cycle'> & { limit?: number; error?: true }) => {\n const demoButtonRef = useRef<HTMLButtonElement>(null);\n const [images, setImages] = useState<LightboxProps['items'] | null>(null);\n\n const onClick = () => {\n setImages(\n (error ? [mockBadImageResource] : mockAPIImageResources.slice(0, limit)).map(\n ({ id, name, description, mime_type, media_url }) => {\n return {\n id,\n name,\n description,\n src: media_url,\n metadata: [\n mime_type.split('/').pop(),\n <DateTimeDisplay value={new Date()} variant='date' />\n ]\n };\n }\n )\n );\n };\n\n const onItemDownload = async (id: LightboxItem['id']) => {\n const a = document.createElement('a');\n a.href = await fetch(id)\n .then(response => response.blob())\n .then(blob => URL.createObjectURL(blob));\n\n a.download = images?.find(image => image.id === id)?.name ?? id;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n };\n\n return (\n <>\n <Button ref={demoButtonRef} onClick={onClick} autoFocus>\n Open Lightbox\n </Button>\n {images && (\n <Lightbox\n items={images}\n cycle={cycle}\n onAfterClose={() => {\n setImages(null);\n demoButtonRef.current?.focus();\n }}\n onItemDownload={onItemDownload}\n />\n )}\n </>\n );\n};\n\nexport const MultiImage = () => <BaseLightboxDemo />;\nexport const SingleImage = () => <BaseLightboxDemo limit={1} />;\nexport const MultiImageWithCycling = () => <BaseLightboxDemo cycle />;\nexport const ImageLoadError = () => <BaseLightboxDemo error />;\n"]}
1
+ {"version":3,"file":"Lightbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,C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,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useRef, useState } from 'react';\n\nimport {\n Button,\n DateTimeDisplay,\n Lightbox,\n LightboxProps,\n LightboxItem\n} from '@pega/cosmos-react-core';\n\nimport { mockAPIImageResources, mockBadImageResource } from './Lightbox.mocks';\n\nexport default {\n title: 'Core/Lightbox',\n component: Lightbox\n} as Meta;\n\ninterface LightboxStoryProps {\n limit?: number;\n cycle?: boolean;\n error?: boolean;\n}\n\nexport const LightboxDemo: Story<LightboxStoryProps> = (args: LightboxStoryProps) => {\n const demoButtonRef = useRef<HTMLButtonElement>(null);\n const [images, setImages] = useState<LightboxProps['items'] | null>(null);\n\n const onClick = () => {\n setImages(\n (args.error ? [mockBadImageResource] : mockAPIImageResources.slice(0, args.limit)).map(\n ({ id, name, description, mime_type, media_url }) => {\n return {\n id,\n name,\n description,\n src: media_url,\n metadata: [\n mime_type.split('/').pop(),\n <DateTimeDisplay value={new Date()} variant='date' />\n ]\n };\n }\n )\n );\n };\n\n const onItemDownload = async (id: LightboxItem['id']) => {\n const a = document.createElement('a');\n a.href = await fetch(id)\n .then(response => response.blob())\n .then(blob => URL.createObjectURL(blob));\n\n a.download = images?.find(image => image.id === id)?.name ?? id;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n };\n\n return (\n <>\n <Button ref={demoButtonRef} onClick={onClick} autoFocus>\n Open Lightbox\n </Button>\n {images && (\n <Lightbox\n items={images}\n cycle={args.cycle || undefined}\n onAfterClose={() => {\n setImages(null);\n demoButtonRef.current?.focus();\n }}\n onItemDownload={onItemDownload}\n />\n )}\n </>\n );\n};\n\nLightboxDemo.args = {\n limit: 7,\n cycle: false,\n error: false\n};\n\nLightboxDemo.argTypes = {\n limit: { control: { type: 'number' } },\n cycle: { control: { type: 'boolean' } },\n error: { control: { type: 'boolean' } }\n};\n"]}
@@ -1,8 +1,18 @@
1
+ /// <reference types="react" />
1
2
  import { Meta, Story } from '@storybook/react';
2
3
  import { LinkProps } from '@pega/cosmos-react-core';
3
4
  declare const _default: Meta<import("@storybook/react").Args>;
4
5
  export default _default;
5
6
  export declare const LinkDemo: Story<LinkProps>;
6
- export declare const LinkWithIconDemo: Story<LinkProps>;
7
+ export declare const LinkWithIconDemo: {
8
+ (): JSX.Element;
9
+ argTypes: {
10
+ variant: {
11
+ table: {
12
+ disable: boolean;
13
+ };
14
+ };
15
+ };
16
+ };
7
17
  export declare const PreviewableLink: Story<LinkProps>;
8
18
  //# sourceMappingURL=Link.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA4B,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAK9E,wBAYU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAMrC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAM7C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,SAAS,CAM5C,CAAC"}
1
+ {"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAkC,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAKpF,wBAYU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAMrC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;CAoB5B,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,SAAS,CAM5C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Icon, registerIcon, Link } from '@pega/cosmos-react-core';
1
+ import { Icon, registerIcon, Flex, Link } from '@pega/cosmos-react-core';
2
2
  import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
3
3
  registerIcon(plusIcon);
4
4
  export default {
@@ -19,10 +19,27 @@ export const LinkDemo = (args) => {
19
19
  Visit Pega!
20
20
  </Link>);
21
21
  };
22
- export const LinkWithIconDemo = (args) => {
23
- return (<Link href='http://www.pega.com' variant={args.variant} icon target='_blank'>
24
- <Icon name='plus'/>
25
- </Link>);
22
+ export const LinkWithIconDemo = () => {
23
+ return (<Flex container={{ alignItems: 'center' }}>
24
+ <Link href='http://www.pega.com' variant='primary' icon target='_blank'>
25
+ <Icon name='plus'/>
26
+ </Link>
27
+ <Link href='http://www.pega.com' variant='secondary' icon target='_blank'>
28
+ <Icon name='plus'/>
29
+ </Link>
30
+ <Link href='http://www.pega.com' variant='simple' icon target='_blank'>
31
+ <Icon name='plus'/>
32
+ </Link>
33
+ <Link href='http://www.pega.com' variant='link' icon target='_blank'>
34
+ <Icon name='plus'/>
35
+ </Link>
36
+ <Link href='http://www.pega.com' variant='text' icon target='_blank'>
37
+ <Icon name='plus'/>
38
+ </Link>
39
+ </Flex>);
40
+ };
41
+ LinkWithIconDemo.argTypes = {
42
+ variant: { table: { disable: true } }
26
43
  };
27
44
  export const PreviewableLink = (args) => {
28
45
  return (<Link href='http://www.pega.com' variant={args.variant} previewable target='_blank'>
@@ -1 +1 @@
1
- {"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;YAC3D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CACrE;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,IAAe,EAAE,EAAE;IACpE,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAC1E;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EACnB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,IAAe,EAAE,EAAE;IACnE,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CACjF;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Icon, registerIcon, Link, LinkProps } from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Link',\n component: Link,\n args: {\n variant: 'link'\n },\n argTypes: {\n variant: {\n options: ['link', 'primary', 'secondary', 'simple', 'text'],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const LinkDemo: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n\nexport const LinkWithIconDemo: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} icon target='_blank'>\n <Icon name='plus' />\n </Link>\n );\n};\n\nexport const PreviewableLink: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} previewable target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n"]}
1
+ {"version":3,"file":"Link.stories.jsx","sourceRoot":"","sources":["../../../src/core/Link/Link.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEvB,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;YAC3D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC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,QAAQ,GAAG;IAC1B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,IAAe,EAAE,EAAE;IACnE,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CACjF;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Icon, registerIcon, Flex, Link, LinkProps } from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Link',\n component: Link,\n args: {\n variant: 'link'\n },\n argTypes: {\n variant: {\n options: ['link', 'primary', 'secondary', 'simple', 'text'],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const LinkDemo: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n\nexport const LinkWithIconDemo = () => {\n return (\n <Flex container={{ alignItems: 'center' }}>\n <Link href='http://www.pega.com' variant='primary' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='secondary' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='simple' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='link' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n <Link href='http://www.pega.com' variant='text' icon target='_blank'>\n <Icon name='plus' />\n </Link>\n </Flex>\n );\n};\n\nLinkWithIconDemo.argTypes = {\n variant: { table: { disable: true } }\n};\n\nexport const PreviewableLink: Story<LinkProps> = (args: LinkProps) => {\n return (\n <Link href='http://www.pega.com' variant={args.variant} previewable target='_blank'>\n Visit Pega!\n </Link>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CommaSeparatedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAsB,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAGU;AAmBV,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,uBAAuB,CAQjE,CAAC"}
1
+ {"version":3,"file":"CommaSeparatedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAsB,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAGU;AAEV,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,uBAAuB,CAqBjE,CAAC"}
@@ -3,26 +3,24 @@ export default {
3
3
  title: 'Core/List',
4
4
  component: CommaSeparatedList
5
5
  };
6
- const arr = [
7
- 'Value1',
8
- 'Value2',
9
- 'Value3',
10
- 'Value4',
11
- 'Value5',
12
- 'Value6',
13
- 'Value7',
14
- 'Value8',
15
- 'Value9',
16
- 'Value10',
17
- 'Value11',
18
- 'Value12',
19
- 'Value13',
20
- 'Value14'
21
- ];
22
6
  export const CommaSeparatedListDemo = (args) => {
23
- return (<div style={{ maxWidth: '25%' }}>
24
- <CommaSeparatedList heading={args.heading} items={arr}/>
25
- </div>);
7
+ const items = [
8
+ 'Value 1',
9
+ 'Value 2',
10
+ 'Value 3',
11
+ 'Value 4',
12
+ 'Value 5',
13
+ 'Value 6',
14
+ 'Value 7',
15
+ 'Value 8',
16
+ 'Value 9',
17
+ 'Value 10',
18
+ 'Value 11',
19
+ 'Value 12',
20
+ 'Value 13',
21
+ 'Value 14'
22
+ ];
23
+ return <CommaSeparatedList heading={args.heading} items={items}/>;
26
24
  };
27
25
  CommaSeparatedListDemo.args = {
28
26
  heading: 'List Heading'
@@ -1 +1 @@
1
- {"version":3,"file":"CommaSeparatedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,kBAAkB;CACtB,CAAC;AAEV,MAAM,GAAG,GAAG;IACV,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAmC,CACpE,IAA6B,EAC7B,EAAE;IACF,OAAO,CACL,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAC9B;MAAA,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EACxD;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,sBAAsB,CAAC,IAAI,GAAG;IAC5B,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,sBAAsB,CAAC,QAAQ,GAAG;IAChC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { CommaSeparatedList, CommaSeparatedListProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: CommaSeparatedList\n} as Meta;\n\nconst arr = [\n 'Value1',\n 'Value2',\n 'Value3',\n 'Value4',\n 'Value5',\n 'Value6',\n 'Value7',\n 'Value8',\n 'Value9',\n 'Value10',\n 'Value11',\n 'Value12',\n 'Value13',\n 'Value14'\n];\n\nexport const CommaSeparatedListDemo: Story<CommaSeparatedListProps> = (\n args: CommaSeparatedListProps\n) => {\n return (\n <div style={{ maxWidth: '25%' }}>\n <CommaSeparatedList heading={args.heading} items={arr} />\n </div>\n );\n};\n\nCommaSeparatedListDemo.args = {\n heading: 'List Heading'\n};\n\nCommaSeparatedListDemo.argTypes = {\n heading: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"CommaSeparatedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/CommaSeparatedList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,kBAAkB;CACtB,CAAC;AAEV,MAAM,CAAC,MAAM,sBAAsB,GAAmC,CACpE,IAA6B,EAC7B,EAAE;IACF,MAAM,KAAK,GAAG;QACZ,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC;IAEF,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC;AACrE,CAAC,CAAC;AAEF,sBAAsB,CAAC,IAAI,GAAG;IAC5B,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,sBAAsB,CAAC,QAAQ,GAAG;IAChC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { CommaSeparatedList, CommaSeparatedListProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: CommaSeparatedList\n} as Meta;\n\nexport const CommaSeparatedListDemo: Story<CommaSeparatedListProps> = (\n args: CommaSeparatedListProps\n) => {\n const items = [\n 'Value 1',\n 'Value 2',\n 'Value 3',\n 'Value 4',\n 'Value 5',\n 'Value 6',\n 'Value 7',\n 'Value 8',\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12',\n 'Value 13',\n 'Value 14'\n ];\n\n return <CommaSeparatedList heading={args.heading} items={items} />;\n};\n\nCommaSeparatedListDemo.args = {\n heading: 'List Heading'\n};\n\nCommaSeparatedListDemo.argTypes = {\n heading: { control: { type: 'text' } }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"OrderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;AAWV,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CAoBxD,CAAC"}
1
+ {"version":3,"file":"OrderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;AAEV,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CA+BxD,CAAC"}
@@ -4,28 +4,28 @@ export default {
4
4
  title: 'Core/List',
5
5
  component: OrderedList
6
6
  };
7
- const arr = [
8
- 'Hello',
9
- ['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],
10
- 'Hi',
11
- 'How are you?',
12
- 'Hey',
13
- 'Whatsup'
14
- ];
15
7
  export const OrderedListDemo = (args) => {
16
8
  const [limit, setLimit] = useState(0);
9
+ const items = [
10
+ 'Value 1',
11
+ ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],
12
+ 'Value 9',
13
+ 'Value 10',
14
+ 'Value 11',
15
+ 'Value 12'
16
+ ];
17
17
  useEffect(() => {
18
18
  setLimit(args.itemsToShow);
19
19
  }, [args.itemsToShow]);
20
20
  const handleToggleShow = () => {
21
21
  if (limit === args.itemsToShow) {
22
- setLimit(arr.flat().length);
22
+ setLimit(items.flat().length);
23
23
  }
24
24
  else {
25
25
  setLimit(args.itemsToShow);
26
26
  }
27
27
  };
28
- return (<OrderedList onToggleShow={handleToggleShow} heading={args.heading} items={arr.slice(0, limit)} count={arr.flat().length}/>);
28
+ return (<OrderedList onToggleShow={handleToggleShow} heading={args.heading} items={items.slice(0, limit)} count={items.flat().length}/>);
29
29
  };
30
30
  OrderedListDemo.args = {
31
31
  heading: 'List Heading',
@@ -1 +1 @@
1
- {"version":3,"file":"OrderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,GAAG,GAAG;IACV,OAAO;IACP,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,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State, useEffect } from 'react';\n\nimport { OrderedListProps, OrderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: OrderedList\n} as Meta;\n\nconst arr = [\n 'Hello',\n ['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],\n 'Hi',\n 'How are you?',\n 'Hey',\n 'Whatsup'\n];\n\ninterface OrderedListStoryProps {\n itemsToShow: number;\n heading: OrderedListProps['heading'];\n}\n\nexport const OrderedListDemo: Story<OrderedListStoryProps> = (args: OrderedListStoryProps) => {\n const [limit, setLimit] = useState(0);\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(arr.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n return (\n <OrderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={arr.slice(0, limit)}\n count={arr.flat().length}\n />\n );\n};\n\nOrderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nOrderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
1
+ {"version":3,"file":"OrderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/OrderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAoB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;CACf,CAAC;AAOV,MAAM,CAAC,MAAM,eAAe,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG;QACZ,SAAS;QACT,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/E,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEvB,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC5B,IAAI,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE;YAC9B,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;SAC/B;aAAM;YACL,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAW,CACV,YAAY,CAAC,CAAC,gBAAgB,CAAC,CAC/B,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAC7B,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,CAAC;CACf,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useEffect } from 'react';\n\nimport { OrderedListProps, OrderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: OrderedList\n} as Meta;\n\ninterface OrderedListStoryProps {\n itemsToShow: number;\n heading: OrderedListProps['heading'];\n}\n\nexport const OrderedListDemo: Story<OrderedListStoryProps> = (args: OrderedListStoryProps) => {\n const [limit, setLimit] = useState(0);\n const items = [\n 'Value 1',\n ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12'\n ];\n\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(items.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n\n return (\n <OrderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={items.slice(0, limit)}\n count={items.flat().length}\n />\n );\n};\n\nOrderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nOrderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UnorderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAiB,MAAM,yBAAyB,CAAC;;AAE5E,wBAGU;AAWV,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,uBAAuB,CAsB5D,CAAC"}
1
+ {"version":3,"file":"UnorderedList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAiB,MAAM,yBAAyB,CAAC;;AAE5E,wBAGU;AAEV,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,uBAAuB,CAiC5D,CAAC"}
@@ -4,28 +4,28 @@ export default {
4
4
  title: 'Core/List',
5
5
  component: UnorderedList
6
6
  };
7
- const arr = [
8
- 'Hello',
9
- ['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],
10
- 'Hi',
11
- 'How are you?',
12
- 'Hey',
13
- 'Whatsup'
14
- ];
15
7
  export const UnorderedListDemo = (args) => {
16
8
  const [limit, setLimit] = useState(0);
9
+ const items = [
10
+ 'Value 1',
11
+ ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],
12
+ 'Value 9',
13
+ 'Value 10',
14
+ 'Value 11',
15
+ 'Value 12'
16
+ ];
17
17
  useEffect(() => {
18
18
  setLimit(args.itemsToShow);
19
19
  }, [args.itemsToShow]);
20
20
  const handleToggleShow = () => {
21
21
  if (limit === args.itemsToShow) {
22
- setLimit(arr.flat().length);
22
+ setLimit(items.flat().length);
23
23
  }
24
24
  else {
25
25
  setLimit(args.itemsToShow);
26
26
  }
27
27
  };
28
- return (<UnorderedList onToggleShow={handleToggleShow} heading={args.heading} items={arr.slice(0, limit)} count={arr.flat().length}/>);
28
+ return (<UnorderedList onToggleShow={handleToggleShow} heading={args.heading} items={items.slice(0, limit)} count={items.flat().length}/>);
29
29
  };
30
30
  UnorderedListDemo.args = {
31
31
  heading: 'List Heading',
@@ -1 +1 @@
1
- {"version":3,"file":"UnorderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE5E,eAAe;IACb,KAAK,EAA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AAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useEffect } from 'react';\n\nimport { UnorderedListProps, UnorderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: UnorderedList\n} as Meta;\n\nconst arr = [\n 'Hello',\n ['val1', 'val2', 'val3', ['a', 'b', 'c', 'd']],\n 'Hi',\n 'How are you?',\n 'Hey',\n 'Whatsup'\n];\n\ninterface UnorderedListStoryProps {\n itemsToShow: number;\n heading: UnorderedListProps['heading'];\n}\n\nexport const UnorderedListDemo: Story<UnorderedListStoryProps> = (\n args: UnorderedListStoryProps\n) => {\n const [limit, setLimit] = useState(0);\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(arr.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n return (\n <UnorderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={arr.slice(0, limit)}\n count={arr.flat().length}\n />\n );\n};\n\nUnorderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nUnorderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
1
+ {"version":3,"file":"UnorderedList.stories.jsx","sourceRoot":"","sources":["../../../src/core/List/UnorderedList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE5E,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,aAAa;CACjB,CAAC;AAOV,MAAM,CAAC,MAAM,iBAAiB,GAAmC,CAC/D,IAA6B,EAC7B,EAAE;IACF,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C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useEffect } from 'react';\n\nimport { UnorderedListProps, UnorderedList } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/List',\n component: UnorderedList\n} as Meta;\n\ninterface UnorderedListStoryProps {\n itemsToShow: number;\n heading: UnorderedListProps['heading'];\n}\n\nexport const UnorderedListDemo: Story<UnorderedListStoryProps> = (\n args: UnorderedListStoryProps\n) => {\n const [limit, setLimit] = useState(0);\n const items = [\n 'Value 1',\n ['Value 2', 'Value 3', 'Value 4', ['Value 5', 'Value 6', 'Value 7', 'Value 8']],\n 'Value 9',\n 'Value 10',\n 'Value 11',\n 'Value 12'\n ];\n\n useEffect(() => {\n setLimit(args.itemsToShow);\n }, [args.itemsToShow]);\n\n const handleToggleShow = () => {\n if (limit === args.itemsToShow) {\n setLimit(items.flat().length);\n } else {\n setLimit(args.itemsToShow);\n }\n };\n\n return (\n <UnorderedList\n onToggleShow={handleToggleShow}\n heading={args.heading}\n items={items.slice(0, limit)}\n count={items.flat().length}\n />\n );\n};\n\nUnorderedListDemo.args = {\n heading: 'List Heading',\n itemsToShow: 3\n};\n\nUnorderedListDemo.argTypes = {\n heading: { control: { type: 'text' } },\n itemsToShow: { control: { type: 'number' } }\n};\n"]}
@@ -1,8 +1,8 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import { MenuProps } from '@pega/cosmos-react-core';
2
+ import { MenuProps, OmitStrict } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
- interface MenuStoryProps extends MenuProps {
5
+ interface MenuStoryProps extends OmitStrict<MenuProps, 'items'> {
6
6
  showItemSecondary?: boolean;
7
7
  showItemVisual?: boolean;
8
8
  showItemCount?: boolean;
@@ -10,7 +10,7 @@ interface MenuStoryProps extends MenuProps {
10
10
  filterPattern?: 'contains' | 'starts with';
11
11
  infiniteScroll?: boolean;
12
12
  noItems?: boolean;
13
- loadMore?: (id?: string) => void;
13
+ useFlatData?: boolean;
14
14
  }
15
15
  export declare const MenuDemo: Story<MenuStoryProps>;
16
16
  export declare const FlatMenuDemo: Story<MenuStoryProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,SAAS,EAOV,MAAM,yBAAyB,CAAC;;AAKjC,wBA8BU;AAEV,UAAU,cAAe,SAAQ,SAAS;IACxC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,UAAU,GAAG,aAAa,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,cAAc,CAgM1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAE9C,CAAC"}
1
+ {"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,SAAS,EAOT,UAAU,EACX,MAAM,yBAAyB,CAAC;;AAKjC,wBA6BU;AAEV,UAAU,cAAe,SAAQ,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,UAAU,GAAG,aAAa,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,cAAc,CAgM1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAE9C,CAAC"}
@@ -16,7 +16,7 @@ export default {
16
16
  infiniteScroll: false,
17
17
  noItems: false,
18
18
  emptyText: 'No items',
19
- items: countries
19
+ useFlatData: false
20
20
  },
21
21
  argTypes: {
22
22
  variant: { options: ['drill-down', 'flyout'], control: { type: 'select' } },
@@ -29,18 +29,18 @@ export default {
29
29
  infiniteScroll: { control: { type: 'boolean' } },
30
30
  noItems: { control: { type: 'boolean' } },
31
31
  emptyText: { control: { type: 'text' } },
32
- items: { table: { disable: true } },
33
- loadMore: { table: { disable: true } }
32
+ useFlatData: { control: { type: 'boolean' } }
34
33
  }
35
34
  };
36
35
  export const MenuDemo = (args) => {
37
36
  const menuID = createUID();
37
+ const data = args.useFlatData ? cars : countries;
38
38
  const searchEleRef = useRef(null);
39
39
  const { push } = useContext(ToasterContext);
40
40
  const [isOpen, setIsOpen] = useState(false);
41
41
  const [isLoading, setIsLoading] = useState(false);
42
42
  const [hasMore, setHasMore] = useState(true);
43
- const [items, setItems] = useState(args.infiniteScroll ? args.items.slice(0, 10) : args.items);
43
+ const [items, setItems] = useState(args.infiniteScroll ? data.slice(0, 10) : data);
44
44
  const [buttonEl, setButtonEl] = useElement(null);
45
45
  const [popoverEl, setPopoverEl] = useElement(null);
46
46
  const [search, setSearch] = useState('');
@@ -71,7 +71,7 @@ export const MenuDemo = (args) => {
71
71
  }, [search, items, searchRegex, args.showItemVisual]);
72
72
  const resetMenu = useCallback(() => {
73
73
  setIsOpen(false);
74
- setItems(args.items.slice(0, 10));
74
+ setItems(data.slice(0, 10));
75
75
  setSearch('');
76
76
  }, []);
77
77
  const onKeydown = useCallback(({ key }) => {
@@ -84,15 +84,14 @@ export const MenuDemo = (args) => {
84
84
  setTimeout(() => {
85
85
  setIsLoading(false);
86
86
  setItems(prevItems => {
87
- const newItems = args.items.slice(prevItems.length, prevItems.length + 10);
87
+ const newItems = data.slice(prevItems.length, prevItems.length + 10);
88
88
  if (newItems.length === 0)
89
89
  setHasMore(false);
90
90
  return menuHelpers.appendTo(prevItems, newItems, expandedItemId);
91
91
  });
92
92
  }, 2000);
93
93
  }
94
- args.loadMore?.(expandedItemId);
95
- }, [items, isLoading, args.loadMore]);
94
+ }, [items, isLoading]);
96
95
  useOuterEvent('mousedown', [popoverEl, buttonEl], e => {
97
96
  if (args.variant === 'flyout') {
98
97
  const path = e.composedPath();
@@ -158,9 +157,6 @@ export const MenuDemo = (args) => {
158
157
  </Flex>);
159
158
  };
160
159
  export const FlatMenuDemo = (args) => {
161
- return <MenuDemo {...args}/>;
162
- };
163
- FlatMenuDemo.args = {
164
- items: cars
160
+ return <MenuDemo {...args} useFlatData/>;
165
161
  };
166
162
  //# sourceMappingURL=Menu.stories.jsx.map