@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,196 @@
1
+ import { useReducer, useRef, useContext, useState } from 'react';
2
+ import { RichTextEditor } from '@pega/cosmos-react-rte';
3
+ import { Banner, Button, Checkbox, CheckboxGroup, Flex, Form, FormField, Grid, Input, RadioButton, RadioButtonGroup, Select, Option, TextArea, ToasterContext } from '@pega/cosmos-react-core';
4
+ import { FileInputDemo } from '@pega/cosmos-react-demos/lib/core/File/FileInput.stories';
5
+ import { FilterableSingleSelect as ComboboxFilterableStory } from '@pega/cosmos-react-demos/lib/core/ComboBox/ComboBox.stories';
6
+ export default {
7
+ title: 'Core/Form',
8
+ component: Form,
9
+ subcomponents: {
10
+ FormField
11
+ },
12
+ includeStories: ['OneColumnForm', 'TwoColumnForm', 'ThreeColumnForm', 'SimpleFormDemo'],
13
+ args: {
14
+ heading: 'Form demo',
15
+ description: ''
16
+ },
17
+ argTypes: {
18
+ heading: { control: { type: 'text' } },
19
+ description: { control: { type: 'text' } }
20
+ }
21
+ };
22
+ const initFields = () => {
23
+ const common = { value: undefined, status: undefined };
24
+ return [
25
+ {
26
+ ...common,
27
+ name: 'name',
28
+ required: true,
29
+ error: 'Please enter first and last name',
30
+ validator() {
31
+ if (!this.value)
32
+ return false;
33
+ return /^[a-z]+\s[a-z]+$/i.test(this.value);
34
+ }
35
+ },
36
+ {
37
+ ...common,
38
+ name: 'email',
39
+ required: true,
40
+ error: 'Enter a @pega.com address',
41
+ validator() {
42
+ if (!this.value)
43
+ return false;
44
+ return /^\S+@pega\.com$/.test(this.value);
45
+ }
46
+ },
47
+ {
48
+ ...common,
49
+ name: 'notes',
50
+ required: true,
51
+ help: 'See how fast you can type 20 characters…go',
52
+ error: 'You need to tell us more than 20 characters',
53
+ validator() {
54
+ if (!this.value)
55
+ return false;
56
+ return this.value.length >= 20;
57
+ }
58
+ }
59
+ ];
60
+ };
61
+ const fieldReducer = (fields, { target, type }) => {
62
+ return fields.map(field => {
63
+ if (field.name === target.name) {
64
+ field.value = target.value;
65
+ if (type === 'blur' || field.status === 'error') {
66
+ if ((field.required || field.value) && !field.validator()) {
67
+ field.status = 'error';
68
+ field.info = field.error;
69
+ }
70
+ else {
71
+ field.status = undefined;
72
+ field.info = field.help;
73
+ }
74
+ }
75
+ }
76
+ return field;
77
+ });
78
+ };
79
+ export const FormContent = ({ cols, heading, description, showActions }) => {
80
+ const editorRef = useRef(null);
81
+ const [fields, setField] = useReducer(fieldReducer, undefined, initFields);
82
+ const { push } = useContext(ToasterContext);
83
+ const name = fields.find(field => field.name === 'name');
84
+ const email = fields.find(field => field.name === 'email');
85
+ const notes = fields.find(field => field.name === 'notes');
86
+ if (!name || !email || !notes)
87
+ return null;
88
+ const canSubmit = fields.every(field => field.value && field.validator());
89
+ const actions = (<>
90
+ <Button name='Cancel' variant='secondary' onClick={() => {
91
+ push({ content: 'Form cancelled!' });
92
+ }}>
93
+ Cancel
94
+ </Button>
95
+ <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>
96
+ Submit
97
+ </Button>
98
+ </>);
99
+ const onImageAdded = (image, id) => {
100
+ const src = URL.createObjectURL(image);
101
+ editorRef.current?.appendImage({ src, alt: image.name }, id);
102
+ };
103
+ return (<Form actions={showActions ? actions : undefined} description={description} heading={heading} onSubmit={(e) => {
104
+ e.preventDefault();
105
+ push({ content: 'Form submitted!' });
106
+ }} style={{ margin: 'auto', maxWidth: '37.5rem' }}>
107
+ <Grid container={{ gap: 1, cols: `repeat(${cols}, minmax(0, 1fr))` }}>
108
+ <Input name='name' label='Name' value={name.value} required={name.required} status={name.status} info='some help text here' onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })} autoComplete='off'/>
109
+
110
+ <Input name='email' value={email.value} type='email' label='Email' required={email.required} status={email.status} info='some help text here' onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })} autoComplete='off'/>
111
+
112
+ <Grid item={{ colStartEnd: '1/-1' }}>
113
+ <CheckboxGroup name='visited' label='Places you have worked'>
114
+ {['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (<Checkbox key={office} label={office} onChange={(e) => setField({ ...e })}/>))}
115
+ </CheckboxGroup>
116
+ </Grid>
117
+
118
+ <Grid item={{ colStartEnd: '1/-1' }}>
119
+ <RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>
120
+ {['Yes', "No… no I don't"].map(option => (<RadioButton key={option} label={option} onChange={(e) => setField({ ...e })}/>))}
121
+ </RadioButtonGroup>
122
+ </Grid>
123
+
124
+ <Select label='What would you like to eat?' info='FYI: options are limited'>
125
+ <Option>choose meal…</Option>
126
+ <Option>Pizza</Option>
127
+ <Option>Sandwich</Option>
128
+ <Option>Salad</Option>
129
+ </Select>
130
+
131
+ <Grid item={{ colStartEnd: '1/-1' }}>
132
+ <TextArea name='notes' required={notes.required} label='Meeting Notes' status={notes.status} info={notes.info || notes.help} onChange={(e) => setField({ ...e })} onBlur={(e) => setField({ ...e })}/>
133
+ </Grid>
134
+
135
+ <Grid item={{ colStartEnd: '1/-1' }}>
136
+ <RichTextEditor label='Detailed meeting notes' info='The rich text editor can be used in forms, comments, and documents' toolbar={[
137
+ 'inline-styling',
138
+ 'headers',
139
+ 'tables',
140
+ 'links',
141
+ 'images',
142
+ 'lists',
143
+ 'cut-copy-paste',
144
+ 'indentation'
145
+ ]} onImageAdded={onImageAdded} ref={editorRef}/>
146
+ </Grid>
147
+ <Grid item={{ colStartEnd: '1/-1' }}>
148
+ <FileInputDemo />
149
+ </Grid>
150
+ <ComboboxFilterableStory />
151
+ </Grid>
152
+ </Form>);
153
+ };
154
+ export const OneColumnForm = (args) => {
155
+ return <FormContent cols={1} heading={args.heading} description={args.description} showActions/>;
156
+ };
157
+ export const TwoColumnForm = (args) => {
158
+ return <FormContent cols={2} heading={args.heading} description={args.description} showActions/>;
159
+ };
160
+ export const ThreeColumnForm = (args) => {
161
+ return <FormContent cols={3} heading={args.heading} description={args.description} showActions/>;
162
+ };
163
+ export const SimpleFormDemo = (args) => {
164
+ const [inputValue, setInputValue] = useState('');
165
+ const [success, setSuccess] = useState('');
166
+ const actions = (<>
167
+ <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>
168
+ Cancel
169
+ </Button>
170
+ <Button name='Submit' type='submit' variant='primary'>
171
+ Submit
172
+ </Button>
173
+ </>);
174
+ const successBanner = (<Banner id='success' variant='success' heading='Success' messages={['Form submitted', `Input value: ${success}`]}/>);
175
+ const errorBanner = (<Banner id='error' variant='urgent' heading='Error' messages={['All required fields in the form must be completed.']}/>);
176
+ const banner = success ? successBanner : errorBanner;
177
+ return (<Form banners={args.withBanners ? banner : undefined} actions={actions} heading={args.heading} description={args.description} onSubmit={(e) => {
178
+ e.preventDefault();
179
+ setSuccess(inputValue);
180
+ setInputValue('');
181
+ }}>
182
+ <Flex container={{ direction: 'column', itemGap: 2 }}>
183
+ <Input label='Name' info='Enter your first name' required value={inputValue} onChange={(e) => {
184
+ setSuccess('');
185
+ setInputValue(e.target.value);
186
+ }}/>
187
+ </Flex>
188
+ </Form>);
189
+ };
190
+ SimpleFormDemo.args = {
191
+ withBanners: false
192
+ };
193
+ SimpleFormDemo.argTypes = {
194
+ withBanners: { control: { type: 'boolean' } }
195
+ };
196
+ //# sourceMappingURL=Form.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.stories.jsx","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EAIV,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,IAAI,EAEJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,0DAA0D,CAAC;AACzF,OAAO,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AAEhI,eAAe;I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AC,IAAI,CAAC,WAAW,CAAC,CAC9B,QAAQ,CAAC,CAAC,CAAC,CAAY,EAAE,EAAE;YACzB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,UAAU,CAAC,UAAU,CAAC,CAAC;YACvB,aAAa,CAAC,EAAE,CAAC,CAAC;QACpB,CAAC,CAAC,CAEF;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CACnD;QAAA,CAAC,KAAK,CACJ,KAAK,CAAC,MAAM,CACZ,IAAI,CAAC,uBAAuB,CAC5B,QAAQ,CACR,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,QAAQ,CAAC,CAAC,CAAC,CAAgC,EAAE,EAAE;YAC7C,UAAU,CAAC,EAAE,CAAC,CAAC;YACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,EAEN;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport {\n useReducer,\n ChangeEvent,\n FocusEvent,\n FormEvent,\n useRef,\n useContext,\n useState\n} from 'react';\n\nimport { RichTextEditor, RichTextEditorState } from '@pega/cosmos-react-rte';\nimport {\n Banner,\n Button,\n Checkbox,\n CheckboxGroup,\n Flex,\n Form,\n FormControlProps,\n FormField,\n Grid,\n Input,\n RadioButton,\n RadioButtonGroup,\n Select,\n Option,\n TextArea,\n ToasterContext\n} from '@pega/cosmos-react-core';\nimport { FileInputDemo } from '@pega/cosmos-react-demos/lib/core/File/FileInput.stories';\nimport { FilterableSingleSelect as ComboboxFilterableStory } from '@pega/cosmos-react-demos/lib/core/ComboBox/ComboBox.stories';\n\nexport default {\n title: 'Core/Form',\n component: Form,\n subcomponents: {\n FormField\n },\n includeStories: ['OneColumnForm', 'TwoColumnForm', 'ThreeColumnForm', 'SimpleFormDemo'],\n args: {\n heading: 'Form demo',\n description: ''\n },\n argTypes: {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface Field extends FormControlProps {\n help?: string;\n error?: string;\n validator: (this: Field) => boolean;\n}\n\n// Get initial field properties\nconst initFields = (): Field[] => {\n const common = { value: undefined, status: undefined };\n return [\n {\n ...common,\n name: 'name',\n required: true,\n error: 'Please enter first and last name',\n validator() {\n if (!this.value) return false;\n return /^[a-z]+\\s[a-z]+$/i.test(this.value);\n }\n },\n {\n ...common,\n name: 'email',\n required: true,\n error: 'Enter a @pega.com address',\n validator() {\n if (!this.value) return false;\n return /^\\S+@pega\\.com$/.test(this.value);\n }\n },\n {\n ...common,\n name: 'notes',\n required: true,\n help: 'See how fast you can type 20 characters…go',\n error: 'You need to tell us more than 20 characters',\n validator() {\n if (!this.value) return false;\n return this.value.length >= 20;\n }\n }\n ];\n};\n\n// Handles setting of state for all fields\nconst fieldReducer = (\n fields: Field[],\n {\n target,\n type\n }:\n | ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n | FocusEvent<HTMLInputElement | HTMLTextAreaElement>\n) => {\n return fields.map(field => {\n if (field.name === target.name) {\n field.value = target.value;\n if (type === 'blur' || field.status === 'error') {\n if ((field.required || field.value) && !field.validator()) {\n field.status = 'error';\n field.info = field.error;\n } else {\n field.status = undefined;\n field.info = field.help;\n }\n }\n }\n return field;\n });\n};\n\nexport const FormContent = ({\n cols,\n heading,\n description,\n showActions\n}: {\n cols: number;\n showActions: boolean;\n heading?: string;\n description?: string;\n}) => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [fields, setField] = useReducer(fieldReducer, undefined, initFields);\n const { push } = useContext(ToasterContext);\n\n const name = fields.find(field => field.name === 'name');\n const email = fields.find(field => field.name === 'email');\n const notes = fields.find(field => field.name === 'notes');\n\n if (!name || !email || !notes) return null;\n\n const canSubmit = fields.every(field => field.value && field.validator());\n\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={() => {\n push({ content: 'Form cancelled!' });\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>\n Submit\n </Button>\n </>\n );\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n return (\n <Form\n actions={showActions ? actions : undefined}\n description={description}\n heading={heading}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n push({ content: 'Form submitted!' });\n }}\n style={{ margin: 'auto', maxWidth: '37.5rem' }}\n >\n <Grid container={{ gap: 1, cols: `repeat(${cols}, minmax(0, 1fr))` }}>\n <Input\n name='name'\n label='Name'\n value={name.value}\n required={name.required}\n status={name.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Input\n name='email'\n value={email.value}\n type='email'\n label='Email'\n required={email.required}\n status={email.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <CheckboxGroup name='visited' label='Places you have worked'>\n {['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (\n <Checkbox\n key={office}\n label={office}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </CheckboxGroup>\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>\n {['Yes', \"No… no I don't\"].map(option => (\n <RadioButton\n key={option}\n label={option}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </RadioButtonGroup>\n </Grid>\n\n <Select label='What would you like to eat?' info='FYI: options are limited'>\n <Option>choose meal…</Option>\n <Option>Pizza</Option>\n <Option>Sandwich</Option>\n <Option>Salad</Option>\n </Select>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <TextArea\n name='notes'\n required={notes.required}\n label='Meeting Notes'\n status={notes.status}\n info={notes.info || notes.help}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n />\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RichTextEditor\n label='Detailed meeting notes'\n info='The rich text editor can be used in forms, comments, and documents'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n ref={editorRef}\n />\n </Grid>\n <Grid item={{ colStartEnd: '1/-1' }}>\n <FileInputDemo />\n </Grid>\n <ComboboxFilterableStory />\n </Grid>\n </Form>\n );\n};\n\ninterface FormStoryProps {\n heading?: string;\n description?: string;\n}\n\nexport const OneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={1} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const TwoColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={2} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const ThreeColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={3} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const SimpleFormDemo: Story<FormStoryProps & { withBanners?: boolean }> = (\n args: FormStoryProps & { withBanners?: boolean }\n) => {\n const [inputValue, setInputValue] = useState('');\n const [success, setSuccess] = useState('');\n\n const actions = (\n <>\n <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n );\n\n const successBanner = (\n <Banner\n id='success'\n variant='success'\n heading='Success'\n messages={['Form submitted', `Input value: ${success}`]}\n />\n );\n\n const errorBanner = (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n messages={['All required fields in the form must be completed.']}\n />\n );\n\n const banner = success ? successBanner : errorBanner;\n\n return (\n <Form\n banners={args.withBanners ? banner : undefined}\n actions={actions}\n heading={args.heading}\n description={args.description}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n setSuccess(inputValue);\n setInputValue('');\n }}\n >\n <Flex container={{ direction: 'column', itemGap: 2 }}>\n <Input\n label='Name'\n info='Enter your first name'\n required\n value={inputValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setSuccess('');\n setInputValue(e.target.value);\n }}\n />\n </Flex>\n </Form>\n );\n};\n\nSimpleFormDemo.args = {\n withBanners: false\n};\n\nSimpleFormDemo.argTypes = {\n withBanners: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ fitContent?: boolean | undefined;
3
+ height?: number | undefined;
4
+ }, never>;
5
+ export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
+ //# sourceMappingURL=Grid.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;SAiB3B,CAAC;AAIF,eAAO,MAAM,UAAU,yGAerB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';
3
+ export const StyledContainer = styled.div(({ fitContent, height, theme }) => {
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
+ ${fitContent &&
14
+ css `
15
+ width: fit-content;
16
+ `}
17
+ `;
18
+ });
19
+ StyledContainer.defaultProps = defaultThemeProp;
20
+ export const StyledItem = styled.div(({ theme }) => {
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: ${theme.base.spacing};
25
+ text-align: center;
26
+ background-color: ${theme.base.colors.orange.light};
27
+ color: ${theme.base.colors.black};
28
+
29
+ span {
30
+ font-size: ${fontSize.xl};
31
+ font-weight: ${theme.base['font-weight'].bold};
32
+ }
33
+ `;
34
+ });
35
+ StyledItem.defaultProps = defaultThemeProp;
36
+ //# sourceMappingURL=Grid.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.styles.js","sourceRoot":"","sources":["../../../src/core/Grid/Grid.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,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,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,UAAU;QACZ,GAAG,CAAA;;OAEF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;yBACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;eAC9D,KAAK,CAAC,IAAI,CAAC,OAAO;;wBAET,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK;aACzC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;mBAGjB,QAAQ,CAAC,EAAE;qBACT,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,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<{ fitContent?: boolean; height?: number }>(\n ({ fitContent, height, theme }) => {\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 ${fitContent &&\n css`\n width: fit-content;\n `}\n `;\n }\n);\n\nStyledContainer.defaultProps = defaultThemeProp;\n\nexport const StyledItem = styled.div(({ theme }) => {\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: ${theme.base.spacing};\n text-align: center;\n background-color: ${theme.base.colors.orange.light};\n color: ${theme.base.colors.black};\n\n span {\n font-size: ${fontSize.xl};\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n});\n\nStyledItem.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { GridContainerProps } from '@pega/cosmos-react-core';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ interface GridStoryProps {
7
+ colGap?: GridContainerProps['colGap'];
8
+ rowGap?: GridContainerProps['rowGap'];
9
+ pad?: GridContainerProps['pad'];
10
+ justifyItems?: GridContainerProps['justifyItems'];
11
+ justifyContent?: GridContainerProps['justifyContent'];
12
+ alignItems?: GridContainerProps['alignItems'];
13
+ alignContent?: GridContainerProps['alignContent'];
14
+ }
15
+ export declare const ColumnsAndRows: () => JSX.Element;
16
+ export declare const Areas: () => JSX.Element;
17
+ export declare const Template: () => JSX.Element;
18
+ export declare const GapAndPadding: Story<GridStoryProps>;
19
+ export declare const JustifyItems: Story<GridStoryProps>;
20
+ export declare const JustifyContent: Story<GridStoryProps>;
21
+ export declare const AlignItems: Story<GridStoryProps>;
22
+ export declare const AlignContent: Story<GridStoryProps>;
23
+ //# sourceMappingURL=GridContainer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.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,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,cAAc,mBAkB1B,CAAC;AAEF,eAAO,MAAM,KAAK,mBA0BjB,CAAC;AAEF,eAAO,MAAM,QAAQ,mBAyBpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAoB/C,CAAC;AAcF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAmB9C,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,CAkBhD,CAAC;AAaF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,cAAc,CAmB5C,CAAC;AAUF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,cAAc,CAoB9C,CAAC"}
@@ -0,0 +1,161 @@
1
+ import { Grid, Text } from '@pega/cosmos-react-core';
2
+ import { StyledContainer, StyledItem } from './Grid.styles';
3
+ export default {
4
+ title: 'Core/Grid/Container',
5
+ component: Grid,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ }
9
+ };
10
+ export const ColumnsAndRows = () => {
11
+ return (<Grid container={{
12
+ cols: '7rem [line1] 1fr [line2] 3fr [line3]',
13
+ rows: 'repeat(3, 3rem) auto',
14
+ pad: 2
15
+ }} as={StyledContainer} height={20}>
16
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`colRows-${index}`}>
17
+ <Text>Item {index}</Text>
18
+ </StyledItem>))}
19
+ </Grid>);
20
+ };
21
+ export const Areas = () => {
22
+ return (<Grid container={{
23
+ cols: '5rem 1fr 3fr',
24
+ rows: 'repeat(3, 3rem) auto',
25
+ areas: '"sidebar header header" "sidebar . main" "sidebar . main" "sidebar footer footer"',
26
+ pad: 2
27
+ }} as={StyledContainer} height={20}>
28
+ <Grid item={{ area: 'header' }} as={StyledItem}>
29
+ <Text>Header</Text>
30
+ </Grid>
31
+ <Grid item={{ area: 'sidebar' }} as={StyledItem}>
32
+ <Text>Side</Text>
33
+ </Grid>
34
+ <Grid item={{ area: 'main' }} as={StyledItem}>
35
+ <Text>Main</Text>
36
+ </Grid>
37
+ <Grid item={{ area: 'footer' }} as={StyledItem}>
38
+ <Text>Footer</Text>
39
+ </Grid>
40
+ </Grid>);
41
+ };
42
+ export const Template = () => {
43
+ const rowsAndAreas = '"sidebar header header" 3rem "sidebar . main" 3rem "sidebar . main" 3rem "sidebar footer footer" auto';
44
+ const columns = '5rem 1fr 3fr';
45
+ return (<Grid container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }} as={StyledContainer} height={20}>
46
+ <Grid item={{ area: 'header' }} as={StyledItem}>
47
+ <Text>Header</Text>
48
+ </Grid>
49
+ <Grid item={{ area: 'sidebar' }} as={StyledItem}>
50
+ <Text>Side</Text>
51
+ </Grid>
52
+ <Grid item={{ area: 'main' }} as={StyledItem}>
53
+ <Text>Main</Text>
54
+ </Grid>
55
+ <Grid item={{ area: 'footer' }} as={StyledItem}>
56
+ <Text>Footer</Text>
57
+ </Grid>
58
+ </Grid>);
59
+ };
60
+ export const GapAndPadding = (args) => {
61
+ return (<Grid container={{
62
+ cols: '7rem 1fr 3fr',
63
+ colGap: args.colGap,
64
+ rows: 'repeat(3, 3rem) auto',
65
+ rowGap: args.rowGap,
66
+ pad: args.pad
67
+ }} as={StyledContainer} height={20}>
68
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`colRowGap-${index}`}>
69
+ <Text>Item {index}</Text>
70
+ </StyledItem>))}
71
+ </Grid>);
72
+ };
73
+ GapAndPadding.args = {
74
+ pad: 1,
75
+ colGap: 1,
76
+ rowGap: 1
77
+ };
78
+ GapAndPadding.argTypes = {
79
+ pad: { control: { type: 'number' } },
80
+ colGap: { control: { type: 'number' } },
81
+ rowGap: { control: { type: 'number' } }
82
+ };
83
+ export const JustifyItems = (args) => {
84
+ return (<Grid container={{
85
+ cols: '7rem 1fr 3fr',
86
+ rows: 'repeat(3, 3rem) auto',
87
+ justifyItems: args.justifyItems,
88
+ pad: 2
89
+ }} as={StyledContainer} height={20}>
90
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`justifyItems-${index}`}>
91
+ <Text>Item {index}</Text>
92
+ </StyledItem>))}
93
+ </Grid>);
94
+ };
95
+ JustifyItems.args = {
96
+ justifyItems: 'stretch'
97
+ };
98
+ JustifyItems.argTypes = {
99
+ justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
100
+ };
101
+ export const JustifyContent = (args) => {
102
+ return (<Grid container={{
103
+ cols: 'repeat(3, 7rem)',
104
+ rows: 'repeat(4, 3rem)',
105
+ justifyContent: args.justifyContent,
106
+ pad: 2
107
+ }} as={StyledContainer}>
108
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`justifyContent-${index}`}>
109
+ <Text>Item {index}</Text>
110
+ </StyledItem>))}
111
+ </Grid>);
112
+ };
113
+ JustifyContent.args = {
114
+ justifyContent: 'start'
115
+ };
116
+ JustifyContent.argTypes = {
117
+ justifyContent: {
118
+ options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
119
+ control: { type: 'select' }
120
+ }
121
+ };
122
+ export const AlignItems = (args) => {
123
+ return (<Grid container={{
124
+ cols: '7rem 1fr 3fr',
125
+ rows: 'repeat(3, 5rem) auto',
126
+ alignItems: args.alignItems,
127
+ pad: 2
128
+ }} as={StyledContainer} height={20}>
129
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`alignItems-${index}`}>
130
+ <Text>Item {index}</Text>
131
+ </StyledItem>))}
132
+ </Grid>);
133
+ };
134
+ AlignItems.args = {
135
+ alignItems: 'stretch'
136
+ };
137
+ AlignItems.argTypes = {
138
+ alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
139
+ };
140
+ export const AlignContent = (args) => {
141
+ return (<Grid container={{
142
+ cols: 'repeat(3, 7rem)',
143
+ rows: 'repeat(4, 3rem)',
144
+ alignContent: args.alignContent,
145
+ pad: 2
146
+ }} as={StyledContainer} height={30} fitContent>
147
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (<StyledItem key={`alignContent-${index}`}>
148
+ <Text>Item {index}</Text>
149
+ </StyledItem>))}
150
+ </Grid>);
151
+ };
152
+ AlignContent.args = {
153
+ alignContent: 'start'
154
+ };
155
+ AlignContent.argTypes = {
156
+ alignContent: {
157
+ options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
158
+ control: { type: 'select' }
159
+ }
160
+ };
161
+ //# sourceMappingURL=GridContainer.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridContainer.stories.jsx","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.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,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC;YACT,IAAI,EAAE,sCAAsC;YAC5C,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAAE,CAAC;SACP,CAAC,CACF,EAAE,CAAC,CAAC,eAAe,CAAC,CACpB,MA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AE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACpD,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,gBAAgB,KAAK,EAAE,CAAC,CACvC;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAC1B;QAAA,EAAE,UAAU,CAAC,CACd,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,YAAY,EAAE,OAAO;CACtB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;QAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridContainerProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Container',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n colGap?: GridContainerProps['colGap'];\n rowGap?: GridContainerProps['rowGap'];\n pad?: GridContainerProps['pad'];\n justifyItems?: GridContainerProps['justifyItems'];\n justifyContent?: GridContainerProps['justifyContent'];\n alignItems?: GridContainerProps['alignItems'];\n alignContent?: GridContainerProps['alignContent'];\n}\n\nexport const ColumnsAndRows = () => {\n return (\n <Grid\n container={{\n cols: '7rem [line1] 1fr [line2] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRows-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nexport const Areas = () => {\n return (\n <Grid\n container={{\n cols: '5rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n areas: '\"sidebar header header\" \"sidebar . main\" \"sidebar . main\" \"sidebar footer footer\"',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const Template = () => {\n const rowsAndAreas =\n '\"sidebar header header\" 3rem \"sidebar . main\" 3rem \"sidebar . main\" 3rem \"sidebar footer footer\" auto';\n const columns = '5rem 1fr 3fr';\n\n return (\n <Grid\n container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const GapAndPadding: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n colGap: args.colGap,\n rows: 'repeat(3, 3rem) auto',\n rowGap: args.rowGap,\n pad: args.pad\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRowGap-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nGapAndPadding.args = {\n pad: 1,\n colGap: 1,\n rowGap: 1\n};\n\nGapAndPadding.argTypes = {\n pad: { control: { type: 'number' } },\n colGap: { control: { type: 'number' } },\n rowGap: { control: { type: 'number' } }\n};\n\nexport const JustifyItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n justifyItems: args.justifyItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyItems.args = {\n justifyItems: 'stretch'\n};\n\nJustifyItems.argTypes = {\n justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const JustifyContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n justifyContent: args.justifyContent,\n pad: 2\n }}\n as={StyledContainer}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyContent.args = {\n justifyContent: 'start'\n};\n\nJustifyContent.argTypes = {\n justifyContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 5rem) auto',\n alignItems: args.alignItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignItems.args = {\n alignItems: 'stretch'\n};\n\nAlignItems.argTypes = {\n alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n alignContent: args.alignContent,\n pad: 2\n }}\n as={StyledContainer}\n height={30}\n fitContent\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignContent.args = {\n alignContent: 'start'\n};\n\nAlignContent.argTypes = {\n alignContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n"]}
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { GridItemProps } from '@pega/cosmos-react-core';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ interface GridStoryProps {
7
+ justifySelf?: GridItemProps['justifySelf'];
8
+ alignSelf?: GridItemProps['alignSelf'];
9
+ }
10
+ export declare const StartAndEnd: () => JSX.Element;
11
+ export declare const JustifySelf: Story<GridStoryProps>;
12
+ export declare const AlignSelf: Story<GridStoryProps>;
13
+ //# sourceMappingURL=GridItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.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,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,mBAkCvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,cAAc,CAc7C,CAAC;AAUF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,cAAc,CAc3C,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { Grid, Text } from '@pega/cosmos-react-core';
2
+ import { StyledContainer, StyledItem } from './Grid.styles';
3
+ export default {
4
+ title: 'Core/Grid/Item',
5
+ component: Grid,
6
+ parameters: {
7
+ layout: 'fullscreen'
8
+ }
9
+ };
10
+ export const StartAndEnd = () => {
11
+ return (<Grid container={{
12
+ cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',
13
+ rows: 'repeat(3, 3rem) auto',
14
+ pad: 2
15
+ }} as={StyledContainer} height={20}>
16
+ <Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledItem}>
17
+ <Text>Item 1</Text>
18
+ </Grid>
19
+ <StyledItem>
20
+ <Text>Item 2</Text>
21
+ </StyledItem>
22
+ <StyledItem>
23
+ <Text>Item 3</Text>
24
+ </StyledItem>
25
+ <Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledItem}>
26
+ <Text>Item 4</Text>
27
+ </Grid>
28
+ <Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledItem}>
29
+ <Text>Item 5</Text>
30
+ </Grid>
31
+ <Grid item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }} as={StyledItem}>
32
+ <Text>Item 6</Text>
33
+ </Grid>
34
+ </Grid>);
35
+ };
36
+ export const JustifySelf = (args) => {
37
+ return (<Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer}>
38
+ <StyledItem>
39
+ <Text>Item 1</Text>
40
+ </StyledItem>
41
+ <Grid item={{ justifySelf: args.justifySelf }} as={StyledItem} editable>
42
+ <Text>Item 2</Text>
43
+ </Grid>
44
+ <StyledItem>
45
+ <Text>Item 3</Text>
46
+ </StyledItem>
47
+ </Grid>);
48
+ };
49
+ JustifySelf.args = {
50
+ justifySelf: 'stretch'
51
+ };
52
+ JustifySelf.argTypes = {
53
+ justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
54
+ };
55
+ export const AlignSelf = (args) => {
56
+ return (<Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer} height={10} fitContent>
57
+ <StyledItem>
58
+ <Text>Item 1</Text>
59
+ </StyledItem>
60
+ <Grid item={{ alignSelf: args.alignSelf }} as={StyledItem} editable>
61
+ <Text>Item 2</Text>
62
+ </Grid>
63
+ <StyledItem>
64
+ <Text>Item 3</Text>
65
+ </StyledItem>
66
+ </Grid>);
67
+ };
68
+ AlignSelf.args = {
69
+ alignSelf: 'stretch'
70
+ };
71
+ AlignSelf.argTypes = {
72
+ alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
73
+ };
74
+ //# sourceMappingURL=GridItem.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridItem.stories.jsx","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.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;AAOV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC;YACT,IAAI,EAAE,4DAA4D;YAClE,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAAE,CAAC;SACP,CAAC,CACF,EAAE,CAA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CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,UAAU,CACZ;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,QAAQ,CACjE;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,UAAU,CACT;QAAA,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CACpB;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC3F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridItemProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Item',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n justifySelf?: GridItemProps['justifySelf'];\n alignSelf?: GridItemProps['alignSelf'];\n}\n\nexport const StartAndEnd = () => {\n return (\n <Grid\n container={{\n cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledItem}>\n <Text>Item 1</Text>\n </Grid>\n <StyledItem>\n <Text>Item 2</Text>\n </StyledItem>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n <Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledItem}>\n <Text>Item 4</Text>\n </Grid>\n <Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledItem}>\n <Text>Item 5</Text>\n </Grid>\n <Grid\n item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }}\n as={StyledItem}\n >\n <Text>Item 6</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const JustifySelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer}>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ justifySelf: args.justifySelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nJustifySelf.args = {\n justifySelf: 'stretch'\n};\n\nJustifySelf.argTypes = {\n justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignSelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer} height={10} fitContent>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ alignSelf: args.alignSelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nAlignSelf.args = {\n alignSelf: 'stretch'\n};\n\nAlignSelf.argTypes = {\n alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n"]}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Meta } from '@storybook/react';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const StaticIcon: () => JSX.Element;
6
+ export declare const DynamicIcon: () => JSX.Element;
7
+ export declare const IconList: () => JSX.Element;
8
+ //# sourceMappingURL=Icon.stories.d.ts.map