@pega/cosmos-react-demos 2.0.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 (678) hide show
  1. package/LICENSE +185 -0
  2. package/lib/build/AppHeader/AppHeader.stories.d.ts +8 -0
  3. package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
  4. package/lib/build/AppHeader/AppHeader.stories.jsx +65 -0
  5. package/lib/build/AppHeader/AppHeader.stories.jsx.map +1 -0
  6. package/lib/build/AppShell/AppShell.mocks.d.ts +50 -0
  7. package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -0
  8. package/lib/build/AppShell/AppShell.mocks.js +503 -0
  9. package/lib/build/AppShell/AppShell.mocks.js.map +1 -0
  10. package/lib/build/AppShell/AppShell.stories.d.ts +12 -0
  11. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -0
  12. package/lib/build/AppShell/AppShell.stories.jsx +194 -0
  13. package/lib/build/AppShell/AppShell.stories.jsx.map +1 -0
  14. package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
  15. package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
  16. package/lib/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
  17. package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
  18. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
  19. package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
  20. package/lib/build/FlowModeller/FlowModeller.mocks.js +411 -0
  21. package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
  22. package/lib/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
  23. package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
  24. package/lib/build/FlowModeller/FlowModeller.stories.jsx +214 -0
  25. package/lib/build/FlowModeller/FlowModeller.stories.jsx.map +1 -0
  26. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
  27. package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
  28. package/lib/build/LifeCycle/LifeCycle.mocks.js +1128 -0
  29. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
  30. package/lib/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
  31. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
  32. package/lib/build/LifeCycle/LifeCycle.stories.jsx +491 -0
  33. package/lib/build/LifeCycle/LifeCycle.stories.jsx.map +1 -0
  34. package/lib/build/LifeCycle/utils.d.ts +65 -0
  35. package/lib/build/LifeCycle/utils.d.ts.map +1 -0
  36. package/lib/build/LifeCycle/utils.js +218 -0
  37. package/lib/build/LifeCycle/utils.js.map +1 -0
  38. package/lib/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
  39. package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
  40. package/lib/build/PageTemplates/GalleryPage.stories.jsx +126 -0
  41. package/lib/build/PageTemplates/GalleryPage.stories.jsx.map +1 -0
  42. package/lib/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
  43. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
  44. package/lib/build/PageTemplates/PageTemplates.stories.jsx +434 -0
  45. package/lib/build/PageTemplates/PageTemplates.stories.jsx.map +1 -0
  46. package/lib/build/Workbench/Workbench.mocks.d.ts +9 -0
  47. package/lib/build/Workbench/Workbench.mocks.d.ts.map +1 -0
  48. package/lib/build/Workbench/Workbench.mocks.js +67 -0
  49. package/lib/build/Workbench/Workbench.mocks.js.map +1 -0
  50. package/lib/build/Workbench/Workbench.stories.d.ts +10 -0
  51. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -0
  52. package/lib/build/Workbench/Workbench.stories.jsx +124 -0
  53. package/lib/build/Workbench/Workbench.stories.jsx.map +1 -0
  54. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
  55. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
  56. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +263 -0
  57. package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -0
  58. package/lib/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
  59. package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
  60. package/lib/condition-builder/ConditionBuilder/props.mock.js +113 -0
  61. package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
  62. package/lib/core/AppShell/AppShell.mocks.d.ts +15 -0
  63. package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -0
  64. package/lib/core/AppShell/AppShell.mocks.jsx +147 -0
  65. package/lib/core/AppShell/AppShell.mocks.jsx.map +1 -0
  66. package/lib/core/AppShell/AppShell.stories.d.ts +31 -0
  67. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -0
  68. package/lib/core/AppShell/AppShell.stories.jsx +222 -0
  69. package/lib/core/AppShell/AppShell.stories.jsx.map +1 -0
  70. package/lib/core/AppShell/AppShell.styles.d.ts +2 -0
  71. package/lib/core/AppShell/AppShell.styles.d.ts.map +1 -0
  72. package/lib/core/AppShell/AppShell.styles.js +5 -0
  73. package/lib/core/AppShell/AppShell.styles.js.map +1 -0
  74. package/lib/core/Avatar/Avatar.stories.d.ts +10 -0
  75. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -0
  76. package/lib/core/Avatar/Avatar.stories.jsx +50 -0
  77. package/lib/core/Avatar/Avatar.stories.jsx.map +1 -0
  78. package/lib/core/Backdrop/Backdrop.stories.d.ts +7 -0
  79. package/lib/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
  80. package/lib/core/Backdrop/Backdrop.stories.jsx +43 -0
  81. package/lib/core/Backdrop/Backdrop.stories.jsx.map +1 -0
  82. package/lib/core/Badges/Alert.stories.d.ts +6 -0
  83. package/lib/core/Badges/Alert.stories.d.ts.map +1 -0
  84. package/lib/core/Badges/Alert.stories.jsx +15 -0
  85. package/lib/core/Badges/Alert.stories.jsx.map +1 -0
  86. package/lib/core/Badges/Count.stories.d.ts +6 -0
  87. package/lib/core/Badges/Count.stories.d.ts.map +1 -0
  88. package/lib/core/Badges/Count.stories.jsx +20 -0
  89. package/lib/core/Badges/Count.stories.jsx.map +1 -0
  90. package/lib/core/Badges/Selection.stories.d.ts +6 -0
  91. package/lib/core/Badges/Selection.stories.d.ts.map +1 -0
  92. package/lib/core/Badges/Selection.stories.jsx +9 -0
  93. package/lib/core/Badges/Selection.stories.jsx.map +1 -0
  94. package/lib/core/Badges/Status.stories.d.ts +6 -0
  95. package/lib/core/Badges/Status.stories.d.ts.map +1 -0
  96. package/lib/core/Badges/Status.stories.jsx +18 -0
  97. package/lib/core/Badges/Status.stories.jsx.map +1 -0
  98. package/lib/core/Badges/Tag.stories.d.ts +6 -0
  99. package/lib/core/Badges/Tag.stories.d.ts.map +1 -0
  100. package/lib/core/Badges/Tag.stories.jsx +9 -0
  101. package/lib/core/Badges/Tag.stories.jsx.map +1 -0
  102. package/lib/core/Banner/Banner.stories.d.ts +22 -0
  103. package/lib/core/Banner/Banner.stories.d.ts.map +1 -0
  104. package/lib/core/Banner/Banner.stories.jsx +125 -0
  105. package/lib/core/Banner/Banner.stories.jsx.map +1 -0
  106. package/lib/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
  107. package/lib/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
  108. package/lib/core/Boolean/BooleanDisplay.stories.jsx +19 -0
  109. package/lib/core/Boolean/BooleanDisplay.stories.jsx.map +1 -0
  110. package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
  111. package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
  112. package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx +29 -0
  113. package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -0
  114. package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
  115. package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
  116. package/lib/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
  117. package/lib/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
  118. package/lib/core/Button/Button.stories.d.ts +12 -0
  119. package/lib/core/Button/Button.stories.d.ts.map +1 -0
  120. package/lib/core/Button/Button.stories.jsx +103 -0
  121. package/lib/core/Button/Button.stories.jsx.map +1 -0
  122. package/lib/core/Card/Card.stories.d.ts +8 -0
  123. package/lib/core/Card/Card.stories.d.ts.map +1 -0
  124. package/lib/core/Card/Card.stories.jsx +55 -0
  125. package/lib/core/Card/Card.stories.jsx.map +1 -0
  126. package/lib/core/Card/Card.styles.d.ts +2 -0
  127. package/lib/core/Card/Card.styles.d.ts.map +1 -0
  128. package/lib/core/Card/Card.styles.js +5 -0
  129. package/lib/core/Card/Card.styles.js.map +1 -0
  130. package/lib/core/Checkbox/Checkbox.stories.d.ts +7 -0
  131. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
  132. package/lib/core/Checkbox/Checkbox.stories.jsx +28 -0
  133. package/lib/core/Checkbox/Checkbox.stories.jsx.map +1 -0
  134. package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
  135. package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
  136. package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx +60 -0
  137. package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -0
  138. package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
  139. package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
  140. package/lib/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
  141. package/lib/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
  142. package/lib/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
  143. package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
  144. package/lib/core/ColorPicker/ColorPicker.stories.jsx +91 -0
  145. package/lib/core/ColorPicker/ColorPicker.stories.jsx.map +1 -0
  146. package/lib/core/ComboBox/ComboBox.mocks.d.ts +24 -0
  147. package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
  148. package/lib/core/ComboBox/ComboBox.mocks.js +54 -0
  149. package/lib/core/ComboBox/ComboBox.mocks.js.map +1 -0
  150. package/lib/core/ComboBox/ComboBox.stories.d.ts +21 -0
  151. package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
  152. package/lib/core/ComboBox/ComboBox.stories.jsx +323 -0
  153. package/lib/core/ComboBox/ComboBox.stories.jsx.map +1 -0
  154. package/lib/core/Configuration/Configuration.stories.d.ts +10 -0
  155. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -0
  156. package/lib/core/Configuration/Configuration.stories.jsx +125 -0
  157. package/lib/core/Configuration/Configuration.stories.jsx.map +1 -0
  158. package/lib/core/Currency/Currency.stories.d.ts +11 -0
  159. package/lib/core/Currency/Currency.stories.d.ts.map +1 -0
  160. package/lib/core/Currency/Currency.stories.jsx +65 -0
  161. package/lib/core/Currency/Currency.stories.jsx.map +1 -0
  162. package/lib/core/DateTime/DateTime.stories.d.ts +20 -0
  163. package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -0
  164. package/lib/core/DateTime/DateTime.stories.jsx +127 -0
  165. package/lib/core/DateTime/DateTime.stories.jsx.map +1 -0
  166. package/lib/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
  167. package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
  168. package/lib/core/DateTime/DateTimeDisplay.stories.jsx +46 -0
  169. package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
  170. package/lib/core/DateTime/DateTimePicker.stories.d.ts +7 -0
  171. package/lib/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
  172. package/lib/core/DateTime/DateTimePicker.stories.jsx +34 -0
  173. package/lib/core/DateTime/DateTimePicker.stories.jsx.map +1 -0
  174. package/lib/core/Drawer/Drawer.stories.d.ts +7 -0
  175. package/lib/core/Drawer/Drawer.stories.d.ts.map +1 -0
  176. package/lib/core/Drawer/Drawer.stories.jsx +98 -0
  177. package/lib/core/Drawer/Drawer.stories.jsx.map +1 -0
  178. package/lib/core/Drawer/Drawer.styles.d.ts +2 -0
  179. package/lib/core/Drawer/Drawer.styles.d.ts.map +1 -0
  180. package/lib/core/Drawer/Drawer.styles.js +11 -0
  181. package/lib/core/Drawer/Drawer.styles.js.map +1 -0
  182. package/lib/core/Email/EmailDisplay.stories.d.ts +6 -0
  183. package/lib/core/Email/EmailDisplay.stories.d.ts.map +1 -0
  184. package/lib/core/Email/EmailDisplay.stories.jsx +19 -0
  185. package/lib/core/Email/EmailDisplay.stories.jsx.map +1 -0
  186. package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
  187. package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
  188. package/lib/core/EmojiPicker/EmojiPicker.stories.jsx +52 -0
  189. package/lib/core/EmojiPicker/EmojiPicker.stories.jsx.map +1 -0
  190. package/lib/core/EmptyState/EmptyState.stories.d.ts +6 -0
  191. package/lib/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
  192. package/lib/core/EmptyState/EmptyState.stories.jsx +18 -0
  193. package/lib/core/EmptyState/EmptyState.stories.jsx.map +1 -0
  194. package/lib/core/ErrorState/ErrorState.stories.d.ts +9 -0
  195. package/lib/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
  196. package/lib/core/ErrorState/ErrorState.stories.jsx +20 -0
  197. package/lib/core/ErrorState/ErrorState.stories.jsx.map +1 -0
  198. package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
  199. package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
  200. package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx +73 -0
  201. package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +1 -0
  202. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
  203. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
  204. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +12 -0
  205. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
  206. package/lib/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
  207. package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
  208. package/lib/core/FieldGroup/FieldGroup.stories.jsx +52 -0
  209. package/lib/core/FieldGroup/FieldGroup.stories.jsx.map +1 -0
  210. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +10 -0
  211. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
  212. package/lib/core/FieldGroup/FieldGroupList.stories.jsx +183 -0
  213. package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
  214. package/lib/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
  215. package/lib/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
  216. package/lib/core/FieldValueList/FieldValueList.stories.jsx +54 -0
  217. package/lib/core/FieldValueList/FieldValueList.stories.jsx.map +1 -0
  218. package/lib/core/File/FileDisplay.stories.d.ts +13 -0
  219. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -0
  220. package/lib/core/File/FileDisplay.stories.jsx +100 -0
  221. package/lib/core/File/FileDisplay.stories.jsx.map +1 -0
  222. package/lib/core/File/FileInput.stories.d.ts +9 -0
  223. package/lib/core/File/FileInput.stories.d.ts.map +1 -0
  224. package/lib/core/File/FileInput.stories.jsx +76 -0
  225. package/lib/core/File/FileInput.stories.jsx.map +1 -0
  226. package/lib/core/Flex/Flex.styles.d.ts +10 -0
  227. package/lib/core/Flex/Flex.styles.d.ts.map +1 -0
  228. package/lib/core/Flex/Flex.styles.js +41 -0
  229. package/lib/core/Flex/Flex.styles.js.map +1 -0
  230. package/lib/core/Flex/FlexContainer.stories.d.ts +20 -0
  231. package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -0
  232. package/lib/core/Flex/FlexContainer.stories.jsx +151 -0
  233. package/lib/core/Flex/FlexContainer.stories.jsx.map +1 -0
  234. package/lib/core/Flex/FlexItem.stories.d.ts +13 -0
  235. package/lib/core/Flex/FlexItem.stories.d.ts.map +1 -0
  236. package/lib/core/Flex/FlexItem.stories.jsx +71 -0
  237. package/lib/core/Flex/FlexItem.stories.jsx.map +1 -0
  238. package/lib/core/Form/Form.stories.d.ts +21 -0
  239. package/lib/core/Form/Form.stories.d.ts.map +1 -0
  240. package/lib/core/Form/Form.stories.jsx +196 -0
  241. package/lib/core/Form/Form.stories.jsx.map +1 -0
  242. package/lib/core/Grid/Grid.styles.d.ts +6 -0
  243. package/lib/core/Grid/Grid.styles.d.ts.map +1 -0
  244. package/lib/core/Grid/Grid.styles.js +36 -0
  245. package/lib/core/Grid/Grid.styles.js.map +1 -0
  246. package/lib/core/Grid/GridContainer.stories.d.ts +23 -0
  247. package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -0
  248. package/lib/core/Grid/GridContainer.stories.jsx +161 -0
  249. package/lib/core/Grid/GridContainer.stories.jsx.map +1 -0
  250. package/lib/core/Grid/GridItem.stories.d.ts +13 -0
  251. package/lib/core/Grid/GridItem.stories.d.ts.map +1 -0
  252. package/lib/core/Grid/GridItem.stories.jsx +74 -0
  253. package/lib/core/Grid/GridItem.stories.jsx.map +1 -0
  254. package/lib/core/Icon/Icon.stories.d.ts +8 -0
  255. package/lib/core/Icon/Icon.stories.d.ts.map +1 -0
  256. package/lib/core/Icon/Icon.stories.jsx +84 -0
  257. package/lib/core/Icon/Icon.stories.jsx.map +1 -0
  258. package/lib/core/IconPicker/IconPicker.stories.d.ts +6 -0
  259. package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
  260. package/lib/core/IconPicker/IconPicker.stories.jsx +39 -0
  261. package/lib/core/IconPicker/IconPicker.stories.jsx.map +1 -0
  262. package/lib/core/Image/Image.stories.d.ts +6 -0
  263. package/lib/core/Image/Image.stories.d.ts.map +1 -0
  264. package/lib/core/Image/Image.stories.jsx +9 -0
  265. package/lib/core/Image/Image.stories.jsx.map +1 -0
  266. package/lib/core/Input/Input.stories.d.ts +9 -0
  267. package/lib/core/Input/Input.stories.d.ts.map +1 -0
  268. package/lib/core/Input/Input.stories.jsx +44 -0
  269. package/lib/core/Input/Input.stories.jsx.map +1 -0
  270. package/lib/core/Label/Label.stories.d.ts +6 -0
  271. package/lib/core/Label/Label.stories.d.ts.map +1 -0
  272. package/lib/core/Label/Label.stories.jsx +15 -0
  273. package/lib/core/Label/Label.stories.jsx.map +1 -0
  274. package/lib/core/Lightbox/Lightbox.stories.d.ts +9 -0
  275. package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
  276. package/lib/core/Lightbox/Lightbox.stories.jsx +106 -0
  277. package/lib/core/Lightbox/Lightbox.stories.jsx.map +1 -0
  278. package/lib/core/Link/Link.stories.d.ts +8 -0
  279. package/lib/core/Link/Link.stories.d.ts.map +1 -0
  280. package/lib/core/Link/Link.stories.jsx +32 -0
  281. package/lib/core/Link/Link.stories.jsx.map +1 -0
  282. package/lib/core/List/CommaSeparatedList.stories.d.ts +6 -0
  283. package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
  284. package/lib/core/List/CommaSeparatedList.stories.jsx +33 -0
  285. package/lib/core/List/CommaSeparatedList.stories.jsx.map +1 -0
  286. package/lib/core/List/OrderedList.stories.d.ts +10 -0
  287. package/lib/core/List/OrderedList.stories.d.ts.map +1 -0
  288. package/lib/core/List/OrderedList.stories.jsx +38 -0
  289. package/lib/core/List/OrderedList.stories.jsx.map +1 -0
  290. package/lib/core/List/UnorderedList.stories.d.ts +10 -0
  291. package/lib/core/List/UnorderedList.stories.d.ts.map +1 -0
  292. package/lib/core/List/UnorderedList.stories.jsx +38 -0
  293. package/lib/core/List/UnorderedList.stories.jsx.map +1 -0
  294. package/lib/core/Location/Location.stories.d.ts +12 -0
  295. package/lib/core/Location/Location.stories.d.ts.map +1 -0
  296. package/lib/core/Location/Location.stories.jsx +130 -0
  297. package/lib/core/Location/Location.stories.jsx.map +1 -0
  298. package/lib/core/Menu/Menu.mocks.d.ts +4 -0
  299. package/lib/core/Menu/Menu.mocks.d.ts.map +1 -0
  300. package/lib/core/Menu/Menu.mocks.js +179 -0
  301. package/lib/core/Menu/Menu.mocks.js.map +1 -0
  302. package/lib/core/Menu/Menu.stories.d.ts +17 -0
  303. package/lib/core/Menu/Menu.stories.d.ts.map +1 -0
  304. package/lib/core/Menu/Menu.stories.jsx +166 -0
  305. package/lib/core/Menu/Menu.stories.jsx.map +1 -0
  306. package/lib/core/Menu/Menu.styles.d.ts +2 -0
  307. package/lib/core/Menu/Menu.styles.d.ts.map +1 -0
  308. package/lib/core/Menu/Menu.styles.js +6 -0
  309. package/lib/core/Menu/Menu.styles.js.map +1 -0
  310. package/lib/core/MenuButton/MenuButton.stories.d.ts +15 -0
  311. package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
  312. package/lib/core/MenuButton/MenuButton.stories.jsx +188 -0
  313. package/lib/core/MenuButton/MenuButton.stories.jsx.map +1 -0
  314. package/lib/core/MetaList/MetaList.stories.d.ts +9 -0
  315. package/lib/core/MetaList/MetaList.stories.d.ts.map +1 -0
  316. package/lib/core/MetaList/MetaList.stories.jsx +24 -0
  317. package/lib/core/MetaList/MetaList.stories.jsx.map +1 -0
  318. package/lib/core/Modal/Modal.mocks.d.ts +4 -0
  319. package/lib/core/Modal/Modal.mocks.d.ts.map +1 -0
  320. package/lib/core/Modal/Modal.mocks.jsx +44 -0
  321. package/lib/core/Modal/Modal.mocks.jsx.map +1 -0
  322. package/lib/core/Modal/Modal.stories.d.ts +20 -0
  323. package/lib/core/Modal/Modal.stories.d.ts.map +1 -0
  324. package/lib/core/Modal/Modal.stories.jsx +305 -0
  325. package/lib/core/Modal/Modal.stories.jsx.map +1 -0
  326. package/lib/core/MultiStep/MultiStep.stories.d.ts +6 -0
  327. package/lib/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
  328. package/lib/core/MultiStep/MultiStep.stories.jsx +56 -0
  329. package/lib/core/MultiStep/MultiStep.stories.jsx.map +1 -0
  330. package/lib/core/Number/Number.stories.d.ts +13 -0
  331. package/lib/core/Number/Number.stories.d.ts.map +1 -0
  332. package/lib/core/Number/Number.stories.jsx +110 -0
  333. package/lib/core/Number/Number.stories.jsx.map +1 -0
  334. package/lib/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
  335. package/lib/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
  336. package/lib/core/PageTemplates/PageTemplates.mocks.js +10 -0
  337. package/lib/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
  338. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +28 -0
  339. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
  340. package/lib/core/PageTemplates/PageTemplates.stories.jsx +233 -0
  341. package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
  342. package/lib/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
  343. package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
  344. package/lib/core/PageTemplates/PageTemplates.styles.js +31 -0
  345. package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -0
  346. package/lib/core/Pagination/Pagination.stories.d.ts +6 -0
  347. package/lib/core/Pagination/Pagination.stories.d.ts.map +1 -0
  348. package/lib/core/Pagination/Pagination.stories.jsx +19 -0
  349. package/lib/core/Pagination/Pagination.stories.jsx.map +1 -0
  350. package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
  351. package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
  352. package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +12 -0
  353. package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
  354. package/lib/core/Phone/Phone.stories.d.ts +7 -0
  355. package/lib/core/Phone/Phone.stories.d.ts.map +1 -0
  356. package/lib/core/Phone/Phone.stories.jsx +42 -0
  357. package/lib/core/Phone/Phone.stories.jsx.map +1 -0
  358. package/lib/core/Popover/Popover.stories.d.ts +8 -0
  359. package/lib/core/Popover/Popover.stories.d.ts.map +1 -0
  360. package/lib/core/Popover/Popover.stories.jsx +184 -0
  361. package/lib/core/Popover/Popover.stories.jsx.map +1 -0
  362. package/lib/core/Progress/Progress.stories.d.ts +7 -0
  363. package/lib/core/Progress/Progress.stories.d.ts.map +1 -0
  364. package/lib/core/Progress/Progress.stories.jsx +71 -0
  365. package/lib/core/Progress/Progress.stories.jsx.map +1 -0
  366. package/lib/core/Progress/Progress.styles.d.ts +2 -0
  367. package/lib/core/Progress/Progress.styles.d.ts.map +1 -0
  368. package/lib/core/Progress/Progress.styles.js +13 -0
  369. package/lib/core/Progress/Progress.styles.js.map +1 -0
  370. package/lib/core/RadioButton/RadioButton.stories.d.ts +7 -0
  371. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
  372. package/lib/core/RadioButton/RadioButton.stories.jsx +26 -0
  373. package/lib/core/RadioButton/RadioButton.stories.jsx.map +1 -0
  374. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
  375. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
  376. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +62 -0
  377. package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -0
  378. package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
  379. package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
  380. package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
  381. package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
  382. package/lib/core/Rating/Rating.stories.d.ts +6 -0
  383. package/lib/core/Rating/Rating.stories.d.ts.map +1 -0
  384. package/lib/core/Rating/Rating.stories.jsx +21 -0
  385. package/lib/core/Rating/Rating.stories.jsx.map +1 -0
  386. package/lib/core/SearchInput/SearchInput.stories.d.ts +6 -0
  387. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
  388. package/lib/core/SearchInput/SearchInput.stories.jsx +15 -0
  389. package/lib/core/SearchInput/SearchInput.stories.jsx.map +1 -0
  390. package/lib/core/Select/Select.stories.d.ts +9 -0
  391. package/lib/core/Select/Select.stories.d.ts.map +1 -0
  392. package/lib/core/Select/Select.stories.jsx +42 -0
  393. package/lib/core/Select/Select.stories.jsx.map +1 -0
  394. package/lib/core/Sentiment/Sentiment.stories.d.ts +14 -0
  395. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
  396. package/lib/core/Sentiment/Sentiment.stories.jsx +39 -0
  397. package/lib/core/Sentiment/Sentiment.stories.jsx.map +1 -0
  398. package/lib/core/Slider/Slider.stories.d.ts +11 -0
  399. package/lib/core/Slider/Slider.stories.d.ts.map +1 -0
  400. package/lib/core/Slider/Slider.stories.jsx +58 -0
  401. package/lib/core/Slider/Slider.stories.jsx.map +1 -0
  402. package/lib/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
  403. package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
  404. package/lib/core/SummaryItem/SummaryItem.stories.jsx +36 -0
  405. package/lib/core/SummaryItem/SummaryItem.stories.jsx.map +1 -0
  406. package/lib/core/SummaryList/SummaryList.mocks.d.ts +32 -0
  407. package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
  408. package/lib/core/SummaryList/SummaryList.mocks.jsx +35 -0
  409. package/lib/core/SummaryList/SummaryList.mocks.jsx.map +1 -0
  410. package/lib/core/SummaryList/SummaryList.stories.d.ts +13 -0
  411. package/lib/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
  412. package/lib/core/SummaryList/SummaryList.stories.jsx +131 -0
  413. package/lib/core/SummaryList/SummaryList.stories.jsx.map +1 -0
  414. package/lib/core/Switch/Switch.stories.d.ts +7 -0
  415. package/lib/core/Switch/Switch.stories.d.ts.map +1 -0
  416. package/lib/core/Switch/Switch.stories.jsx +26 -0
  417. package/lib/core/Switch/Switch.stories.jsx.map +1 -0
  418. package/lib/core/Switch/Switch.styles.d.ts +2 -0
  419. package/lib/core/Switch/Switch.styles.d.ts.map +1 -0
  420. package/lib/core/Switch/Switch.styles.js +13 -0
  421. package/lib/core/Switch/Switch.styles.js.map +1 -0
  422. package/lib/core/Table/Table.mocks.d.ts +19 -0
  423. package/lib/core/Table/Table.mocks.d.ts.map +1 -0
  424. package/lib/core/Table/Table.mocks.jsx +32 -0
  425. package/lib/core/Table/Table.mocks.jsx.map +1 -0
  426. package/lib/core/Table/Table.stories.d.ts +14 -0
  427. package/lib/core/Table/Table.stories.d.ts.map +1 -0
  428. package/lib/core/Table/Table.stories.jsx +58 -0
  429. package/lib/core/Table/Table.stories.jsx.map +1 -0
  430. package/lib/core/Table/Table.styles.d.ts +4 -0
  431. package/lib/core/Table/Table.styles.d.ts.map +1 -0
  432. package/lib/core/Table/Table.styles.js +9 -0
  433. package/lib/core/Table/Table.styles.js.map +1 -0
  434. package/lib/core/Tabs/Tabs.stories.d.ts +7 -0
  435. package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -0
  436. package/lib/core/Tabs/Tabs.stories.jsx +59 -0
  437. package/lib/core/Tabs/Tabs.stories.jsx.map +1 -0
  438. package/lib/core/Text/Text.stories.d.ts +6 -0
  439. package/lib/core/Text/Text.stories.d.ts.map +1 -0
  440. package/lib/core/Text/Text.stories.jsx +22 -0
  441. package/lib/core/Text/Text.stories.jsx.map +1 -0
  442. package/lib/core/TextArea/TextArea.stories.d.ts +6 -0
  443. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -0
  444. package/lib/core/TextArea/TextArea.stories.jsx +43 -0
  445. package/lib/core/TextArea/TextArea.stories.jsx.map +1 -0
  446. package/lib/core/Toaster/Toaster.stories.d.ts +6 -0
  447. package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -0
  448. package/lib/core/Toaster/Toaster.stories.jsx +17 -0
  449. package/lib/core/Toaster/Toaster.stories.jsx.map +1 -0
  450. package/lib/core/Tooltip/Tooltip.stories.d.ts +8 -0
  451. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
  452. package/lib/core/Tooltip/Tooltip.stories.jsx +18 -0
  453. package/lib/core/Tooltip/Tooltip.stories.jsx.map +1 -0
  454. package/lib/core/Tree/Tree.mocks.d.ts +2 -0
  455. package/lib/core/Tree/Tree.mocks.d.ts.map +1 -0
  456. package/lib/core/Tree/Tree.mocks.js +20 -0
  457. package/lib/core/Tree/Tree.mocks.js.map +1 -0
  458. package/lib/core/Tree/Tree.stories.d.ts +8 -0
  459. package/lib/core/Tree/Tree.stories.d.ts.map +1 -0
  460. package/lib/core/Tree/Tree.stories.jsx +89 -0
  461. package/lib/core/Tree/Tree.stories.jsx.map +1 -0
  462. package/lib/core/Tree/Tree.styles.d.ts +3 -0
  463. package/lib/core/Tree/Tree.styles.d.ts.map +1 -0
  464. package/lib/core/Tree/Tree.styles.js +10 -0
  465. package/lib/core/Tree/Tree.styles.js.map +1 -0
  466. package/lib/core/URL/URL.stories.d.ts +6 -0
  467. package/lib/core/URL/URL.stories.d.ts.map +1 -0
  468. package/lib/core/URL/URL.stories.jsx +17 -0
  469. package/lib/core/URL/URL.stories.jsx.map +1 -0
  470. package/lib/cs/Article/Article.mocks.d.ts +14 -0
  471. package/lib/cs/Article/Article.mocks.d.ts.map +1 -0
  472. package/lib/cs/Article/Article.mocks.js +14 -0
  473. package/lib/cs/Article/Article.mocks.js.map +1 -0
  474. package/lib/cs/Article/Article.stories.d.ts +15 -0
  475. package/lib/cs/Article/Article.stories.d.ts.map +1 -0
  476. package/lib/cs/Article/Article.stories.jsx +126 -0
  477. package/lib/cs/Article/Article.stories.jsx.map +1 -0
  478. package/lib/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
  479. package/lib/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
  480. package/lib/cs/ArticleList/ArticleList.mocks.js +102 -0
  481. package/lib/cs/ArticleList/ArticleList.mocks.js.map +1 -0
  482. package/lib/cs/ArticleList/ArticleList.stories.d.ts +16 -0
  483. package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
  484. package/lib/cs/ArticleList/ArticleList.stories.jsx +110 -0
  485. package/lib/cs/ArticleList/ArticleList.stories.jsx.map +1 -0
  486. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
  487. package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
  488. package/lib/cs/CSCaseView/CSAppShell.stories.jsx +275 -0
  489. package/lib/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -0
  490. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
  491. package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
  492. package/lib/cs/CSCaseView/CSCaseView.mocks.js +224 -0
  493. package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
  494. package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
  495. package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
  496. package/lib/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
  497. package/lib/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
  498. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
  499. package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
  500. package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx +188 -0
  501. package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -0
  502. package/lib/cs/DialPad/DialPad.stories.d.ts +9 -0
  503. package/lib/cs/DialPad/DialPad.stories.d.ts.map +1 -0
  504. package/lib/cs/DialPad/DialPad.stories.jsx +18 -0
  505. package/lib/cs/DialPad/DialPad.stories.jsx.map +1 -0
  506. package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
  507. package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
  508. package/lib/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
  509. package/lib/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
  510. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
  511. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
  512. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +356 -0
  513. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -0
  514. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
  515. package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
  516. package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx +32 -0
  517. package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -0
  518. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
  519. package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
  520. package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx +85 -0
  521. package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -0
  522. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
  523. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
  524. package/lib/cs/TaskManager/TaskManager.mocks.js +140 -0
  525. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -0
  526. package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -0
  527. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
  528. package/lib/cs/TaskManager/TaskManager.stories.jsx +314 -0
  529. package/lib/cs/TaskManager/TaskManager.stories.jsx.map +1 -0
  530. package/lib/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
  531. package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
  532. package/lib/dnd/DragDropList/DragDropList.stories.jsx +119 -0
  533. package/lib/dnd/DragDropList/DragDropList.stories.jsx.map +1 -0
  534. package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
  535. package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
  536. package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx +34 -0
  537. package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -0
  538. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
  539. package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
  540. package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
  541. package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
  542. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +7 -0
  543. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
  544. package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +62 -0
  545. package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
  546. package/lib/social/Chat/Chat.mocks.d.ts +385 -0
  547. package/lib/social/Chat/Chat.mocks.d.ts.map +1 -0
  548. package/lib/social/Chat/Chat.mocks.js +648 -0
  549. package/lib/social/Chat/Chat.mocks.js.map +1 -0
  550. package/lib/social/Chat/Chat.stories.d.ts +25 -0
  551. package/lib/social/Chat/Chat.stories.d.ts.map +1 -0
  552. package/lib/social/Chat/Chat.stories.jsx +537 -0
  553. package/lib/social/Chat/Chat.stories.jsx.map +1 -0
  554. package/lib/social/Chat/RepeatingView.stories.d.ts +20 -0
  555. package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -0
  556. package/lib/social/Chat/RepeatingView.stories.jsx +90 -0
  557. package/lib/social/Chat/RepeatingView.stories.jsx.map +1 -0
  558. package/lib/social/Email/Email.mocks.d.ts +87 -0
  559. package/lib/social/Email/Email.mocks.d.ts.map +1 -0
  560. package/lib/social/Email/Email.mocks.jsx +349 -0
  561. package/lib/social/Email/Email.mocks.jsx.map +1 -0
  562. package/lib/social/Email/Email.stories.d.ts +28 -0
  563. package/lib/social/Email/Email.stories.d.ts.map +1 -0
  564. package/lib/social/Email/Email.stories.jsx +798 -0
  565. package/lib/social/Email/Email.stories.jsx.map +1 -0
  566. package/lib/social/Feed/Feed.mocks.d.ts +52 -0
  567. package/lib/social/Feed/Feed.mocks.d.ts.map +1 -0
  568. package/lib/social/Feed/Feed.mocks.jsx +315 -0
  569. package/lib/social/Feed/Feed.mocks.jsx.map +1 -0
  570. package/lib/social/Feed/Feed.stories.d.ts +15 -0
  571. package/lib/social/Feed/Feed.stories.d.ts.map +1 -0
  572. package/lib/social/Feed/Feed.stories.jsx +146 -0
  573. package/lib/social/Feed/Feed.stories.jsx.map +1 -0
  574. package/lib/social/Feed/FeedNewPost.stories.d.ts +17 -0
  575. package/lib/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
  576. package/lib/social/Feed/FeedNewPost.stories.jsx +80 -0
  577. package/lib/social/Feed/FeedNewPost.stories.jsx.map +1 -0
  578. package/lib/social/Feed/FeedPost.stories.d.ts +9 -0
  579. package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -0
  580. package/lib/social/Feed/FeedPost.stories.jsx +248 -0
  581. package/lib/social/Feed/FeedPost.stories.jsx.map +1 -0
  582. package/lib/social/Feed/FeedReply.stories.d.ts +16 -0
  583. package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -0
  584. package/lib/social/Feed/FeedReply.stories.jsx +99 -0
  585. package/lib/social/Feed/FeedReply.stories.jsx.map +1 -0
  586. package/lib/social/Feed/FeedReplyInput.stories.d.ts +15 -0
  587. package/lib/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
  588. package/lib/social/Feed/FeedReplyInput.stories.jsx +59 -0
  589. package/lib/social/Feed/FeedReplyInput.stories.jsx.map +1 -0
  590. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
  591. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
  592. package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +30 -0
  593. package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
  594. package/lib/work/CaseView/Attachments.mocks.d.ts +3 -0
  595. package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -0
  596. package/lib/work/CaseView/Attachments.mocks.jsx +388 -0
  597. package/lib/work/CaseView/Attachments.mocks.jsx.map +1 -0
  598. package/lib/work/CaseView/CaseView.mocks.d.ts +11 -0
  599. package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -0
  600. package/lib/work/CaseView/CaseView.mocks.jsx +126 -0
  601. package/lib/work/CaseView/CaseView.mocks.jsx.map +1 -0
  602. package/lib/work/CaseView/CaseView.stories.d.ts +34 -0
  603. package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -0
  604. package/lib/work/CaseView/CaseView.stories.jsx +264 -0
  605. package/lib/work/CaseView/CaseView.stories.jsx.map +1 -0
  606. package/lib/work/CaseView/Details.mocks.d.ts +3 -0
  607. package/lib/work/CaseView/Details.mocks.d.ts.map +1 -0
  608. package/lib/work/CaseView/Details.mocks.jsx +21 -0
  609. package/lib/work/CaseView/Details.mocks.jsx.map +1 -0
  610. package/lib/work/CaseView/FileService.mock.d.ts +28 -0
  611. package/lib/work/CaseView/FileService.mock.d.ts.map +1 -0
  612. package/lib/work/CaseView/FileService.mock.jsx +139 -0
  613. package/lib/work/CaseView/FileService.mock.jsx.map +1 -0
  614. package/lib/work/CaseView/MobileCaseView.stories.d.ts +11 -0
  615. package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
  616. package/lib/work/CaseView/MobileCaseView.stories.jsx +27 -0
  617. package/lib/work/CaseView/MobileCaseView.stories.jsx.map +1 -0
  618. package/lib/work/CaseView/Pulse.mocks.d.ts +6 -0
  619. package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -0
  620. package/lib/work/CaseView/Pulse.mocks.jsx +35 -0
  621. package/lib/work/CaseView/Pulse.mocks.jsx.map +1 -0
  622. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
  623. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
  624. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +195 -0
  625. package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -0
  626. package/lib/work/Confirmation/Confirmation.stories.d.ts +9 -0
  627. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
  628. package/lib/work/Confirmation/Confirmation.stories.jsx +17 -0
  629. package/lib/work/Confirmation/Confirmation.stories.jsx.map +1 -0
  630. package/lib/work/Details/Details.stories.d.ts +5 -0
  631. package/lib/work/Details/Details.stories.d.ts.map +1 -0
  632. package/lib/work/Details/Details.stories.jsx +65 -0
  633. package/lib/work/Details/Details.stories.jsx.map +1 -0
  634. package/lib/work/Glimpse/Glimpse.stories.d.ts +10 -0
  635. package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
  636. package/lib/work/Glimpse/Glimpse.stories.jsx +39 -0
  637. package/lib/work/Glimpse/Glimpse.stories.jsx.map +1 -0
  638. package/lib/work/SearchResults/SearchResults.mocks.d.ts +8 -0
  639. package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
  640. package/lib/work/SearchResults/SearchResults.mocks.jsx +96 -0
  641. package/lib/work/SearchResults/SearchResults.mocks.jsx.map +1 -0
  642. package/lib/work/SearchResults/SearchResults.stories.d.ts +8 -0
  643. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
  644. package/lib/work/SearchResults/SearchResults.stories.jsx +205 -0
  645. package/lib/work/SearchResults/SearchResults.stories.jsx.map +1 -0
  646. package/lib/work/Stages/Stages.stories.d.ts +11 -0
  647. package/lib/work/Stages/Stages.stories.d.ts.map +1 -0
  648. package/lib/work/Stages/Stages.stories.jsx +65 -0
  649. package/lib/work/Stages/Stages.stories.jsx.map +1 -0
  650. package/lib/work/Stakeholders/Stakeholders.stories.d.ts +9 -0
  651. package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
  652. package/lib/work/Stakeholders/Stakeholders.stories.jsx +118 -0
  653. package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
  654. package/lib/work/Tags/Tags.mocks.d.ts +3 -0
  655. package/lib/work/Tags/Tags.mocks.d.ts.map +1 -0
  656. package/lib/work/Tags/Tags.mocks.js +76 -0
  657. package/lib/work/Tags/Tags.mocks.js.map +1 -0
  658. package/lib/work/Tags/Tags.stories.d.ts +10 -0
  659. package/lib/work/Tags/Tags.stories.d.ts.map +1 -0
  660. package/lib/work/Tags/Tags.stories.jsx +61 -0
  661. package/lib/work/Tags/Tags.stories.jsx.map +1 -0
  662. package/lib/work/Tasks/TaskList.stories.d.ts +5 -0
  663. package/lib/work/Tasks/TaskList.stories.d.ts.map +1 -0
  664. package/lib/work/Tasks/TaskList.stories.jsx +17 -0
  665. package/lib/work/Tasks/TaskList.stories.jsx.map +1 -0
  666. package/lib/work/Tasks/Tasks.stories.d.ts +9 -0
  667. package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -0
  668. package/lib/work/Tasks/Tasks.stories.jsx +101 -0
  669. package/lib/work/Tasks/Tasks.stories.jsx.map +1 -0
  670. package/lib/work/Timeline/Timeline.mocks.d.ts +3 -0
  671. package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -0
  672. package/lib/work/Timeline/Timeline.mocks.jsx +129 -0
  673. package/lib/work/Timeline/Timeline.mocks.jsx.map +1 -0
  674. package/lib/work/Timeline/Timeline.stories.d.ts +7 -0
  675. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -0
  676. package/lib/work/Timeline/Timeline.stories.jsx +43 -0
  677. package/lib/work/Timeline/Timeline.stories.jsx.map +1 -0
  678. package/package.json +47 -0
