@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,19 @@
1
+ /// <reference types="react" />
2
+ export declare const tableData: ({
3
+ id: string;
4
+ name: string;
5
+ dob: string;
6
+ address: string;
7
+ email: string;
8
+ emailVerified: boolean;
9
+ balance: string;
10
+ } | {
11
+ id: string;
12
+ name: string;
13
+ dob: string;
14
+ address: JSX.Element;
15
+ email: string;
16
+ balance: string;
17
+ emailVerified?: undefined;
18
+ })[];
19
+ //# sourceMappingURL=Table.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;IAgCrB,CAAC"}
@@ -0,0 +1,32 @@
1
+ export const tableData = [
2
+ {
3
+ id: '1234',
4
+ name: 'Jane Smith',
5
+ dob: '12/31/1990',
6
+ address: 'Boston, MA',
7
+ email: 'jsmith@email.com',
8
+ emailVerified: true,
9
+ balance: '$2,200'
10
+ },
11
+ {
12
+ id: '5678',
13
+ name: 'Joe Smith',
14
+ dob: '01/01/1980',
15
+ address: '',
16
+ email: 'joe.smith@email.com',
17
+ emailVerified: true,
18
+ balance: '$1,350'
19
+ },
20
+ {
21
+ id: '0000',
22
+ name: 'Mary Lou',
23
+ dob: '06/15/1985',
24
+ address: (<>
25
+ <div>100 Main St.</div>
26
+ <div>Springfield, USA</div>
27
+ </>),
28
+ email: '',
29
+ balance: '-$175'
30
+ }
31
+ ];
32
+ //# sourceMappingURL=Table.mocks.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.mocks.jsx","sourceRoot":"","sources":["../../../src/core/Table/Table.mocks.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,kBAAkB;QACzB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,qBAAqB;QAC5B,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,CACP,EACE;QAAA,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CACtB;QAAA,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAC5B;MAAA,GAAG,CACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,OAAO;KACjB;CACF,CAAC","sourcesContent":["export const tableData = [\n {\n id: '1234',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n emailVerified: true,\n balance: '$2,200'\n },\n {\n id: '5678',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n emailVerified: true,\n balance: '$1,350'\n },\n {\n id: '0000',\n name: 'Mary Lou',\n dob: '06/15/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Springfield, USA</div>\n </>\n ),\n email: '',\n balance: '-$175'\n }\n];\n"]}
@@ -0,0 +1,14 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { TableProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ interface TableStoryProps {
6
+ title?: TableProps['title'];
7
+ hoverHighlight?: TableProps['hoverHighlight'];
8
+ loading?: TableProps['loading'];
9
+ loadingMessage?: TableProps['loadingMessage'];
10
+ emptyTable?: boolean;
11
+ }
12
+ export declare const TableDemo: Story<TableStoryProps>;
13
+ export declare const StyledTableDemo: Story<TableStoryProps>;
14
+ //# sourceMappingURL=Table.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAKjF,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CAmB5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAuClD,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { Status, Table } from '@pega/cosmos-react-core';
2
+ import { tableData } from './Table.mocks';
3
+ import { StyledBalance } from './Table.styles';
4
+ export default {
5
+ title: 'Core/Table',
6
+ component: Table,
7
+ args: {
8
+ title: 'Accounts',
9
+ hoverHighlight: false,
10
+ loading: false,
11
+ loadingMessage: 'Loading data',
12
+ emptyTable: false
13
+ },
14
+ argTypes: {
15
+ title: { control: { type: 'text' } },
16
+ hoverHighlight: { control: { type: 'boolean' } },
17
+ loading: { control: { type: 'boolean' } },
18
+ loadingMessage: { control: { type: 'text' } },
19
+ emptyTable: { control: { type: 'boolean' } }
20
+ }
21
+ };
22
+ export const TableDemo = (args) => {
23
+ const columns = [
24
+ { renderer: 'name', label: 'Name' },
25
+ { renderer: 'dob', label: 'Date of Birth' },
26
+ { renderer: 'address', label: 'Address' },
27
+ { renderer: 'email', label: 'Email' },
28
+ { renderer: 'balance', label: 'Account Balance', align: 'right' }
29
+ ];
30
+ return (<Table title={args.title} hoverHighlight={args.hoverHighlight} loading={args.loading} loadingMessage={args.loadingMessage} data={args.emptyTable ? [] : tableData} columns={columns}/>);
31
+ };
32
+ export const StyledTableDemo = (args) => {
33
+ const columns = [
34
+ { renderer: data => <b>{data.name}</b>, label: 'Name' },
35
+ { renderer: 'dob', label: 'Date of Birth' },
36
+ { renderer: 'address', label: 'Address' },
37
+ {
38
+ renderer: data => {
39
+ return (<>
40
+ {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}
41
+ {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}
42
+ </>);
43
+ },
44
+ label: 'Email'
45
+ },
46
+ {
47
+ renderer: data => {
48
+ return (<StyledBalance negativeBalance={data.balance.startsWith('-')}>
49
+ {data.balance}
50
+ </StyledBalance>);
51
+ },
52
+ label: 'Account Balance',
53
+ align: 'right'
54
+ }
55
+ ];
56
+ return (<Table title={args.title} hoverHighlight={args.hoverHighlight} loading={args.loading} loadingMessage={args.loadingMessage} data={args.emptyTable ? [] : tableData} columns={columns}/>);
57
+ };
58
+ //# sourceMappingURL=Table.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.stories.jsx","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IA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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACvC,OAAO,CAAC,CAAC,OAAO,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ export declare const StyledBalance: import("styled-components").StyledComponent<"h4", import("styled-components").DefaultTheme, {
2
+ negativeBalance: boolean;
3
+ }, never>;
4
+ //# sourceMappingURL=Table.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;qBAAgC,OAAO;SAMhE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp } from '@pega/cosmos-react-core';
3
+ export const StyledBalance = styled.h4(({ negativeBalance, theme }) => {
4
+ return css `
5
+ color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};
6
+ `;
7
+ });
8
+ StyledBalance.defaultProps = defaultThemeProp;
9
+ //# sourceMappingURL=Table.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.styles.js","sourceRoot":"","sources":["../../../src/core/Table/Table.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CACpC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,OAAO,GAAG,CAAA;eACC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;KAClF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledBalance = styled.h4<{ negativeBalance: boolean }>(\n ({ negativeBalance, theme }) => {\n return css`\n color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};\n `;\n }\n);\n\nStyledBalance.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { TabsProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const TabsDemo: Story<TabsProps>;
6
+ export declare const TabsCountDemo: Story<TabsProps>;
7
+ //# sourceMappingURL=Tabs.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAwB,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAE1E,wBASU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAAS,CA6B1C,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { useState } from 'react';
2
+ import { Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
3
+ export default {
4
+ title: 'Core/Tabs',
5
+ component: Tabs,
6
+ args: {
7
+ type: 'horizontal'
8
+ },
9
+ argTypes: {
10
+ type: { options: ['horizontal', 'vertical'], control: { type: 'select' } }
11
+ }
12
+ };
13
+ export const TabsDemo = (args) => {
14
+ const [panelShown, changePanel] = useState('1');
15
+ const handleTabChange = (id) => {
16
+ changePanel(id);
17
+ };
18
+ const tabs = [
19
+ { name: 'Tab 1', id: '1' },
20
+ { name: 'Tab 2', id: '2' },
21
+ { name: 'Tab 3', id: '3' },
22
+ { name: 'Tab 4', id: '4', disabled: true },
23
+ { name: 'Tab 5', id: '5' }
24
+ ];
25
+ return (<Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>
26
+ <Flex item={{ grow: 1 }}>
27
+ <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown}/>
28
+ </Flex>
29
+ <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>
30
+ {tabs.map(tab => (<TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>
31
+ <div>{tab.name} content</div>
32
+ </TabPanel>))}
33
+ </Flex>
34
+ </Flex>);
35
+ };
36
+ export const TabsCountDemo = (args) => {
37
+ const [panelShown, changePanel] = useState('1');
38
+ const handleTabChange = (id) => {
39
+ changePanel(id);
40
+ };
41
+ const tabs = [
42
+ { name: 'Tab 1', id: '1', count: 5 },
43
+ { name: 'Tab 2', id: '2', count: 14 },
44
+ { name: 'Tab 3', id: '3', count: 0 },
45
+ { name: 'Tab 4', id: '4', count: 56, disabled: true },
46
+ { name: 'Tab 5', id: '5', count: 150 }
47
+ ];
48
+ return (<Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>
49
+ <Flex item={{ grow: 1 }}>
50
+ <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown}/>
51
+ </Flex>
52
+ <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>
53
+ {tabs.map(tab => (<TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>
54
+ <div>{tab.name} content</div>
55
+ </TabPanel>))}
56
+ </Flex>
57
+ </Flex>);
58
+ };
59
+ //# sourceMappingURL=Tabs.stories.js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GAAG,CAAC,EAAE,CAAC,CAC7D;YAAA,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAE,QAAO,EAAE,GAAG,CAC9B;UAAA,EAAE,QAAQ,CAAC,CACZ,CAAC,CACJ;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Flex, TabPanel, Tabs, TabsProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tabs',\n component: Tabs,\n args: {\n type: 'horizontal'\n },\n argTypes: {\n type: { options: ['horizontal', 'vertical'], control: { type: 'select' } }\n }\n} as Meta;\n\nexport const TabsDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1' },\n { name: 'Tab 2', id: '2' },\n { name: 'Tab 3', id: '3' },\n { name: 'Tab 4', id: '4', disabled: true },\n { name: 'Tab 5', id: '5' }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n\nexport const TabsCountDemo: Story<TabsProps> = (args: TabsProps) => {\n const [panelShown, changePanel] = useState('1');\n\n const handleTabChange = (id: string) => {\n changePanel(id);\n };\n\n const tabs = [\n { name: 'Tab 1', id: '1', count: 5 },\n { name: 'Tab 2', id: '2', count: 14 },\n { name: 'Tab 3', id: '3', count: 0 },\n { name: 'Tab 4', id: '4', count: 56, disabled: true },\n { name: 'Tab 5', id: '5', count: 150 }\n ];\n\n return (\n <Flex container={{ direction: args.type === 'horizontal' ? 'column' : 'row' }}>\n <Flex item={{ grow: 1 }}>\n <Tabs tabs={tabs} type={args.type} onTabClick={handleTabChange} currentTabId={panelShown} />\n </Flex>\n <Flex container={{ pad: [1, 2] }} item={{ grow: 1 }}>\n {tabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panelShown} key={tab.id}>\n <div>{tab.name} content</div>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { TextProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const TextDemo: Story<TextProps>;
6
+ //# sourceMappingURL=Text.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAE1D,wBAGU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAMrC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { Text } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/Text',
4
+ component: Text
5
+ };
6
+ export const TextDemo = (args) => {
7
+ return (<Text variant={args.variant} status={args.status}>
8
+ Pega Cosmos
9
+ </Text>);
10
+ };
11
+ TextDemo.args = {
12
+ variant: 'primary',
13
+ status: undefined
14
+ };
15
+ TextDemo.argTypes = {
16
+ variant: {
17
+ options: ['primary', 'secondary', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
18
+ control: { type: 'select' }
19
+ },
20
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }
21
+ };
22
+ //# sourceMappingURL=Text.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.stories.jsx","sourceRoot":"","sources":["../../../src/core/Text/Text.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAa,MAAM,yBAAyB,CAAC;AAE1D,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAqB,CAAC,IAAe,EAAE,EAAE;IAC5D,OAAO,CACL,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAC/C;;IACF,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,IAAI,GAAG;IACd,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,QAAQ,CAAC,QAAQ,GAAG;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACrE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Text, TextProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Text',\n component: Text\n} as Meta;\n\nexport const TextDemo: Story<TextProps> = (args: TextProps) => {\n return (\n <Text variant={args.variant} status={args.status}>\n Pega Cosmos\n </Text>\n );\n};\n\nTextDemo.args = {\n variant: 'primary',\n status: undefined\n};\n\nTextDemo.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n control: { type: 'select' }\n },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } }\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { TextAreaProps } from '@pega/cosmos-react-core';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const TextAreaDemo: Story<TextAreaProps>;
6
+ //# sourceMappingURL=TextArea.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAY,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAElE,wBAGU;AAEV,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,aAAa,CAwB7C,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { useState } from 'react';
2
+ import { TextArea } from '@pega/cosmos-react-core';
3
+ export default {
4
+ title: 'Core/Textarea',
5
+ component: TextArea
6
+ };
7
+ export const TextAreaDemo = (args) => {
8
+ const [value, setValue] = useState('');
9
+ return (<TextArea id='text-area' value={value} onChange={(e) => setValue(e.target.value)} minLength={args.minLength} maxLength={args.maxLength} displayCharCount={args.displayCharCount} hardStop={args.hardStop} resizable={args.resizable} autoResize={args.autoResize} label={args.label} labelHidden={args.labelHidden} info={args.info} placeholder={args.placeholder} status={args.status} required={args.required} disabled={args.disabled} readOnly={args.readOnly}/>);
10
+ };
11
+ TextAreaDemo.args = {
12
+ minLength: 0,
13
+ maxLength: 300,
14
+ displayCharCount: false,
15
+ hardStop: true,
16
+ resizable: false,
17
+ autoResize: false,
18
+ label: 'Text Area',
19
+ labelHidden: false,
20
+ info: 'Enter a large amount of text',
21
+ placeholder: 'Tell us a story…',
22
+ status: undefined,
23
+ required: false,
24
+ disabled: false,
25
+ readOnly: false
26
+ };
27
+ TextAreaDemo.argTypes = {
28
+ minLength: { control: { type: 'number' } },
29
+ maxLength: { control: { type: 'number' } },
30
+ displayCharCount: { control: { type: 'boolean' } },
31
+ hardStop: { control: { type: 'boolean' } },
32
+ resizable: { control: { type: 'boolean' } },
33
+ autoResize: { control: { type: 'boolean' } },
34
+ label: { control: { type: 'text' } },
35
+ labelHidden: { control: { type: 'boolean' } },
36
+ info: { control: { type: 'text' } },
37
+ placeholder: { control: { type: 'text' } },
38
+ status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },
39
+ required: { control: { type: 'boolean' } },
40
+ disabled: { control: { type: 'boolean' } },
41
+ readOnly: { control: { type: 'boolean' } }
42
+ };
43
+ //# sourceMappingURL=TextArea.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.stories.jsx","sourceRoot":"","sources":["../../../src/core/TextArea/TextArea.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAe,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAElE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAyB,CAAC,IAAmB,EAAE,EAAE;IACxE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEvC,OAAO,CACL,CAAC,QAAQ,CACP,EAAE,CAAC,WAAW,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,CAAC,CAAmC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC5E,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAC1B,SAAS,CAAC,CAAC,IAAI,CAAC,S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EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAClD,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, ChangeEvent } from 'react';\n\nimport { TextArea, TextAreaProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Textarea',\n component: TextArea\n} as Meta;\n\nexport const TextAreaDemo: Story<TextAreaProps> = (args: TextAreaProps) => {\n const [value, setValue] = useState('');\n\n return (\n <TextArea\n id='text-area'\n value={value}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n minLength={args.minLength}\n maxLength={args.maxLength}\n displayCharCount={args.displayCharCount}\n hardStop={args.hardStop}\n resizable={args.resizable}\n autoResize={args.autoResize}\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n placeholder={args.placeholder}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nTextAreaDemo.args = {\n minLength: 0,\n maxLength: 300,\n displayCharCount: false,\n hardStop: true,\n resizable: false,\n autoResize: false,\n label: 'Text Area',\n labelHidden: false,\n info: 'Enter a large amount of text',\n placeholder: 'Tell us a story…',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nTextAreaDemo.argTypes = {\n minLength: { control: { type: 'number' } },\n maxLength: { control: { type: 'number' } },\n displayCharCount: { control: { type: 'boolean' } },\n hardStop: { control: { type: 'boolean' } },\n resizable: { control: { type: 'boolean' } },\n autoResize: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n placeholder: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,6 @@
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 ToasterDemo: () => JSX.Element;
6
+ //# sourceMappingURL=Toaster.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toaster.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Toaster/Toaster.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAKxC,wBAGU;AAKV,eAAO,MAAM,WAAW,mBAkBvB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { useContext } from 'react';
2
+ import { Button, Toaster, ToasterContext } from '@pega/cosmos-react-core';
3
+ export default {
4
+ title: 'Core/Toaster',
5
+ component: Toaster
6
+ };
7
+ const msg = 'Lorem ipsum dolor sit amet consectetur adipiscing elit Praesent hendrerit finibus diam sed convallis';
8
+ export const ToasterDemo = () => {
9
+ const { push } = useContext(ToasterContext);
10
+ const pushToaster = () => {
11
+ push({
12
+ content: msg.slice(0, Math.floor(Math.random() * (msg.length - 26 + 1)) + 26)
13
+ });
14
+ };
15
+ return <Button onClick={pushToaster}>Make some Toast</Button>;
16
+ };
17
+ //# sourceMappingURL=Toaster.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toaster.stories.jsx","sourceRoot":"","sources":["../../../src/core/Toaster/Toaster.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,GAAG,GACP,sGAAsG,CAAC;AAEzG,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAS9B,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,CAAC;YACH,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AAChE,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useContext } from 'react';\n\nimport { Button, Toaster, ToasterContext } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Toaster',\n component: Toaster\n} as Meta;\n\nconst msg =\n 'Lorem ipsum dolor sit amet consectetur adipiscing elit Praesent hendrerit finibus diam sed convallis';\n\nexport const ToasterDemo = () => {\n /*\n * The <Toaster> component should be wrapped around the entire portion of an application that utilizes it.\n * For most apps that is once near the root of the app's React tree.\n * Descendant components can utilize the Toaster's push context method via a useContext hook, as demonstrated here.\n * This story component represents an component rendered somewhere in an app's tree.\n * Note, a Toaster provider is already rendered at the root of the Cosmos Storybook, allowing for the use of context here.\n */\n\n const { push } = useContext(ToasterContext);\n\n const pushToaster = () => {\n push({\n content: msg.slice(0, Math.floor(Math.random() * (msg.length - 26 + 1)) + 26)\n });\n };\n\n return <Button onClick={pushToaster}>Make some Toast</Button>;\n};\n"]}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").FunctionComponent<import("@pega/cosmos-react-core").TooltipProps & import("@pega/cosmos-react-core").ForwardProps>;
5
+ };
6
+ export default _default;
7
+ export declare const TooltipDemo: () => JSX.Element;
8
+ //# sourceMappingURL=Tooltip.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";;;;;AAEA,wBAGE;AAEF,eAAO,MAAM,WAAW,mBAgBvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Button, Tooltip, useElement } from '@pega/cosmos-react-core';
2
+ export default {
3
+ title: 'Core/Tooltip',
4
+ component: Tooltip
5
+ };
6
+ export const TooltipDemo = () => {
7
+ const [el, setEl] = useElement();
8
+ return (<>
9
+ <Button ref={setEl}>Hover me</Button>
10
+
11
+ {el && (<Tooltip target={el}>
12
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque
13
+ viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non
14
+ convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.
15
+ </Tooltip>)}
16
+ </>);
17
+ };
18
+ //# sourceMappingURL=Tooltip.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.stories.jsx","sourceRoot":"","sources":["../../../src/core/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IAEjC,OAAO,CACL,EACE;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAEpC;;MAAA,CAAC,EAAE,IAAI,CACL,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAClB;;;;QAGF,EAAE,OAAO,CAAC,CACX,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Button, Tooltip, useElement } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Tooltip',\n component: Tooltip\n};\n\nexport const TooltipDemo = () => {\n const [el, setEl] = useElement();\n\n return (\n <>\n <Button ref={setEl}>Hover me</Button>\n\n {el && (\n <Tooltip target={el}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur finibus scelerisque\n viverra. Fusce consequat, justo at laoreet lobortis, mauris ipsum aliquet arcu, non\n convallis nisl elit id erat. Pellentesque posuere sagittis velit a molestie.\n </Tooltip>\n )}\n </>\n );\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const themeToTree: (themeNode: object, parentPath?: string | undefined) => import("@pega/cosmos-react-core").TreeNode[];
2
+ //# sourceMappingURL=Tree.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Tree/Tree.mocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAe,MAAM,kFAsB5C,CAAC"}
@@ -0,0 +1,20 @@
1
+ export const themeToTree = (themeNode, parentPath) => {
2
+ const dataArray = [];
3
+ Object.entries(themeNode).forEach(([childKey, childValue]) => {
4
+ const id = parentPath ? `${parentPath}.${childKey}` : childKey;
5
+ const label = childKey;
6
+ if (childValue.$type) {
7
+ dataArray.push({
8
+ id,
9
+ label,
10
+ data: { ...childValue }
11
+ });
12
+ }
13
+ else {
14
+ const nodes = themeToTree(childValue, id);
15
+ dataArray.push({ id, label, nodes });
16
+ }
17
+ });
18
+ return dataArray;
19
+ };
20
+ //# sourceMappingURL=Tree.mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.mocks.js","sourceRoot":"","sources":["../../../src/core/Tree/Tree.mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAE,UAAmB,EAAE,EAAE;IACpE,MAAM,SAAS,GAAuB,EAAE,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE;QAC3D,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/D,MAAM,KAAK,GAAG,QAAQ,CAAC;QAGvB,IAAI,UAAU,CAAC,KAAK,EAAE;YACpB,SAAS,CAAC,IAAI,CAAC;gBACb,EAAE;gBACF,KAAK;gBACL,IAAI,EAAE,EAAE,GAAG,UAAU,EAAE;aACxB,CAAC,CAAC;SACJ;aAEI;YACH,MAAM,KAAK,GAAuB,WAAW,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC9D,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { TreeProps } from '@pega/cosmos-react-core';\n\nexport const themeToTree = (themeNode: object, parentPath?: string) => {\n const dataArray: TreeProps['nodes'] = [];\n Object.entries(themeNode).forEach(([childKey, childValue]) => {\n const id = parentPath ? `${parentPath}.${childKey}` : childKey;\n const label = childKey;\n\n // Is a leaf\n if (childValue.$type) {\n dataArray.push({\n id,\n label,\n data: { ...childValue }\n });\n }\n // Is a parent\n else {\n const nodes: TreeProps['nodes'] = themeToTree(childValue, id);\n dataArray.push({ id, label, nodes });\n }\n });\n\n return dataArray;\n};\n"]}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { StandardTreeProps } from '@pega/cosmos-react-core';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const BaseTree: () => JSX.Element;
7
+ export declare const StandardTreeDemo: Story<Pick<StandardTreeProps, 'lined'>>;
8
+ //# sourceMappingURL=Tree.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAGL,iBAAiB,EAMlB,MAAM,yBAAyB,CAAC;;AAKjC,wBAGU;AAEV,eAAO,MAAM,QAAQ,mBAcpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAmFpE,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { useState } from 'react';
2
+ import { action } from '@storybook/addon-actions';
3
+ import { Button, StandardTree, Tree, treeHelpers, createUID, themeDefinition } from '@pega/cosmos-react-core';
4
+ import { themeToTree } from './Tree.mocks';
5
+ import { StyledBaseTree } from './Tree.styles';
6
+ export default {
7
+ title: 'Core/Tree',
8
+ component: Tree
9
+ };
10
+ export const BaseTree = () => {
11
+ return (<StyledBaseTree nodes={themeToTree(themeDefinition)} nodeRenderer={({ id, subTree }) => {
12
+ return (<>
13
+ <span>{id}</span>
14
+ {subTree}
15
+ </>);
16
+ }}/>);
17
+ };
18
+ export const StandardTreeDemo = ({ lined }) => {
19
+ const getMockNodes = ({ length = 5, parent = true } = {}) => {
20
+ return Array.from({ length }, (_, i) => {
21
+ const isParent = parent && i !== 2;
22
+ const id = createUID();
23
+ return {
24
+ id,
25
+ label: isParent ? 'Parent' : 'Leaf',
26
+ icon: isParent ? 'folder-solid' : 'document-solid',
27
+ nodes: isParent ? [] : undefined,
28
+ actions: [
29
+ { id: 'star', text: 'Star', icon: 'star', onClick: action(`Star node: ${id}`) },
30
+ { id: 'pin', text: 'Pin', icon: 'pin', onClick: action(`Pin node: ${id}`) }
31
+ ],
32
+ onClick: isParent
33
+ ? undefined
34
+ : nodeId => {
35
+ action(`Action for node: ${nodeId}`)();
36
+ }
37
+ };
38
+ });
39
+ };
40
+ const [currentNodeId, setCurrentNodeId] = useState();
41
+ const [allNodes, setAllNodes] = useState(() => {
42
+ return getMockNodes({ length: 10 });
43
+ });
44
+ const loadChildNodes = (id) => {
45
+ setTimeout(() => {
46
+ setAllNodes(tree => {
47
+ return treeHelpers.mapNode(tree, id, node => {
48
+ return {
49
+ ...node,
50
+ loading: false,
51
+ nodes: [...(node.nodes ?? []), ...getMockNodes()]
52
+ };
53
+ });
54
+ });
55
+ }, 1000);
56
+ };
57
+ const expandTo = (id) => {
58
+ setAllNodes(tree => {
59
+ return treeHelpers.expandTo(tree, id);
60
+ });
61
+ };
62
+ return (<>
63
+ <StandardTree lined={lined} currentNodeId={currentNodeId} nodes={allNodes} onNodeClick={id => {
64
+ const clickedNode = treeHelpers.getNode(allNodes, id);
65
+ setCurrentNodeId(id);
66
+ if (!clickedNode?.nodes)
67
+ return;
68
+ setAllNodes(tree => treeHelpers.mapNode(tree, id, node => {
69
+ return {
70
+ ...node,
71
+ expanded: !node.expanded,
72
+ loading: node.nodes?.length === 0
73
+ };
74
+ }));
75
+ if (clickedNode?.nodes?.length > 0)
76
+ return;
77
+ loadChildNodes(id);
78
+ }}/>
79
+ <Button onClick={() => expandTo('')}>Collapse All</Button>
80
+ <Button onClick={() => expandTo(currentNodeId || '')}>Expand to active item</Button>
81
+ </>);
82
+ };
83
+ StandardTreeDemo.args = {
84
+ lined: false
85
+ };
86
+ StandardTreeDemo.argTypes = {
87
+ lined: { control: { type: 'boolean' } }
88
+ };
89
+ //# sourceMappingURL=Tree.stories.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.stories.jsx","sourceRoot":"","sources":["../../../src/core/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,YAAY,EAEZ,IAAI,EAEJ,WAAW,EACX,SAAS,EACT,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAEV,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CACpC,YAAY,CAA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AE;YAChB,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YACtD,gBAAgB,CAAC,EAAE,CAAC,CAAC;YAErB,IAAI,CAAC,WAAW,EAAE,KAAK;gBAAE,OAAO;YAEhC,WAAW,CAAC,IAAI,CAAC,EAAE,CACjB,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE;gBACnC,OAAO;oBACL,GAAG,IAAI;oBACP,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ;oBACxB,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC;iBAClC,CAAC;YACJ,CAAC,CAAC,CACH,CAAC;YAGF,IAAI,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;gBAAE,OAAO;YAE3C,cAAc,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,CAAC,EAEJ;MAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,MAAM,CACzD;MAAA,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,MAAM,CACrF;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n StandardTree,\n StandardTreeProps,\n Tree,\n TreeNode,\n treeHelpers,\n createUID,\n themeDefinition\n} from '@pega/cosmos-react-core';\n\nimport { themeToTree } from './Tree.mocks';\nimport { StyledBaseTree } from './Tree.styles';\n\nexport default {\n title: 'Core/Tree',\n component: Tree\n} as Meta;\n\nexport const BaseTree = () => {\n return (\n <StyledBaseTree\n nodes={themeToTree(themeDefinition)}\n nodeRenderer={({ id, subTree }) => {\n return (\n <>\n <span>{id}</span>\n {subTree}\n </>\n );\n }}\n />\n );\n};\n\nexport const StandardTreeDemo: Story<Pick<StandardTreeProps, 'lined'>> = ({ lined }) => {\n const getMockNodes = ({\n length = 5,\n parent = true\n }: { length?: number; parent?: boolean } = {}): StandardTreeProps['nodes'] => {\n return Array.from({ length }, (_, i) => {\n const isParent = parent && i !== 2;\n const id = createUID();\n return {\n id,\n label: isParent ? 'Parent' : 'Leaf',\n icon: isParent ? 'folder-solid' : 'document-solid',\n nodes: isParent ? [] : undefined,\n actions: [\n { id: 'star', text: 'Star', icon: 'star', onClick: action(`Star node: ${id}`) },\n { id: 'pin', text: 'Pin', icon: 'pin', onClick: action(`Pin node: ${id}`) }\n ],\n onClick: isParent\n ? undefined\n : nodeId => {\n action(`Action for node: ${nodeId}`)();\n }\n };\n });\n };\n\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(() => {\n return getMockNodes({ length: 10 });\n });\n\n const loadChildNodes = (id: string) => {\n setTimeout(() => {\n setAllNodes(tree => {\n return treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n loading: false,\n nodes: [...(node.nodes ?? []), ...getMockNodes()]\n };\n });\n });\n }, 1000);\n };\n\n const expandTo = (id: TreeNode['id']) => {\n setAllNodes(tree => {\n return treeHelpers.expandTo(tree, id);\n });\n };\n\n return (\n <>\n <StandardTree\n lined={lined}\n currentNodeId={currentNodeId}\n nodes={allNodes}\n onNodeClick={id => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n setCurrentNodeId(id);\n // If a leaf node, just set to current\n if (!clickedNode?.nodes) return;\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded,\n loading: node.nodes?.length === 0\n };\n })\n );\n\n // If a parent node with children already loaded, we're done.\n if (clickedNode?.nodes?.length > 0) return;\n\n loadChildNodes(id);\n }}\n />\n <Button onClick={() => expandTo('')}>Collapse All</Button>\n <Button onClick={() => expandTo(currentNodeId || '')}>Expand to active item</Button>\n </>\n );\n};\n\nStandardTreeDemo.args = {\n lined: false\n};\n\nStandardTreeDemo.argTypes = {\n lined: { control: { type: 'boolean' } }\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@pega/cosmos-react-core';
2
+ export declare const StyledBaseTree: typeof Tree;
3
+ //# sourceMappingURL=Tree.styles.d.ts.map