@pega/cosmos-react-demos 6.6.0 → 6.6.2

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 (893) hide show
  1. package/package.json +7 -7
  2. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +0 -3
  3. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +0 -1
  4. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +0 -15
  5. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +0 -1
  6. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +0 -19
  7. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +0 -1
  8. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +0 -297
  9. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +0 -1
  10. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +0 -5
  11. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +0 -1
  12. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +0 -15
  13. package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +0 -1
  14. package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +0 -6
  15. package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +0 -1
  16. package/jsx/condition-builder/ConditionBuilder/props.mock.js +0 -229
  17. package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +0 -1
  18. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts +0 -10
  19. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts.map +0 -1
  20. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx +0 -40
  21. package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx.map +0 -1
  22. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +0 -4
  23. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +0 -1
  24. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +0 -233
  25. package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +0 -1
  26. package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts +0 -8
  27. package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts.map +0 -1
  28. package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx +0 -31
  29. package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx.map +0 -1
  30. package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts +0 -9
  31. package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts.map +0 -1
  32. package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js +0 -35
  33. package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js.map +0 -1
  34. package/jsx/core/AIButton/AIButton.mocks.d.ts +0 -22
  35. package/jsx/core/AIButton/AIButton.mocks.d.ts.map +0 -1
  36. package/jsx/core/AIButton/AIButton.mocks.js +0 -136
  37. package/jsx/core/AIButton/AIButton.mocks.js.map +0 -1
  38. package/jsx/core/AIButton/AIButton.stories.d.ts +0 -23
  39. package/jsx/core/AIButton/AIButton.stories.d.ts.map +0 -1
  40. package/jsx/core/AIButton/AIButton.stories.jsx +0 -306
  41. package/jsx/core/AIButton/AIButton.stories.jsx.map +0 -1
  42. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +0 -9
  43. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +0 -1
  44. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx +0 -25
  45. package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx.map +0 -1
  46. package/jsx/core/AppShell/AppShell.mocks.d.ts +0 -15
  47. package/jsx/core/AppShell/AppShell.mocks.d.ts.map +0 -1
  48. package/jsx/core/AppShell/AppShell.mocks.jsx +0 -132
  49. package/jsx/core/AppShell/AppShell.mocks.jsx.map +0 -1
  50. package/jsx/core/AppShell/AppShell.stories.d.ts +0 -39
  51. package/jsx/core/AppShell/AppShell.stories.d.ts.map +0 -1
  52. package/jsx/core/AppShell/AppShell.stories.jsx +0 -266
  53. package/jsx/core/AppShell/AppShell.stories.jsx.map +0 -1
  54. package/jsx/core/AppShell/AppShell.styles.d.ts +0 -2
  55. package/jsx/core/AppShell/AppShell.styles.d.ts.map +0 -1
  56. package/jsx/core/AppShell/AppShell.styles.js +0 -5
  57. package/jsx/core/AppShell/AppShell.styles.js.map +0 -1
  58. package/jsx/core/Avatar/Avatar.stories.d.ts +0 -15
  59. package/jsx/core/Avatar/Avatar.stories.d.ts.map +0 -1
  60. package/jsx/core/Avatar/Avatar.stories.jsx +0 -75
  61. package/jsx/core/Avatar/Avatar.stories.jsx.map +0 -1
  62. package/jsx/core/Backdrop/Backdrop.stories.d.ts +0 -7
  63. package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +0 -1
  64. package/jsx/core/Backdrop/Backdrop.stories.jsx +0 -43
  65. package/jsx/core/Backdrop/Backdrop.stories.jsx.map +0 -1
  66. package/jsx/core/Badges/Alert.stories.d.ts +0 -6
  67. package/jsx/core/Badges/Alert.stories.d.ts.map +0 -1
  68. package/jsx/core/Badges/Alert.stories.jsx +0 -15
  69. package/jsx/core/Badges/Alert.stories.jsx.map +0 -1
  70. package/jsx/core/Badges/Count.stories.d.ts +0 -6
  71. package/jsx/core/Badges/Count.stories.d.ts.map +0 -1
  72. package/jsx/core/Badges/Count.stories.jsx +0 -20
  73. package/jsx/core/Badges/Count.stories.jsx.map +0 -1
  74. package/jsx/core/Badges/Keyboard.stories.d.ts +0 -6
  75. package/jsx/core/Badges/Keyboard.stories.d.ts.map +0 -1
  76. package/jsx/core/Badges/Keyboard.stories.jsx +0 -17
  77. package/jsx/core/Badges/Keyboard.stories.jsx.map +0 -1
  78. package/jsx/core/Badges/Selection.stories.d.ts +0 -5
  79. package/jsx/core/Badges/Selection.stories.d.ts.map +0 -1
  80. package/jsx/core/Badges/Selection.stories.jsx +0 -9
  81. package/jsx/core/Badges/Selection.stories.jsx.map +0 -1
  82. package/jsx/core/Badges/Status.stories.d.ts +0 -11
  83. package/jsx/core/Badges/Status.stories.d.ts.map +0 -1
  84. package/jsx/core/Badges/Status.stories.jsx +0 -43
  85. package/jsx/core/Badges/Status.stories.jsx.map +0 -1
  86. package/jsx/core/Badges/Tag.stories.d.ts +0 -5
  87. package/jsx/core/Badges/Tag.stories.d.ts.map +0 -1
  88. package/jsx/core/Badges/Tag.stories.jsx +0 -9
  89. package/jsx/core/Badges/Tag.stories.jsx.map +0 -1
  90. package/jsx/core/Banner/Banner.mocks.d.ts +0 -18
  91. package/jsx/core/Banner/Banner.mocks.d.ts.map +0 -1
  92. package/jsx/core/Banner/Banner.mocks.jsx +0 -41
  93. package/jsx/core/Banner/Banner.mocks.jsx.map +0 -1
  94. package/jsx/core/Banner/Banner.stories.d.ts +0 -18
  95. package/jsx/core/Banner/Banner.stories.d.ts.map +0 -1
  96. package/jsx/core/Banner/Banner.stories.jsx +0 -156
  97. package/jsx/core/Banner/Banner.stories.jsx.map +0 -1
  98. package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +0 -6
  99. package/jsx/core/Boolean/BooleanDisplay.stories.d.ts.map +0 -1
  100. package/jsx/core/Boolean/BooleanDisplay.stories.jsx +0 -19
  101. package/jsx/core/Boolean/BooleanDisplay.stories.jsx.map +0 -1
  102. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts +0 -2
  103. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts.map +0 -1
  104. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js +0 -8
  105. package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js.map +0 -1
  106. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
  107. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
  108. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx +0 -69
  109. package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +0 -1
  110. package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -2
  111. package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +0 -1
  112. package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js +0 -12
  113. package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js.map +0 -1
  114. package/jsx/core/Button/Button.stories.d.ts +0 -18
  115. package/jsx/core/Button/Button.stories.d.ts.map +0 -1
  116. package/jsx/core/Button/Button.stories.jsx +0 -119
  117. package/jsx/core/Button/Button.stories.jsx.map +0 -1
  118. package/jsx/core/Card/Card.stories.d.ts +0 -12
  119. package/jsx/core/Card/Card.stories.d.ts.map +0 -1
  120. package/jsx/core/Card/Card.stories.jsx +0 -85
  121. package/jsx/core/Card/Card.stories.jsx.map +0 -1
  122. package/jsx/core/Card/Card.styles.d.ts +0 -2
  123. package/jsx/core/Card/Card.styles.d.ts.map +0 -1
  124. package/jsx/core/Card/Card.styles.js +0 -5
  125. package/jsx/core/Card/Card.styles.js.map +0 -1
  126. package/jsx/core/Checkbox/Checkbox.stories.d.ts +0 -23
  127. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +0 -1
  128. package/jsx/core/Checkbox/Checkbox.stories.jsx +0 -100
  129. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +0 -1
  130. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +0 -11
  131. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +0 -1
  132. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -99
  133. package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +0 -1
  134. package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +0 -4
  135. package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +0 -1
  136. package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js +0 -9
  137. package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js.map +0 -1
  138. package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +0 -10
  139. package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +0 -1
  140. package/jsx/core/ColorPicker/ColorPicker.stories.jsx +0 -89
  141. package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +0 -1
  142. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +0 -4
  143. package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +0 -1
  144. package/jsx/core/ColorPicker/ColorPicker.styles.js +0 -11
  145. package/jsx/core/ColorPicker/ColorPicker.styles.js.map +0 -1
  146. package/jsx/core/ComboBox/ComboBox.mocks.d.ts +0 -26
  147. package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +0 -1
  148. package/jsx/core/ComboBox/ComboBox.mocks.jsx +0 -58
  149. package/jsx/core/ComboBox/ComboBox.mocks.jsx.map +0 -1
  150. package/jsx/core/ComboBox/ComboBox.stories.d.ts +0 -24
  151. package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +0 -1
  152. package/jsx/core/ComboBox/ComboBox.stories.jsx +0 -369
  153. package/jsx/core/ComboBox/ComboBox.stories.jsx.map +0 -1
  154. package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts +0 -8
  155. package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts.map +0 -1
  156. package/jsx/core/CompositeInput/CompositeInput.mocks.jsx +0 -8
  157. package/jsx/core/CompositeInput/CompositeInput.mocks.jsx.map +0 -1
  158. package/jsx/core/CompositeInput/CompositeInput.stories.d.ts +0 -9
  159. package/jsx/core/CompositeInput/CompositeInput.stories.d.ts.map +0 -1
  160. package/jsx/core/CompositeInput/CompositeInput.stories.jsx +0 -52
  161. package/jsx/core/CompositeInput/CompositeInput.stories.jsx.map +0 -1
  162. package/jsx/core/Configuration/Configuration.mocks.d.ts +0 -7
  163. package/jsx/core/Configuration/Configuration.mocks.d.ts.map +0 -1
  164. package/jsx/core/Configuration/Configuration.mocks.jsx +0 -9
  165. package/jsx/core/Configuration/Configuration.mocks.jsx.map +0 -1
  166. package/jsx/core/Configuration/Configuration.stories.d.ts +0 -25
  167. package/jsx/core/Configuration/Configuration.stories.d.ts.map +0 -1
  168. package/jsx/core/Configuration/Configuration.stories.jsx +0 -196
  169. package/jsx/core/Configuration/Configuration.stories.jsx.map +0 -1
  170. package/jsx/core/Configuration/Configuration.styles.d.ts +0 -6
  171. package/jsx/core/Configuration/Configuration.styles.d.ts.map +0 -1
  172. package/jsx/core/Configuration/Configuration.styles.js +0 -12
  173. package/jsx/core/Configuration/Configuration.styles.js.map +0 -1
  174. package/jsx/core/CreditCard/CreditCard.stories.d.ts +0 -14
  175. package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +0 -1
  176. package/jsx/core/CreditCard/CreditCard.stories.jsx +0 -50
  177. package/jsx/core/CreditCard/CreditCard.stories.jsx.map +0 -1
  178. package/jsx/core/Currency/Currency.stories.d.ts +0 -19
  179. package/jsx/core/Currency/Currency.stories.d.ts.map +0 -1
  180. package/jsx/core/Currency/Currency.stories.jsx +0 -105
  181. package/jsx/core/Currency/Currency.stories.jsx.map +0 -1
  182. package/jsx/core/DangerButton/DangerButton.stories.d.ts +0 -6
  183. package/jsx/core/DangerButton/DangerButton.stories.d.ts.map +0 -1
  184. package/jsx/core/DangerButton/DangerButton.stories.jsx +0 -17
  185. package/jsx/core/DangerButton/DangerButton.stories.jsx.map +0 -1
  186. package/jsx/core/DateTime/DateTime.stories.d.ts +0 -51
  187. package/jsx/core/DateTime/DateTime.stories.d.ts.map +0 -1
  188. package/jsx/core/DateTime/DateTime.stories.jsx +0 -291
  189. package/jsx/core/DateTime/DateTime.stories.jsx.map +0 -1
  190. package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +0 -7
  191. package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +0 -1
  192. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +0 -54
  193. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +0 -1
  194. package/jsx/core/DateTime/DateTimePicker.stories.d.ts +0 -7
  195. package/jsx/core/DateTime/DateTimePicker.stories.d.ts.map +0 -1
  196. package/jsx/core/DateTime/DateTimePicker.stories.jsx +0 -34
  197. package/jsx/core/DateTime/DateTimePicker.stories.jsx.map +0 -1
  198. package/jsx/core/Dialog/Dialog.stories.d.ts +0 -7
  199. package/jsx/core/Dialog/Dialog.stories.d.ts.map +0 -1
  200. package/jsx/core/Dialog/Dialog.stories.jsx +0 -15
  201. package/jsx/core/Dialog/Dialog.stories.jsx.map +0 -1
  202. package/jsx/core/Dialog/FormDialog.mocks.d.ts +0 -27
  203. package/jsx/core/Dialog/FormDialog.mocks.d.ts.map +0 -1
  204. package/jsx/core/Dialog/FormDialog.mocks.jsx +0 -194
  205. package/jsx/core/Dialog/FormDialog.mocks.jsx.map +0 -1
  206. package/jsx/core/Dialog/InfoDialog.mocks.d.ts +0 -4
  207. package/jsx/core/Dialog/InfoDialog.mocks.d.ts.map +0 -1
  208. package/jsx/core/Dialog/InfoDialog.mocks.jsx +0 -64
  209. package/jsx/core/Dialog/InfoDialog.mocks.jsx.map +0 -1
  210. package/jsx/core/Drawer/Drawer.stories.d.ts +0 -7
  211. package/jsx/core/Drawer/Drawer.stories.d.ts.map +0 -1
  212. package/jsx/core/Drawer/Drawer.stories.jsx +0 -98
  213. package/jsx/core/Drawer/Drawer.stories.jsx.map +0 -1
  214. package/jsx/core/Drawer/Drawer.styles.d.ts +0 -2
  215. package/jsx/core/Drawer/Drawer.styles.d.ts.map +0 -1
  216. package/jsx/core/Drawer/Drawer.styles.js +0 -11
  217. package/jsx/core/Drawer/Drawer.styles.js.map +0 -1
  218. package/jsx/core/Email/EmailDisplay.stories.d.ts +0 -6
  219. package/jsx/core/Email/EmailDisplay.stories.d.ts.map +0 -1
  220. package/jsx/core/Email/EmailDisplay.stories.jsx +0 -19
  221. package/jsx/core/Email/EmailDisplay.stories.jsx.map +0 -1
  222. package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +0 -8
  223. package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +0 -1
  224. package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx +0 -53
  225. package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx.map +0 -1
  226. package/jsx/core/EmptyState/EmptyState.stories.d.ts +0 -6
  227. package/jsx/core/EmptyState/EmptyState.stories.d.ts.map +0 -1
  228. package/jsx/core/EmptyState/EmptyState.stories.jsx +0 -18
  229. package/jsx/core/EmptyState/EmptyState.stories.jsx.map +0 -1
  230. package/jsx/core/ErrorState/ErrorState.stories.d.ts +0 -9
  231. package/jsx/core/ErrorState/ErrorState.stories.d.ts.map +0 -1
  232. package/jsx/core/ErrorState/ErrorState.stories.jsx +0 -20
  233. package/jsx/core/ErrorState/ErrorState.stories.jsx.map +0 -1
  234. package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +0 -7
  235. package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +0 -1
  236. package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx +0 -73
  237. package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +0 -1
  238. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts +0 -4
  239. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +0 -1
  240. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +0 -17
  241. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +0 -1
  242. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +0 -20
  243. package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +0 -1
  244. package/jsx/core/FieldGroup/FieldGroup.stories.jsx +0 -93
  245. package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +0 -1
  246. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +0 -25
  247. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +0 -1
  248. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +0 -109
  249. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +0 -1
  250. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +0 -12
  251. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +0 -1
  252. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +0 -134
  253. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +0 -1
  254. package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts +0 -20
  255. package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts.map +0 -1
  256. package/jsx/core/FieldValueList/FieldValueList.mocks.jsx +0 -54
  257. package/jsx/core/FieldValueList/FieldValueList.mocks.jsx.map +0 -1
  258. package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +0 -11
  259. package/jsx/core/FieldValueList/FieldValueList.stories.d.ts.map +0 -1
  260. package/jsx/core/FieldValueList/FieldValueList.stories.jsx +0 -37
  261. package/jsx/core/FieldValueList/FieldValueList.stories.jsx.map +0 -1
  262. package/jsx/core/FieldValueList/FieldValueList.styles.d.ts +0 -2
  263. package/jsx/core/FieldValueList/FieldValueList.styles.d.ts.map +0 -1
  264. package/jsx/core/FieldValueList/FieldValueList.styles.js +0 -8
  265. package/jsx/core/FieldValueList/FieldValueList.styles.js.map +0 -1
  266. package/jsx/core/File/FileDisplay.stories.d.ts +0 -20
  267. package/jsx/core/File/FileDisplay.stories.d.ts.map +0 -1
  268. package/jsx/core/File/FileDisplay.stories.jsx +0 -140
  269. package/jsx/core/File/FileDisplay.stories.jsx.map +0 -1
  270. package/jsx/core/File/FileInput.stories.d.ts +0 -10
  271. package/jsx/core/File/FileInput.stories.d.ts.map +0 -1
  272. package/jsx/core/File/FileInput.stories.jsx +0 -103
  273. package/jsx/core/File/FileInput.stories.jsx.map +0 -1
  274. package/jsx/core/File/FileService.mock.d.ts +0 -28
  275. package/jsx/core/File/FileService.mock.d.ts.map +0 -1
  276. package/jsx/core/File/FileService.mock.jsx +0 -139
  277. package/jsx/core/File/FileService.mock.jsx.map +0 -1
  278. package/jsx/core/File/MockFileInput.d.ts +0 -6
  279. package/jsx/core/File/MockFileInput.d.ts.map +0 -1
  280. package/jsx/core/File/MockFileInput.jsx +0 -24
  281. package/jsx/core/File/MockFileInput.jsx.map +0 -1
  282. package/jsx/core/Flex/Flex.styles.d.ts +0 -10
  283. package/jsx/core/Flex/Flex.styles.d.ts.map +0 -1
  284. package/jsx/core/Flex/Flex.styles.js +0 -41
  285. package/jsx/core/Flex/Flex.styles.js.map +0 -1
  286. package/jsx/core/Flex/FlexContainer.stories.d.ts +0 -21
  287. package/jsx/core/Flex/FlexContainer.stories.d.ts.map +0 -1
  288. package/jsx/core/Flex/FlexContainer.stories.jsx +0 -164
  289. package/jsx/core/Flex/FlexContainer.stories.jsx.map +0 -1
  290. package/jsx/core/Flex/FlexItem.stories.d.ts +0 -13
  291. package/jsx/core/Flex/FlexItem.stories.d.ts.map +0 -1
  292. package/jsx/core/Flex/FlexItem.stories.jsx +0 -71
  293. package/jsx/core/Flex/FlexItem.stories.jsx.map +0 -1
  294. package/jsx/core/Form/Form.mocks.d.ts +0 -14
  295. package/jsx/core/Form/Form.mocks.d.ts.map +0 -1
  296. package/jsx/core/Form/Form.mocks.jsx +0 -265
  297. package/jsx/core/Form/Form.mocks.jsx.map +0 -1
  298. package/jsx/core/Form/Form.stories.d.ts +0 -25
  299. package/jsx/core/Form/Form.stories.d.ts.map +0 -1
  300. package/jsx/core/Form/Form.stories.jsx +0 -106
  301. package/jsx/core/Form/Form.stories.jsx.map +0 -1
  302. package/jsx/core/Grid/Grid.styles.d.ts +0 -6
  303. package/jsx/core/Grid/Grid.styles.d.ts.map +0 -1
  304. package/jsx/core/Grid/Grid.styles.js +0 -36
  305. package/jsx/core/Grid/Grid.styles.js.map +0 -1
  306. package/jsx/core/Grid/GridContainer.stories.d.ts +0 -23
  307. package/jsx/core/Grid/GridContainer.stories.d.ts.map +0 -1
  308. package/jsx/core/Grid/GridContainer.stories.jsx +0 -168
  309. package/jsx/core/Grid/GridContainer.stories.jsx.map +0 -1
  310. package/jsx/core/Grid/GridItem.stories.d.ts +0 -12
  311. package/jsx/core/Grid/GridItem.stories.d.ts.map +0 -1
  312. package/jsx/core/Grid/GridItem.stories.jsx +0 -74
  313. package/jsx/core/Grid/GridItem.stories.jsx.map +0 -1
  314. package/jsx/core/HTML/HTML.stories.d.ts +0 -6
  315. package/jsx/core/HTML/HTML.stories.d.ts.map +0 -1
  316. package/jsx/core/HTML/HTML.stories.jsx +0 -13
  317. package/jsx/core/HTML/HTML.stories.jsx.map +0 -1
  318. package/jsx/core/Icon/Icon.mocks.d.ts +0 -26
  319. package/jsx/core/Icon/Icon.mocks.d.ts.map +0 -1
  320. package/jsx/core/Icon/Icon.mocks.jsx +0 -32
  321. package/jsx/core/Icon/Icon.mocks.jsx.map +0 -1
  322. package/jsx/core/Icon/Icon.stories.d.ts +0 -21
  323. package/jsx/core/Icon/Icon.stories.d.ts.map +0 -1
  324. package/jsx/core/Icon/Icon.stories.jsx +0 -112
  325. package/jsx/core/Icon/Icon.stories.jsx.map +0 -1
  326. package/jsx/core/Icon/Icon.styles.d.ts +0 -4
  327. package/jsx/core/Icon/Icon.styles.d.ts.map +0 -1
  328. package/jsx/core/Icon/Icon.styles.js +0 -25
  329. package/jsx/core/Icon/Icon.styles.js.map +0 -1
  330. package/jsx/core/IconPicker/IconPicker.stories.d.ts +0 -6
  331. package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +0 -1
  332. package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -35
  333. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +0 -1
  334. package/jsx/core/Image/Image.stories.d.ts +0 -5
  335. package/jsx/core/Image/Image.stories.d.ts.map +0 -1
  336. package/jsx/core/Image/Image.stories.jsx +0 -9
  337. package/jsx/core/Image/Image.stories.jsx.map +0 -1
  338. package/jsx/core/Input/Input.stories.d.ts +0 -20
  339. package/jsx/core/Input/Input.stories.d.ts.map +0 -1
  340. package/jsx/core/Input/Input.stories.jsx +0 -159
  341. package/jsx/core/Input/Input.stories.jsx.map +0 -1
  342. package/jsx/core/Label/Label.stories.d.ts +0 -10
  343. package/jsx/core/Label/Label.stories.d.ts.map +0 -1
  344. package/jsx/core/Label/Label.stories.jsx +0 -33
  345. package/jsx/core/Label/Label.stories.jsx.map +0 -1
  346. package/jsx/core/Lightbox/Lightbox.mocks.d.ts +0 -22
  347. package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +0 -1
  348. package/jsx/core/Lightbox/Lightbox.mocks.js +0 -97
  349. package/jsx/core/Lightbox/Lightbox.mocks.js.map +0 -1
  350. package/jsx/core/Lightbox/Lightbox.stories.d.ts +0 -10
  351. package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +0 -1
  352. package/jsx/core/Lightbox/Lightbox.stories.jsx +0 -70
  353. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +0 -1
  354. package/jsx/core/Link/Link.stories.d.ts +0 -13
  355. package/jsx/core/Link/Link.stories.d.ts.map +0 -1
  356. package/jsx/core/Link/Link.stories.jsx +0 -43
  357. package/jsx/core/Link/Link.stories.jsx.map +0 -1
  358. package/jsx/core/List/CommaSeparatedList.stories.d.ts +0 -6
  359. package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +0 -1
  360. package/jsx/core/List/CommaSeparatedList.stories.jsx +0 -31
  361. package/jsx/core/List/CommaSeparatedList.stories.jsx.map +0 -1
  362. package/jsx/core/List/OrderedList.stories.d.ts +0 -10
  363. package/jsx/core/List/OrderedList.stories.d.ts.map +0 -1
  364. package/jsx/core/List/OrderedList.stories.jsx +0 -38
  365. package/jsx/core/List/OrderedList.stories.jsx.map +0 -1
  366. package/jsx/core/List/UnorderedList.stories.d.ts +0 -10
  367. package/jsx/core/List/UnorderedList.stories.d.ts.map +0 -1
  368. package/jsx/core/List/UnorderedList.stories.jsx +0 -38
  369. package/jsx/core/List/UnorderedList.stories.jsx.map +0 -1
  370. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +0 -9
  371. package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +0 -1
  372. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +0 -58
  373. package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +0 -1
  374. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +0 -17
  375. package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +0 -1
  376. package/jsx/core/ListToolbar/ListToolbar.stories.jsx +0 -141
  377. package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +0 -1
  378. package/jsx/core/LiveLog/LiveLog.mocks.d.ts +0 -5
  379. package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +0 -1
  380. package/jsx/core/LiveLog/LiveLog.mocks.jsx +0 -47
  381. package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +0 -1
  382. package/jsx/core/LiveLog/LiveLog.stories.d.ts +0 -9
  383. package/jsx/core/LiveLog/LiveLog.stories.d.ts.map +0 -1
  384. package/jsx/core/LiveLog/LiveLog.stories.jsx +0 -19
  385. package/jsx/core/LiveLog/LiveLog.stories.jsx.map +0 -1
  386. package/jsx/core/Location/Location.stories.d.ts +0 -15
  387. package/jsx/core/Location/Location.stories.d.ts.map +0 -1
  388. package/jsx/core/Location/Location.stories.jsx +0 -142
  389. package/jsx/core/Location/Location.stories.jsx.map +0 -1
  390. package/jsx/core/Location/locationTestUtils.d.ts +0 -3
  391. package/jsx/core/Location/locationTestUtils.d.ts.map +0 -1
  392. package/jsx/core/Location/locationTestUtils.js +0 -29
  393. package/jsx/core/Location/locationTestUtils.js.map +0 -1
  394. package/jsx/core/Menu/Menu.mocks.d.ts +0 -4
  395. package/jsx/core/Menu/Menu.mocks.d.ts.map +0 -1
  396. package/jsx/core/Menu/Menu.mocks.js +0 -179
  397. package/jsx/core/Menu/Menu.mocks.js.map +0 -1
  398. package/jsx/core/Menu/Menu.stories.d.ts +0 -18
  399. package/jsx/core/Menu/Menu.stories.d.ts.map +0 -1
  400. package/jsx/core/Menu/Menu.stories.jsx +0 -196
  401. package/jsx/core/Menu/Menu.stories.jsx.map +0 -1
  402. package/jsx/core/Menu/Menu.styles.d.ts +0 -2
  403. package/jsx/core/Menu/Menu.styles.d.ts.map +0 -1
  404. package/jsx/core/Menu/Menu.styles.js +0 -6
  405. package/jsx/core/Menu/Menu.styles.js.map +0 -1
  406. package/jsx/core/MenuButton/MenuButton.stories.d.ts +0 -16
  407. package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +0 -1
  408. package/jsx/core/MenuButton/MenuButton.stories.jsx +0 -188
  409. package/jsx/core/MenuButton/MenuButton.stories.jsx.map +0 -1
  410. package/jsx/core/MetaList/MetaList.stories.d.ts +0 -9
  411. package/jsx/core/MetaList/MetaList.stories.d.ts.map +0 -1
  412. package/jsx/core/MetaList/MetaList.stories.jsx +0 -24
  413. package/jsx/core/MetaList/MetaList.stories.jsx.map +0 -1
  414. package/jsx/core/Modal/Modal.mocks.d.ts +0 -4
  415. package/jsx/core/Modal/Modal.mocks.d.ts.map +0 -1
  416. package/jsx/core/Modal/Modal.mocks.jsx +0 -44
  417. package/jsx/core/Modal/Modal.mocks.jsx.map +0 -1
  418. package/jsx/core/Modal/Modal.stories.d.ts +0 -36
  419. package/jsx/core/Modal/Modal.stories.d.ts.map +0 -1
  420. package/jsx/core/Modal/Modal.stories.jsx +0 -332
  421. package/jsx/core/Modal/Modal.stories.jsx.map +0 -1
  422. package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +0 -70
  423. package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +0 -1
  424. package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx +0 -401
  425. package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +0 -1
  426. package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts +0 -7
  427. package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +0 -1
  428. package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx +0 -133
  429. package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +0 -1
  430. package/jsx/core/NoValue/NoValue.stories.d.ts +0 -6
  431. package/jsx/core/NoValue/NoValue.stories.d.ts.map +0 -1
  432. package/jsx/core/NoValue/NoValue.stories.jsx +0 -30
  433. package/jsx/core/NoValue/NoValue.stories.jsx.map +0 -1
  434. package/jsx/core/Number/Number.stories.d.ts +0 -19
  435. package/jsx/core/Number/Number.stories.d.ts.map +0 -1
  436. package/jsx/core/Number/Number.stories.jsx +0 -303
  437. package/jsx/core/Number/Number.stories.jsx.map +0 -1
  438. package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +0 -3
  439. package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +0 -1
  440. package/jsx/core/PageTemplates/PageTemplates.mocks.js +0 -10
  441. package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +0 -1
  442. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +0 -33
  443. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
  444. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +0 -287
  445. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +0 -1
  446. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +0 -5
  447. package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +0 -1
  448. package/jsx/core/PageTemplates/PageTemplates.styles.js +0 -40
  449. package/jsx/core/PageTemplates/PageTemplates.styles.js.map +0 -1
  450. package/jsx/core/Pagination/Pagination.stories.d.ts +0 -6
  451. package/jsx/core/Pagination/Pagination.stories.d.ts.map +0 -1
  452. package/jsx/core/Pagination/Pagination.stories.jsx +0 -19
  453. package/jsx/core/Pagination/Pagination.stories.jsx.map +0 -1
  454. package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +0 -6
  455. package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts.map +0 -1
  456. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +0 -15
  457. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +0 -1
  458. package/jsx/core/Phone/Phone.stories.d.ts +0 -13
  459. package/jsx/core/Phone/Phone.stories.d.ts.map +0 -1
  460. package/jsx/core/Phone/Phone.stories.jsx +0 -52
  461. package/jsx/core/Phone/Phone.stories.jsx.map +0 -1
  462. package/jsx/core/Popover/Popover.mocks.d.ts +0 -9
  463. package/jsx/core/Popover/Popover.mocks.d.ts.map +0 -1
  464. package/jsx/core/Popover/Popover.mocks.jsx +0 -114
  465. package/jsx/core/Popover/Popover.mocks.jsx.map +0 -1
  466. package/jsx/core/Popover/Popover.stories.d.ts +0 -13
  467. package/jsx/core/Popover/Popover.stories.d.ts.map +0 -1
  468. package/jsx/core/Popover/Popover.stories.jsx +0 -209
  469. package/jsx/core/Popover/Popover.stories.jsx.map +0 -1
  470. package/jsx/core/Progress/Progress.mocks.d.ts +0 -2
  471. package/jsx/core/Progress/Progress.mocks.d.ts.map +0 -1
  472. package/jsx/core/Progress/Progress.mocks.js +0 -2
  473. package/jsx/core/Progress/Progress.mocks.js.map +0 -1
  474. package/jsx/core/Progress/Progress.stories.d.ts +0 -16
  475. package/jsx/core/Progress/Progress.stories.d.ts.map +0 -1
  476. package/jsx/core/Progress/Progress.stories.jsx +0 -124
  477. package/jsx/core/Progress/Progress.stories.jsx.map +0 -1
  478. package/jsx/core/Progress/Progress.styles.d.ts +0 -2
  479. package/jsx/core/Progress/Progress.styles.d.ts.map +0 -1
  480. package/jsx/core/Progress/Progress.styles.js +0 -14
  481. package/jsx/core/Progress/Progress.styles.js.map +0 -1
  482. package/jsx/core/QRCode/QRCode.stories.d.ts +0 -9
  483. package/jsx/core/QRCode/QRCode.stories.d.ts.map +0 -1
  484. package/jsx/core/QRCode/QRCode.stories.jsx +0 -17
  485. package/jsx/core/QRCode/QRCode.stories.jsx.map +0 -1
  486. package/jsx/core/RadioButton/RadioButton.stories.d.ts +0 -23
  487. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +0 -1
  488. package/jsx/core/RadioButton/RadioButton.stories.jsx +0 -95
  489. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +0 -1
  490. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +0 -12
  491. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +0 -1
  492. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -101
  493. package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +0 -1
  494. package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +0 -4
  495. package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +0 -1
  496. package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js +0 -9
  497. package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +0 -1
  498. package/jsx/core/Rating/Rating.stories.d.ts +0 -13
  499. package/jsx/core/Rating/Rating.stories.d.ts.map +0 -1
  500. package/jsx/core/Rating/Rating.stories.jsx +0 -39
  501. package/jsx/core/Rating/Rating.stories.jsx.map +0 -1
  502. package/jsx/core/SearchInput/SearchInput.mocks.d.ts +0 -12
  503. package/jsx/core/SearchInput/SearchInput.mocks.d.ts.map +0 -1
  504. package/jsx/core/SearchInput/SearchInput.mocks.js +0 -25
  505. package/jsx/core/SearchInput/SearchInput.mocks.js.map +0 -1
  506. package/jsx/core/SearchInput/SearchInput.stories.d.ts +0 -7
  507. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +0 -1
  508. package/jsx/core/SearchInput/SearchInput.stories.jsx +0 -44
  509. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +0 -1
  510. package/jsx/core/Select/Select.stories.d.ts +0 -18
  511. package/jsx/core/Select/Select.stories.d.ts.map +0 -1
  512. package/jsx/core/Select/Select.stories.jsx +0 -83
  513. package/jsx/core/Select/Select.stories.jsx.map +0 -1
  514. package/jsx/core/Sentiment/Sentiment.stories.d.ts +0 -20
  515. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +0 -1
  516. package/jsx/core/Sentiment/Sentiment.stories.jsx +0 -71
  517. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +0 -1
  518. package/jsx/core/SkipLinks/SkipLinks.stories.d.ts +0 -6
  519. package/jsx/core/SkipLinks/SkipLinks.stories.d.ts.map +0 -1
  520. package/jsx/core/SkipLinks/SkipLinks.stories.jsx +0 -29
  521. package/jsx/core/SkipLinks/SkipLinks.stories.jsx.map +0 -1
  522. package/jsx/core/SkipLinks/SkipLinks.styles.d.ts +0 -2
  523. package/jsx/core/SkipLinks/SkipLinks.styles.d.ts.map +0 -1
  524. package/jsx/core/SkipLinks/SkipLinks.styles.js +0 -16
  525. package/jsx/core/SkipLinks/SkipLinks.styles.js.map +0 -1
  526. package/jsx/core/Slider/Slider.stories.d.ts +0 -13
  527. package/jsx/core/Slider/Slider.stories.d.ts.map +0 -1
  528. package/jsx/core/Slider/Slider.stories.jsx +0 -78
  529. package/jsx/core/Slider/Slider.stories.jsx.map +0 -1
  530. package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +0 -11
  531. package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +0 -1
  532. package/jsx/core/SummaryItem/SummaryItem.stories.jsx +0 -36
  533. package/jsx/core/SummaryItem/SummaryItem.stories.jsx.map +0 -1
  534. package/jsx/core/SummaryList/SummaryList.mocks.d.ts +0 -20
  535. package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +0 -1
  536. package/jsx/core/SummaryList/SummaryList.mocks.jsx +0 -48
  537. package/jsx/core/SummaryList/SummaryList.mocks.jsx.map +0 -1
  538. package/jsx/core/SummaryList/SummaryList.stories.d.ts +0 -13
  539. package/jsx/core/SummaryList/SummaryList.stories.d.ts.map +0 -1
  540. package/jsx/core/SummaryList/SummaryList.stories.jsx +0 -131
  541. package/jsx/core/SummaryList/SummaryList.stories.jsx.map +0 -1
  542. package/jsx/core/SummaryList/mockUsers.d.ts +0 -16
  543. package/jsx/core/SummaryList/mockUsers.d.ts.map +0 -1
  544. package/jsx/core/SummaryList/mockUsers.js +0 -904
  545. package/jsx/core/SummaryList/mockUsers.js.map +0 -1
  546. package/jsx/core/Switch/Switch.stories.d.ts +0 -14
  547. package/jsx/core/Switch/Switch.stories.d.ts.map +0 -1
  548. package/jsx/core/Switch/Switch.stories.jsx +0 -60
  549. package/jsx/core/Switch/Switch.stories.jsx.map +0 -1
  550. package/jsx/core/Switch/Switch.styles.d.ts +0 -2
  551. package/jsx/core/Switch/Switch.styles.d.ts.map +0 -1
  552. package/jsx/core/Switch/Switch.styles.js +0 -13
  553. package/jsx/core/Switch/Switch.styles.js.map +0 -1
  554. package/jsx/core/Table/Table.mocks.d.ts +0 -25
  555. package/jsx/core/Table/Table.mocks.d.ts.map +0 -1
  556. package/jsx/core/Table/Table.mocks.jsx +0 -166
  557. package/jsx/core/Table/Table.mocks.jsx.map +0 -1
  558. package/jsx/core/Table/Table.stories.d.ts +0 -39
  559. package/jsx/core/Table/Table.stories.d.ts.map +0 -1
  560. package/jsx/core/Table/Table.stories.jsx +0 -178
  561. package/jsx/core/Table/Table.stories.jsx.map +0 -1
  562. package/jsx/core/Table/Table.styles.d.ts +0 -4
  563. package/jsx/core/Table/Table.styles.d.ts.map +0 -1
  564. package/jsx/core/Table/Table.styles.js +0 -9
  565. package/jsx/core/Table/Table.styles.js.map +0 -1
  566. package/jsx/core/Tabs/Tabs.stories.d.ts +0 -9
  567. package/jsx/core/Tabs/Tabs.stories.d.ts.map +0 -1
  568. package/jsx/core/Tabs/Tabs.stories.jsx +0 -59
  569. package/jsx/core/Tabs/Tabs.stories.jsx.map +0 -1
  570. package/jsx/core/Text/Text.stories.d.ts +0 -25
  571. package/jsx/core/Text/Text.stories.d.ts.map +0 -1
  572. package/jsx/core/Text/Text.stories.jsx +0 -134
  573. package/jsx/core/Text/Text.stories.jsx.map +0 -1
  574. package/jsx/core/TextArea/TextArea.stories.d.ts +0 -14
  575. package/jsx/core/TextArea/TextArea.stories.d.ts.map +0 -1
  576. package/jsx/core/TextArea/TextArea.stories.jsx +0 -71
  577. package/jsx/core/TextArea/TextArea.stories.jsx.map +0 -1
  578. package/jsx/core/Toaster/Toaster.stories.d.ts +0 -5
  579. package/jsx/core/Toaster/Toaster.stories.d.ts.map +0 -1
  580. package/jsx/core/Toaster/Toaster.stories.jsx +0 -27
  581. package/jsx/core/Toaster/Toaster.stories.jsx.map +0 -1
  582. package/jsx/core/Tooltip/Tooltip.stories.d.ts +0 -11
  583. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +0 -1
  584. package/jsx/core/Tooltip/Tooltip.stories.jsx +0 -66
  585. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +0 -1
  586. package/jsx/core/Tooltip/Tooltip.styles.d.ts +0 -2
  587. package/jsx/core/Tooltip/Tooltip.styles.d.ts.map +0 -1
  588. package/jsx/core/Tooltip/Tooltip.styles.js +0 -23
  589. package/jsx/core/Tooltip/Tooltip.styles.js.map +0 -1
  590. package/jsx/core/Tree/Tree.mocks.d.ts +0 -2
  591. package/jsx/core/Tree/Tree.mocks.d.ts.map +0 -1
  592. package/jsx/core/Tree/Tree.mocks.js +0 -20
  593. package/jsx/core/Tree/Tree.mocks.js.map +0 -1
  594. package/jsx/core/Tree/Tree.stories.d.ts +0 -7
  595. package/jsx/core/Tree/Tree.stories.d.ts.map +0 -1
  596. package/jsx/core/Tree/Tree.stories.jsx +0 -95
  597. package/jsx/core/Tree/Tree.stories.jsx.map +0 -1
  598. package/jsx/core/Tree/Tree.styles.d.ts +0 -3
  599. package/jsx/core/Tree/Tree.styles.d.ts.map +0 -1
  600. package/jsx/core/Tree/Tree.styles.js +0 -10
  601. package/jsx/core/Tree/Tree.styles.js.map +0 -1
  602. package/jsx/core/URL/URL.stories.d.ts +0 -6
  603. package/jsx/core/URL/URL.stories.d.ts.map +0 -1
  604. package/jsx/core/URL/URL.stories.jsx +0 -17
  605. package/jsx/core/URL/URL.stories.jsx.map +0 -1
  606. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +0 -15
  607. package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +0 -1
  608. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +0 -33
  609. package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +0 -1
  610. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +0 -10
  611. package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +0 -1
  612. package/jsx/dnd/DragDropList/DragDropList.stories.jsx +0 -55
  613. package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +0 -1
  614. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +0 -6
  615. package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +0 -1
  616. package/jsx/dnd/DragDropList/DragDropList.styles.js +0 -32
  617. package/jsx/dnd/DragDropList/DragDropList.styles.js.map +0 -1
  618. package/jsx/dnd/StandardDragDropList/Demo.d.ts +0 -7
  619. package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +0 -1
  620. package/jsx/dnd/StandardDragDropList/Demo.jsx +0 -156
  621. package/jsx/dnd/StandardDragDropList/Demo.jsx.map +0 -1
  622. package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts +0 -10
  623. package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts.map +0 -1
  624. package/jsx/dnd/StandardDragDropList/GroupConfig.jsx +0 -26
  625. package/jsx/dnd/StandardDragDropList/GroupConfig.jsx.map +0 -1
  626. package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts +0 -12
  627. package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts.map +0 -1
  628. package/jsx/dnd/StandardDragDropList/ItemConfig.jsx +0 -21
  629. package/jsx/dnd/StandardDragDropList/ItemConfig.jsx.map +0 -1
  630. package/jsx/dnd/StandardDragDropList/Popover.d.ts +0 -14
  631. package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +0 -1
  632. package/jsx/dnd/StandardDragDropList/Popover.jsx +0 -51
  633. package/jsx/dnd/StandardDragDropList/Popover.jsx.map +0 -1
  634. package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts +0 -16
  635. package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts.map +0 -1
  636. package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx +0 -104
  637. package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx.map +0 -1
  638. package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +0 -5
  639. package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts.map +0 -1
  640. package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx +0 -15
  641. package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx.map +0 -1
  642. package/jsx/dnd/StandardDragDropList/mockData.d.ts +0 -26
  643. package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +0 -1
  644. package/jsx/dnd/StandardDragDropList/mockData.js +0 -77
  645. package/jsx/dnd/StandardDragDropList/mockData.js.map +0 -1
  646. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +0 -8
  647. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +0 -1
  648. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx +0 -103
  649. package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +0 -1
  650. package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts +0 -11
  651. package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts.map +0 -1
  652. package/jsx/rte/DynamicContentEditor/FieldSelector.jsx +0 -82
  653. package/jsx/rte/DynamicContentEditor/FieldSelector.jsx.map +0 -1
  654. package/jsx/rte/Editor/Editor.mocks.d.ts +0 -329
  655. package/jsx/rte/Editor/Editor.mocks.d.ts.map +0 -1
  656. package/jsx/rte/Editor/Editor.mocks.jsx +0 -22
  657. package/jsx/rte/Editor/Editor.mocks.jsx.map +0 -1
  658. package/jsx/rte/Editor/Editor.stories.d.ts +0 -14
  659. package/jsx/rte/Editor/Editor.stories.d.ts.map +0 -1
  660. package/jsx/rte/Editor/Editor.stories.jsx +0 -159
  661. package/jsx/rte/Editor/Editor.stories.jsx.map +0 -1
  662. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +0 -3
  663. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +0 -1
  664. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx +0 -34
  665. package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +0 -1
  666. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +0 -7
  667. package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +0 -1
  668. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +0 -108
  669. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +0 -1
  670. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +0 -13
  671. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +0 -1
  672. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +0 -151
  673. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +0 -1
  674. package/jsx/social/Chat/Chat.mocks.d.ts +0 -52
  675. package/jsx/social/Chat/Chat.mocks.d.ts.map +0 -1
  676. package/jsx/social/Chat/Chat.mocks.js +0 -767
  677. package/jsx/social/Chat/Chat.mocks.js.map +0 -1
  678. package/jsx/social/Chat/Chat.stories.d.ts +0 -55
  679. package/jsx/social/Chat/Chat.stories.d.ts.map +0 -1
  680. package/jsx/social/Chat/Chat.stories.jsx +0 -678
  681. package/jsx/social/Chat/Chat.stories.jsx.map +0 -1
  682. package/jsx/social/Email/Email.mocks.d.ts +0 -352
  683. package/jsx/social/Email/Email.mocks.d.ts.map +0 -1
  684. package/jsx/social/Email/Email.mocks.jsx +0 -1215
  685. package/jsx/social/Email/Email.mocks.jsx.map +0 -1
  686. package/jsx/social/Email/Email.stories.d.ts +0 -83
  687. package/jsx/social/Email/Email.stories.d.ts.map +0 -1
  688. package/jsx/social/Email/Email.stories.jsx +0 -1219
  689. package/jsx/social/Email/Email.stories.jsx.map +0 -1
  690. package/jsx/social/Email/Email.styles.d.ts +0 -3
  691. package/jsx/social/Email/Email.styles.d.ts.map +0 -1
  692. package/jsx/social/Email/Email.styles.js +0 -11
  693. package/jsx/social/Email/Email.styles.js.map +0 -1
  694. package/jsx/social/Feed/Feed.mocks.d.ts +0 -53
  695. package/jsx/social/Feed/Feed.mocks.d.ts.map +0 -1
  696. package/jsx/social/Feed/Feed.mocks.jsx +0 -412
  697. package/jsx/social/Feed/Feed.mocks.jsx.map +0 -1
  698. package/jsx/social/Feed/Feed.stories.d.ts +0 -11
  699. package/jsx/social/Feed/Feed.stories.d.ts.map +0 -1
  700. package/jsx/social/Feed/Feed.stories.jsx +0 -222
  701. package/jsx/social/Feed/Feed.stories.jsx.map +0 -1
  702. package/jsx/social/Feed/FeedNewPost.mocks.d.ts +0 -8
  703. package/jsx/social/Feed/FeedNewPost.mocks.d.ts.map +0 -1
  704. package/jsx/social/Feed/FeedNewPost.mocks.jsx +0 -29
  705. package/jsx/social/Feed/FeedNewPost.mocks.jsx.map +0 -1
  706. package/jsx/social/Feed/FeedPost.mocks.d.ts +0 -4
  707. package/jsx/social/Feed/FeedPost.mocks.d.ts.map +0 -1
  708. package/jsx/social/Feed/FeedPost.mocks.jsx +0 -182
  709. package/jsx/social/Feed/FeedPost.mocks.jsx.map +0 -1
  710. package/jsx/social/Feed/FeedReply.mocks.d.ts +0 -13
  711. package/jsx/social/Feed/FeedReply.mocks.d.ts.map +0 -1
  712. package/jsx/social/Feed/FeedReply.mocks.jsx +0 -83
  713. package/jsx/social/Feed/FeedReply.mocks.jsx.map +0 -1
  714. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +0 -6
  715. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +0 -1
  716. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +0 -30
  717. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +0 -1
  718. package/jsx/work/Article/Article.mocks.d.ts +0 -18
  719. package/jsx/work/Article/Article.mocks.d.ts.map +0 -1
  720. package/jsx/work/Article/Article.mocks.js +0 -18
  721. package/jsx/work/Article/Article.mocks.js.map +0 -1
  722. package/jsx/work/Article/Article.stories.d.ts +0 -18
  723. package/jsx/work/Article/Article.stories.d.ts.map +0 -1
  724. package/jsx/work/Article/Article.stories.jsx +0 -243
  725. package/jsx/work/Article/Article.stories.jsx.map +0 -1
  726. package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts +0 -12
  727. package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts.map +0 -1
  728. package/jsx/work/ArticleList/ArticleBuddy.stories.jsx +0 -87
  729. package/jsx/work/ArticleList/ArticleBuddy.stories.jsx.map +0 -1
  730. package/jsx/work/ArticleList/ArticleList.mocks.d.ts +0 -222
  731. package/jsx/work/ArticleList/ArticleList.mocks.d.ts.map +0 -1
  732. package/jsx/work/ArticleList/ArticleList.mocks.js +0 -490
  733. package/jsx/work/ArticleList/ArticleList.mocks.js.map +0 -1
  734. package/jsx/work/ArticleList/ArticleList.stories.d.ts +0 -15
  735. package/jsx/work/ArticleList/ArticleList.stories.d.ts.map +0 -1
  736. package/jsx/work/ArticleList/ArticleList.stories.jsx +0 -517
  737. package/jsx/work/ArticleList/ArticleList.stories.jsx.map +0 -1
  738. package/jsx/work/Assignments/Assignments.stories.d.ts +0 -11
  739. package/jsx/work/Assignments/Assignments.stories.d.ts.map +0 -1
  740. package/jsx/work/Assignments/Assignments.stories.jsx +0 -64
  741. package/jsx/work/Assignments/Assignments.stories.jsx.map +0 -1
  742. package/jsx/work/CaseView/Attachments.mocks.d.ts +0 -3
  743. package/jsx/work/CaseView/Attachments.mocks.d.ts.map +0 -1
  744. package/jsx/work/CaseView/Attachments.mocks.jsx +0 -397
  745. package/jsx/work/CaseView/Attachments.mocks.jsx.map +0 -1
  746. package/jsx/work/CaseView/CaseView.mocks.d.ts +0 -117
  747. package/jsx/work/CaseView/CaseView.mocks.d.ts.map +0 -1
  748. package/jsx/work/CaseView/CaseView.mocks.jsx +0 -642
  749. package/jsx/work/CaseView/CaseView.mocks.jsx.map +0 -1
  750. package/jsx/work/CaseView/CaseView.stories.d.ts +0 -6
  751. package/jsx/work/CaseView/CaseView.stories.d.ts.map +0 -1
  752. package/jsx/work/CaseView/CaseView.stories.jsx +0 -57
  753. package/jsx/work/CaseView/CaseView.stories.jsx.map +0 -1
  754. package/jsx/work/CaseView/Details.mocks.d.ts +0 -3
  755. package/jsx/work/CaseView/Details.mocks.d.ts.map +0 -1
  756. package/jsx/work/CaseView/Details.mocks.jsx +0 -21
  757. package/jsx/work/CaseView/Details.mocks.jsx.map +0 -1
  758. package/jsx/work/CaseView/Pulse.mocks.d.ts +0 -7
  759. package/jsx/work/CaseView/Pulse.mocks.d.ts.map +0 -1
  760. package/jsx/work/CaseView/Pulse.mocks.jsx +0 -35
  761. package/jsx/work/CaseView/Pulse.mocks.jsx.map +0 -1
  762. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +0 -45
  763. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +0 -1
  764. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +0 -166
  765. package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +0 -1
  766. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +0 -5
  767. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +0 -1
  768. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +0 -24
  769. package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +0 -1
  770. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +0 -4
  771. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +0 -1
  772. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +0 -11
  773. package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +0 -1
  774. package/jsx/work/Confirmation/Confirmation.stories.d.ts +0 -13
  775. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +0 -1
  776. package/jsx/work/Confirmation/Confirmation.stories.jsx +0 -39
  777. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +0 -1
  778. package/jsx/work/Confirmation/Confirmation.styles.d.ts +0 -2
  779. package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +0 -1
  780. package/jsx/work/Confirmation/Confirmation.styles.js +0 -7
  781. package/jsx/work/Confirmation/Confirmation.styles.js.map +0 -1
  782. package/jsx/work/Details/Details.stories.d.ts +0 -10
  783. package/jsx/work/Details/Details.stories.d.ts.map +0 -1
  784. package/jsx/work/Details/Details.stories.jsx +0 -109
  785. package/jsx/work/Details/Details.stories.jsx.map +0 -1
  786. package/jsx/work/DetailsV2/DetailsV2.stories.d.ts +0 -10
  787. package/jsx/work/DetailsV2/DetailsV2.stories.d.ts.map +0 -1
  788. package/jsx/work/DetailsV2/DetailsV2.stories.jsx +0 -215
  789. package/jsx/work/DetailsV2/DetailsV2.stories.jsx.map +0 -1
  790. package/jsx/work/Glimpse/Glimpse.stories.d.ts +0 -5
  791. package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +0 -1
  792. package/jsx/work/Glimpse/Glimpse.stories.jsx +0 -42
  793. package/jsx/work/Glimpse/Glimpse.stories.jsx.map +0 -1
  794. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +0 -5
  795. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +0 -1
  796. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +0 -115
  797. package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +0 -1
  798. package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts +0 -13
  799. package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts.map +0 -1
  800. package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx +0 -56
  801. package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx.map +0 -1
  802. package/jsx/work/Predictions/Predictions.mocks.d.ts +0 -3
  803. package/jsx/work/Predictions/Predictions.mocks.d.ts.map +0 -1
  804. package/jsx/work/Predictions/Predictions.mocks.jsx +0 -18
  805. package/jsx/work/Predictions/Predictions.mocks.jsx.map +0 -1
  806. package/jsx/work/Predictions/Predictions.stories.d.ts +0 -5
  807. package/jsx/work/Predictions/Predictions.stories.d.ts.map +0 -1
  808. package/jsx/work/Predictions/Predictions.stories.jsx +0 -53
  809. package/jsx/work/Predictions/Predictions.stories.jsx.map +0 -1
  810. package/jsx/work/SearchResults/SearchResults.mocks.d.ts +0 -14
  811. package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +0 -1
  812. package/jsx/work/SearchResults/SearchResults.mocks.jsx +0 -97
  813. package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +0 -1
  814. package/jsx/work/SearchResults/SearchResults.stories.d.ts +0 -9
  815. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +0 -1
  816. package/jsx/work/SearchResults/SearchResults.stories.jsx +0 -242
  817. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +0 -1
  818. package/jsx/work/SearchResults/SearchResults.styles.d.ts +0 -5
  819. package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +0 -1
  820. package/jsx/work/SearchResults/SearchResults.styles.js +0 -12
  821. package/jsx/work/SearchResults/SearchResults.styles.js.map +0 -1
  822. package/jsx/work/Stages/Stages.mocks.d.ts +0 -14
  823. package/jsx/work/Stages/Stages.mocks.d.ts.map +0 -1
  824. package/jsx/work/Stages/Stages.mocks.jsx +0 -40
  825. package/jsx/work/Stages/Stages.mocks.jsx.map +0 -1
  826. package/jsx/work/Stages/Stages.stories.d.ts +0 -11
  827. package/jsx/work/Stages/Stages.stories.d.ts.map +0 -1
  828. package/jsx/work/Stages/Stages.stories.jsx +0 -45
  829. package/jsx/work/Stages/Stages.stories.jsx.map +0 -1
  830. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +0 -17
  831. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +0 -1
  832. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +0 -36
  833. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +0 -1
  834. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +0 -8
  835. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +0 -1
  836. package/jsx/work/Stakeholders/Stakeholders.stories.jsx +0 -99
  837. package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +0 -1
  838. package/jsx/work/Tags/Tags.mocks.d.ts +0 -3
  839. package/jsx/work/Tags/Tags.mocks.d.ts.map +0 -1
  840. package/jsx/work/Tags/Tags.mocks.js +0 -76
  841. package/jsx/work/Tags/Tags.mocks.js.map +0 -1
  842. package/jsx/work/Tags/Tags.stories.d.ts +0 -10
  843. package/jsx/work/Tags/Tags.stories.d.ts.map +0 -1
  844. package/jsx/work/Tags/Tags.stories.jsx +0 -66
  845. package/jsx/work/Tags/Tags.stories.jsx.map +0 -1
  846. package/jsx/work/Tasks/TaskList.stories.d.ts +0 -5
  847. package/jsx/work/Tasks/TaskList.stories.d.ts.map +0 -1
  848. package/jsx/work/Tasks/TaskList.stories.jsx +0 -19
  849. package/jsx/work/Tasks/TaskList.stories.jsx.map +0 -1
  850. package/jsx/work/Tasks/Tasks.mocks.d.ts +0 -22
  851. package/jsx/work/Tasks/Tasks.mocks.d.ts.map +0 -1
  852. package/jsx/work/Tasks/Tasks.mocks.js +0 -51
  853. package/jsx/work/Tasks/Tasks.mocks.js.map +0 -1
  854. package/jsx/work/Tasks/Tasks.stories.d.ts +0 -15
  855. package/jsx/work/Tasks/Tasks.stories.d.ts.map +0 -1
  856. package/jsx/work/Tasks/Tasks.stories.jsx +0 -79
  857. package/jsx/work/Tasks/Tasks.stories.jsx.map +0 -1
  858. package/jsx/work/Timeline/Timeline.mocks.d.ts +0 -3
  859. package/jsx/work/Timeline/Timeline.mocks.d.ts.map +0 -1
  860. package/jsx/work/Timeline/Timeline.mocks.jsx +0 -144
  861. package/jsx/work/Timeline/Timeline.mocks.jsx.map +0 -1
  862. package/jsx/work/Timeline/Timeline.stories.d.ts +0 -11
  863. package/jsx/work/Timeline/Timeline.stories.d.ts.map +0 -1
  864. package/jsx/work/Timeline/Timeline.stories.jsx +0 -78
  865. package/jsx/work/Timeline/Timeline.stories.jsx.map +0 -1
  866. package/jsx/wss/AppShell/AppShell.mocks.d.ts +0 -24
  867. package/jsx/wss/AppShell/AppShell.mocks.d.ts.map +0 -1
  868. package/jsx/wss/AppShell/AppShell.mocks.jsx +0 -64
  869. package/jsx/wss/AppShell/AppShell.mocks.jsx.map +0 -1
  870. package/jsx/wss/AppShell/AppShell.stories.d.ts +0 -19
  871. package/jsx/wss/AppShell/AppShell.stories.d.ts.map +0 -1
  872. package/jsx/wss/AppShell/AppShell.stories.jsx +0 -96
  873. package/jsx/wss/AppShell/AppShell.stories.jsx.map +0 -1
  874. package/jsx/wss/AppShell/AppShell.styles.d.ts +0 -2
  875. package/jsx/wss/AppShell/AppShell.styles.d.ts.map +0 -1
  876. package/jsx/wss/AppShell/AppShell.styles.js +0 -5
  877. package/jsx/wss/AppShell/AppShell.styles.js.map +0 -1
  878. package/jsx/wss/CaseView/CaseView.mocks.d.ts +0 -13
  879. package/jsx/wss/CaseView/CaseView.mocks.d.ts.map +0 -1
  880. package/jsx/wss/CaseView/CaseView.mocks.jsx +0 -34
  881. package/jsx/wss/CaseView/CaseView.mocks.jsx.map +0 -1
  882. package/jsx/wss/CaseView/CaseView.stories.d.ts +0 -12
  883. package/jsx/wss/CaseView/CaseView.stories.d.ts.map +0 -1
  884. package/jsx/wss/CaseView/CaseView.stories.jsx +0 -74
  885. package/jsx/wss/CaseView/CaseView.stories.jsx.map +0 -1
  886. package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts +0 -15
  887. package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
  888. package/jsx/wss/PageTemplates/PageTemplates.stories.jsx +0 -41
  889. package/jsx/wss/PageTemplates/PageTemplates.stories.jsx.map +0 -1
  890. package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts +0 -11
  891. package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts.map +0 -1
  892. package/jsx/wss/QuickCreate/QuickCreate.stories.jsx +0 -28
  893. package/jsx/wss/QuickCreate/QuickCreate.stories.jsx.map +0 -1