@@ -0,0 +1,42 @@
1
+ import { Select, Option } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/Select',
4
+ component: Select
5
+ };
6
+ export const SelectDemo = (args) => {
7
+ return (<Select id='select-demo' label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} actions={args.showAction
8
+ ? [
9
+ {
10
+ id: 'config',
11
+ text: 'Configure',
12
+ icon: 'gear'
13
+ }
14
+ ]
15
+ : undefined}>
16
+ <Option>Choose an option…</Option>
17
+ <Option>Option 1</Option>
18
+ <Option>Option 2</Option>
19
+ <Option>Option 3</Option>
20
+ </Select>);
21
+ };
22
+ SelectDemo.args = {
23
+ showAction: false,
24
+ label: 'Select input',
25
+ labelHidden: false,
26
+ info: 'Choose a value',
27
+ status: undefined,
28
+ required: false,
29
+ disabled: false,
30
+ readOnly: false
31
+ };
32
+ SelectDemo.argTypes = {
33
+ showAction: { control: { type: 'boolean' } },
34
+ label: { control: { type: 'text' } },
35
+ labelHidden: { control: { type: 'boolean' } },
36
+ info: { control: { type: 'text' } },
37
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
38
+ required: { control: { type: 'boolean' } },
39
+ disabled: { control: { type: 'boolean' } },
40
+ readOnly: { control: { type: 'boolean' } }
41
+ };
42
+ //# sourceMappingURL=Select.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.stories.jsx","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,aAAa,CAChB,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,IAAI,CAAC,CAAC,IAAI,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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 { Select, SelectProps, Option } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,14 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SentimentProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface SentimentStoryProps extends SentimentProps {
6
+ positiveLabel: string;
7
+ neutralLabel: string;
8
+ negativeLabel: string;
9
+ positiveIcon: string;
10
+ neutralIcon: string;
11
+ negativeIcon: string;
12
+ }
13
+ export declare const SentimentDemo: Story<SentimentStoryProps>;
14
+ //# sourceMappingURL=Sentiment.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAa,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAEpE,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { Sentiment } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/Sentiment',
4
+ component: Sentiment
5
+ };
6
+ export const SentimentDemo = (args) => {
7
+ const icons = {
8
+ positive: args.positiveIcon,
9
+ neutral: args.neutralIcon,
10
+ negative: args.negativeIcon
11
+ };
12
+ const labels = {
13
+ positive: args.positiveLabel,
14
+ neutral: args.neutralLabel,
15
+ negative: args.negativeLabel
16
+ };
17
+ return (<Sentiment variant={args.variant} labelHidden={args.labelHidden} icons={icons} labels={labels}/>);
18
+ };
19
+ SentimentDemo.args = {
20
+ variant: 'positive',
21
+ labelHidden: false,
22
+ positiveLabel: 'Yay!',
23
+ positiveIcon: 'face-happy-solid',
24
+ neutralLabel: 'Hm…',
25
+ neutralIcon: 'face-blank-solid',
26
+ negativeLabel: 'Uh-oh!',
27
+ negativeIcon: 'face-sad-solid'
28
+ };
29
+ SentimentDemo.argTypes = {
30
+ variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },
31
+ labelHidden: { control: { type: 'boolean' } },
32
+ positiveLabel: { control: { type: 'text' } },
33
+ positiveIcon: { control: { type: 'text' } },
34
+ neutralLabel: { control: { type: 'text' } },
35
+ neutralIcon: { control: { type: 'text' } },
36
+ negativeLabel: { control: { type: 'text' } },
37
+ negativeIcon: { control: { type: 'text' } }
38
+ };
39
+ //# sourceMappingURL=Sentiment.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sentiment.stories.jsx","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,CAAC,YAAY;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,aAAa;QAC5B,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,QAAQ,EAAE,IAAI,CAAC,aAAa;KAC7B,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAC9B,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,KAAK;IAClB,aAAa,EAAE,MAAM;IACrB,YAAY,EAAE,kBAAkB;IAChC,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,kBAAkB;IAC/B,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,gBAAgB;CAC/B,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtF,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const icons = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={icons}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { control: { type: 'text' } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { control: { type: 'text' } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { control: { type: 'text' } }\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SliderProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface SliderStoryProps extends SliderProps {
6
+ min: number;
7
+ max: number;
8
+ step: number;
9
+ }
10
+ export declare const SliderDemo: Story<SliderStoryProps>;
11
+ //# sourceMappingURL=Slider.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAGU;AAGV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAoC9C,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { useState } from 'react';
2
+ import { Slider } from '@pega/cosmos-react-core';
3
+ export default {
4
+ title: 'Core/Slider',
5
+ component: Slider
6
+ };
7
+ export const SliderDemo = (args) => {
8
+ const [value, setValue] = useState(args.value);
9
+ let ticksObject = args.ticks;
10
+ if (args.max > args.min && !ticksObject) {
11
+ ticksObject = {};
12
+ const numTicks = Math.floor((args.max - args.min) / (args.step || 1)) + 1;
13
+ Array(numTicks)
14
+ .fill(0)
15
+ .map((_, index) => args.min + index * args.step)
16
+ .forEach(tick => {
17
+ ticksObject[tick] = tick.toString();
18
+ });
19
+ }
20
+ return (<Slider orientation={args.orientation} step={args.step} min={args.min} max={args.max} ticks={ticksObject} showProgress={args.showProgress} preview={args.preview} showInput={args.showInput} label={args.label} labelHidden={args.labelHidden} info={args.info} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly} value={value} onChange={(changeValue) => setValue(changeValue)}/>);
21
+ };
22
+ SliderDemo.args = {
23
+ orientation: 'vertical',
24
+ step: 1,
25
+ min: 0,
26
+ max: 10,
27
+ value: 5,
28
+ ticks: undefined,
29
+ showProgress: true,
30
+ preview: false,
31
+ showInput: true,
32
+ label: 'Slider input',
33
+ labelHidden: false,
34
+ info: 'Pick a value',
35
+ status: undefined,
36
+ required: false,
37
+ disabled: false,
38
+ readOnly: false
39
+ };
40
+ SliderDemo.argTypes = {
41
+ orientation: { options: ['vertical', 'horizontal'], control: { type: 'inline-radio' } },
42
+ step: { control: { type: 'number' } },
43
+ min: { control: { type: 'number' } },
44
+ max: { control: { type: 'number' } },
45
+ value: { control: { type: 'number' } },
46
+ ticks: { control: { type: 'object' } },
47
+ showProgress: { control: { type: 'boolean' } },
48
+ preview: { control: { type: 'boolean' } },
49
+ showInput: { control: { type: 'boolean' } },
50
+ label: { control: { type: 'text' } },
51
+ labelHidden: { control: { type: 'boolean' } },
52
+ info: { control: { type: 'text' } },
53
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
54
+ required: { control: { type: 'boolean' } },
55
+ disabled: { control: { type: 'boolean' } },
56
+ readOnly: { control: { type: 'boolean' } }
57
+ };
58
+ //# sourceMappingURL=Slider.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.stories.jsx","sourceRoot":"","sources":["../../../src/core/Slider/Slider.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AASV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,WAAW,GAAyB,IAAI,CAAC,KAAK,CAAC;IAEnD,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;QACvC,WAAW,GAAG,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC1E,KAAK,CAAC,QAAQ,CAAC;aACZ,IAAI,CAAC,CAAC,CAAC;aACP,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,IAAI,C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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';\nimport { useState } from 'react';\n\nimport { Slider, SliderProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Slider',\n component: Slider\n} as Meta;\n\n// Necessary to prevent linting undefined errors since these will never be undefined in the demo\ninterface SliderStoryProps extends SliderProps {\n min: number;\n max: number;\n step: number;\n}\n\nexport const SliderDemo: Story<SliderStoryProps> = (args: SliderStoryProps) => {\n const [value, setValue] = useState(args.value);\n let ticksObject: SliderProps['ticks'] = args.ticks;\n\n if (args.max > args.min && !ticksObject) {\n ticksObject = {};\n const numTicks = Math.floor((args.max - args.min) / (args.step || 1)) + 1;\n Array(numTicks)\n .fill(0)\n .map((_, index) => args.min + index * args.step)\n .forEach(tick => {\n ticksObject![tick] = tick.toString();\n });\n }\n\n return (\n <Slider\n orientation={args.orientation}\n step={args.step}\n min={args.min}\n max={args.max}\n ticks={ticksObject}\n showProgress={args.showProgress}\n preview={args.preview}\n showInput={args.showInput}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n value={value}\n onChange={(changeValue: number) => setValue(changeValue)}\n />\n );\n};\n\nSliderDemo.args = {\n orientation: 'vertical',\n step: 1,\n min: 0,\n max: 10,\n value: 5,\n ticks: undefined,\n showProgress: true,\n preview: false,\n showInput: true,\n label: 'Slider input',\n labelHidden: false,\n info: 'Pick a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSliderDemo.argTypes = {\n orientation: { options: ['vertical', 'horizontal'], control: { type: 'inline-radio' } },\n step: { control: { type: 'number' } },\n min: { control: { type: 'number' } },\n max: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n ticks: { control: { type: 'object' } },\n showProgress: { control: { type: 'boolean' } },\n preview: { control: { type: 'boolean' } },\n showInput: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SummaryItemProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface SummaryItemStoryProps extends SummaryItemProps {
6
+ showSecondary: boolean;
7
+ showVisual: boolean;
8
+ showActions: boolean;
9
+ }
10
+ export declare const SummaryItemDemo: Story<SummaryItemStoryProps>;
11
+ //# sourceMappingURL=SummaryItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryItem/SummaryItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAOL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;;AAEjC,wBAMU;AAEV,UAAU,qBAAsB,SAAQ,gBAAgB;IACtD,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CA+CxD,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { Avatar, Link, MenuButton, MetaList, Status, SummaryItem } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/SummaryItem',
4
+ component: SummaryItem,
5
+ parameters: {
6
+ layout: 'centered'
7
+ }
8
+ };
9
+ export const SummaryItemDemo = (args) => {
10
+ return (<SummaryItem primary='This is the primary info' secondary={args.showSecondary ? (<MetaList items={[
11
+ 'email@example.com',
12
+ <Status variant='success'>Verified</Status>,
13
+ <>
14
+ Go to{' '}
15
+ <Link href='https://www.pega.com' target='_blank'>
16
+ Pega.com
17
+ </Link>
18
+ </>
19
+ ]}/>) : undefined} visual={args.showVisual ? (<Avatar size='l' name='Random Man' imageSrc='https://randomuser.me/api/portraits/men/41.jpg'/>) : undefined} actions={args.showActions ? (<MenuButton text='Options' variant='simple' icon='more' iconOnly menu={{
20
+ items: ['Option Number 1', 'Option Number 2', 'Option Number 3'].map(name => ({
21
+ id: name,
22
+ primary: name
23
+ }))
24
+ }}/>) : undefined}/>);
25
+ };
26
+ SummaryItemDemo.args = {
27
+ showSecondary: true,
28
+ showVisual: true,
29
+ showActions: true
30
+ };
31
+ SummaryItemDemo.argTypes = {
32
+ showSecondary: { control: { type: 'boolean' } },
33
+ showVisual: { control: { type: 'boolean' } },
34
+ showActions: { control: { type: 'boolean' } }
35
+ };
36
+ //# sourceMappingURL=SummaryItem.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryItem.stories.jsx","sourceRoot":"","sources":["../../../src/core/SummaryItem/SummaryItem.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,MAAM,EACN,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAQV,MAAM,CAAC,MAAM,eAAe,GAAiC,CAAC,IAA2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C,QAAQ,GAAG;IACzB,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC/C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Avatar,\n Link,\n MenuButton,\n MetaList,\n Status,\n SummaryItem,\n SummaryItemProps\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SummaryItem',\n component: SummaryItem,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\ninterface SummaryItemStoryProps extends SummaryItemProps {\n showSecondary: boolean;\n showVisual: boolean;\n showActions: boolean;\n}\n\nexport const SummaryItemDemo: Story<SummaryItemStoryProps> = (args: SummaryItemStoryProps) => {\n return (\n <SummaryItem\n primary='This is the primary info'\n secondary={\n args.showSecondary ? (\n <MetaList\n items={[\n 'email@example.com',\n <Status variant='success'>Verified</Status>,\n <>\n Go to{' '}\n <Link href='https://www.pega.com' target='_blank'>\n Pega.com\n </Link>\n </>\n ]}\n />\n ) : undefined\n }\n visual={\n args.showVisual ? (\n <Avatar\n size='l'\n name='Random Man'\n imageSrc='https://randomuser.me/api/portraits/men/41.jpg'\n />\n ) : undefined\n }\n actions={\n args.showActions ? (\n <MenuButton\n text='Options'\n variant='simple'\n icon='more'\n iconOnly\n menu={{\n items: ['Option Number 1', 'Option Number 2', 'Option Number 3'].map(name => ({\n id: name,\n primary: name\n }))\n }}\n />\n ) : undefined\n }\n />\n );\n};\n\nSummaryItemDemo.args = {\n showSecondary: true,\n showVisual: true,\n showActions: true\n};\n\nSummaryItemDemo.argTypes = {\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,32 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ export interface MockListItem {
3
+ id: string;
4
+ primary: string;
5
+ secondary: ReactNode;
6
+ visual: ReactNode;
7
+ data?: {
8
+ [key: string]: unknown;
9
+ };
10
+ [key: string]: unknown;
11
+ }
12
+ export interface MockUserAPIResponse {
13
+ results: MockUser[];
14
+ }
15
+ export interface MockUser {
16
+ name: {
17
+ title: string;
18
+ first: string;
19
+ last: string;
20
+ };
21
+ email: string;
22
+ picture: {
23
+ large: string;
24
+ medium: string;
25
+ thumbnail: string;
26
+ };
27
+ }
28
+ export declare const getMockUsers: (limit?: number, fields?: string[]) => Promise<MockUserAPIResponse>;
29
+ export declare const useMockListData: (cb: () => void, { count }?: {
30
+ count?: number | undefined;
31
+ }) => [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>];
32
+ //# sourceMappingURL=SummaryList.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryList.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAIjF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,eAAO,MAAM,YAAY,WAChB,MAAM,WACL,MAAM,EAAE,KACf,QAAQ,mBAAmB,CAI7B,CAAC;AA+BF,eAAO,MAAM,eAAe,OACtB,MAAM,IAAI;;MAEb,CAAC,YAAY,EAAE,EAAE,SAAS,eAAe,YAAY,EAAE,CAAC,CAAC,CAa3D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { Avatar, EmailDisplay, useAfterInitialEffect } from '@pega/cosmos-react-core';
3
+ export const getMockUsers = async (limit = 3, fields = ['name', 'email', 'picture']) => {
4
+ return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res => res.json());
5
+ };
6
+ const getMockListItem = ({ name: { first: firstName, last: lastName }, email, picture: { thumbnail } }) => {
7
+ const fullName = `${firstName} ${lastName}`;
8
+ return {
9
+ data: {
10
+ id: email,
11
+ firstName,
12
+ lastName,
13
+ email,
14
+ thumbnail
15
+ },
16
+ id: email,
17
+ primary: fullName,
18
+ secondary: (<div>
19
+ <EmailDisplay value={email}/>
20
+ </div>),
21
+ visual: <Avatar size='l' name={fullName} imageSrc={thumbnail}/>
22
+ };
23
+ };
24
+ export const useMockListData = (cb, { count } = { count: undefined }) => {
25
+ const [items, setItems] = useState([]);
26
+ useEffect(() => {
27
+ (async () => {
28
+ const { results } = await getMockUsers(count);
29
+ setItems(results.map(getMockListItem));
30
+ })();
31
+ }, [count]);
32
+ useAfterInitialEffect(cb, [items]);
33
+ return [items, setItems];
34
+ };
35
+ //# sourceMappingURL=SummaryList.mocks.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryList.mocks.jsx","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.mocks.tsx"],"names":[],"mappings":"AAAA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,EAAE;IAC9D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,qBAAqB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { Dispatch, ReactNode, SetStateAction, useEffect, useState } from 'react';\n\nimport { Avatar, EmailDisplay, useAfterInitialEffect } from '@pega/cosmos-react-core';\n\nexport interface MockListItem {\n id: string;\n primary: string;\n secondary: ReactNode;\n visual: ReactNode;\n data?: {\n [key: string]: unknown;\n };\n [key: string]: unknown;\n}\n\nexport interface MockUserAPIResponse {\n results: MockUser[];\n}\n\nexport interface MockUser {\n name: {\n title: string;\n first: string;\n last: string;\n };\n email: string;\n picture: {\n large: string;\n medium: string;\n thumbnail: string;\n };\n}\n\nexport const getMockUsers = async (\n limit: number = 3,\n fields: string[] = ['name', 'email', 'picture']\n): Promise<MockUserAPIResponse> => {\n return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res =>\n res.json()\n );\n};\n\nconst getMockListItem = ({\n name: { first: firstName, last: lastName },\n email,\n picture: { thumbnail }\n}: {\n name: { first: string; last: string };\n email: string;\n picture: { thumbnail: string };\n}): MockListItem => {\n const fullName = `${firstName} ${lastName}`;\n return {\n data: {\n id: email,\n firstName,\n lastName,\n email,\n thumbnail\n },\n id: email,\n primary: fullName,\n secondary: (\n <div>\n <EmailDisplay value={email} />\n </div>\n ),\n visual: <Avatar size='l' name={fullName} imageSrc={thumbnail} />\n };\n};\n\nexport const useMockListData = (\n cb: () => void,\n { count }: { count?: number } = { count: undefined }\n): [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>] => {\n const [items, setItems] = useState<MockListItem[]>([]);\n\n useEffect(() => {\n (async () => {\n const { results } = await getMockUsers(count);\n setItems(results.map(getMockListItem));\n })();\n }, [count]);\n\n useAfterInitialEffect(cb, [items]);\n\n return [items, setItems];\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SummaryListProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface SummaryListStoryProps extends SummaryListProps {
6
+ showSecondary?: boolean;
7
+ showVisual?: boolean;
8
+ showActions?: boolean;
9
+ noItems?: boolean;
10
+ }
11
+ export declare const SummaryListDemo: Story<SummaryListStoryProps>;
12
+ export declare const SummaryListViewAll: Story<SummaryListStoryProps>;
13
+ //# sourceMappingURL=SummaryList.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAML,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;;AAIjC,wBA4BU;AAEV,UAAU,qBAAsB,SAAQ,gBAAgB;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,qBAAqB,CAmDxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAqG3D,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { useContext, useMemo, useState } from 'react';
2
+ import { icons, Modal, ModalManagerContext, SummaryList, ViewAll, createStringMatcher } from '@pega/cosmos-react-core';
3
+ import { useMockListData } from './SummaryList.mocks';
4
+ export default {
5
+ title: 'Core/SummaryList',
6
+ component: SummaryList,
7
+ parameters: {
8
+ layout: 'centered'
9
+ },
10
+ args: {
11
+ name: 'People',
12
+ icon: 'users-solid',
13
+ count: 5,
14
+ loading: false,
15
+ showSecondary: true,
16
+ showVisual: true,
17
+ showActions: true,
18
+ noItems: false,
19
+ noItemsText: 'No items'
20
+ },
21
+ argTypes: {
22
+ name: { control: { type: 'text' } },
23
+ icon: { options: icons, control: { type: 'select' } },
24
+ count: { control: { type: 'number' } },
25
+ loading: { control: { type: 'boolean' } },
26
+ showSecondary: { control: { type: 'boolean' } },
27
+ showVisual: { control: { type: 'boolean' } },
28
+ showActions: { control: { type: 'boolean' } },
29
+ noItems: { control: { type: 'boolean' } },
30
+ noItemsText: { control: { type: 'text' } }
31
+ }
32
+ };
33
+ export const SummaryListDemo = (args) => {
34
+ const { create: createModal } = useContext(ModalManagerContext);
35
+ const [loading, setLoading] = useState(true);
36
+ const [items] = useMockListData(() => {
37
+ setLoading(false);
38
+ }, { count: args.count });
39
+ const itemsToRender = items.map(item => {
40
+ return {
41
+ ...item,
42
+ secondary: args.showSecondary ? item.secondary : undefined,
43
+ visual: args.showVisual ? item.visual : undefined,
44
+ actions: args.showActions
45
+ ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({
46
+ text,
47
+ id: text
48
+ }))
49
+ : undefined
50
+ };
51
+ });
52
+ return (<SummaryList name={args.name} icon={args.icon} count={args.loading || loading ? undefined : args.count} items={args.noItems ? [] : itemsToRender} loading={args.loading || loading} noItemsText={args.noItemsText} actions={[
53
+ {
54
+ text: `Add new ${args.name}`,
55
+ id: `${args.name}:addNew`,
56
+ icon: 'plus',
57
+ onClick() {
58
+ createModal(() => {
59
+ return (<Modal heading={`Add new ${args.name}`}>
60
+ {`Content for adding new ${args.name} goes here…`}
61
+ </Modal>);
62
+ });
63
+ }
64
+ }
65
+ ]}/>);
66
+ };
67
+ export const SummaryListViewAll = (args) => {
68
+ const SummaryListViewAllModal = ({ name, count, loading }) => {
69
+ const [search, setSearch] = useState('');
70
+ const [modalLoading, setModalLoading] = useState(true);
71
+ const [items] = useMockListData(() => {
72
+ setModalLoading(false);
73
+ }, {
74
+ count
75
+ });
76
+ const itemsToRender = useMemo(() => {
77
+ if (search.trim()) {
78
+ const filterRegex = createStringMatcher(search, 'boundary');
79
+ return items.filter(({ primary }) => filterRegex.test(primary));
80
+ }
81
+ return items;
82
+ }, [items, search]);
83
+ return (<Modal heading={args.name}>
84
+ <ViewAll loading={loading || modalLoading} items={itemsToRender} actions={[
85
+ {
86
+ id: 'addNew',
87
+ text: `Add ${name}`
88
+ }
89
+ ]} searchInputProps={{ onSearchChange: setSearch }}/>
90
+ </Modal>);
91
+ };
92
+ const { create: createModal } = useContext(ModalManagerContext);
93
+ const [loading, setLoading] = useState(true);
94
+ const [items] = useMockListData(() => {
95
+ setLoading(false);
96
+ }, { count: 3 });
97
+ const itemsToRender = items.map(item => {
98
+ return {
99
+ ...item,
100
+ secondary: args.showSecondary ? item.secondary : undefined,
101
+ visual: args.showVisual ? item.visual : undefined,
102
+ actions: args.showActions
103
+ ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({
104
+ text,
105
+ id: text
106
+ }))
107
+ : undefined
108
+ };
109
+ });
110
+ return (<SummaryList name={args.name} icon={args.icon} count={args.loading || loading ? undefined : args.count} items={args.noItems ? [] : itemsToRender} loading={args.loading || loading} noItemsText={args.noItemsText} actions={[
111
+ {
112
+ text: `Add new ${args.name}`,
113
+ id: `${args.name}:addNew`,
114
+ icon: 'plus',
115
+ onClick() {
116
+ createModal(() => {
117
+ return (<Modal heading={`Add new ${args.name}`}>
118
+ {`Content for adding new ${args.name} goes here…`}
119
+ </Modal>);
120
+ });
121
+ }
122
+ }
123
+ ]} onViewAll={() => {
124
+ createModal(SummaryListViewAllModal, {
125
+ name: args.name,
126
+ count: args.count,
127
+ loading: args.loading
128
+ });
129
+ }}/>);
130
+ };
131
+ //# sourceMappingURL=SummaryList.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryList.stories.jsx","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;KACxB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACnC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACrD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACtC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACzC,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EA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CAAC,GAAG,EAAE;wBACf,OAAO,CACL,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,CACrC;kBAAA,CAAC,0BAA0B,IAAI,CAAC,IAAI,aAAa,CACnD;gBAAA,EAAE,KAAK,CAAC,CACT,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;aACF;SACF,CAAC,CACF,SAAS,CAAC,CAAC,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SwitchProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const SwitchDemo: Story<SwitchProps>;
6
+ export declare const SwitchInCard: Story<SwitchProps>;
7
+ //# sourceMappingURL=Switch.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAgB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAIpE,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { useState } from 'react';
2
+ import { Card, Switch } from '@pega/cosmos-react-core';
3
+ import { StyledCard } from './Switch.styles';
4
+ export default {
5
+ title: 'Core/Switch',
6
+ component: Switch,
7
+ args: {
8
+ label: 'Toggle on/off',
9
+ disabled: false
10
+ },
11
+ argTypes: {
12
+ label: { control: { type: 'text' } },
13
+ disabled: { control: { type: 'boolean' } }
14
+ }
15
+ };
16
+ export const SwitchDemo = (args) => {
17
+ const [on, setOn] = useState(false);
18
+ return (<Switch id='switch' on={on} onChange={() => setOn(curr => !curr)} label={args.label} disabled={args.disabled}/>);
19
+ };
20
+ export const SwitchInCard = (args) => {
21
+ const [on, setOn] = useState(false);
22
+ return (<Card as={StyledCard}>
23
+ <Switch id='switch' on={on} onChange={() => setOn(curr => !curr)} label={args.label} disabled={args.disabled}/>
24
+ </Card>);
25
+ };
26
+ //# sourceMappingURL=Switch.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.stories.jsx","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,CAAC,MAAM,CACL,EAAE,CAAC,QAAQ,CACX,EAAE,CAAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACpE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACnB;MAAA,CAAC,MAAM,CACL,EAAE,CAAC,QAAQ,CACX,EAAE,CAAC,CAAC,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAE5B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const StyledCard: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, {}, never>;
2
+ //# sourceMappingURL=Switch.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,6GAarB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '@pega/cosmos-react-core';
3
+ export const StyledCard = styled.article(props => {
4
+ const { theme: { base: { spacing } } } = props;
5
+ return css `
6
+ margin: calc(2 * ${spacing});
7
+ padding: ${spacing};
8
+ height: max-content;
9
+ width: max-content;
10
+ `;
11
+ });
12
+ StyledCard.defaultProps = defaultThemeProp;
13
+ //# sourceMappingURL=Switch.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.styles.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;IAC/C,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;uBACW,OAAO;eACf,OAAO;;;GAGnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledCard = styled.article(props => {\n const {\n theme: {\n base: { spacing }\n }\n } = props;\n\n return css`\n margin: calc(2 * ${spacing});\n padding: ${spacing};\n height: max-content;\n width: max-content;\n `;\n});\n\nStyledCard.defaultProps = defaultThemeProp;\n"]}