@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,18 @@
1
+ import { EmptyState } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/EmptyState',
4
+ component: EmptyState,
5
+ parameters: {
6
+ layout: 'centered'
7
+ }
8
+ };
9
+ export const EmptyStateDemo = (args) => {
10
+ return <EmptyState message={args.message}/>;
11
+ };
12
+ EmptyStateDemo.args = {
13
+ message: 'No items'
14
+ };
15
+ EmptyStateDemo.argTypes = {
16
+ message: { control: { type: 'text' } }
17
+ };
18
+ //# sourceMappingURL=EmptyState.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.stories.jsx","sourceRoot":"","sources":["../../../src/core/EmptyState/EmptyState.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,cAAc,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAC9E,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAG,CAAC;AAC/C,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,OAAO,EAAE,UAAU;CACpB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { EmptyState, EmptyStateProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/EmptyState',\n component: EmptyState,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const EmptyStateDemo: Story<EmptyStateProps> = (args: EmptyStateProps) => {\n return <EmptyState message={args.message} />;\n};\n\nEmptyStateDemo.args = {\n message: 'No items'\n};\n\nEmptyStateDemo.argTypes = {\n message: { control: { type: 'text' } }\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { ErrorStateProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface ErrorStateStoryProps extends ErrorStateProps {
6
+ displayRetry?: boolean;
7
+ }
8
+ export declare const ErrorStateDemo: Story<ErrorStateStoryProps>;
9
+ //# sourceMappingURL=ErrorState.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorState.stories.d.ts","sourceRoot":"","sources":["../../../src/core/ErrorState/ErrorState.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAc,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEtE,wBAMU;AAEV,UAAU,oBAAqB,SAAQ,eAAe;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,oBAAoB,CAEtD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ErrorState } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/ErrorState',
4
+ component: ErrorState,
5
+ parameters: {
6
+ layout: 'centered'
7
+ }
8
+ };
9
+ export const ErrorStateDemo = (args) => {
10
+ return <ErrorState message={args.message} onRetry={args.displayRetry ? () => { } : undefined}/>;
11
+ };
12
+ ErrorStateDemo.args = {
13
+ message: 'Unknown error',
14
+ displayRetry: false
15
+ };
16
+ ErrorStateDemo.argTypes = {
17
+ message: { control: { type: 'text' } },
18
+ displayRetry: { control: { type: 'boolean' } }
19
+ };
20
+ //# sourceMappingURL=ErrorState.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorState.stories.jsx","sourceRoot":"","sources":["../../../src/core/ErrorState/ErrorState.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAMV,MAAM,CAAC,MAAM,cAAc,GAAgC,CAAC,IAA0B,EAAE,EAAE;IACxF,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAG,CAAC;AAClG,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC/C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { ErrorState, ErrorStateProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/ErrorState',\n component: ErrorState,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\ninterface ErrorStateStoryProps extends ErrorStateProps {\n displayRetry?: boolean;\n}\n\nexport const ErrorStateDemo: Story<ErrorStateStoryProps> = (args: ErrorStateStoryProps) => {\n return <ErrorState message={args.message} onRetry={args.displayRetry ? () => {} : undefined} />;\n};\n\nErrorStateDemo.args = {\n message: 'Unknown error',\n displayRetry: false\n};\n\nErrorStateDemo.argTypes = {\n message: { control: { type: 'text' } },\n displayRetry: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { ExpandCollapseProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const VerticalExpandCollapse: Story<ExpandCollapseProps>;
6
+ export declare const HorizontalExpandCollapse: Story<ExpandCollapseProps>;
7
+ //# sourceMappingURL=ExpandCollapse.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandCollapse.stories.d.ts","sourceRoot":"","sources":["../../../src/core/ExpandCollapse/ExpandCollapse.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA0B,mBAAmB,EAAc,MAAM,yBAAyB,CAAC;;AAIlG,wBAaU;AAEV,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,mBAAmB,CAoC7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,mBAAmB,CAyC/D,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { useState } from 'react';
2
+ import { Button, ExpandCollapse, Flex, Text } from '@pega/cosmos-react-core';
3
+ import { StyledRegion } from './ExpandCollapse.styles';
4
+ export default {
5
+ title: 'Core/ExpandCollapse',
6
+ component: ExpandCollapse,
7
+ args: {
8
+ min: '',
9
+ max: '',
10
+ transitionSpeed: '0.25s'
11
+ },
12
+ argTypes: {
13
+ min: { control: { type: 'text' } },
14
+ max: { control: { type: 'text' } },
15
+ transitionSpeed: { control: { type: 'text' } }
16
+ }
17
+ };
18
+ export const VerticalExpandCollapse = (args) => {
19
+ const [collapsed, setCollapsed] = useState(true);
20
+ return (<Flex container={{ direction: 'column' }}>
21
+ <StyledRegion>
22
+ <Button onClick={() => setCollapsed(curState => !curState)}>
23
+ {collapsed ? 'Expand' : 'Collapse '}
24
+ </Button>
25
+ </StyledRegion>
26
+
27
+ <ExpandCollapse dimension='height' collapsed={collapsed} min={args.min} max={args.max} transitionSpeed={args.transitionSpeed} nullWhenCollapsed>
28
+ <StyledRegion innerRegion>
29
+ <Text>
30
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
31
+ incididunt ut ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
32
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
33
+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
34
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
35
+ mollit anim id est laborum.
36
+ </Text>
37
+ </StyledRegion>
38
+ </ExpandCollapse>
39
+
40
+ <StyledRegion>
41
+ <Text>This content is outside of the ExpandCollapse and so it will always be visible.</Text>
42
+ </StyledRegion>
43
+ </Flex>);
44
+ };
45
+ export const HorizontalExpandCollapse = (args) => {
46
+ const [collapsed, setCollapsed] = useState(true);
47
+ const [showText, setShowText] = useState(false);
48
+ return (<Flex container>
49
+ <StyledRegion>
50
+ <Button onClick={() => setCollapsed(curState => !curState)}>
51
+ {collapsed ? 'Expand' : 'Collapse '}
52
+ </Button>
53
+ </StyledRegion>
54
+
55
+ <ExpandCollapse dimension='width' collapsed={collapsed} min={args.min} max={args.max} transitionSpeed={args.transitionSpeed} nullWhenCollapsed onAfterExpand={() => setShowText(true)} onBeforeCollapse={() => setShowText(false)}>
56
+ <StyledRegion innerRegion>
57
+ {showText && (<Text>
58
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
59
+ incididunt ut ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
60
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
61
+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
62
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
63
+ mollit anim id est laborum.
64
+ </Text>)}
65
+ </StyledRegion>
66
+ </ExpandCollapse>
67
+
68
+ <StyledRegion>
69
+ <Text>This content is outside of the ExpandCollapse and so it will always be visible.</Text>
70
+ </StyledRegion>
71
+ </Flex>);
72
+ };
73
+ //# sourceMappingURL=ExpandCollapse.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"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,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CACtC,iBAAiB,CACjB,aAAa,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CACvC,gBAAgB,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAE3C;QAAA,CAAC,YAAY,CAAC,WAAW,CACvB;UAAA,CAAC,QAAQ,IAAI,CACX,CAAC,IAAI,CACH;;;;;;;YAMF,EAAE,IAAI,CAAC,CACR,CACH;QAAA,EAAE,YAAY,CAChB;MAAA,EAAE,cAAc,CAEhB;;MAAA,CAAC,YAAY,CACX;QAAA,CAAC,IAAI,CAAC,+EAA+E,EAAE,IAAI,CAC7F;MAAA,EAAE,YAAY,CAChB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Button, ExpandCollapse, ExpandCollapseProps, Flex, Text } from '@pega/cosmos-react-core';\n\nimport { StyledRegion } from './ExpandCollapse.styles';\n\nexport default {\n title: 'Core/ExpandCollapse',\n component: ExpandCollapse,\n args: {\n min: '',\n max: '',\n transitionSpeed: '0.25s'\n },\n argTypes: {\n min: { control: { type: 'text' } },\n max: { control: { type: 'text' } },\n transitionSpeed: { control: { type: 'text' } }\n }\n} as Meta;\n\nexport const VerticalExpandCollapse: Story<ExpandCollapseProps> = (args: ExpandCollapseProps) => {\n const [collapsed, setCollapsed] = useState(true);\n\n return (\n <Flex container={{ direction: 'column' }}>\n <StyledRegion>\n <Button onClick={() => setCollapsed(curState => !curState)}>\n {collapsed ? 'Expand' : 'Collapse '}\n </Button>\n </StyledRegion>\n\n <ExpandCollapse\n dimension='height'\n collapsed={collapsed}\n min={args.min}\n max={args.max}\n transitionSpeed={args.transitionSpeed}\n nullWhenCollapsed\n >\n <StyledRegion innerRegion>\n <Text>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud\n exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt\n mollit anim id est laborum.\n </Text>\n </StyledRegion>\n </ExpandCollapse>\n\n <StyledRegion>\n <Text>This content is outside of the ExpandCollapse and so it will always be visible.</Text>\n </StyledRegion>\n </Flex>\n );\n};\n\nexport const HorizontalExpandCollapse: Story<ExpandCollapseProps> = (args: ExpandCollapseProps) => {\n const [collapsed, setCollapsed] = useState(true);\n const [showText, setShowText] = useState(false);\n\n return (\n <Flex container>\n <StyledRegion>\n <Button onClick={() => setCollapsed(curState => !curState)}>\n {collapsed ? 'Expand' : 'Collapse '}\n </Button>\n </StyledRegion>\n\n <ExpandCollapse\n dimension='width'\n collapsed={collapsed}\n min={args.min}\n max={args.max}\n transitionSpeed={args.transitionSpeed}\n nullWhenCollapsed\n onAfterExpand={() => setShowText(true)}\n onBeforeCollapse={() => setShowText(false)}\n >\n <StyledRegion innerRegion>\n {showText && (\n <Text>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud\n exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt\n mollit anim id est laborum.\n </Text>\n )}\n </StyledRegion>\n </ExpandCollapse>\n\n <StyledRegion>\n <Text>This content is outside of the ExpandCollapse and so it will always be visible.</Text>\n </StyledRegion>\n </Flex>\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const StyledRegion: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ innerRegion?: boolean | undefined;
3
+ }, never>;
4
+ //# sourceMappingURL=ExpandCollapse.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandCollapse.styles.d.ts","sourceRoot":"","sources":["../../../src/core/ExpandCollapse/ExpandCollapse.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;SASvB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '@pega/cosmos-react-core';
3
+ export const StyledRegion = styled.div(({ innerRegion, theme }) => {
4
+ return css `
5
+ background-color: ${theme.base.palette[innerRegion ? 'primary-background' : 'secondary-background']};
6
+ padding: calc(4 * ${theme.base.spacing});
7
+ display: flex;
8
+ justify-content: center;
9
+ `;
10
+ });
11
+ StyledRegion.defaultProps = defaultThemeProp;
12
+ //# sourceMappingURL=ExpandCollapse.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandCollapse.styles.js","sourceRoot":"","sources":["../../../src/core/ExpandCollapse/ExpandCollapse.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,YAAY,GAAG,MAAM,CAAC,GAAG,CAA4B,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3F,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CACpC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,CAC5D;wBACmB,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAGvC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledRegion = styled.div<{ innerRegion?: boolean }>(({ innerRegion, theme }) => {\n return css`\n background-color: ${theme.base.palette[\n innerRegion ? 'primary-background' : 'secondary-background'\n ]};\n padding: calc(4 * ${theme.base.spacing});\n display: flex;\n justify-content: center;\n `;\n});\n\nStyledRegion.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,11 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ interface FieldGroupStoryProps {
5
+ firstGroupName: string;
6
+ firstGroupCollapsible: boolean;
7
+ secondGroupName: string;
8
+ secondGroupCollapsible: boolean;
9
+ }
10
+ export declare const FieldGroupDemo: Story<FieldGroupStoryProps>;
11
+ //# sourceMappingURL=FieldGroup.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAY/C,wBAGU;AAEV,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,oBAAoB,CAmCtD,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { DateInput, FieldGroup, Grid, Input, Select, Option, TextArea } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/FieldGroup',
4
+ component: FieldGroup
5
+ };
6
+ export const FieldGroupDemo = (args) => {
7
+ return (<Grid container={{ rowGap: 1 }}>
8
+ <FieldGroup name={args.firstGroupName} collapsible={args.firstGroupCollapsible}>
9
+ <Grid container={{ gap: 1, cols: 'repeat(auto-fit, minmax(min(40ch, 100%), 1fr))' }}>
10
+ <Input type='text' label='Text 1'/>
11
+ <Select label='Select 1'>
12
+ <Option value='A'>Option 1A</Option>
13
+ <Option value='B'>Option 1B</Option>
14
+ </Select>
15
+ <DateInput label='Date 1'/>
16
+ <Grid item={{ colStart: '1', colEnd: '-1' }}>
17
+ <TextArea label='TextArea 1'/>
18
+ </Grid>
19
+ <Input required type='text' label='Required 1'/>
20
+ <Input disabled type='text' label='Disabled 1'/>
21
+ </Grid>
22
+ </FieldGroup>
23
+ <FieldGroup name={args.secondGroupName} collapsible={args.secondGroupCollapsible}>
24
+ <Grid container={{ gap: 1, cols: 'repeat(auto-fill, minmax(min(40ch, 100%), 1fr))' }}>
25
+ <Input type='text' label='Text 2'/>
26
+ <Select label='Select 2'>
27
+ <Option value='A'>Option 2A</Option>
28
+ <Option value='B'>Option 2B</Option>
29
+ </Select>
30
+ <DateInput label='Date 2'/>
31
+ <Grid item={{ colStart: '1', colEnd: '-1' }}>
32
+ <TextArea label='TextArea 2'/>
33
+ </Grid>
34
+ <Input required type='text' label='Required 2'/>
35
+ <Input disabled type='text' label='Disabled 2'/>
36
+ </Grid>
37
+ </FieldGroup>
38
+ </Grid>);
39
+ };
40
+ FieldGroupDemo.args = {
41
+ firstGroupName: 'Field group 1',
42
+ firstGroupCollapsible: true,
43
+ secondGroupName: 'Field group 2',
44
+ secondGroupCollapsible: true
45
+ };
46
+ FieldGroupDemo.argTypes = {
47
+ firstGroupName: { control: { type: 'text' } },
48
+ firstGroupCollapsible: { control: { type: 'boolean' } },
49
+ secondGroupName: { control: { type: 'text' } },
50
+ secondGroupCollapsible: { control: { type: 'boolean' } }
51
+ };
52
+ //# sourceMappingURL=FieldGroup.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldGroup.stories.jsx","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroup.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACT,MAAM,yBAAyB,CAAC;AA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MAAM,EAAE,EAAE;IAC7C,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvD,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACzD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n DateInput,\n FieldGroup,\n Grid,\n Input,\n Select,\n Option,\n TextArea\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/FieldGroup',\n component: FieldGroup\n} as Meta;\n\ninterface FieldGroupStoryProps {\n firstGroupName: string;\n firstGroupCollapsible: boolean;\n secondGroupName: string;\n secondGroupCollapsible: boolean;\n}\n\nexport const FieldGroupDemo: Story<FieldGroupStoryProps> = (args: FieldGroupStoryProps) => {\n return (\n <Grid container={{ rowGap: 1 }}>\n <FieldGroup name={args.firstGroupName} collapsible={args.firstGroupCollapsible}>\n <Grid container={{ gap: 1, cols: 'repeat(auto-fit, minmax(min(40ch, 100%), 1fr))' }}>\n <Input type='text' label='Text 1' />\n <Select label='Select 1'>\n <Option value='A'>Option 1A</Option>\n <Option value='B'>Option 1B</Option>\n </Select>\n <DateInput label='Date 1' />\n <Grid item={{ colStart: '1', colEnd: '-1' }}>\n <TextArea label='TextArea 1' />\n </Grid>\n <Input required type='text' label='Required 1' />\n <Input disabled type='text' label='Disabled 1' />\n </Grid>\n </FieldGroup>\n <FieldGroup name={args.secondGroupName} collapsible={args.secondGroupCollapsible}>\n <Grid container={{ gap: 1, cols: 'repeat(auto-fill, minmax(min(40ch, 100%), 1fr))' }}>\n <Input type='text' label='Text 2' />\n <Select label='Select 2'>\n <Option value='A'>Option 2A</Option>\n <Option value='B'>Option 2B</Option>\n </Select>\n <DateInput label='Date 2' />\n <Grid item={{ colStart: '1', colEnd: '-1' }}>\n <TextArea label='TextArea 2' />\n </Grid>\n <Input required type='text' label='Required 2' />\n <Input disabled type='text' label='Disabled 2' />\n </Grid>\n </FieldGroup>\n </Grid>\n );\n};\n\nFieldGroupDemo.args = {\n firstGroupName: 'Field group 1',\n firstGroupCollapsible: true,\n secondGroupName: 'Field group 2',\n secondGroupCollapsible: true\n};\n\nFieldGroupDemo.argTypes = {\n firstGroupName: { control: { type: 'text' } },\n firstGroupCollapsible: { control: { type: 'boolean' } },\n secondGroupName: { control: { type: 'text' } },\n secondGroupCollapsible: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").FunctionComponent<import("@pega/cosmos-react-core").FieldGroupListProps & import("@pega/cosmos-react-core").ForwardProps>;
5
+ };
6
+ export default _default;
7
+ export declare const ExpensesDemo: () => JSX.Element;
8
+ export declare const InsuranceDemo: () => JSX.Element;
9
+ export declare const FieldGroupListDemo: () => JSX.Element;
10
+ //# sourceMappingURL=FieldGroupList.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldGroupList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.stories.tsx"],"names":[],"mappings":";;;;;AAkBA,wBAGE;AA+FF,eAAO,MAAM,YAAY,mBAiDxB,CAAC;AAiCF,eAAO,MAAM,aAAa,mBAkDzB,CAAC;AAoBF,eAAO,MAAM,kBAAkB,mBAwB9B,CAAC"}
@@ -0,0 +1,183 @@
1
+ import { useReducer } from 'react';
2
+ import { action } from '@storybook/addon-actions';
3
+ import { Button, createUID, DateInput, FieldGroupList, FileInput, Form, Input, Select, Option, Text, TextArea } from '@pega/cosmos-react-core';
4
+ export default {
5
+ title: 'Core/FieldGroupList',
6
+ component: FieldGroupList
7
+ };
8
+ const fieldGroupReducer = (groupMeta, FieldRenderer) => (items, payload) => {
9
+ switch (payload.action) {
10
+ case 'add':
11
+ return [
12
+ ...items,
13
+ {
14
+ name: `${groupMeta.label} ${items.length + 1}`,
15
+ id: createUID(),
16
+ children: groupMeta.fields.map(props => <FieldRenderer {...props} key={props.label}/>)
17
+ }
18
+ ];
19
+ case 'delete':
20
+ return items
21
+ .filter(group => group.id !== payload.id)
22
+ .map((group, i) => ({ ...group, name: `${groupMeta.label} ${i + 1}` }));
23
+ default:
24
+ return items;
25
+ }
26
+ };
27
+ const ExpensesFieldRenderer = ({ label, type }) => {
28
+ if (type === 'text') {
29
+ return <Input label={label}/>;
30
+ }
31
+ if (type === 'select') {
32
+ return (<Select label={label}>
33
+ <Option>Select</Option>
34
+ <Option>Advertising</Option>
35
+ <Option>Car and truck expenses</Option>
36
+ <Option>Commissions and fees</Option>
37
+ <Option>Contract labor</Option>
38
+ <Option>Legal and professional services</Option>
39
+ <Option>Office expense</Option>
40
+ <Option>Rent or lease</Option>
41
+ <Option>Vehicles, machinery, and equipment</Option>
42
+ <Option>Repairs and maintenance</Option>
43
+ <Option>Travel and meals</Option>
44
+ <Option>Deductible meals</Option>
45
+ <Option>Utilities</Option>
46
+ <Option>Other</Option>
47
+ </Select>);
48
+ }
49
+ if (type === 'file') {
50
+ return <FileInput label={label} multiple/>;
51
+ }
52
+ if (type === 'textarea') {
53
+ return <TextArea label={label}/>;
54
+ }
55
+ if (type === 'date') {
56
+ return <DateInput label={label}/>;
57
+ }
58
+ return null;
59
+ };
60
+ const expensesGroupMeta = {
61
+ label: 'Expense',
62
+ fields: [
63
+ { type: 'select', label: 'Type of expense' },
64
+ { type: 'date', label: 'Date of expense' },
65
+ { type: 'file', label: 'Receipts' },
66
+ { type: 'textarea', label: 'Notes' }
67
+ ]
68
+ };
69
+ export const ExpensesDemo = () => {
70
+ const [state, dispatch] = useReducer(fieldGroupReducer(expensesGroupMeta, ExpensesFieldRenderer), undefined, () => [
71
+ {
72
+ name: `${expensesGroupMeta.label} 1`,
73
+ id: createUID(),
74
+ children: expensesGroupMeta.fields.map(ExpensesFieldRenderer)
75
+ }
76
+ ]);
77
+ return (<Form actions={<>
78
+ <Button name='Cancel' variant='secondary' onClick={(e) => {
79
+ action('Click')(`${e.currentTarget.name}:${e.type}`);
80
+ }}>
81
+ Cancel
82
+ </Button>
83
+ <Button name='Submit' type='submit' variant='primary'>
84
+ Submit
85
+ </Button>
86
+ </>} onSubmit={(e) => {
87
+ e.preventDefault();
88
+ action('Submit')(`Form:${e.type}`);
89
+ }} style={{ margin: 'auto', maxWidth: '37.5rem' }}>
90
+ <Text variant='h2'>Expense report</Text>
91
+ <FieldGroupList items={state} onAdd={() => {
92
+ dispatch({ action: 'add' });
93
+ }} onDelete={id => {
94
+ dispatch({ action: 'delete', id });
95
+ }}/>
96
+ </Form>);
97
+ };
98
+ const InsuranceFieldRenderer = ({ label, type }) => {
99
+ if (type === 'text') {
100
+ return <Input label={label}/>;
101
+ }
102
+ if (type === 'select') {
103
+ return (<Select label={label}>
104
+ <Option>Select</Option>
105
+ <Option>Mother</Option>
106
+ <Option>Father</Option>
107
+ <Option>Guardian</Option>
108
+ <Option>Child</Option>
109
+ <Option>Spouse</Option>
110
+ <Option>Sibling</Option>
111
+ <Option>Other</Option>
112
+ </Select>);
113
+ }
114
+ return null;
115
+ };
116
+ const insuranceGroupMeta = {
117
+ label: 'Entry',
118
+ fields: [
119
+ { type: 'text', label: 'First name' },
120
+ { type: 'text', label: 'Last name' },
121
+ { type: 'select', label: 'Relationship' }
122
+ ]
123
+ };
124
+ export const InsuranceDemo = () => {
125
+ const [state, dispatch] = useReducer(fieldGroupReducer(insuranceGroupMeta, InsuranceFieldRenderer), undefined, () => [
126
+ {
127
+ name: `${insuranceGroupMeta.label} 1`,
128
+ id: createUID(),
129
+ children: insuranceGroupMeta.fields.map(InsuranceFieldRenderer)
130
+ }
131
+ ]);
132
+ return (<Form actions={<>
133
+ <Button name='Cancel' variant='secondary' onClick={(e) => {
134
+ action('Click')(`${e.currentTarget.name}:${e.type}`);
135
+ }}>
136
+ Cancel
137
+ </Button>
138
+ <Button name='Submit' type='submit' variant='primary'>
139
+ Submit
140
+ </Button>
141
+ </>} onSubmit={(e) => {
142
+ e.preventDefault();
143
+ action('Submit')(`Form:${e.type}`);
144
+ }} style={{ margin: 'auto', maxWidth: '37.5rem' }}>
145
+ <Text variant='h1'>Insurance step 1</Text>
146
+ <Text variant='h2'>Dependants</Text>
147
+ <FieldGroupList items={state} onAdd={() => {
148
+ dispatch({ action: 'add' });
149
+ }} onDelete={id => {
150
+ dispatch({ action: 'delete', id });
151
+ }}/>
152
+ </Form>);
153
+ };
154
+ const DemoFieldRenderer = ({ label, type }) => {
155
+ if (type === 'text') {
156
+ return <Input label={label}/>;
157
+ }
158
+ return null;
159
+ };
160
+ const demoGroupMeta = {
161
+ label: 'Applicant',
162
+ fields: [
163
+ {
164
+ type: 'text',
165
+ label: 'Applicant name'
166
+ }
167
+ ]
168
+ };
169
+ export const FieldGroupListDemo = () => {
170
+ const [state, dispatch] = useReducer(fieldGroupReducer(demoGroupMeta, DemoFieldRenderer), undefined, () => [
171
+ {
172
+ name: `${demoGroupMeta.label} 1`,
173
+ id: createUID(),
174
+ children: demoGroupMeta.fields.map(DemoFieldRenderer)
175
+ }
176
+ ]);
177
+ return (<FieldGroupList items={state} onAdd={() => {
178
+ dispatch({ action: 'add' });
179
+ }} onDelete={id => {
180
+ dispatch({ action: 'delete', id });
181
+ }}/>);
182
+ };
183
+ //# sourceMappingURL=FieldGroupList.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldGroupList.stories.jsx","sourceRoot":"","sources":["../../../src/core/FieldGroup/FieldGroupList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyB,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,cAAc,EAEd,SAAS,EACT,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,C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CAClC,iBAAiB,CAAC,aAAa,EAAE,iBAAiB,CAAC,EACnD,SAAS,EACT,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,GAAG,aAAa,CAAC,KAAK,IAAI;YAChC,EAAE,EAAE,SAAS,EAAE;YACf,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC;SACtD;KACF,CACF,CAAC;IAEF,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,GAAG,EAAE;YACV,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9B,CAAC,CAAC,CACF,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE;YACb,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACrC,CAAC,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useReducer, MouseEvent, FormEvent } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n Button,\n createUID,\n DateInput,\n FieldGroupList,\n FieldGroupListItemProps,\n FileInput,\n Form,\n Input,\n Select,\n Option,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/FieldGroupList',\n component: FieldGroupList\n};\n\ntype FieldGroupReducerPayload =\n | {\n action: 'add';\n }\n | {\n action: 'delete';\n id: string;\n };\n\ninterface FieldMeta {\n label: string;\n type: 'text' | 'date' | 'file' | 'select' | 'textarea';\n}\n\ninterface GroupMeta {\n label: string;\n fields: FieldMeta[];\n}\n\nconst fieldGroupReducer =\n (groupMeta: GroupMeta, FieldRenderer: (props: FieldMeta) => JSX.Element | null) =>\n (\n items: FieldGroupListItemProps[],\n payload: FieldGroupReducerPayload\n ): FieldGroupListItemProps[] => {\n switch (payload.action) {\n case 'add':\n return [\n ...items,\n {\n name: `${groupMeta.label} ${items.length + 1}`,\n id: createUID(),\n children: groupMeta.fields.map(props => <FieldRenderer {...props} key={props.label} />)\n }\n ];\n\n case 'delete':\n return items\n .filter(group => group.id !== payload.id)\n .map((group, i) => ({ ...group, name: `${groupMeta.label} ${i + 1}` }));\n\n default:\n return items;\n }\n };\n\nconst ExpensesFieldRenderer = ({ label, type }: FieldMeta) => {\n if (type === 'text') {\n return <Input label={label} />;\n }\n if (type === 'select') {\n return (\n <Select label={label}>\n <Option>Select</Option>\n <Option>Advertising</Option>\n <Option>Car and truck expenses</Option>\n <Option>Commissions and fees</Option>\n <Option>Contract labor</Option>\n <Option>Legal and professional services</Option>\n <Option>Office expense</Option>\n <Option>Rent or lease</Option>\n <Option>Vehicles, machinery, and equipment</Option>\n <Option>Repairs and maintenance</Option>\n <Option>Travel and meals</Option>\n <Option>Deductible meals</Option>\n <Option>Utilities</Option>\n <Option>Other</Option>\n </Select>\n );\n }\n if (type === 'file') {\n return <FileInput label={label} multiple />;\n }\n if (type === 'textarea') {\n return <TextArea label={label} />;\n }\n if (type === 'date') {\n return <DateInput label={label} />;\n }\n\n return null;\n};\n\nconst expensesGroupMeta: GroupMeta = {\n label: 'Expense',\n fields: [\n { type: 'select', label: 'Type of expense' },\n { type: 'date', label: 'Date of expense' },\n { type: 'file', label: 'Receipts' },\n { type: 'textarea', label: 'Notes' }\n ]\n};\n\nexport const ExpensesDemo = () => {\n const [state, dispatch] = useReducer(\n fieldGroupReducer(expensesGroupMeta, ExpensesFieldRenderer),\n undefined,\n () => [\n {\n name: `${expensesGroupMeta.label} 1`,\n id: createUID(),\n children: expensesGroupMeta.fields.map(ExpensesFieldRenderer)\n }\n ]\n );\n\n return (\n <Form\n actions={\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n action('Click')(`${e.currentTarget.name}:${e.type}`);\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n }\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n action('Submit')(`Form:${e.type}`);\n }}\n style={{ margin: 'auto', maxWidth: '37.5rem' }}\n >\n <Text variant='h2'>Expense report</Text>\n <FieldGroupList\n items={state}\n onAdd={() => {\n dispatch({ action: 'add' });\n }}\n onDelete={id => {\n dispatch({ action: 'delete', id });\n }}\n />\n </Form>\n );\n};\n\nconst InsuranceFieldRenderer = ({ label, type }: FieldMeta) => {\n if (type === 'text') {\n return <Input label={label} />;\n }\n if (type === 'select') {\n return (\n <Select label={label}>\n <Option>Select</Option>\n <Option>Mother</Option>\n <Option>Father</Option>\n <Option>Guardian</Option>\n <Option>Child</Option>\n <Option>Spouse</Option>\n <Option>Sibling</Option>\n <Option>Other</Option>\n </Select>\n );\n }\n\n return null;\n};\n\nconst insuranceGroupMeta: GroupMeta = {\n label: 'Entry',\n fields: [\n { type: 'text', label: 'First name' },\n { type: 'text', label: 'Last name' },\n { type: 'select', label: 'Relationship' }\n ]\n};\n\nexport const InsuranceDemo = () => {\n const [state, dispatch] = useReducer(\n fieldGroupReducer(insuranceGroupMeta, InsuranceFieldRenderer),\n undefined,\n () => [\n {\n name: `${insuranceGroupMeta.label} 1`,\n id: createUID(),\n children: insuranceGroupMeta.fields.map(InsuranceFieldRenderer)\n }\n ]\n );\n\n return (\n <Form\n actions={\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n action('Click')(`${e.currentTarget.name}:${e.type}`);\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n }\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n action('Submit')(`Form:${e.type}`);\n }}\n style={{ margin: 'auto', maxWidth: '37.5rem' }}\n >\n <Text variant='h1'>Insurance step 1</Text>\n <Text variant='h2'>Dependants</Text>\n <FieldGroupList\n items={state}\n onAdd={() => {\n dispatch({ action: 'add' });\n }}\n onDelete={id => {\n dispatch({ action: 'delete', id });\n }}\n />\n </Form>\n );\n};\n\nconst DemoFieldRenderer = ({ label, type }: FieldMeta) => {\n if (type === 'text') {\n return <Input label={label} />;\n }\n\n return null;\n};\n\nconst demoGroupMeta: GroupMeta = {\n label: 'Applicant',\n fields: [\n {\n type: 'text',\n label: 'Applicant name'\n }\n ]\n};\n\nexport const FieldGroupListDemo = () => {\n const [state, dispatch] = useReducer(\n fieldGroupReducer(demoGroupMeta, DemoFieldRenderer),\n undefined,\n () => [\n {\n name: `${demoGroupMeta.label} 1`,\n id: createUID(),\n children: demoGroupMeta.fields.map(DemoFieldRenderer)\n }\n ]\n );\n\n return (\n <FieldGroupList\n items={state}\n onAdd={() => {\n dispatch({ action: 'add' });\n }}\n onDelete={id => {\n dispatch({ action: 'delete', id });\n }}\n />\n );\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FieldValueListProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface FieldValueListStoryProps extends FieldValueListProps {
6
+ name: string;
7
+ value: string;
8
+ }
9
+ export declare const FieldValueListDemo: Story<FieldValueListStoryProps>;
10
+ //# sourceMappingURL=FieldValueList.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldValueList.stories.d.ts","sourceRoot":"","sources":["../../../src/core/FieldValueList/FieldValueList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAkB,mBAAmB,EAAsB,MAAM,yBAAyB,CAAC;;AAElG,wBAGU;AAEV,UAAU,wBAAyB,SAAQ,mBAAmB;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,wBAAwB,CA4C9D,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { FieldValueList, Link, Status, Text } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/FieldValueList',
4
+ component: FieldValueList
5
+ };
6
+ export const FieldValueListDemo = (args) => {
7
+ const data = [
8
+ {
9
+ id: 'id',
10
+ name: 'ID',
11
+ value: (<Text variant='h1' as='span'>
12
+ C-1234
13
+ </Text>)
14
+ },
15
+ {
16
+ id: 'status',
17
+ name: 'Status',
18
+ value: <Status variant='pending'>pending</Status>
19
+ },
20
+ {
21
+ id: 'dynamic',
22
+ name: args.name,
23
+ value: args.value
24
+ },
25
+ {
26
+ id: 'link',
27
+ name: 'Link',
28
+ value: (<Link href='https://www.pega.com' target='_blank'>
29
+ C-ABC
30
+ </Link>)
31
+ },
32
+ {
33
+ id: 'created',
34
+ name: 'Created',
35
+ value: new Date().toLocaleDateString()
36
+ },
37
+ {
38
+ id: 'no value',
39
+ name: 'No Value'
40
+ }
41
+ ];
42
+ return <FieldValueList variant={args.variant} fields={data}/>;
43
+ };
44
+ FieldValueListDemo.args = {
45
+ variant: 'inline',
46
+ name: 'Name',
47
+ value: 'Value'
48
+ };
49
+ FieldValueListDemo.argTypes = {
50
+ variant: { options: ['inline', 'stacked'], control: { type: 'select' } },
51
+ name: { control: { type: 'text' } },
52
+ value: { control: { type: 'text' } }
53
+ };
54
+ //# sourceMappingURL=FieldValueList.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldValueList.stories.jsx","sourceRoot":"","sources":["../../../src/core/FieldValueList/FieldValueList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAuB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAElG,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,cAAc;CAClB,CAAC;AAOV,MAAM,CAAC,MAAM,kBAAkB,GAAoC,CACjE,IAA8B,EAC9B,EAAE;IACF,MAAM,IAAI,GAAG;QACX;YACE,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,IAAI;YACV,KAAK,EAA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,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACrC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { FieldValueList, FieldValueListProps, Link, Status, Text } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/FieldValueList',\n component: FieldValueList\n} as Meta;\n\ninterface FieldValueListStoryProps extends FieldValueListProps {\n name: string;\n value: string;\n}\n\nexport const FieldValueListDemo: Story<FieldValueListStoryProps> = (\n args: FieldValueListStoryProps\n) => {\n const data = [\n {\n id: 'id',\n name: 'ID',\n value: (\n <Text variant='h1' as='span'>\n C-1234\n </Text>\n )\n },\n {\n id: 'status',\n name: 'Status',\n value: <Status variant='pending'>pending</Status>\n },\n {\n id: 'dynamic',\n name: args.name,\n value: args.value\n },\n {\n id: 'link',\n name: 'Link',\n value: (\n <Link href='https://www.pega.com' target='_blank'>\n C-ABC\n </Link>\n )\n },\n {\n id: 'created',\n name: 'Created',\n value: new Date().toLocaleDateString()\n },\n {\n id: 'no value',\n name: 'No Value'\n }\n ];\n\n return <FieldValueList variant={args.variant} fields={data} />;\n};\n\nFieldValueListDemo.args = {\n variant: 'inline',\n name: 'Name',\n value: 'Value'\n};\n\nFieldValueListDemo.argTypes = {\n variant: { options: ['inline', 'stacked'], control: { type: 'select' } },\n name: { control: { type: 'text' } },\n value: { control: { type: 'text' } }\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FileDisplayProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface FileDisplayDemoProps {
6
+ withDisplayText?: boolean;
7
+ withValue?: boolean;
8
+ withPreview?: boolean;
9
+ withDownload?: boolean;
10
+ }
11
+ export declare const FileDisplayTypes: Story<FileDisplayDemoProps>;
12
+ export declare const FileDisplayDemo: Story<FileDisplayProps & FileDisplayDemoProps>;
13
+ //# sourceMappingURL=FileDisplay.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileDisplay.stories.d.ts","sourceRoot":"","sources":["../../../src/core/File/FileDisplay.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAEL,gBAAgB,EAQjB,MAAM,yBAAyB,CAAC;;AAEjC,wBAaU;AAEV,UAAU,oBAAoB;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,oBAAoB,CAmGxD,CAAC;AAUF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,GAAG,oBAAoB,CAsC1E,CAAC"}