@@ -1,64 +0,0 @@
1
- import { useState } from 'react';
2
- import { MetaList, Text, Link, DateTimeDisplay, Avatar } from '@pega/cosmos-react-core';
3
- import { Assignments, tasksHelpers as helpers } from '@pega/cosmos-react-work';
4
- import { AIButtonFormDemo } from '../../core/AIButton/AIButton.stories';
5
- import viewGroups from '../Tasks/Tasks.mocks';
6
- export default {
7
- title: 'Work/Assignments',
8
- component: Assignments
9
- };
10
- export const AssignmentsDemo = (args) => {
11
- const [hasOpenTask, setHasOpenTask] = useState(false);
12
- const [open, setOpen] = useState(true);
13
- const activeView = helpers.getSelectedView(viewGroups);
14
- const activeViewTaskCount = args.count ?? activeView?.count ?? 0;
15
- const taskArray = Array.from({
16
- length: args.count ?? activeViewTaskCount
17
- }, (_, i) => {
18
- const dueIn = 86400000 * i;
19
- return {
20
- id: `${i}`,
21
- name: `Task ${i + 1}`,
22
- processName: i % 2 ? 'Demo process' : undefined,
23
- avatar: <Avatar name='James Gregory'/>,
24
- meta: (<MetaList items={[
25
- <Text variant='secondary'>
26
- Due <DateTimeDisplay variant='relative' value={Date.now() + dueIn}/>
27
- </Text>,
28
- <Link href='#demo'>Parent case link</Link>
29
- ]}/>),
30
- additionalActions: [
31
- {
32
- id: '1',
33
- text: 'Action 1'
34
- },
35
- {
36
- id: '2',
37
- text: 'Action 2'
38
- }
39
- ],
40
- onOpen: args.openableTasks !== false
41
- ? () => {
42
- setHasOpenTask(true);
43
- }
44
- : undefined,
45
- content: hasOpenTask ? (<AIButtonFormDemo onCancel={() => setHasOpenTask(false)} onSubmit={() => setHasOpenTask(false)}/>) : null
46
- };
47
- });
48
- return (<Assignments count={activeViewTaskCount} items={taskArray} collapsed={args.collapsed !== false ? open : undefined} onToggleCollapsed={args.collapsed !== false
49
- ? () => {
50
- setOpen(cur => !cur);
51
- }
52
- : undefined}/>);
53
- };
54
- AssignmentsDemo.args = {
55
- openableTasks: true,
56
- count: undefined,
57
- collapsed: true
58
- };
59
- AssignmentsDemo.argTypes = {
60
- count: { control: { type: 'number' } },
61
- openableTasks: { control: { type: 'boolean' } },
62
- collapsed: { control: { type: 'boolean' } }
63
- };
64
- //# sourceMappingURL=Assignments.stories.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Assignments.stories.jsx","sourceRoot":"","sources":["../../../src/work/Assignments/Assignments.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAQV,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,IAA2B,EAAE,EAAE;IAC7F,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ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type { Meta, StoryFn } from '@storybook/react';\n\nimport { MetaList, Text, Link, DateTimeDisplay, Avatar } from '@pega/cosmos-react-core';\nimport { Assignments, tasksHelpers as helpers } from '@pega/cosmos-react-work';\nimport type { AssignmentsProps, TaskItemProps } from '@pega/cosmos-react-work';\n\nimport { AIButtonFormDemo } from '../../core/AIButton/AIButton.stories';\nimport viewGroups from '../Tasks/Tasks.mocks';\n\nexport default {\n title: 'Work/Assignments',\n component: Assignments\n} as Meta;\n\ninterface AssignmentsStoryProps {\n collapsed?: boolean;\n count?: AssignmentsProps['count'];\n openableTasks?: boolean;\n}\n\nexport const AssignmentsDemo: StoryFn<AssignmentsStoryProps> = (args: AssignmentsStoryProps) => {\n const [hasOpenTask, setHasOpenTask] = useState(false);\n const [open, setOpen] = useState(true);\n\n const activeView = helpers.getSelectedView(viewGroups);\n const activeViewTaskCount = args.count ?? activeView?.count ?? 0;\n\n const taskArray: TaskItemProps[] = Array.from(\n {\n length: args.count ?? activeViewTaskCount\n },\n (_, i) => {\n const dueIn = 86400000 * i;\n\n return {\n id: `${i}`,\n name: `Task ${i + 1}`,\n processName: i % 2 ? 'Demo process' : undefined,\n avatar: <Avatar name='James Gregory' />,\n meta: (\n <MetaList\n items={[\n <Text variant='secondary'>\n Due <DateTimeDisplay variant='relative' value={Date.now() + dueIn} />\n </Text>,\n <Link href='#demo'>Parent case link</Link>\n ]}\n />\n ),\n additionalActions: [\n {\n id: '1',\n text: 'Action 1'\n },\n {\n id: '2',\n text: 'Action 2'\n }\n ],\n onOpen:\n args.openableTasks !== false\n ? () => {\n setHasOpenTask(true);\n }\n : undefined,\n content: hasOpenTask ? (\n <AIButtonFormDemo\n onCancel={() => setHasOpenTask(false)}\n onSubmit={() => setHasOpenTask(false)}\n />\n ) : null\n };\n }\n );\n\n return (\n <Assignments\n count={activeViewTaskCount}\n items={taskArray}\n collapsed={args.collapsed !== false ? open : undefined}\n onToggleCollapsed={\n args.collapsed !== false\n ? () => {\n setOpen(cur => !cur);\n }\n : undefined\n }\n />\n );\n};\n\nAssignmentsDemo.args = {\n openableTasks: true,\n count: undefined,\n collapsed: true\n};\n\nAssignmentsDemo.argTypes = {\n count: { control: { type: 'number' } },\n openableTasks: { control: { type: 'boolean' } },\n collapsed: { control: { type: 'boolean' } }\n};\n"]}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const AttachmentsMock: () => import("react").JSX.Element;
3
- //# sourceMappingURL=Attachments.mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Attachments.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/CaseView/Attachments.mocks.tsx"],"names":[],"mappings":";AAmfA,eAAO,MAAM,eAAe,mCAkI3B,CAAC"}
@@ -1,397 +0,0 @@
1
- import { useState, useCallback, useContext, useEffect, useRef, useMemo, forwardRef } from 'react';
2
- import { Button, FileInput, FileVisual, Progress, Modal, Text, SummaryList, ViewAll, getKindFromMimeType, getMimeTypeFromFile, Flex, Input, ComboBox, createUID, useModalManager, useModalContext, useToaster, DateTimeDisplay, MetaList, FormDialog } from '@pega/cosmos-react-core';
3
- import { loadingTimeoutMS } from '../../core/Progress/Progress.mocks';
4
- import { FileServiceContext, mockAttachmentListRequest, mockCategories } from '../../core/File/FileService.mock';
5
- const getSummaryListItemProps = ({ ref, file, editFile, cancelFile, deleteFile }) => {
6
- let actions;
7
- let visual;
8
- if ('progress' in file && typeof file.progress === 'number' && file.progress < 100) {
9
- visual = <Progress value={file.progress} placement='inline' variant='ring'/>;
10
- actions = [
11
- {
12
- id: 'Cancel',
13
- text: 'Cancel',
14
- icon: 'times',
15
- onClick: () => {
16
- cancelFile(file.id);
17
- }
18
- }
19
- ];
20
- }
21
- else {
22
- visual = (<FileVisual type={getKindFromMimeType(getMimeTypeFromFile(file.name) ?? '')} thumbnail={file.thumbnail}/>);
23
- actions = [
24
- {
25
- id: 'Edit',
26
- text: 'Edit',
27
- icon: 'pencil',
28
- onClick: () => {
29
- editFile?.(file);
30
- }
31
- },
32
- {
33
- id: 'Download',
34
- text: 'Download',
35
- icon: 'download',
36
- onClick: () => { }
37
- },
38
- {
39
- id: 'Delete',
40
- text: 'Delete',
41
- icon: 'trash',
42
- onClick: () => {
43
- deleteFile(file.id);
44
- }
45
- }
46
- ];
47
- }
48
- return {
49
- ref,
50
- id: file.id,
51
- visual,
52
- primary: file.name,
53
- contextualLabel: file.name,
54
- secondary: (<Text variant='secondary'>
55
- {'progress' in file && typeof file.progress === 'number' && file.progress < 100 ? (`Uploading…${Math.floor(file.progress)}%`) : (<MetaList items={[
56
- file.category,
57
- <>
58
- Uploaded{' '}
59
- <DateTimeDisplay variant='relative' value={file.createDate}/>
60
- </>
61
- ]}/>)}
62
- </Text>),
63
- actions
64
- };
65
- };
66
- const EditDialog = forwardRef(function EditDialog({ file, target, onSubmit, onCancel }, ref) {
67
- const [name, setName] = useState(file.name);
68
- const [error, setError] = useState('');
69
- const [loading, setLoading] = useState(false);
70
- const [categories, setCategories] = useState(() => {
71
- return [
72
- { id: createUID(), primary: 'No category', selected: false },
73
- ...mockCategories.map(category => {
74
- return {
75
- id: createUID(),
76
- primary: category,
77
- selected: file.category === category
78
- };
79
- })
80
- ];
81
- });
82
- const selectedCategory = useMemo(() => {
83
- const sc = categories.find(c => c.selected);
84
- return sc
85
- ? {
86
- items: {
87
- id: sc.id,
88
- text: sc.primary
89
- }
90
- }
91
- : undefined;
92
- }, [categories]);
93
- return (<FormDialog ref={ref} heading='Edit attachment' target={target} progress={loading ? 'Updating attachment...' : undefined} placement='bottom-start' onCancel={onCancel} onSubmit={() => {
94
- if (error)
95
- return;
96
- setLoading(true);
97
- setTimeout(() => {
98
- onSubmit({
99
- name,
100
- category: !selectedCategory || selectedCategory.items.text === 'No category'
101
- ? ''
102
- : selectedCategory.items.text
103
- });
104
- setLoading(false);
105
- }, loadingTimeoutMS);
106
- }}>
107
- <Flex container={{ direction: 'column', gap: 2 }}>
108
- <Input label='Name' placeholder='Enter name…' value={name} info={error} status={error ? 'error' : undefined} autoFocus required onChange={(e) => {
109
- setName(e.target.value);
110
- if (error && e.target.value) {
111
- setError('');
112
- }
113
- }} onBlur={() => {
114
- if (!name) {
115
- setError('Name is required.');
116
- }
117
- }}/>
118
- <ComboBox label='Category' placeholder='Choose…' selected={selectedCategory} menu={{
119
- mode: 'single-select',
120
- items: categories,
121
- onItemClick: id => {
122
- setCategories(cur => {
123
- return cur.map(category => {
124
- return {
125
- ...category,
126
- selected: category.id === id
127
- };
128
- });
129
- });
130
- }
131
- }}/>
132
- </Flex>
133
- </FormDialog>);
134
- });
135
- const AttachmentsModal = ({ defaultMode }) => {
136
- const [mode, setMode] = useState(defaultMode);
137
- const { push: pushToaster } = useToaster();
138
- const { dismiss } = useModalContext();
139
- const { files, setFiles, cancelFile, attachFile, deleteFile } = useContext(FileServiceContext);
140
- const [search, setSearch] = useState('');
141
- const [viewAllLoading, setViewAllLoading] = useState(true);
142
- const [addNewLoading, setAddNewLoading] = useState(false);
143
- const [newFiles, setNewFiles] = useState([]);
144
- const attachSelected = useCallback(() => {
145
- newFiles.forEach(attachFile);
146
- dismiss();
147
- }, [newFiles, attachFile]);
148
- const listItemEls = useRef([]);
149
- const [editFileIndex, setEditFileIndex] = useState(-1);
150
- const editDialogTargetLi = useMemo(() => {
151
- return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;
152
- }, [editFileIndex, listItemEls]);
153
- const menuButton = useMemo(() => editDialogTargetLi
154
- ? editDialogTargetLi.querySelector('button[aria-haspopup="menu"]')
155
- : null, [editDialogTargetLi]);
156
- const handleDialogClose = useCallback(() => {
157
- if (!editDialogTargetLi)
158
- return;
159
- setEditFileIndex(-1);
160
- menuButton?.focus();
161
- }, [menuButton, editDialogTargetLi]);
162
- const handleKeydown = useCallback((e) => {
163
- if (e.key === 'Escape') {
164
- setEditFileIndex(-1);
165
- }
166
- }, []);
167
- const editDialogRef = useRef(null);
168
- useEffect(() => {
169
- if (mode === 'viewAll') {
170
- const timeout = setTimeout(() => {
171
- setViewAllLoading(false);
172
- }, 1000);
173
- return () => {
174
- clearTimeout(timeout);
175
- };
176
- }
177
- }, [mode]);
178
- useEffect(() => {
179
- if (!editDialogTargetLi)
180
- return;
181
- document.addEventListener('keydown', handleKeydown);
182
- return () => {
183
- document.removeEventListener('keydown', handleKeydown);
184
- };
185
- }, [editDialogTargetLi]);
186
- useEffect(() => {
187
- listItemEls.current = [];
188
- }, [mode]);
189
- const onFilesAdded = useCallback((newlyAddedFiles) => {
190
- setNewFiles(current => [
191
- ...newlyAddedFiles.map((file, i) => {
192
- const id = createUID();
193
- return {
194
- id,
195
- name: file.name,
196
- category: '',
197
- File: file,
198
- ref: (el) => {
199
- listItemEls.current[i] = el;
200
- },
201
- onEdit: () => {
202
- setEditFileIndex(i);
203
- },
204
- onCancel: () => {
205
- setNewFiles(c => c.filter(f => f.id !== id));
206
- }
207
- };
208
- }),
209
- ...current
210
- ]);
211
- }, [files]);
212
- const actions = mode === 'addNew' ? (<>
213
- <Button onClick={dismiss} disabled={addNewLoading}>
214
- Cancel
215
- </Button>
216
- <Button type='submit' variant='primary' onClick={() => {
217
- setAddNewLoading(true);
218
- setTimeout(() => {
219
- attachSelected();
220
- setAddNewLoading(false);
221
- }, loadingTimeoutMS);
222
- }} disabled={newFiles.length === 0 || addNewLoading}>
223
- Upload files
224
- </Button>
225
- </>) : null;
226
- const content = mode === 'addNew' ? (<FileInput multiple label='Select files to upload' onFilesAdded={onFilesAdded} files={newFiles.map(f => ({ ...f, meta: f.category || undefined }))}/>) : (<ViewAll loading={viewAllLoading} items={(search ? files.filter(f => f.name.includes(search)) : files).map((file, i) => {
227
- return getSummaryListItemProps({
228
- ref: (el) => {
229
- listItemEls.current[i] = el;
230
- },
231
- file,
232
- editFile: () => {
233
- setEditFileIndex(i);
234
- },
235
- cancelFile: id => {
236
- const canceledFile = files.find(f => f.id === id);
237
- cancelFile(id);
238
- pushToaster({ content: `Cancelled uploading ${canceledFile.name}` });
239
- },
240
- deleteFile: async (id) => {
241
- const deletedFile = files.find(f => f.id === id);
242
- await deleteFile(id);
243
- pushToaster({ content: `${deletedFile.name} deleted` });
244
- }
245
- });
246
- })} actions={[
247
- {
248
- id: 'addNewFile',
249
- text: 'Add files',
250
- onClick: () => {
251
- setMode('addNew');
252
- }
253
- },
254
- {
255
- id: 'addNewLink',
256
- text: 'Add links',
257
- onClick: () => {
258
- setMode('addNew');
259
- }
260
- }
261
- ]} searchInputProps={{ onSearchChange: value => setSearch(value) }}/>);
262
- return (<Modal as={mode === 'addNew' ? 'form' : undefined} heading={mode === 'addNew' ? 'Add attachments' : 'Attachments'} actions={actions} progress={addNewLoading ? { message: 'Adding attachments...' } : undefined} onRequestDismiss={() => {
263
- return !editDialogTargetLi;
264
- }} onSubmit={mode === 'addNew'
265
- ? (e) => {
266
- e.preventDefault();
267
- }
268
- : undefined}>
269
- <>
270
- {content}
271
- {editDialogTargetLi && menuButton && (<EditDialog ref={editDialogRef} target={menuButton} file={mode === 'addNew' ? newFiles[editFileIndex] : files[editFileIndex]} onCancel={handleDialogClose} onSubmit={({ name, category }) => {
272
- handleDialogClose();
273
- if (mode === 'addNew') {
274
- setNewFiles(cur => {
275
- return cur.map((file, i) => {
276
- if (i === editFileIndex) {
277
- return {
278
- ...file,
279
- name,
280
- category
281
- };
282
- }
283
- return file;
284
- });
285
- });
286
- }
287
- else {
288
- setFiles(cur => cur.map((file, i) => {
289
- if (i === editFileIndex) {
290
- return {
291
- ...file,
292
- name,
293
- category
294
- };
295
- }
296
- return file;
297
- }));
298
- }
299
- }}/>)}
300
- </>
301
- </Modal>);
302
- };
303
- export const AttachmentsMock = () => {
304
- const { push: pushToaster } = useToaster();
305
- const { create: createModal } = useModalManager();
306
- const [loading, setLoading] = useState(true);
307
- const { files, setFiles, cancelFile, deleteFile } = useContext(FileServiceContext);
308
- const listItemEls = useRef([]);
309
- const [editFileIndex, setEditFileIndex] = useState(-1);
310
- const editDialogTargetLi = useMemo(() => {
311
- return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;
312
- }, [editFileIndex, listItemEls]);
313
- const menuButton = useMemo(() => editDialogTargetLi
314
- ? editDialogTargetLi.querySelector('button[aria-haspopup="menu"]')
315
- : null, [editDialogTargetLi]);
316
- const handleDialogClose = useCallback(() => {
317
- if (!editDialogTargetLi)
318
- return;
319
- setEditFileIndex(-1);
320
- menuButton?.focus();
321
- }, [menuButton, editDialogTargetLi]);
322
- const handleKeydown = useCallback((e) => {
323
- if (e.key === 'Escape') {
324
- setEditFileIndex(-1);
325
- }
326
- }, []);
327
- const editDialogRef = useRef(null);
328
- useEffect(() => {
329
- let mounted = true;
330
- (async () => {
331
- const attachments = await mockAttachmentListRequest();
332
- if (mounted) {
333
- setLoading(false);
334
- setFiles(attachments);
335
- }
336
- })();
337
- return () => {
338
- mounted = false;
339
- };
340
- }, []);
341
- useEffect(() => {
342
- if (!editDialogTargetLi)
343
- return;
344
- document.addEventListener('keydown', handleKeydown);
345
- return () => {
346
- document.removeEventListener('keydown', handleKeydown);
347
- };
348
- }, [editDialogTargetLi]);
349
- return (<>
350
- <SummaryList icon='paper-clip' name='Attachments' headingTag='h3' loading={loading} count={!loading && Array.isArray(files) ? files.length : undefined} actions={[
351
- {
352
- text: 'Add',
353
- id: 'addNew',
354
- icon: 'plus',
355
- onClick() {
356
- createModal(AttachmentsModal, { defaultMode: 'addNew' });
357
- }
358
- }
359
- ]} items={files.slice(0, 3).map((file, i) => {
360
- return getSummaryListItemProps({
361
- ref: (el) => {
362
- listItemEls.current[i] = el;
363
- },
364
- file,
365
- editFile: () => {
366
- setEditFileIndex(i);
367
- },
368
- cancelFile: id => {
369
- const canceledFile = files.find(f => f.id === id);
370
- cancelFile(id);
371
- pushToaster({ content: `Cancelled uploading ${canceledFile.name}` });
372
- },
373
- deleteFile: async (id) => {
374
- const deletedFile = files.find(f => f.id === id);
375
- await deleteFile(id);
376
- pushToaster({ content: `${deletedFile.name} deleted` });
377
- }
378
- });
379
- })} onViewAll={() => {
380
- createModal(AttachmentsModal, { defaultMode: 'viewAll' });
381
- }}/>
382
- {editDialogTargetLi && menuButton && (<EditDialog ref={editDialogRef} target={menuButton} file={files[editFileIndex]} onCancel={handleDialogClose} onSubmit={({ name, category }) => {
383
- handleDialogClose();
384
- setFiles(cur => cur.map((file, i) => {
385
- if (i === editFileIndex) {
386
- return {
387
- ...file,
388
- name,
389
- category
390
- };
391
- }
392
- return file;
393
- }));
394
- }}/>)}
395
- </>);
396
- };
397
- //# sourceMappingURL=Attachments.mocks.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Attachments.mocks.jsx","sourceRoot":"","sources":["../../../src/work/CaseView/Attachments.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlG,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,mBAAmB,EACnB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EACf,QAAQ,EACR,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACf,MAAM,kCAAkC,CAAC;AAU1C,MAAM,uBAAuB,GAAG,CAAC,EAC/B,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,UAAU,EAOX,EAAmB,EAAE;IACpB,IAAI,OAAiB,CAAC;IACtB,IAAI,MAAmB,CAAC;IAExB,IAAI,UAAU,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;QAClF,M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ACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, useCallback, useContext, useEffect, useRef, useMemo, forwardRef } from 'react';\nimport type { FormEvent, Ref, ChangeEvent, FC, PropsWithoutRef } from 'react';\n\nimport {\n Button,\n FileInput,\n FileVisual,\n Progress,\n Modal,\n Text,\n SummaryList,\n ViewAll,\n getKindFromMimeType,\n getMimeTypeFromFile,\n Flex,\n Input,\n ComboBox,\n createUID,\n useModalManager,\n useModalContext,\n useToaster,\n DateTimeDisplay,\n MetaList,\n FormDialog\n} from '@pega/cosmos-react-core';\nimport type { Action, SummaryListItem, FormDialogProps } from '@pega/cosmos-react-core';\n\nimport { loadingTimeoutMS } from '../../core/Progress/Progress.mocks';\nimport {\n FileServiceContext,\n mockAttachmentListRequest,\n mockCategories\n} from '../../core/File/FileService.mock';\nimport type {\n FileServiceContextValue,\n MockFileAttachmentResource,\n MockFileUploadItem\n} from '../../core/File/FileService.mock';\n\n// ---------------------------------------------------------------------------------------------------------------------\n// getSummaryListItemProps\n// ---------------------------------------------------------------------------------------------------------------------\nconst getSummaryListItemProps = ({\n ref,\n file,\n editFile,\n cancelFile,\n deleteFile\n}: {\n ref: Ref<HTMLLIElement>;\n file: MockFileAttachmentResource | MockFileUploadItem;\n editFile?: (file: MockFileAttachmentResource) => void;\n cancelFile: FileServiceContextValue['cancelFile'];\n deleteFile: FileServiceContextValue['deleteFile'];\n}): SummaryListItem => {\n let actions: Action[];\n let visual: JSX.Element;\n\n if ('progress' in file && typeof file.progress === 'number' && file.progress < 100) {\n visual = <Progress value={file.progress} placement='inline' variant='ring' />;\n actions = [\n {\n id: 'Cancel',\n text: 'Cancel',\n icon: 'times',\n onClick: () => {\n cancelFile(file.id);\n }\n }\n ];\n } else {\n visual = (\n <FileVisual\n type={getKindFromMimeType(getMimeTypeFromFile(file.name) ?? '')}\n thumbnail={(file as MockFileAttachmentResource).thumbnail}\n />\n );\n actions = [\n {\n id: 'Edit',\n text: 'Edit',\n icon: 'pencil',\n onClick: () => {\n editFile?.(file);\n }\n },\n {\n id: 'Download',\n text: 'Download',\n icon: 'download',\n onClick: () => {}\n },\n {\n id: 'Delete',\n text: 'Delete',\n icon: 'trash',\n onClick: () => {\n deleteFile(file.id);\n }\n }\n ];\n }\n\n return {\n ref,\n id: file.id,\n visual,\n primary: file.name,\n contextualLabel: file.name,\n secondary: (\n <Text variant='secondary'>\n {'progress' in file && typeof file.progress === 'number' && file.progress < 100 ? (\n `Uploading…${Math.floor(file.progress)}%`\n ) : (\n <MetaList\n items={[\n file.category,\n <>\n Uploaded{' '}\n <DateTimeDisplay\n variant='relative'\n value={(file as MockFileAttachmentResource).createDate}\n />\n </>\n ]}\n />\n )}\n </Text>\n ),\n actions\n };\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n// Attachment edit Dialog\n// ---------------------------------------------------------------------------------------------------------------------\ninterface EditDialogProps {\n file: MockFileAttachmentResource;\n target: FormDialogProps['target'];\n onSubmit: (fields: { name: string; category: string }) => void;\n onCancel: () => void;\n ref: Ref<HTMLDivElement>;\n}\n\nconst EditDialog: FC<EditDialogProps> = forwardRef(function EditDialog(\n { file, target, onSubmit, onCancel }: PropsWithoutRef<EditDialogProps>,\n ref: EditDialogProps['ref']\n) {\n const [name, setName] = useState(file.name);\n const [error, setError] = useState('');\n const [loading, setLoading] = useState(false);\n\n const [categories, setCategories] = useState(() => {\n return [\n { id: createUID(), primary: 'No category', selected: false },\n ...mockCategories.map(category => {\n return {\n id: createUID(),\n primary: category,\n selected: file.category === category\n };\n })\n ];\n });\n\n const selectedCategory = useMemo(() => {\n const sc = categories.find(c => c.selected);\n return sc\n ? {\n items: {\n id: sc.id,\n text: sc.primary\n }\n }\n : undefined;\n }, [categories]);\n\n return (\n <FormDialog\n ref={ref}\n heading='Edit attachment'\n target={target}\n progress={loading ? 'Updating attachment...' : undefined}\n placement='bottom-start'\n onCancel={onCancel}\n onSubmit={() => {\n if (error) return;\n setLoading(true);\n setTimeout(() => {\n onSubmit({\n name,\n category:\n !selectedCategory || selectedCategory.items.text === 'No category'\n ? ''\n : selectedCategory.items.text\n });\n setLoading(false);\n }, loadingTimeoutMS);\n }}\n >\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input\n label='Name'\n placeholder='Enter name…'\n value={name}\n info={error}\n status={error ? 'error' : undefined}\n autoFocus\n required\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setName(e.target.value);\n if (error && e.target.value) {\n setError('');\n }\n }}\n onBlur={() => {\n if (!name) {\n setError('Name is required.');\n }\n }}\n />\n <ComboBox\n label='Category'\n placeholder='Choose…'\n selected={selectedCategory}\n menu={{\n mode: 'single-select',\n items: categories,\n onItemClick: id => {\n setCategories(cur => {\n return cur.map(category => {\n return {\n ...category,\n selected: category.id === id\n };\n });\n });\n }\n }}\n />\n </Flex>\n </FormDialog>\n );\n});\n\n// ---------------------------------------------------------------------------------------------------------------------\n// AttachmentsModal\n// ---------------------------------------------------------------------------------------------------------------------\ninterface AttachmentsModalProps {\n defaultMode: 'viewAll' | 'addNew';\n}\n\nconst AttachmentsModal = ({ defaultMode }: AttachmentsModalProps) => {\n const [mode, setMode] = useState(defaultMode);\n\n const { push: pushToaster } = useToaster();\n const { dismiss } = useModalContext();\n const { files, setFiles, cancelFile, attachFile, deleteFile } = useContext(FileServiceContext);\n\n const [search, setSearch] = useState('');\n const [viewAllLoading, setViewAllLoading] = useState(true);\n const [addNewLoading, setAddNewLoading] = useState(false);\n const [newFiles, setNewFiles] = useState<MockFileUploadItem[]>([]);\n\n const attachSelected = useCallback(() => {\n newFiles.forEach(attachFile);\n dismiss();\n }, [newFiles, attachFile]);\n\n const listItemEls = useRef<HTMLLIElement[]>([]);\n const [editFileIndex, setEditFileIndex] = useState<number>(-1);\n\n const editDialogTargetLi = useMemo(() => {\n return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;\n }, [editFileIndex, listItemEls]);\n\n const menuButton = useMemo(\n () =>\n editDialogTargetLi\n ? editDialogTargetLi.querySelector<HTMLButtonElement>('button[aria-haspopup=\"menu\"]')\n : null,\n [editDialogTargetLi]\n );\n\n const handleDialogClose = useCallback(() => {\n if (!editDialogTargetLi) return;\n setEditFileIndex(-1);\n menuButton?.focus();\n }, [menuButton, editDialogTargetLi]);\n\n const handleKeydown = useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setEditFileIndex(-1);\n }\n }, []);\n\n const editDialogRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (mode === 'viewAll') {\n const timeout = setTimeout(() => {\n setViewAllLoading(false);\n }, 1000);\n\n return () => {\n clearTimeout(timeout);\n };\n }\n }, [mode]);\n\n useEffect(() => {\n if (!editDialogTargetLi) return;\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [editDialogTargetLi]);\n\n useEffect(() => {\n // Since the component is performing double duty we need to empty out ref elements from a prior render mode.\n listItemEls.current = [];\n }, [mode]);\n\n const onFilesAdded = useCallback(\n (newlyAddedFiles: File[]) => {\n setNewFiles(current => [\n ...newlyAddedFiles.map((file, i) => {\n const id = createUID();\n return {\n id,\n name: file.name,\n category: '',\n File: file,\n ref: (el: HTMLLIElement) => {\n listItemEls.current[i] = el;\n },\n onEdit: () => {\n setEditFileIndex(i);\n },\n onCancel: () => {\n setNewFiles(c => c.filter(f => f.id !== id));\n }\n };\n }),\n ...current\n ]);\n },\n [files]\n );\n\n // Actions for the modal\n const actions =\n mode === 'addNew' ? (\n <>\n <Button onClick={dismiss} disabled={addNewLoading}>\n Cancel\n </Button>\n <Button\n type='submit'\n variant='primary'\n // Normally this would trigger a submit event but we are preventing that in the Modal's onSubmit.\n onClick={() => {\n setAddNewLoading(true);\n setTimeout(() => {\n attachSelected();\n setAddNewLoading(false);\n }, loadingTimeoutMS);\n }}\n disabled={newFiles.length === 0 || addNewLoading}\n >\n Upload files\n </Button>\n </>\n ) : null;\n\n // Content for the modal\n const content =\n mode === 'addNew' ? (\n <FileInput\n multiple\n label='Select files to upload'\n onFilesAdded={onFilesAdded}\n files={newFiles.map(f => ({ ...f, meta: f.category || undefined }))}\n />\n ) : (\n <ViewAll\n loading={viewAllLoading}\n items={(search ? files.filter(f => f.name.includes(search)) : files).map((file, i) => {\n return getSummaryListItemProps({\n ref: (el: HTMLLIElement) => {\n listItemEls.current[i] = el;\n },\n file,\n editFile: () => {\n setEditFileIndex(i);\n },\n cancelFile: id => {\n const canceledFile = files.find(f => f.id === id) as MockFileUploadItem;\n cancelFile(id);\n pushToaster({ content: `Cancelled uploading ${canceledFile.name}` });\n },\n deleteFile: async id => {\n const deletedFile = files.find(f => f.id === id) as MockFileAttachmentResource;\n await deleteFile(id);\n pushToaster({ content: `${deletedFile.name} deleted` });\n }\n });\n })}\n actions={[\n {\n id: 'addNewFile',\n text: 'Add files',\n onClick: () => {\n setMode('addNew');\n }\n },\n {\n id: 'addNewLink',\n text: 'Add links',\n onClick: () => {\n setMode('addNew');\n }\n }\n ]}\n searchInputProps={{ onSearchChange: value => setSearch(value) }}\n />\n );\n\n return (\n <Modal\n as={mode === 'addNew' ? 'form' : undefined}\n heading={mode === 'addNew' ? 'Add attachments' : 'Attachments'}\n actions={actions}\n progress={addNewLoading ? { message: 'Adding attachments...' } : undefined}\n onRequestDismiss={() => {\n return !editDialogTargetLi;\n }}\n onSubmit={\n mode === 'addNew'\n ? (e: FormEvent) => {\n e.preventDefault();\n }\n : undefined\n }\n >\n <>\n {content}\n {editDialogTargetLi && menuButton && (\n <EditDialog\n ref={editDialogRef}\n target={menuButton}\n file={mode === 'addNew' ? newFiles[editFileIndex] : files[editFileIndex]}\n onCancel={handleDialogClose}\n onSubmit={({ name, category }) => {\n handleDialogClose();\n\n // TS kept from easily consolidating like:\n // const setter = mode === 'addNew' ? setNewFiles : setFiles;\n // Could not avoid map's file param as \"any\".\n if (mode === 'addNew') {\n setNewFiles(cur => {\n return cur.map((file, i) => {\n if (i === editFileIndex) {\n return {\n ...file,\n name,\n category\n };\n }\n\n return file;\n });\n });\n } else {\n setFiles(cur =>\n cur.map((file, i) => {\n if (i === editFileIndex) {\n return {\n ...file,\n name,\n category\n };\n }\n\n return file;\n })\n );\n }\n }}\n />\n )}\n </>\n </Modal>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n// Attachments mock\n// ---------------------------------------------------------------------------------------------------------------------\nexport const AttachmentsMock = () => {\n const { push: pushToaster } = useToaster();\n const { create: createModal } = useModalManager();\n const [loading, setLoading] = useState(true);\n const { files, setFiles, cancelFile, deleteFile } = useContext(FileServiceContext);\n\n const listItemEls = useRef<HTMLLIElement[]>([]);\n const [editFileIndex, setEditFileIndex] = useState<number>(-1);\n\n const editDialogTargetLi = useMemo(() => {\n return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;\n }, [editFileIndex, listItemEls]);\n\n const menuButton = useMemo(\n () =>\n editDialogTargetLi\n ? editDialogTargetLi.querySelector<HTMLButtonElement>('button[aria-haspopup=\"menu\"]')\n : null,\n [editDialogTargetLi]\n );\n\n const handleDialogClose = useCallback(() => {\n if (!editDialogTargetLi) return;\n setEditFileIndex(-1);\n menuButton?.focus();\n }, [menuButton, editDialogTargetLi]);\n\n const handleKeydown = useCallback((e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setEditFileIndex(-1);\n }\n }, []);\n\n const editDialogRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let mounted = true;\n\n (async () => {\n const attachments = await mockAttachmentListRequest();\n\n // Avoids: Warning: Can't perform a React state update on an unmounted component.\n if (mounted) {\n setLoading(false);\n setFiles(attachments);\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, []);\n\n useEffect(() => {\n if (!editDialogTargetLi) return;\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [editDialogTargetLi]);\n\n return (\n <>\n <SummaryList\n icon='paper-clip'\n name='Attachments'\n headingTag='h3'\n loading={loading}\n count={!loading && Array.isArray(files) ? files.length : undefined}\n actions={[\n {\n text: 'Add',\n id: 'addNew',\n icon: 'plus',\n onClick() {\n createModal(AttachmentsModal, { defaultMode: 'addNew' as const });\n }\n }\n ]}\n items={files.slice(0, 3).map((file, i) => {\n return getSummaryListItemProps({\n ref: (el: HTMLLIElement) => {\n listItemEls.current[i] = el;\n },\n file,\n editFile: () => {\n setEditFileIndex(i);\n },\n cancelFile: id => {\n const canceledFile = files.find(f => f.id === id) as MockFileUploadItem;\n cancelFile(id);\n pushToaster({ content: `Cancelled uploading ${canceledFile.name}` });\n },\n deleteFile: async id => {\n const deletedFile = files.find(f => f.id === id) as MockFileAttachmentResource;\n await deleteFile(id);\n pushToaster({ content: `${deletedFile.name} deleted` });\n }\n });\n })}\n onViewAll={() => {\n createModal(AttachmentsModal, { defaultMode: 'viewAll' as const });\n }}\n />\n {editDialogTargetLi && menuButton && (\n <EditDialog\n ref={editDialogRef}\n target={menuButton}\n file={files[editFileIndex]}\n onCancel={handleDialogClose}\n onSubmit={({ name, category }) => {\n handleDialogClose();\n setFiles(cur =>\n cur.map((file, i) => {\n if (i === editFileIndex) {\n return {\n ...file,\n name,\n category\n };\n }\n\n return file;\n })\n );\n }}\n />\n )}\n </>\n );\n};\n"]}