@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
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.stories.js","sourceRoot":"","sources":["../../../src/core/Icon/Icon.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,KAAK,EAEL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,WAAW,MAAM,gEAAgE,CAAC;AAE9F,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,SAAS,gBAAY,mBAAmB,WAAG,CACjG,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IA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ACjB,mBAAmB,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aACzE,KAAC,WAAW,IAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,WAAI,EAC7D,UAAU,GAAG,CAAC,IAAI,MAAC,IAAI,IAAC,OAAO,EAAC,WAAW,aAAE,YAAY,CAAC,OAAO,wBAAgB,EAClF,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK,aACrF,WAAW,EACX,eAAe,GAAG,CAAC,IAAI,CACtB,KAAC,uBAAuB,cACtB,KAAC,QAAQ,IAAC,SAAS,EAAC,OAAO,WAAG,WACN,CAC3B,YACI,YACF,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useMemo, useState, useCallback, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n EmptyState,\n StyledEmptyState,\n Flex,\n Icon,\n icons,\n IconNames,\n registerIcon,\n Progress,\n SearchInput,\n Text,\n useItemIntersection\n} from '@pega/cosmos-react-core';\nimport * as pegasusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pegasus.icon';\n\nexport default {\n title: 'Core/Icon',\n component: Icon\n} as Meta;\n\nregisterIcon(pegasusIcon);\n\nexport const StaticIcon = () => {\n return (\n <Icon style={{ height: '5rem', width: '5rem' }} name='pegasus' aria-label='Informative label' />\n );\n};\n\nexport const DynamicIcon = () => {\n return <Icon style={{ height: '5rem', width: '5rem' }} name='pega' />;\n};\n\n// Default # of icons to display in a page\nconst PAGE_SIZE = 50;\n\nconst StyledIconList = styled.ul`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n\n ${StyledEmptyState} {\n width: 100%;\n height: 100%;\n }\n`;\n\nconst StyledIconListItem = styled.li(\n ({ theme }) =>\n css`\n padding: calc(2 * ${theme.base.spacing});\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n width: 20%;\n `\n);\n\nStyledIconListItem.defaultProps = defaultThemeProp;\n\nconst StyledProgressContainer = styled.li`\n position: relative;\n height: 2.8rem;\n width: 100%;\n`;\n\nexport const IconList = () => {\n const [search, setSearch] = useState('');\n const totalMatches = useRef(0);\n const [currentPageIndex, setCurrentPageIndex] = useState(0);\n const ulRef = useRef<HTMLUListElement>(null);\n\n const listContent = useMemo(() => {\n const matches: readonly IconNames[] = search\n ? icons.filter(icon => icon.includes(search))\n : icons;\n const totalItemsToRender = (1 + currentPageIndex) * PAGE_SIZE;\n totalMatches.current = matches.length;\n\n if (matches.length === 0) {\n return <EmptyState forwardedAs='li' />;\n }\n\n return matches.slice(0, totalItemsToRender).map(icon => (\n <Flex\n key={icon}\n container={{\n direction: 'column',\n justify: 'center',\n alignItems: 'center',\n alignContent: 'center'\n }}\n as={StyledIconListItem}\n >\n <Icon style={{ height: '3rem', width: '3rem' }} name={icon} />\n <p style={{ textAlign: 'center' }}>{icon}</p>\n </Flex>\n ));\n }, [search, currentPageIndex]);\n\n const itemsShown = Math.min(totalMatches.current, (1 + currentPageIndex) * PAGE_SIZE);\n const itemsToLoadMore = totalMatches.current - itemsShown;\n\n // When reaches to the bottom of the results, loads next PAGE_SIZE items\n useItemIntersection(\n ulRef,\n itemsShown,\n () => {\n setCurrentPageIndex(prev => 1 + prev);\n },\n ':scope > li'\n );\n\n // on search, reset to first page and scroll to top\n const onSearchChange = useCallback((value: string) => {\n setSearch(value);\n setCurrentPageIndex(0);\n ulRef?.current?.scrollIntoView();\n }, []);\n\n return (\n <Flex container={{ direction: 'column', gap: 1 }} style={{ height: '90vh' }}>\n <SearchInput value={search} onSearchChange={onSearchChange} />\n {itemsShown > 0 && <Text variant='secondary'>{totalMatches.current} results</Text>}\n <Flex container={{ wrap: 'wrap', alignContent: 'start' }} as={StyledIconList} ref={ulRef}>\n {listContent}\n {itemsToLoadMore > 0 && (\n <StyledProgressContainer>\n <Progress placement='local' />\n </StyledProgressContainer>\n )}\n </Flex>\n </Flex>\n );\n};\n"]}
1
+ {"version":3,"file":"Icon.stories.js","sourceRoot":"","sources":["../../../src/core/Icon/Icon.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,KAAK,EAEL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,WAAW,MAAM,gEAAgE,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,SAAS,gBAAY,mBAAmB,WAAG,CACjG,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,KAAK,GAAG,QAAQ,EA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E;IACxE,mBAAmB,CACjB,KAAK,EACL,UAAU,EACV,GAAG,EAAE;QACH,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACxC,CAAC,EACD,aAAa,CACd,CAAC;IAEF,mDAAmD;IACnD,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,KAAa,EAAE,EAAE;QACnD,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,mBAAmB,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aACzE,KAAC,WAAW,IAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,WAAI,EAC7D,UAAU,GAAG,CAAC,IAAI,MAAC,IAAI,IAAC,OAAO,EAAC,WAAW,aAAE,YAAY,CAAC,OAAO,wBAAgB,EAClF,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK,aACrF,WAAW,EACX,eAAe,GAAG,CAAC,IAAI,CACtB,KAAC,uBAAuB,cACtB,KAAC,QAAQ,IAAC,SAAS,EAAC,OAAO,WAAG,WACN,CAC3B,YACI,YACF,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useMemo, useState, useCallback, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n EmptyState,\n StyledEmptyState,\n Flex,\n Icon,\n icons,\n IconNames,\n registerIcon,\n Progress,\n SearchInput,\n Text,\n useItemIntersection,\n useTheme\n} from '@pega/cosmos-react-core';\nimport * as pegasusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pegasus.icon';\n\nimport { createCustomIcon } from './Icon.mocks';\n\nexport default {\n title: 'Core/Icon',\n component: Icon\n} as Meta;\n\nregisterIcon(pegasusIcon);\n\nexport const StaticIcon = () => {\n return (\n <Icon style={{ height: '5rem', width: '5rem' }} name='pegasus' aria-label='Informative label' />\n );\n};\n\nexport const CustomIcon = () => {\n const theme = useTheme();\n\n createCustomIcon(theme);\n\n return (\n <Icon style={{ height: '5rem', width: '5rem' }} name='custom-pega' aria-label='Custom icon' />\n );\n};\n\nexport const DynamicIcon = () => {\n return <Icon style={{ height: '5rem', width: '5rem' }} name='pega' />;\n};\n\n// Default # of icons to display in a page\nconst PAGE_SIZE = 50;\n\nconst StyledIconList = styled.ul`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n\n ${StyledEmptyState} {\n width: 100%;\n height: 100%;\n }\n`;\n\nconst StyledIconListItem = styled.li(\n ({ theme }) =>\n css`\n padding: calc(2 * ${theme.base.spacing});\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n width: 20%;\n `\n);\n\nStyledIconListItem.defaultProps = defaultThemeProp;\n\nconst StyledProgressContainer = styled.li`\n position: relative;\n height: 2.8rem;\n width: 100%;\n`;\n\nexport const IconList = () => {\n const [search, setSearch] = useState('');\n const totalMatches = useRef(0);\n const [currentPageIndex, setCurrentPageIndex] = useState(0);\n const ulRef = useRef<HTMLUListElement>(null);\n\n const listContent = useMemo(() => {\n const matches: readonly IconNames[] = search\n ? icons.filter(icon => icon.includes(search))\n : icons;\n const totalItemsToRender = (1 + currentPageIndex) * PAGE_SIZE;\n totalMatches.current = matches.length;\n\n if (matches.length === 0) {\n return <EmptyState forwardedAs='li' />;\n }\n\n return matches.slice(0, totalItemsToRender).map(icon => (\n <Flex\n key={icon}\n container={{\n direction: 'column',\n justify: 'center',\n alignItems: 'center',\n alignContent: 'center'\n }}\n as={StyledIconListItem}\n >\n <Icon style={{ height: '3rem', width: '3rem' }} name={icon} />\n <p style={{ textAlign: 'center' }}>{icon}</p>\n </Flex>\n ));\n }, [search, currentPageIndex]);\n\n const itemsShown = Math.min(totalMatches.current, (1 + currentPageIndex) * PAGE_SIZE);\n const itemsToLoadMore = totalMatches.current - itemsShown;\n\n // When reaches to the bottom of the results, loads next PAGE_SIZE items\n useItemIntersection(\n ulRef,\n itemsShown,\n () => {\n setCurrentPageIndex(prev => 1 + prev);\n },\n ':scope > li'\n );\n\n // on search, reset to first page and scroll to top\n const onSearchChange = useCallback((value: string) => {\n setSearch(value);\n setCurrentPageIndex(0);\n ulRef?.current?.scrollIntoView();\n }, []);\n\n return (\n <Flex container={{ direction: 'column', gap: 1 }} style={{ height: '90vh' }}>\n <SearchInput value={search} onSearchChange={onSearchChange} />\n {itemsShown > 0 && <Text variant='secondary'>{totalMatches.current} results</Text>}\n <Flex container={{ wrap: 'wrap', alignContent: 'start' }} as={StyledIconList} ref={ulRef}>\n {listContent}\n {itemsToLoadMore > 0 && (\n <StyledProgressContainer>\n <Progress placement='local' />\n </StyledProgressContainer>\n )}\n </Flex>\n </Flex>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IconPicker.stories.d.ts","sourceRoot":"","sources":["../../../src/core/IconPicker/IconPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAc,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEtE,wBA0BU;AAEV,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,eAAe,CAuBjD,CAAC"}
1
+ {"version":3,"file":"IconPicker.stories.d.ts","sourceRoot":"","sources":["../../../src/core/IconPicker/IconPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAc,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEtE,wBAyBU;AAEV,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,eAAe,CAuBjD,CAAC"}
@@ -17,7 +17,6 @@ export default {
17
17
  },
18
18
  argTypes: {
19
19
  defaultSelection: { control: { type: 'text' } },
20
- initialItemsRenderLimit: { control: { type: 'number' } },
21
20
  label: { control: { type: 'text' } },
22
21
  labelHidden: { control: { type: 'boolean' } },
23
22
  info: { control: { type: 'text' } },
@@ -1 +1 @@
1
- {"version":3,"file":"IconPicker.stories.js","sourceRoot":"","sources":["../../../src/core/IconPicker/IconPicker.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE;QACJ,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EAAE,EAAE;QACf,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,gBAAgB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC/C,uBAAuB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACxD,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,WAAW,EAAE,EAAE,OAA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storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport { IconPicker, IconPickerProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/IconPicker',\n component: IconPicker,\n args: {\n defaultSelection: 'pegasus',\n label: 'IconPicker input',\n labelHidden: false,\n info: 'Type in or click to expand the Popover',\n placeholder: '',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n defaultSelection: { control: { type: 'text' } },\n initialItemsRenderLimit: { control: { type: 'number' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { 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 IconPickerDemo: Story<IconPickerProps> = args => {\n const [value, setValue] = useState(args.defaultSelection);\n\n useEffect(() => {\n setValue(args.defaultSelection);\n }, [args.defaultSelection]);\n\n return (\n <IconPicker\n defaultSelection={value}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n onSelect={(icon: string) => {\n setValue(icon);\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"IconPicker.stories.js","sourceRoot":"","sources":["../../../src/core/IconPicker/IconPicker.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE;QACJ,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EAAE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EACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE;YACzB,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport { IconPicker, IconPickerProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/IconPicker',\n component: IconPicker,\n args: {\n defaultSelection: 'pegasus',\n label: 'IconPicker input',\n labelHidden: false,\n info: 'Type in or click to expand the Popover',\n placeholder: '',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n defaultSelection: { control: { type: 'text' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { 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 IconPickerDemo: Story<IconPickerProps> = args => {\n const [value, setValue] = useState(args.defaultSelection);\n\n useEffect(() => {\n setValue(args.defaultSelection);\n }, [args.defaultSelection]);\n\n return (\n <IconPicker\n defaultSelection={value}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n onSelect={(icon: string) => {\n setValue(icon);\n }}\n />\n );\n};\n"]}
@@ -6,4 +6,13 @@ interface InputStoryProps extends InputProps {
6
6
  showAction: boolean;
7
7
  }
8
8
  export declare const InputDemo: Story<InputStoryProps>;
9
+ interface ConfigurableInputProps {
10
+ height?: string;
11
+ padding?: string;
12
+ errorStatusColor?: string;
13
+ successStatusColor?: string;
14
+ warningStatusColor?: string;
15
+ status?: InputProps['status'];
16
+ }
17
+ export declare const ConfigurableInput: Story<ConfigurableInputProps>;
9
18
  //# sourceMappingURL=Input.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAS,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAE5D,wBAGU;AAEV,UAAU,eAAgB,SAAQ,UAAU;IAC1C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CA0B5C,CAAC"}
1
+ {"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAwB,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAE3E,wBAGU;AAEV,UAAU,eAAgB,SAAQ,UAAU;IAC1C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CA0B5C,CAAC;AA+BF,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,sBAAsB,CA+B3D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Input } from '@pega/cosmos-react-core';
2
+ import { Configuration, Input } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/Input',
5
5
  component: Input
@@ -42,4 +42,41 @@ InputDemo.argTypes = {
42
42
  disabled: { control: { type: 'boolean' } },
43
43
  readOnly: { control: { type: 'boolean' } }
44
44
  };
45
+ export const ConfigurableInput = (args) => {
46
+ return (_jsx(Configuration, { theme: {
47
+ components: {
48
+ input: {
49
+ height: args.height,
50
+ padding: args.padding
51
+ },
52
+ 'form-field': {
53
+ error: {
54
+ 'status-color': args.errorStatusColor
55
+ },
56
+ success: {
57
+ 'status-color': args.successStatusColor
58
+ },
59
+ warning: {
60
+ 'status-color': args.warningStatusColor
61
+ }
62
+ }
63
+ }
64
+ }, children: _jsx(Input, { status: args.status, label: 'Input', placeholder: 'Enter your input', info: 'Enter some value' }, void 0) }, void 0));
65
+ };
66
+ ConfigurableInput.args = {
67
+ height: '2rem',
68
+ padding: '0.5rem',
69
+ errorStatusColor: '#d91c29',
70
+ successStatusColor: '#20aa50',
71
+ warningStatusColor: '#fd6000',
72
+ status: undefined
73
+ };
74
+ ConfigurableInput.argTypes = {
75
+ height: { control: { type: 'text' } },
76
+ padding: { control: { type: 'text' } },
77
+ errorStatusColor: { control: { type: 'color' } },
78
+ successStatusColor: { control: { type: 'color' } },
79
+ warningStatusColor: { control: { type: 'color' } },
80
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }
81
+ };
45
82
  //# sourceMappingURL=Input.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../../src/core/Input/Input.stories.tsx"],"names":[],"mappings":";AAEA,OA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,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Input, InputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Input',\n component: Input\n} as Meta;\n\ninterface InputStoryProps extends InputProps {\n showAction: boolean;\n}\n\nexport const InputDemo: Story<InputStoryProps> = (args: InputStoryProps) => {\n return (\n <Input\n id='input-demo'\n type={args.type}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n />\n );\n};\n\nInputDemo.args = {\n type: 'text',\n showAction: false,\n label: 'Input',\n labelHidden: false,\n info: 'Enter some value',\n placeholder: 'Enter your input',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nInputDemo.argTypes = {\n type: {\n options: ['text', 'password', 'email', 'url'],\n control: { type: 'select' }\n },\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { 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"]}
1
+ {"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../../src/core/Input/Input.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAc,MAAM,yBAAyB,CAAC;AAE3E,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;CACT,CAAC;AAMV,MAAM,CAAC,MAAM,SAAS,GAA2B,CAAC,IAAqB,EAAE,EAAE;IACzE,OAAO,CACL,KAAC,KAAK,IACJ,EAAE,EAAC,YAAY,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EACL,IAAI,CAAC,UAAU;YACb,CAAC,CAAC;gBACE;oBACE,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,MAAM;iBACb;aACF;YACH,CAAC,CAAC,SAAS,WAEf,CACH,CAAC;AACJ,CAAC,CAAC;AA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AAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Input, InputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Input',\n component: Input\n} as Meta;\n\ninterface InputStoryProps extends InputProps {\n showAction: boolean;\n}\n\nexport const InputDemo: Story<InputStoryProps> = (args: InputStoryProps) => {\n return (\n <Input\n id='input-demo'\n type={args.type}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n />\n );\n};\n\nInputDemo.args = {\n type: 'text',\n showAction: false,\n label: 'Input',\n labelHidden: false,\n info: 'Enter some value',\n placeholder: 'Enter your input',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nInputDemo.argTypes = {\n type: {\n options: ['text', 'password', 'email', 'url'],\n control: { type: 'select' }\n },\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { 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\ninterface ConfigurableInputProps {\n height?: string;\n padding?: string;\n errorStatusColor?: string;\n successStatusColor?: string;\n warningStatusColor?: string;\n status?: InputProps['status'];\n}\n\nexport const ConfigurableInput: Story<ConfigurableInputProps> = (args: ConfigurableInputProps) => {\n return (\n <Configuration\n theme={{\n components: {\n input: {\n height: args.height,\n padding: args.padding\n },\n 'form-field': {\n error: {\n 'status-color': args.errorStatusColor\n },\n success: {\n 'status-color': args.successStatusColor\n },\n warning: {\n 'status-color': args.warningStatusColor\n }\n }\n }\n }}\n >\n <Input\n status={args.status}\n label='Input'\n placeholder='Enter your input'\n info='Enter some value'\n />\n </Configuration>\n );\n};\n\nConfigurableInput.args = {\n height: '2rem',\n padding: '0.5rem',\n errorStatusColor: '#d91c29',\n successStatusColor: '#20aa50',\n warningStatusColor: '#fd6000',\n status: undefined\n};\n\nConfigurableInput.argTypes = {\n height: { control: { type: 'text' } },\n padding: { control: { type: 'text' } },\n errorStatusColor: { control: { type: 'color' } },\n successStatusColor: { control: { type: 'color' } },\n warningStatusColor: { control: { type: 'color' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }\n};\n"]}
@@ -3,4 +3,8 @@ import { LabelProps } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const LabelDemo: Story<LabelProps>;
6
+ interface ConfigurableLabelProps {
7
+ fontSize?: string;
8
+ }
9
+ export declare const ConfigurableLabel: Story<ConfigurableLabelProps>;
6
10
  //# sourceMappingURL=Label.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Label/Label.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAS,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAE5D,wBAGU;AAEV,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,UAAU,CAEvC,CAAC"}
1
+ {"version":3,"file":"Label.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Label/Label.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAwB,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAE3E,wBAGU;AAEV,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,UAAU,CAEvC,CAAC;AAUF,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,sBAAsB,CAc3D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Label } from '@pega/cosmos-react-core';
2
+ import { Configuration, Label } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/Label',
5
5
  component: Label
@@ -13,4 +13,19 @@ LabelDemo.args = {
13
13
  LabelDemo.argTypes = {
14
14
  labelHidden: { control: { type: 'boolean' } }
15
15
  };
16
+ export const ConfigurableLabel = (args) => {
17
+ return (_jsx(Configuration, { theme: {
18
+ components: {
19
+ label: {
20
+ 'font-size': args.fontSize
21
+ }
22
+ }
23
+ }, children: _jsx(Label, { children: "Label" }, void 0) }, void 0));
24
+ };
25
+ ConfigurableLabel.args = {
26
+ fontSize: 'xs'
27
+ };
28
+ ConfigurableLabel.argTypes = {
29
+ fontSize: { options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'], control: { type: 'select' } }
30
+ };
16
31
  //# sourceMappingURL=Label.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.stories.js","sourceRoot":"","sources":["../../../src/core/Label/Label.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAc,MAAM,yBAAyB,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;CACT,CAAC;AAEV,MAAM,CAAC,MAAM,SAAS,GAAsB,CAAC,IAAgB,EAAE,EAAE;IAC/D,OAAO,KAAC,KAAK,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,8BAAe,CAAC;AAC7D,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Label, LabelProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Label',\n component: Label\n} as Meta;\n\nexport const LabelDemo: Story<LabelProps> = (args: LabelProps) => {\n return <Label labelHidden={args.labelHidden}>Label</Label>;\n};\n\nLabelDemo.args = {\n labelHidden: false\n};\n\nLabelDemo.argTypes = {\n labelHidden: { control: { type: 'boolean' } }\n};\n"]}
1
+ {"version":3,"file":"Label.stories.js","sourceRoot":"","sources":["../../../src/core/Label/Label.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAc,MAAM,yBAAyB,CAAC;AAE3E,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;CACT,CAAC;AAEV,MAAM,CAAC,MAAM,SAAS,GAAsB,CAAC,IAAgB,EAAE,EAAE;IAC/D,OAAO,KAAC,KAAK,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,8BAAe,CAAC;AAC7D,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC;AAMF,MAAM,CAAC,MAAM,iBAAiB,GAAkC,CAAC,IAA4B,EAAE,EAAE;IAC/F,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,WAAW,EAAE,IAAI,CAAC,QAAQ;iBAC3B;aACF;SACF,YAED,KAAC,KAAK,gCAAc,WACN,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,iBAAiB,CAAC,IAAI,GAAG;IACvB,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC9F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Label, LabelProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Label',\n component: Label\n} as Meta;\n\nexport const LabelDemo: Story<LabelProps> = (args: LabelProps) => {\n return <Label labelHidden={args.labelHidden}>Label</Label>;\n};\n\nLabelDemo.args = {\n labelHidden: false\n};\n\nLabelDemo.argTypes = {\n labelHidden: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableLabelProps {\n fontSize?: string;\n}\n\nexport const ConfigurableLabel: Story<ConfigurableLabelProps> = (args: ConfigurableLabelProps) => {\n return (\n <Configuration\n theme={{\n components: {\n label: {\n 'font-size': args.fontSize\n }\n }\n }}\n >\n <Label>Label</Label>\n </Configuration>\n );\n};\n\nConfigurableLabel.args = {\n fontSize: 'xs'\n};\n\nConfigurableLabel.argTypes = {\n fontSize: { options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'], control: { type: 'select' } }\n};\n"]}
@@ -0,0 +1,15 @@
1
+ export declare const mockAPIImageResources: {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ mime_type: string;
6
+ media_url: string;
7
+ }[];
8
+ export declare const mockBadImageResource: {
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ mime_type: string;
13
+ media_url: string;
14
+ };
15
+ //# sourceMappingURL=Lightbox.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lightbox.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Lightbox/Lightbox.mocks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;GAgEjC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;CAOhC,CAAC"}
@@ -0,0 +1,67 @@
1
+ export const mockAPIImageResources = [
2
+ {
3
+ id: 'photo-1497752531616-c3afd9760a11',
4
+ name: 'Image 1',
5
+ description: 'Descriptive text about Image 1',
6
+ // cSpell:disable-next-line
7
+ mime_type: 'image/avif',
8
+ media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
9
+ },
10
+ {
11
+ id: 'photo-1470093851219-69951fcbb533',
12
+ name: 'Image 2',
13
+ description: 'Descriptive text about Image 2',
14
+ // cSpell:disable-next-line
15
+ mime_type: 'image/avif',
16
+ media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
17
+ },
18
+ {
19
+ id: 'photo-1447684808650-354ae64db5b8',
20
+ name: 'Image 3',
21
+ description: 'Descriptive text about Image 3',
22
+ // cSpell:disable-next-line
23
+ mime_type: 'image/avif',
24
+ media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
25
+ },
26
+ {
27
+ id: 'photo-1425082661705-1834bfd09dca',
28
+ name: 'Image 4',
29
+ description: 'Descriptive text about Image 4',
30
+ // cSpell:disable-next-line
31
+ mime_type: 'image/avif',
32
+ media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
33
+ },
34
+ {
35
+ id: 'photo-1494256997604-768d1f608cac',
36
+ name: 'Image 5',
37
+ description: 'Descriptive text about Image 5',
38
+ // cSpell:disable-next-line
39
+ mime_type: 'image/avif',
40
+ media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
41
+ },
42
+ {
43
+ id: 'photo-1500694216671-a4e54fc4b513',
44
+ name: 'Image 6',
45
+ description: 'Descriptive text about Image 6',
46
+ // cSpell:disable-next-line
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
+ // cSpell:disable-next-line
55
+ mime_type: 'image/avif',
56
+ media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
57
+ }
58
+ ];
59
+ export const mockBadImageResource = {
60
+ id: 'error',
61
+ name: 'Some image',
62
+ description: 'Descriptive text about Some image',
63
+ // cSpell:disable-next-line
64
+ mime_type: 'image/avif',
65
+ media_url: ''
66
+ };
67
+ //# 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;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EACP,wIAAwI;KAC3I;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gCAAgC;QAC7C,2BAA2B;QAC3B,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;IAChD,2BAA2B;IAC3B,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,81 +1,16 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from 'react';
3
3
  import { Button, DateTimeDisplay, Lightbox } from '@pega/cosmos-react-core';
4
+ import { mockAPIImageResources, mockBadImageResource } from './Lightbox.mocks';
4
5
  export default {
5
6
  title: 'Core/Lightbox',
6
7
  component: Lightbox
7
8
  };
8
- const mockAPIImageResources = [
9
- {
10
- id: 'photo-1497752531616-c3afd9760a11',
11
- name: 'Image 1',
12
- description: 'Descriptive text about Image 1',
13
- // cSpell:disable-next-line
14
- mime_type: 'image/avif',
15
- media_url: 'https://images.unsplash.com/photo-1497752531616-c3afd9760a11?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
16
- },
17
- {
18
- id: 'photo-1470093851219-69951fcbb533',
19
- name: 'Image 2',
20
- description: 'Descriptive text about Image 2',
21
- // cSpell:disable-next-line
22
- mime_type: 'image/avif',
23
- media_url: 'https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80'
24
- },
25
- {
26
- id: 'photo-1447684808650-354ae64db5b8',
27
- name: 'Image 3',
28
- description: 'Descriptive text about Image 3',
29
- // cSpell:disable-next-line
30
- mime_type: 'image/avif',
31
- media_url: 'https://images.unsplash.com/photo-1447684808650-354ae64db5b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2094&q=80'
32
- },
33
- {
34
- id: 'photo-1425082661705-1834bfd09dca',
35
- name: 'Image 4',
36
- description: 'Descriptive text about Image 4',
37
- // cSpell:disable-next-line
38
- mime_type: 'image/avif',
39
- media_url: 'https://images.unsplash.com/photo-1425082661705-1834bfd09dca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80'
40
- },
41
- {
42
- id: 'photo-1494256997604-768d1f608cac',
43
- name: 'Image 5',
44
- description: 'Descriptive text about Image 5',
45
- // cSpell:disable-next-line
46
- mime_type: 'image/avif',
47
- media_url: 'https://images.unsplash.com/photo-1494256997604-768d1f608cac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80'
48
- },
49
- {
50
- id: 'photo-1500694216671-a4e54fc4b513',
51
- name: 'Image 6',
52
- description: 'Descriptive text about Image 6',
53
- // cSpell:disable-next-line
54
- mime_type: 'image/avif',
55
- media_url: 'https://images.unsplash.com/photo-1500694216671-a4e54fc4b513?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2092&q=80'
56
- },
57
- {
58
- id: 'photo-1638292597251-6fe6b2ba50f9',
59
- name: 'Image 7',
60
- description: 'Descriptive text about Image 7',
61
- // cSpell:disable-next-line
62
- mime_type: 'image/avif',
63
- media_url: 'https://images.unsplash.com/photo-1638292597251-6fe6b2ba50f9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
64
- }
65
- ];
66
- const mockBadImageResource = {
67
- id: 'error',
68
- name: 'Some image',
69
- description: 'Descriptive text about Some image',
70
- // cSpell:disable-next-line
71
- mime_type: 'image/avif',
72
- media_url: ''
73
- };
74
- const BaseLightboxDemo = ({ cycle, limit, error }) => {
9
+ export const LightboxDemo = (args) => {
75
10
  const demoButtonRef = useRef(null);
76
11
  const [images, setImages] = useState(null);
77
12
  const onClick = () => {
78
- setImages((error ? [mockBadImageResource] : mockAPIImageResources.slice(0, limit)).map(({ id, name, description, mime_type, media_url }) => {
13
+ setImages((args.error ? [mockBadImageResource] : mockAPIImageResources.slice(0, args.limit)).map(({ id, name, description, mime_type, media_url }) => {
79
14
  return {
80
15
  id,
81
16
  name,
@@ -98,13 +33,19 @@ const BaseLightboxDemo = ({ cycle, limit, error }) => {
98
33
  a.click();
99
34
  document.body.removeChild(a);
100
35
  };
101
- return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: demoButtonRef, onClick: onClick, autoFocus: true, children: "Open Lightbox" }, void 0), images && (_jsx(Lightbox, { items: images, cycle: cycle, onAfterClose: () => {
36
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { ref: demoButtonRef, onClick: onClick, autoFocus: true, children: "Open Lightbox" }, void 0), images && (_jsx(Lightbox, { items: images, cycle: args.cycle || undefined, onAfterClose: () => {
102
37
  setImages(null);
103
38
  demoButtonRef.current?.focus();
104
39
  }, onItemDownload: onItemDownload }, void 0))] }, void 0));
105
40
  };
106
- export const MultiImage = () => _jsx(BaseLightboxDemo, {}, void 0);
107
- export const SingleImage = () => _jsx(BaseLightboxDemo, { limit: 1 }, void 0);
108
- export const MultiImageWithCycling = () => _jsx(BaseLightboxDemo, { cycle: true }, void 0);
109
- export const ImageLoadError = () => _jsx(BaseLightboxDemo, { error: true }, void 0);
41
+ LightboxDemo.args = {
42
+ limit: 7,
43
+ cycle: false,
44
+ error: false
45
+ };
46
+ LightboxDemo.argTypes = {
47
+ limit: { control: { type: 'number' } },
48
+ cycle: { control: { type: 'boolean' } },
49
+ error: { control: { type: 'boolean' } }
50
+ };
110
51
  //# sourceMappingURL=Lightbox.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lightbox.stories.js","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,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play,\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.js","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,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAQV,MAAM,CAAC,MAAM,YAAY,GAA8B,CAAC,IAAwB,EAAE,EAAE;IAClF,MAAM,aAAa,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgC,IAAI,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,SAAS,CACP,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CACpF,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;YAClD,OAAO;gBACL,EAAE;gBACF,IAAI;gBACJ,WAAW;gBACX,GAAG,EAAE,SAAS;gBACd,QAAQ,EAAE;oBACR,SAAS,CAAC,KAAK,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,YACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,KAAK,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,5 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Icon, registerIcon, Link } from '@pega/cosmos-react-core';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Icon, registerIcon, Flex, Link } from '@pega/cosmos-react-core';
3
3
  import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
4
4
  registerIcon(plusIcon);
5
5
  export default {
@@ -18,8 +18,11 @@ export default {
18
18
  export const LinkDemo = (args) => {
19
19
  return (_jsx(Link, { href: 'http://www.pega.com', variant: args.variant, target: '_blank', children: "Visit Pega!" }, void 0));
20
20
  };
21
- export const LinkWithIconDemo = (args) => {
22
- return (_jsx(Link, { href: 'http://www.pega.com', variant: args.variant, icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0));
21
+ export const LinkWithIconDemo = () => {
22
+ return (_jsxs(Flex, { container: { alignItems: 'center' }, children: [_jsx(Link, { href: 'http://www.pega.com', variant: 'primary', icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0), _jsx(Link, { href: 'http://www.pega.com', variant: 'secondary', icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0), _jsx(Link, { href: 'http://www.pega.com', variant: 'simple', icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0), _jsx(Link, { href: 'http://www.pega.com', variant: 'link', icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0), _jsx(Link, { href: 'http://www.pega.com', variant: 'text', icon: true, target: '_blank', children: _jsx(Icon, { name: 'plus' }, void 0) }, void 0)] }, void 0));
23
+ };
24
+ LinkWithIconDemo.argTypes = {
25
+ variant: { table: { disable: true } }
23
26
  };
24
27
  export const PreviewableLink = (args) => {
25
28
  return (_jsx(Link, { href: 'http://www.pega.com', variant: args.variant, previewable: true, target: '_blank', children: "Visit Pega!" }, void 0));
@@ -1 +1 @@
1
- {"version":3,"file":"Link.stories.js","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,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAC,QAAQ,oCAEhE,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,IAAe,EAAE,EAAE;IACpE,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,QAAC,MAAM,EAAC,QAAQ,YAC1E,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,WAAG,WACf,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,IAAe,EAAE,EAAE;IACnE,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,QAAC,MAAM,EAAC,QAAQ,oCAE5E,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.js","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,K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AAI,EAAC,MAAM,WAAG,WACf,EACP,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,QAAC,MAAM,EAAC,QAAQ,YAClE,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,WAAG,WACf,YACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,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,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,QAAC,MAAM,EAAC,QAAQ,oCAE5E,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"}