@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,100 @@
1
+ import { useContext, useState } from 'react';
2
+ import { FileDisplay, FieldValueList, Image, Popover, ToasterContext, useElement, useOuterEvent } from '@pega/cosmos-react-core';
3
+ export default {
4
+ title: 'Core/File/Display',
5
+ component: FileDisplay,
6
+ args: {
7
+ withValue: true,
8
+ withPreview: true,
9
+ withDownload: true
10
+ },
11
+ argTypes: {
12
+ withValue: { control: { type: 'boolean' } },
13
+ withPreview: { control: { type: 'boolean' } },
14
+ withDownload: { control: { type: 'boolean' } }
15
+ }
16
+ };
17
+ export const FileDisplayTypes = (args) => {
18
+ const { push } = useContext(ToasterContext);
19
+ const handlePreview = args.withPreview
20
+ ? (url) => push({ content: `Previewed ${url}` })
21
+ : undefined;
22
+ const handleDownload = args.withDownload
23
+ ? (url) => push({ content: `Downloaded ${url}` })
24
+ : undefined;
25
+ const fields = [
26
+ {
27
+ id: '1',
28
+ name: 'Image file',
29
+ value: (<FileDisplay displayText={args.withDisplayText ? 'image.jpg' : undefined} value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
30
+ },
31
+ {
32
+ id: '2',
33
+ name: 'Video file',
34
+ value: (<FileDisplay displayText={args.withDisplayText ? 'video.avi' : undefined} value={args.withValue ? 'https://pega.com/media/some-video.avi' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
35
+ },
36
+ {
37
+ id: '3',
38
+ name: 'Audio file',
39
+ value: (<FileDisplay displayText={args.withDisplayText ? 'recording.mp3' : undefined} value={args.withValue ? 'https://pega.com/media/sprint-review-recording.mp3' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
40
+ },
41
+ {
42
+ id: '4',
43
+ name: 'Document file',
44
+ value: (<FileDisplay displayText={args.withDisplayText ? 'document.doc' : undefined} value={args.withValue ? 'https://pega.com/media/document.doc' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
45
+ },
46
+ {
47
+ id: '5',
48
+ name: 'PDF file',
49
+ value: (<FileDisplay displayText={args.withDisplayText ? 'invoice.pdf' : undefined} value={args.withValue ? 'https://pega.com/media/invoice.pdf' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
50
+ },
51
+ {
52
+ id: '6',
53
+ name: 'Presentation file',
54
+ value: (<FileDisplay displayText={args.withDisplayText ? 'review.pps' : undefined} value={args.withValue ? 'https://pega.com/media/review.pps' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
55
+ },
56
+ {
57
+ id: '7',
58
+ name: 'Spreadsheet file',
59
+ value: (<FileDisplay displayText={args.withDisplayText ? 'welfare.xlsx' : undefined} value={args.withValue ? 'https://pega.com/media/welfare.xlsx' : undefined} onPreview={handlePreview} onDownload={handleDownload}/>)
60
+ }
61
+ ];
62
+ return <FieldValueList fields={fields}/>;
63
+ };
64
+ FileDisplayTypes.args = {
65
+ withDisplayText: true
66
+ };
67
+ FileDisplayTypes.argTypes = {
68
+ withDisplayText: { control: { type: 'boolean' } }
69
+ };
70
+ export const FileDisplayDemo = (args) => {
71
+ const [buttonEl, setButtonEl] = useElement();
72
+ const [popoverEl, setPopoverEl] = useElement();
73
+ const [showPreview, setShowPreview] = useState(false);
74
+ useOuterEvent('click', [buttonEl, popoverEl], () => setShowPreview(false));
75
+ const imageSrc = 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';
76
+ const handlePreview = args.withPreview ? () => setShowPreview(true) : undefined;
77
+ const handleDownload = args.withDownload
78
+ ? () => {
79
+ const element = document.createElement('a');
80
+ element.href = imageSrc;
81
+ element.download = 'cosmos_file_display_download.jpg';
82
+ element.click();
83
+ }
84
+ : undefined;
85
+ return (<>
86
+ <FileDisplay ref={setButtonEl} variant={args.variant} displayText={args.displayText} value={args.withValue ? imageSrc : undefined} onPreview={handlePreview} onDownload={handleDownload}/>
87
+ <Popover ref={setPopoverEl} show={showPreview} target={buttonEl} strategy='fixed'>
88
+ <Image src={imageSrc} alt={args.displayText || 'Pega World iNspire'}/>
89
+ </Popover>
90
+ </>);
91
+ };
92
+ FileDisplayDemo.args = {
93
+ variant: 'file',
94
+ displayText: 'Pega World iNspire'
95
+ };
96
+ FileDisplayDemo.argTypes = {
97
+ variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },
98
+ displayText: { control: { type: 'text' } }
99
+ };
100
+ //# sourceMappingURL=FileDisplay.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileDisplay.stories.jsx","sourceRoot":"","sources":["../../../src/core/File/FileDisplay.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,WAAW,EAGX,cAAc,EACd,KAAK,EACL,OAAO,EACP,cAAc,EACd,UAAU,EACV,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,IAAI;KACnB;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC/C;CACM,CAAC;AASV,MAAM,CAAC,MAAM,gBAAgB,GAAgC,CAAC,IAA0B,EAAE,EAAE;IAC1F,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW;QACpC,CAAC,CAAC,CAAC,GAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,EAAE,EAAE,CAAC;QACtE,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY;QACtC,CAAC,CAAC,CAAC,GA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E;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useState } from 'react';\n\nimport {\n FileDisplay,\n FileDisplayProps,\n FileItemProps,\n FieldValueList,\n Image,\n Popover,\n ToasterContext,\n useElement,\n useOuterEvent\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/File/Display',\n component: FileDisplay,\n args: {\n withValue: true,\n withPreview: true,\n withDownload: true\n },\n argTypes: {\n withValue: { control: { type: 'boolean' } },\n withPreview: { control: { type: 'boolean' } },\n withDownload: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface FileDisplayDemoProps {\n withDisplayText?: boolean;\n withValue?: boolean;\n withPreview?: boolean;\n withDownload?: boolean;\n}\n\nexport const FileDisplayTypes: Story<FileDisplayDemoProps> = (args: FileDisplayDemoProps) => {\n const { push } = useContext(ToasterContext);\n\n const handlePreview = args.withPreview\n ? (url: FileItemProps['url']) => push({ content: `Previewed ${url}` })\n : undefined;\n\n const handleDownload = args.withDownload\n ? (url: FileItemProps['url']) => push({ content: `Downloaded ${url}` })\n : undefined;\n\n const fields = [\n {\n id: '1',\n name: 'Image file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'image.jpg' : undefined}\n value={args.withValue ? 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '2',\n name: 'Video file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'video.avi' : undefined}\n value={args.withValue ? 'https://pega.com/media/some-video.avi' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '3',\n name: 'Audio file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'recording.mp3' : undefined}\n value={args.withValue ? 'https://pega.com/media/sprint-review-recording.mp3' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '4',\n name: 'Document file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'document.doc' : undefined}\n value={args.withValue ? 'https://pega.com/media/document.doc' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '5',\n name: 'PDF file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'invoice.pdf' : undefined}\n value={args.withValue ? 'https://pega.com/media/invoice.pdf' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '6',\n name: 'Presentation file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'review.pps' : undefined}\n value={args.withValue ? 'https://pega.com/media/review.pps' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n },\n {\n id: '7',\n name: 'Spreadsheet file',\n value: (\n <FileDisplay\n displayText={args.withDisplayText ? 'welfare.xlsx' : undefined}\n value={args.withValue ? 'https://pega.com/media/welfare.xlsx' : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n )\n }\n ];\n\n return <FieldValueList fields={fields} />;\n};\n\nFileDisplayTypes.args = {\n withDisplayText: true\n};\n\nFileDisplayTypes.argTypes = {\n withDisplayText: { control: { type: 'boolean' } }\n};\n\nexport const FileDisplayDemo: Story<FileDisplayProps & FileDisplayDemoProps> = (\n args: FileDisplayProps & FileDisplayDemoProps\n) => {\n const [buttonEl, setButtonEl] = useElement();\n const [popoverEl, setPopoverEl] = useElement();\n const [showPreview, setShowPreview] = useState(false);\n\n useOuterEvent('click', [buttonEl, popoverEl], () => setShowPreview(false));\n\n const imageSrc =\n 'https://www.pega.com/sites/default/files/styles/480/public/media/images/2021-02/pwi-2021-prevcard.jpg';\n\n const handlePreview = args.withPreview ? () => setShowPreview(true) : undefined;\n\n const handleDownload = args.withDownload\n ? () => {\n const element = document.createElement('a');\n element.href = imageSrc;\n element.download = 'cosmos_file_display_download.jpg';\n element.click();\n }\n : undefined;\n\n return (\n <>\n <FileDisplay\n ref={setButtonEl}\n variant={args.variant}\n displayText={args.displayText}\n value={args.withValue ? imageSrc : undefined}\n onPreview={handlePreview}\n onDownload={handleDownload}\n />\n <Popover ref={setPopoverEl} show={showPreview} target={buttonEl} strategy='fixed'>\n <Image src={imageSrc} alt={args.displayText || 'Pega World iNspire'} />\n </Popover>\n </>\n );\n};\n\nFileDisplayDemo.args = {\n variant: 'file',\n displayText: 'Pega World iNspire'\n};\n\nFileDisplayDemo.argTypes = {\n variant: { options: ['file', 'text', 'link'], control: { type: 'radio' } },\n displayText: { control: { type: 'text' } }\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FileInputProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface FileInputStoryProps extends FileInputProps {
6
+ sizeLimit?: number;
7
+ }
8
+ export declare const FileInputDemo: Story<FileInputStoryProps>;
9
+ //# sourceMappingURL=FileInput.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/File/FileInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAEL,cAAc,EAGf,MAAM,yBAAyB,CAAC;;AAGjC,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CA+EpD,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { useState, useMemo, useCallback, useRef, useContext } from 'react';
2
+ import { FileInput, createUID, useAfterInitialEffect } from '@pega/cosmos-react-core';
3
+ import { FileServiceContext } from '@pega/cosmos-react-demos/lib/work/CaseView/FileService.mock';
4
+ export default {
5
+ title: 'Core/File/Input',
6
+ component: FileInput
7
+ };
8
+ export const FileInputDemo = (args) => {
9
+ const { files, attachFile, cancelFile, deleteFile } = useContext(FileServiceContext);
10
+ const errCounts = useRef({ invalidType: 0, invalidSize: 0 });
11
+ const [hasError, setHasError] = useState(false);
12
+ const sizeLimit = args.sizeLimit || 100;
13
+ const onFilesAdded = useCallback((addedFiles) => {
14
+ errCounts.current = { invalidType: 0, invalidSize: 0 };
15
+ const newFiles = addedFiles.filter(f => {
16
+ let isValidSize = true;
17
+ if (f.size / 1000000 > sizeLimit) {
18
+ errCounts.current.invalidSize += 1;
19
+ isValidSize = false;
20
+ }
21
+ return isValidSize;
22
+ });
23
+ setHasError(newFiles.length < addedFiles.length);
24
+ newFiles.forEach((File) => {
25
+ const id = createUID();
26
+ attachFile({
27
+ id,
28
+ thumbnail: File.type.startsWith('image') ? URL.createObjectURL(File) : undefined,
29
+ name: File.name,
30
+ category: '',
31
+ File,
32
+ onCancel: () => {
33
+ cancelFile(id);
34
+ }
35
+ });
36
+ });
37
+ }, [attachFile, deleteFile]);
38
+ useAfterInitialEffect(() => {
39
+ if (files.length === 0)
40
+ setHasError(false);
41
+ }, [files.length]);
42
+ const info = useMemo(() => {
43
+ return hasError
44
+ ? errCounts.current.invalidSize > 0 && (<div>{`File size must be less than ${sizeLimit}MB`}</div>)
45
+ : null;
46
+ }, [hasError]);
47
+ return (<FileInput label={args.label} labelHidden={args.labelHidden} multiple={args.multiple} status={hasError ? 'error' : undefined} info={info} required={args.required} disabled={args.disabled} onFilesAdded={onFilesAdded} files={files.map(file => {
48
+ return {
49
+ ...file,
50
+ onCancel: undefined,
51
+ onPreview: () => { },
52
+ onDownload: () => { },
53
+ onDelete: () => {
54
+ deleteFile(file.id);
55
+ }
56
+ };
57
+ return file;
58
+ })}/>);
59
+ };
60
+ FileInputDemo.args = {
61
+ multiple: true,
62
+ sizeLimit: 100,
63
+ label: 'File input label',
64
+ labelHidden: false,
65
+ required: false,
66
+ disabled: false
67
+ };
68
+ FileInputDemo.argTypes = {
69
+ multiple: { control: { type: 'boolean' } },
70
+ sizeLimit: { control: { type: 'number' } },
71
+ label: { control: { type: 'text' } },
72
+ labelHidden: { control: { type: 'boolean' } },
73
+ required: { control: { type: 'boolean' } },
74
+ disabled: { control: { type: 'boolean' } }
75
+ };
76
+ //# sourceMappingURL=FileInput.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInput.stories.jsx","sourceRoot":"","sources":["../../../src/core/File/FileInput.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EACL,SAAS,EAET,SAAS,EACT,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AAEjG,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,SAAS;CACb,CAAC;AAMV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACrF,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC;IAGxC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,UAAkB,EAAE,EAAE;QACrB,SAAS,CAAC,OAAO,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QAEvD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACrC,IAAI,WAAW,GAAG,IAAI,CAAC;YAEvB,IAAI,CAAC,CAAC,IAA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O,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,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, useMemo, useCallback, useRef, useContext } from 'react';\n\nimport {\n FileInput,\n FileInputProps,\n createUID,\n useAfterInitialEffect\n} from '@pega/cosmos-react-core';\nimport { FileServiceContext } from '@pega/cosmos-react-demos/lib/work/CaseView/FileService.mock';\n\nexport default {\n title: 'Core/File/Input',\n component: FileInput\n} as Meta;\n\ninterface FileInputStoryProps extends FileInputProps {\n sizeLimit?: number;\n}\n\nexport const FileInputDemo: Story<FileInputStoryProps> = (args: FileInputStoryProps) => {\n const { files, attachFile, cancelFile, deleteFile } = useContext(FileServiceContext);\n const errCounts = useRef({ invalidType: 0, invalidSize: 0 });\n const [hasError, setHasError] = useState(false);\n\n const sizeLimit = args.sizeLimit || 100;\n\n // Fires anytime files are added to the input either through selection or drop\n const onFilesAdded = useCallback(\n (addedFiles: File[]) => {\n errCounts.current = { invalidType: 0, invalidSize: 0 };\n\n const newFiles = addedFiles.filter(f => {\n let isValidSize = true;\n\n if (f.size / 1000000 > sizeLimit) {\n errCounts.current.invalidSize += 1;\n isValidSize = false;\n }\n\n return isValidSize;\n });\n\n setHasError(newFiles.length < addedFiles.length);\n\n newFiles.forEach((File: File) => {\n const id = createUID();\n attachFile({\n id,\n thumbnail: File.type.startsWith('image') ? URL.createObjectURL(File) : undefined,\n name: File.name,\n category: '',\n File,\n onCancel: () => {\n cancelFile(id);\n }\n });\n });\n },\n [attachFile, deleteFile]\n );\n\n useAfterInitialEffect(() => {\n if (files.length === 0) setHasError(false);\n }, [files.length]);\n\n const info = useMemo(() => {\n return hasError\n ? errCounts.current.invalidSize > 0 && (\n <div>{`File size must be less than ${sizeLimit}MB`}</div>\n )\n : null;\n }, [hasError]);\n\n return (\n <FileInput\n label={args.label}\n labelHidden={args.labelHidden}\n multiple={args.multiple}\n status={hasError ? 'error' : undefined}\n info={info}\n required={args.required}\n disabled={args.disabled}\n onFilesAdded={onFilesAdded}\n files={files.map(file => {\n return {\n ...file,\n onCancel: undefined,\n onPreview: () => {},\n onDownload: () => {},\n onDelete: () => {\n deleteFile(file.id);\n }\n };\n\n return file;\n })}\n />\n );\n};\n\nFileInputDemo.args = {\n multiple: true,\n sizeLimit: 100,\n label: 'File input label',\n labelHidden: false,\n required: false,\n disabled: false\n};\n\nFileInputDemo.argTypes = {\n multiple: { control: { type: 'boolean' } },\n sizeLimit: { control: { type: 'number' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ height?: number | undefined;
3
+ width?: number | undefined;
4
+ }, never>;
5
+ export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
6
+ inActive?: boolean | undefined;
7
+ noPadding?: boolean | undefined;
8
+ width?: number | undefined;
9
+ }, never>;
10
+ //# sourceMappingURL=Flex.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Flex/Flex.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;SAiB3B,CAAC;AAIF,eAAO,MAAM,UAAU;;;;SAsBtB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';
3
+ export const StyledContainer = styled.div(({ height, theme, width }) => {
4
+ return css `
5
+ border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
6
+ background-color: ${theme.base.colors.blue.light};
7
+
8
+ ${height &&
9
+ css `
10
+ height: ${height}rem;
11
+ `}
12
+
13
+ ${width &&
14
+ css `
15
+ width: ${width}rem;
16
+ `}
17
+ `;
18
+ });
19
+ StyledContainer.defaultProps = defaultThemeProp;
20
+ export const StyledItem = styled.div(({ inActive, noPadding, theme, width }) => {
21
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
22
+ return css `
23
+ border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
24
+ padding: ${noPadding ? '0' : `calc(4 * ${theme.base.spacing}) `};
25
+ text-align: center;
26
+ background-color: ${inActive ? theme.base.colors.white : theme.base.colors.orange.light};
27
+ color: ${theme.base.colors.black};
28
+
29
+ ${width &&
30
+ css `
31
+ width: ${width}rem;
32
+ `}
33
+
34
+ span {
35
+ font-size: ${fontSize.xl};
36
+ font-weight: ${theme.base['font-weight'].bold};
37
+ }
38
+ `;
39
+ });
40
+ StyledItem.defaultProps = defaultThemeProp;
41
+ //# sourceMappingURL=Flex.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.styles.js","sourceRoot":"","sources":["../../../src/core/Flex/Flex.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CACvC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3B,OAAO,GAAG,CAAA;2BACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;0BACrD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;;QAE9C,MAAM;QACR,GAAG,CAAA;kBACS,MAAM;OACjB;;QAEC,KAAK;QACP,GAAG,CAAA;iBACQ,KAAK;OACf;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAClC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACxC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;2BACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;iBAC9D,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI;;0BAE3C,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK;eAC9E,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;QAE9B,KAAK;QACP,GAAG,CAAA;iBACQ,KAAK;OACf;;;qBAGc,QAAQ,CAAC,EAAE;uBACT,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI;;KAEhD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledContainer = styled.div<{ height?: number; width?: number }>(\n ({ height, theme, width }) => {\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n background-color: ${theme.base.colors.blue.light};\n\n ${height &&\n css`\n height: ${height}rem;\n `}\n\n ${width &&\n css`\n width: ${width}rem;\n `}\n `;\n }\n);\n\nStyledContainer.defaultProps = defaultThemeProp;\n\nexport const StyledItem = styled.div<{ inActive?: boolean; noPadding?: boolean; width?: number }>(\n ({ inActive, noPadding, theme, width }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n padding: ${noPadding ? '0' : `calc(4 * ${theme.base.spacing}) `};\n text-align: center;\n background-color: ${inActive ? theme.base.colors.white : theme.base.colors.orange.light};\n color: ${theme.base.colors.black};\n\n ${width &&\n css`\n width: ${width}rem;\n `}\n\n span {\n font-size: ${fontSize.xl};\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n }\n);\n\nStyledItem.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,20 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FlexContainerProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface FlexStoryProps {
6
+ direction?: FlexContainerProps['direction'];
7
+ gap?: FlexContainerProps['gap'];
8
+ pad?: FlexContainerProps['pad'];
9
+ wrap?: FlexContainerProps['wrap'];
10
+ justify?: FlexContainerProps['justify'];
11
+ alignItems?: FlexContainerProps['alignItems'];
12
+ alignContent?: FlexContainerProps['alignContent'];
13
+ }
14
+ export declare const Direction: Story<FlexStoryProps>;
15
+ export declare const GapAndPadding: Story<FlexStoryProps>;
16
+ export declare const Wrap: Story<FlexStoryProps>;
17
+ export declare const Justify: Story<FlexStoryProps>;
18
+ export declare const AlignItems: Story<FlexStoryProps>;
19
+ export declare const AlignContent: Story<FlexStoryProps>;
20
+ //# sourceMappingURL=FlexContainer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlexContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Flex/FlexContainer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,kBAAkB,EAAQ,MAAM,yBAAyB,CAAC;;AAIzE,wBAMU;AAEV,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC5C,GAAG,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,GAAG,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,cAAc,CAc3C,CAAC;AAaF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAc/C,CAAC;AAYF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,cAAc,CAoBtC,CAAC;AAUF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,cAAc,CAczC,CAAC;AAaF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,cAAc,CAoB5C,CAAC;AAaF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAyB9C,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { Flex, Text } from '@pega/cosmos-react-core';
2
+ import { StyledContainer, StyledItem } from './Flex.styles';
3
+ export default {
4
+ title: 'Core/Flex/Container',
5
+ component: Flex,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ }
9
+ };
10
+ export const Direction = (args) => {
11
+ return (<Flex container={{ direction: args.direction, pad: 2 }} as={StyledContainer}>
12
+ <Flex item={{ grow: 1 }} as={StyledItem}>
13
+ <Text>Item 1</Text>
14
+ </Flex>
15
+ <Flex item={{ grow: 1 }} as={StyledItem}>
16
+ <Text>Item 2</Text>
17
+ </Flex>
18
+ <Flex item={{ grow: 1 }} as={StyledItem}>
19
+ <Text>Item 3</Text>
20
+ </Flex>
21
+ </Flex>);
22
+ };
23
+ Direction.args = {
24
+ direction: 'row'
25
+ };
26
+ Direction.argTypes = {
27
+ direction: {
28
+ options: ['row', 'column', 'row-reverse', 'column-reverse'],
29
+ control: { type: 'select' }
30
+ }
31
+ };
32
+ export const GapAndPadding = (args) => {
33
+ return (<Flex container={{ pad: args.pad, gap: args.gap }} as={StyledContainer}>
34
+ <Flex item={{ grow: 1 }} as={StyledItem}>
35
+ <Text>Item 1</Text>
36
+ </Flex>
37
+ <Flex item={{ grow: 1 }} as={StyledItem}>
38
+ <Text>Item 2</Text>
39
+ </Flex>
40
+ <Flex item={{ grow: 1 }} as={StyledItem}>
41
+ <Text>Item 3</Text>
42
+ </Flex>
43
+ </Flex>);
44
+ };
45
+ GapAndPadding.args = {
46
+ pad: 1,
47
+ gap: 1
48
+ };
49
+ GapAndPadding.argTypes = {
50
+ pad: { control: { type: 'number' } },
51
+ gap: { control: { type: 'number' } }
52
+ };
53
+ export const Wrap = (args) => {
54
+ return (<Flex container={{ wrap: args.wrap, pad: 2 }} as={StyledContainer} width={35}>
55
+ <Flex item={{ grow: 1 }} as={StyledItem}>
56
+ <Text>Item 1</Text>
57
+ </Flex>
58
+ <Flex item={{ grow: 1 }} as={StyledItem}>
59
+ <Text>Item 2</Text>
60
+ </Flex>
61
+ <Flex item={{ grow: 1 }} as={StyledItem}>
62
+ <Text>Item 3</Text>
63
+ </Flex>
64
+ <Flex item={{ grow: 1 }} as={StyledItem}>
65
+ <Text>Item 4</Text>
66
+ </Flex>
67
+ <Flex item={{ grow: 1 }} as={StyledItem}>
68
+ <Text>Item 5</Text>
69
+ </Flex>
70
+ </Flex>);
71
+ };
72
+ Wrap.args = {
73
+ wrap: 'nowrap'
74
+ };
75
+ Wrap.argTypes = {
76
+ wrap: { options: ['nowrap', 'wrap', 'wrap-reverse'], control: { type: 'select' } }
77
+ };
78
+ export const Justify = (args) => {
79
+ return (<Flex container={{ justify: args.justify, pad: 2 }} as={StyledContainer}>
80
+ <StyledItem>
81
+ <Text>Item 1</Text>
82
+ </StyledItem>
83
+ <StyledItem>
84
+ <Text>Item 2</Text>
85
+ </StyledItem>
86
+ <StyledItem>
87
+ <Text>Item 3</Text>
88
+ </StyledItem>
89
+ </Flex>);
90
+ };
91
+ Justify.args = {
92
+ justify: 'start'
93
+ };
94
+ Justify.argTypes = {
95
+ justify: {
96
+ options: ['start', 'end', 'center', 'between', 'around', 'evenly'],
97
+ control: { type: 'select' }
98
+ }
99
+ };
100
+ export const AlignItems = (args) => {
101
+ return (<Flex container={{ alignItems: args.alignItems, pad: 2 }} as={StyledContainer} height={15} width={30}>
102
+ <Flex item={{ grow: 1 }} as={StyledItem}>
103
+ <Text>Item 1</Text>
104
+ </Flex>
105
+ <Flex item={{ grow: 1 }} as={StyledItem} noPadding>
106
+ <Text>Item 2</Text>
107
+ </Flex>
108
+ <Flex container={{ direction: 'column' }} item={{ grow: 1 }} as={StyledItem}>
109
+ <Text>Item 3 - First line</Text>
110
+ <Text>Item 3 - Second line</Text>
111
+ </Flex>
112
+ </Flex>);
113
+ };
114
+ AlignItems.args = {
115
+ alignItems: 'stretch'
116
+ };
117
+ AlignItems.argTypes = {
118
+ alignItems: {
119
+ options: ['stretch', 'start', 'end', 'center', 'baseline'],
120
+ control: { type: 'select' }
121
+ }
122
+ };
123
+ export const AlignContent = (args) => {
124
+ return (<Flex container={{ alignContent: args.alignContent, wrap: 'wrap', pad: 2 }} as={StyledContainer} height={20} width={30}>
125
+ <Flex item={{ grow: 1 }} as={StyledItem}>
126
+ <Text>Item 1</Text>
127
+ </Flex>
128
+ <Flex item={{ grow: 1 }} as={StyledItem}>
129
+ <Text>Item 2</Text>
130
+ </Flex>
131
+ <Flex item={{ grow: 1 }} as={StyledItem}>
132
+ <Text>Item 3</Text>
133
+ </Flex>
134
+ <Flex item={{ grow: 1 }} as={StyledItem}>
135
+ <Text>Item 4</Text>
136
+ </Flex>
137
+ <Flex item={{ grow: 1 }} as={StyledItem}>
138
+ <Text>Item 5</Text>
139
+ </Flex>
140
+ </Flex>);
141
+ };
142
+ AlignContent.args = {
143
+ alignContent: 'stretch'
144
+ };
145
+ AlignContent.argTypes = {
146
+ alignContent: {
147
+ options: ['stretch', 'start', 'end', 'center', 'between', 'around'],
148
+ control: { type: 'select' }
149
+ }
150
+ };
151
+ //# sourceMappingURL=FlexContainer.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlexContainer.stories.jsx","sourceRoot":"","sources":["../../../src/core/Flex/FlexContainer.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAsB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAYV,MAAM,CAAC,MAAM,SAAS,GAA0B,CAAC,IAAoB,EAAE,EAAE;IACvE,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,CAC1E;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACtC;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA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;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACtC;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACtC;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACtC;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;QACnE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Flex, FlexContainerProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Flex.styles';\n\nexport default {\n title: 'Core/Flex/Container',\n component: Flex,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface FlexStoryProps {\n direction?: FlexContainerProps['direction'];\n gap?: FlexContainerProps['gap'];\n pad?: FlexContainerProps['pad'];\n wrap?: FlexContainerProps['wrap'];\n justify?: FlexContainerProps['justify'];\n alignItems?: FlexContainerProps['alignItems'];\n alignContent?: FlexContainerProps['alignContent'];\n}\n\nexport const Direction: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ direction: args.direction, pad: 2 }} as={StyledContainer}>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 2</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 3</Text>\n </Flex>\n </Flex>\n );\n};\n\nDirection.args = {\n direction: 'row'\n};\n\nDirection.argTypes = {\n direction: {\n options: ['row', 'column', 'row-reverse', 'column-reverse'],\n control: { type: 'select' }\n }\n};\n\nexport const GapAndPadding: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ pad: args.pad, gap: args.gap }} as={StyledContainer}>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 2</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 3</Text>\n </Flex>\n </Flex>\n );\n};\n\nGapAndPadding.args = {\n pad: 1,\n gap: 1\n};\n\nGapAndPadding.argTypes = {\n pad: { control: { type: 'number' } },\n gap: { control: { type: 'number' } }\n};\n\nexport const Wrap: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ wrap: args.wrap, pad: 2 }} as={StyledContainer} width={35}>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 2</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 3</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 4</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 5</Text>\n </Flex>\n </Flex>\n );\n};\n\nWrap.args = {\n wrap: 'nowrap'\n};\n\nWrap.argTypes = {\n wrap: { options: ['nowrap', 'wrap', 'wrap-reverse'], control: { type: 'select' } }\n};\n\nexport const Justify: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ justify: args.justify, pad: 2 }} as={StyledContainer}>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <StyledItem>\n <Text>Item 2</Text>\n </StyledItem>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Flex>\n );\n};\n\nJustify.args = {\n justify: 'start'\n};\n\nJustify.argTypes = {\n justify: {\n options: ['start', 'end', 'center', 'between', 'around', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignItems: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex\n container={{ alignItems: args.alignItems, pad: 2 }}\n as={StyledContainer}\n height={15}\n width={30}\n >\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem} noPadding>\n <Text>Item 2</Text>\n </Flex>\n <Flex container={{ direction: 'column' }} item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 3 - First line</Text>\n <Text>Item 3 - Second line</Text>\n </Flex>\n </Flex>\n );\n};\n\nAlignItems.args = {\n alignItems: 'stretch'\n};\n\nAlignItems.argTypes = {\n alignItems: {\n options: ['stretch', 'start', 'end', 'center', 'baseline'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignContent: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex\n container={{ alignContent: args.alignContent, wrap: 'wrap', pad: 2 }}\n as={StyledContainer}\n height={20}\n width={30}\n >\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 2</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 3</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 4</Text>\n </Flex>\n <Flex item={{ grow: 1 }} as={StyledItem}>\n <Text>Item 5</Text>\n </Flex>\n </Flex>\n );\n};\n\nAlignContent.args = {\n alignContent: 'stretch'\n};\n\nAlignContent.argTypes = {\n alignContent: {\n options: ['stretch', 'start', 'end', 'center', 'between', 'around'],\n control: { type: 'select' }\n }\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FlexItemProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface FlexStoryProps {
6
+ alignSelf?: FlexItemProps['alignSelf'];
7
+ grow?: FlexItemProps['grow'];
8
+ shrink?: FlexItemProps['shrink'];
9
+ }
10
+ export declare const AlignSelf: Story<FlexStoryProps>;
11
+ export declare const Grow: Story<FlexStoryProps>;
12
+ export declare const Shrink: Story<FlexStoryProps>;
13
+ //# sourceMappingURL=FlexItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlexItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Flex/FlexItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,aAAa,EAAQ,MAAM,yBAAyB,CAAC;;AAIpE,wBAMU;AAEV,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,cAAc,CAe3C,CAAC;AAaF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,cAAc,CActC,CAAC;AAUF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,cAAc,CAcxC,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { Flex, Text } from '@pega/cosmos-react-core';
2
+ import { StyledContainer, StyledItem } from './Flex.styles';
3
+ export default {
4
+ title: 'Core/Flex/Item',
5
+ component: Flex,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ }
9
+ };
10
+ export const AlignSelf = (args) => {
11
+ return (<Flex container={{ alignItems: 'start', pad: 2 }} as={StyledContainer} height={10}>
12
+ <Flex item={{ grow: 1 }} as={StyledItem} inActive>
13
+ <Text>Item 1</Text>
14
+ </Flex>
15
+ <Flex item={{ grow: 1, alignSelf: args.alignSelf }} as={StyledItem} noPadding>
16
+ <Text>Item 2</Text>
17
+ </Flex>
18
+ <Flex container={{ direction: 'column' }} item={{ grow: 1 }} as={StyledItem} inActive>
19
+ <Text>Item 3 - First line</Text>
20
+ <Text>Item 3 - Second line</Text>
21
+ </Flex>
22
+ </Flex>);
23
+ };
24
+ AlignSelf.args = {
25
+ alignSelf: 'auto'
26
+ };
27
+ AlignSelf.argTypes = {
28
+ alignSelf: {
29
+ options: ['auto', 'start', 'end', 'baseline', 'center', 'stretch'],
30
+ control: { type: 'select' }
31
+ }
32
+ };
33
+ export const Grow = (args) => {
34
+ return (<Flex container={{ pad: 2 }} as={StyledContainer}>
35
+ <Flex item={{ grow: 1 }} as={StyledItem} inActive>
36
+ <Text>Grow: 1</Text>
37
+ </Flex>
38
+ <Flex item={{ grow: args.grow }} as={StyledItem}>
39
+ <Text>Grow: {args.grow}</Text>
40
+ </Flex>
41
+ <Flex item={{ grow: 0 }} as={StyledItem} inActive>
42
+ <Text>Grow: 0</Text>
43
+ </Flex>
44
+ </Flex>);
45
+ };
46
+ Grow.args = {
47
+ grow: 0
48
+ };
49
+ Grow.argTypes = {
50
+ grow: { control: { type: 'number' } }
51
+ };
52
+ export const Shrink = (args) => {
53
+ return (<Flex container={{ pad: 2 }} as={StyledContainer} width={42}>
54
+ <Flex item={{ shrink: 1 }} as={StyledItem} width={15} inActive>
55
+ <Text>Shrink: 1</Text>
56
+ </Flex>
57
+ <Flex item={{ shrink: args.shrink }} as={StyledItem} width={15}>
58
+ <Text>Shrink: {args.shrink}</Text>
59
+ </Flex>
60
+ <Flex item={{ shrink: 0 }} as={StyledItem} width={15} inActive>
61
+ <Text>Shrink: 0</Text>
62
+ </Flex>
63
+ </Flex>);
64
+ };
65
+ Shrink.args = {
66
+ shrink: 0
67
+ };
68
+ Shrink.argTypes = {
69
+ shrink: { control: { type: 'number' } }
70
+ };
71
+ //# sourceMappingURL=FlexItem.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlexItem.stories.jsx","sourceRoot":"","sources":["../../../src/core/Flex/FlexItem.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAiB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAQV,MAAM,CAAC,MAAM,SAAS,GAA0B,CAAC,IAAoB,EAAE,EAAE;IACvE,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAChF;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,QAAQ,CAC/C;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;M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A,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAC7D;QAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CACnC;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAC5D;QAAA,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CACvB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,GAAG;IACZ,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,QAAQ,GAAG;IAChB,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Flex, FlexItemProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Flex.styles';\n\nexport default {\n title: 'Core/Flex/Item',\n component: Flex,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface FlexStoryProps {\n alignSelf?: FlexItemProps['alignSelf'];\n grow?: FlexItemProps['grow'];\n shrink?: FlexItemProps['shrink'];\n}\n\nexport const AlignSelf: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ alignItems: 'start', pad: 2 }} as={StyledContainer} height={10}>\n <Flex item={{ grow: 1 }} as={StyledItem} inActive>\n <Text>Item 1</Text>\n </Flex>\n <Flex item={{ grow: 1, alignSelf: args.alignSelf }} as={StyledItem} noPadding>\n <Text>Item 2</Text>\n </Flex>\n <Flex container={{ direction: 'column' }} item={{ grow: 1 }} as={StyledItem} inActive>\n <Text>Item 3 - First line</Text>\n <Text>Item 3 - Second line</Text>\n </Flex>\n </Flex>\n );\n};\n\nAlignSelf.args = {\n alignSelf: 'auto'\n};\n\nAlignSelf.argTypes = {\n alignSelf: {\n options: ['auto', 'start', 'end', 'baseline', 'center', 'stretch'],\n control: { type: 'select' }\n }\n};\n\nexport const Grow: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ pad: 2 }} as={StyledContainer}>\n <Flex item={{ grow: 1 }} as={StyledItem} inActive>\n <Text>Grow: 1</Text>\n </Flex>\n <Flex item={{ grow: args.grow }} as={StyledItem}>\n <Text>Grow: {args.grow}</Text>\n </Flex>\n <Flex item={{ grow: 0 }} as={StyledItem} inActive>\n <Text>Grow: 0</Text>\n </Flex>\n </Flex>\n );\n};\n\nGrow.args = {\n grow: 0\n};\n\nGrow.argTypes = {\n grow: { control: { type: 'number' } }\n};\n\nexport const Shrink: Story<FlexStoryProps> = (args: FlexStoryProps) => {\n return (\n <Flex container={{ pad: 2 }} as={StyledContainer} width={42}>\n <Flex item={{ shrink: 1 }} as={StyledItem} width={15} inActive>\n <Text>Shrink: 1</Text>\n </Flex>\n <Flex item={{ shrink: args.shrink }} as={StyledItem} width={15}>\n <Text>Shrink: {args.shrink}</Text>\n </Flex>\n <Flex item={{ shrink: 0 }} as={StyledItem} width={15} inActive>\n <Text>Shrink: 0</Text>\n </Flex>\n </Flex>\n );\n};\n\nShrink.args = {\n shrink: 0\n};\n\nShrink.argTypes = {\n shrink: { control: { type: 'number' } }\n};\n"]}
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const FormContent: ({ cols, heading, description, showActions }: {
6
+ cols: number;
7
+ showActions: boolean;
8
+ heading?: string | undefined;
9
+ description?: string | undefined;
10
+ }) => JSX.Element | null;
11
+ interface FormStoryProps {
12
+ heading?: string;
13
+ description?: string;
14
+ }
15
+ export declare const OneColumnForm: Story<FormStoryProps>;
16
+ export declare const TwoColumnForm: Story<FormStoryProps>;
17
+ export declare const ThreeColumnForm: Story<FormStoryProps>;
18
+ export declare const SimpleFormDemo: Story<FormStoryProps & {
19
+ withBanners?: boolean;
20
+ }>;
21
+ //# sourceMappingURL=Form.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAiC/C,wBAeU;AAyEV,eAAO,MAAM,WAAW;UAMhB,MAAM;iBACC,OAAO;;;wBA8IrB,CAAC;AAEF,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAE/C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,cAAc,CAEjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CA+D5E,CAAC"}