@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.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 (580) hide show
  1. package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
  2. package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  3. package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
  4. package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
  5. package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
  6. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  7. package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
  8. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  9. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  10. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  11. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  12. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  13. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  14. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  15. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
  16. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
  17. package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
  18. package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  19. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  20. package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
  21. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
  22. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  23. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
  24. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  25. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  26. package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
  27. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  28. package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
  29. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  30. package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
  31. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  32. package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
  33. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  34. package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
  35. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  36. package/jsx/core/Badges/Status.stories.d.ts +5 -0
  37. package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
  38. package/jsx/core/Badges/Status.stories.jsx +25 -1
  39. package/jsx/core/Badges/Status.stories.jsx.map +1 -1
  40. package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
  41. package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
  42. package/jsx/core/Banner/Banner.mocks.jsx +41 -0
  43. package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
  44. package/jsx/core/Banner/Banner.stories.d.ts +5 -1
  45. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  46. package/jsx/core/Banner/Banner.stories.jsx +22 -39
  47. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  48. package/jsx/core/Button/Button.stories.d.ts +8 -0
  49. package/jsx/core/Button/Button.stories.d.ts.map +1 -1
  50. package/jsx/core/Button/Button.stories.jsx +32 -3
  51. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  52. package/jsx/core/Card/Card.stories.d.ts +5 -0
  53. package/jsx/core/Card/Card.stories.d.ts.map +1 -1
  54. package/jsx/core/Card/Card.stories.jsx +30 -1
  55. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  56. package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
  57. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  58. package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
  59. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  60. package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
  61. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  62. package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
  63. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  64. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
  65. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
  66. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  67. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  68. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  69. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  70. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  71. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
  72. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
  73. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  74. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
  75. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  76. package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
  77. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  78. package/jsx/core/File/FileDisplay.stories.jsx +37 -2
  79. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  80. package/jsx/core/Flex/Flex.styles.d.ts +2 -2
  81. package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
  82. package/jsx/core/Flex/Flex.styles.js +17 -17
  83. package/jsx/core/Flex/Flex.styles.js.map +1 -1
  84. package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
  85. package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  86. package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
  87. package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
  88. package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
  89. package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
  90. package/jsx/core/Form/Form.mocks.d.ts +8 -0
  91. package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
  92. package/jsx/core/Form/Form.mocks.jsx +138 -0
  93. package/jsx/core/Form/Form.mocks.jsx.map +1 -0
  94. package/jsx/core/Form/Form.stories.d.ts +10 -7
  95. package/jsx/core/Form/Form.stories.d.ts.map +1 -1
  96. package/jsx/core/Form/Form.stories.jsx +44 -138
  97. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  98. package/jsx/core/Grid/Grid.styles.d.ts +2 -2
  99. package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
  100. package/jsx/core/Grid/Grid.styles.js +4 -4
  101. package/jsx/core/Grid/Grid.styles.js.map +1 -1
  102. package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
  103. package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
  104. package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
  105. package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
  106. package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
  107. package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
  108. package/jsx/core/Grid/GridItem.stories.jsx +28 -28
  109. package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
  110. package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
  111. package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
  112. package/jsx/core/Icon/Icon.mocks.jsx +9 -0
  113. package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
  114. package/jsx/core/Icon/Icon.stories.d.ts +1 -0
  115. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  116. package/jsx/core/Icon/Icon.stories.jsx +7 -1
  117. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  118. package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  119. package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
  120. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  121. package/jsx/core/Input/Input.stories.d.ts +9 -0
  122. package/jsx/core/Input/Input.stories.d.ts.map +1 -1
  123. package/jsx/core/Input/Input.stories.jsx +40 -1
  124. package/jsx/core/Input/Input.stories.jsx.map +1 -1
  125. package/jsx/core/Label/Label.stories.d.ts +4 -0
  126. package/jsx/core/Label/Label.stories.d.ts.map +1 -1
  127. package/jsx/core/Label/Label.stories.jsx +18 -1
  128. package/jsx/core/Label/Label.stories.jsx.map +1 -1
  129. package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  130. package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  131. package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
  132. package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
  133. package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
  134. package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  135. package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
  136. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
  137. package/jsx/core/Link/Link.stories.d.ts +11 -1
  138. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  139. package/jsx/core/Link/Link.stories.jsx +22 -5
  140. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  141. package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  142. package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
  143. package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
  144. package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
  145. package/jsx/core/List/OrderedList.stories.jsx +10 -10
  146. package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
  147. package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
  148. package/jsx/core/List/UnorderedList.stories.jsx +10 -10
  149. package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
  150. package/jsx/core/Menu/Menu.stories.d.ts +3 -3
  151. package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
  152. package/jsx/core/Menu/Menu.stories.jsx +8 -12
  153. package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
  154. package/jsx/core/Modal/Modal.mocks.jsx +1 -1
  155. package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
  156. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  157. package/jsx/core/Number/Number.stories.jsx +1 -4
  158. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  159. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  160. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  161. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
  162. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  163. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
  164. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
  165. package/jsx/core/Popover/Popover.stories.d.ts +1 -2
  166. package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
  167. package/jsx/core/Popover/Popover.stories.jsx +35 -37
  168. package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
  169. package/jsx/core/Progress/Progress.stories.d.ts +4 -0
  170. package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
  171. package/jsx/core/Progress/Progress.stories.jsx +22 -1
  172. package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
  173. package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
  174. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  175. package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
  176. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  177. package/jsx/core/Rating/Rating.stories.d.ts +8 -1
  178. package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
  179. package/jsx/core/Rating/Rating.stories.jsx +21 -4
  180. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  181. package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
  182. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  183. package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
  184. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
  185. package/jsx/core/Select/Select.stories.d.ts +8 -0
  186. package/jsx/core/Select/Select.stories.d.ts.map +1 -1
  187. package/jsx/core/Select/Select.stories.jsx +35 -1
  188. package/jsx/core/Select/Select.stories.jsx.map +1 -1
  189. package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
  190. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  191. package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
  192. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  193. package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
  194. package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
  195. package/jsx/core/Switch/Switch.stories.d.ts +7 -0
  196. package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
  197. package/jsx/core/Switch/Switch.stories.jsx +34 -1
  198. package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
  199. package/jsx/core/Table/Table.stories.d.ts +25 -0
  200. package/jsx/core/Table/Table.stories.d.ts.map +1 -1
  201. package/jsx/core/Table/Table.stories.jsx +120 -1
  202. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  203. package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
  204. package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
  205. package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
  206. package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
  207. package/jsx/core/Text/Text.stories.d.ts +19 -0
  208. package/jsx/core/Text/Text.stories.d.ts.map +1 -1
  209. package/jsx/core/Text/Text.stories.jsx +112 -1
  210. package/jsx/core/Text/Text.stories.jsx.map +1 -1
  211. package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
  212. package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
  213. package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
  214. package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
  215. package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
  216. package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
  217. package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
  218. package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
  219. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  220. package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
  221. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  222. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
  223. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  224. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  225. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
  226. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  227. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  228. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  229. package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
  230. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  231. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  232. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  233. package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
  234. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  235. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
  236. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  237. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  238. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  239. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
  240. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
  241. package/jsx/social/Chat/Chat.stories.d.ts +31 -22
  242. package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
  243. package/jsx/social/Chat/Chat.stories.jsx +106 -153
  244. package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
  245. package/jsx/social/Email/Email.mocks.d.ts +1 -2
  246. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  247. package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
  248. package/jsx/social/Email/Email.mocks.js.map +1 -0
  249. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  250. package/jsx/social/Email/Email.stories.jsx +7 -8
  251. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  252. package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
  253. package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
  254. package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
  255. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  256. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  257. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
  258. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
  259. package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
  260. package/jsx/work/CaseView/FileService.mock.jsx +6 -2
  261. package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
  262. package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
  263. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  264. package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
  265. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
  266. package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
  267. package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  268. package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
  269. package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
  270. package/jsx/work/Details/Details.stories.jsx +3 -3
  271. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  272. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  273. package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
  274. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
  275. package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
  276. package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  277. package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
  278. package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
  279. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
  280. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  281. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
  282. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
  283. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  284. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  285. package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
  286. package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
  287. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  288. package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
  289. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  290. package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
  291. package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  292. package/lib/build/AppHeader/AppHeader.stories.js +46 -13
  293. package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
  294. package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
  295. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  296. package/lib/build/AppShell/AppShell.stories.js +46 -13
  297. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  298. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  299. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  300. package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  301. package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  302. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  303. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  304. package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
  305. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
  306. package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
  307. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  308. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  309. package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
  310. package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
  311. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  312. package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
  313. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  314. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  315. package/lib/build/Workbench/Workbench.stories.js +15 -17
  316. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  317. package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
  318. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  319. package/lib/core/AppShell/AppShell.stories.js +23 -1
  320. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  321. package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
  322. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  323. package/lib/core/Avatar/Avatar.stories.js +30 -5
  324. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  325. package/lib/core/Badges/Status.stories.d.ts +5 -0
  326. package/lib/core/Badges/Status.stories.d.ts.map +1 -1
  327. package/lib/core/Badges/Status.stories.js +23 -1
  328. package/lib/core/Badges/Status.stories.js.map +1 -1
  329. package/lib/core/Banner/Banner.mocks.d.ts +18 -0
  330. package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
  331. package/lib/core/Banner/Banner.mocks.js +36 -0
  332. package/lib/core/Banner/Banner.mocks.js.map +1 -0
  333. package/lib/core/Banner/Banner.stories.d.ts +5 -1
  334. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  335. package/lib/core/Banner/Banner.stories.js +21 -33
  336. package/lib/core/Banner/Banner.stories.js.map +1 -1
  337. package/lib/core/Button/Button.stories.d.ts +8 -0
  338. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  339. package/lib/core/Button/Button.stories.js +29 -2
  340. package/lib/core/Button/Button.stories.js.map +1 -1
  341. package/lib/core/Card/Card.stories.d.ts +5 -0
  342. package/lib/core/Card/Card.stories.d.ts.map +1 -1
  343. package/lib/core/Card/Card.stories.js +19 -1
  344. package/lib/core/Card/Card.stories.js.map +1 -1
  345. package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
  346. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  347. package/lib/core/Checkbox/Checkbox.stories.js +52 -1
  348. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  349. package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
  350. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  351. package/lib/core/Configuration/Configuration.stories.js +62 -3
  352. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  353. package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
  354. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  355. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  356. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  357. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  358. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  359. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  360. package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
  361. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
  362. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  363. package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
  364. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  365. package/lib/core/File/FileDisplay.stories.d.ts +8 -1
  366. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  367. package/lib/core/File/FileDisplay.stories.js +32 -2
  368. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  369. package/lib/core/Flex/Flex.styles.d.ts +2 -2
  370. package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
  371. package/lib/core/Flex/Flex.styles.js +17 -17
  372. package/lib/core/Flex/Flex.styles.js.map +1 -1
  373. package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
  374. package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  375. package/lib/core/Flex/FlexContainer.stories.js +10 -7
  376. package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
  377. package/lib/core/Flex/FlexItem.stories.js +4 -4
  378. package/lib/core/Flex/FlexItem.stories.js.map +1 -1
  379. package/lib/core/Form/Form.mocks.d.ts +8 -0
  380. package/lib/core/Form/Form.mocks.d.ts.map +1 -0
  381. package/lib/core/Form/Form.mocks.js +97 -0
  382. package/lib/core/Form/Form.mocks.js.map +1 -0
  383. package/lib/core/Form/Form.stories.d.ts +10 -7
  384. package/lib/core/Form/Form.stories.d.ts.map +1 -1
  385. package/lib/core/Form/Form.stories.js +42 -96
  386. package/lib/core/Form/Form.stories.js.map +1 -1
  387. package/lib/core/Grid/Grid.styles.d.ts +2 -2
  388. package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
  389. package/lib/core/Grid/Grid.styles.js +4 -4
  390. package/lib/core/Grid/Grid.styles.js.map +1 -1
  391. package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
  392. package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
  393. package/lib/core/Grid/GridContainer.stories.js +27 -24
  394. package/lib/core/Grid/GridContainer.stories.js.map +1 -1
  395. package/lib/core/Grid/GridItem.stories.d.ts +2 -2
  396. package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
  397. package/lib/core/Grid/GridItem.stories.js +10 -10
  398. package/lib/core/Grid/GridItem.stories.js.map +1 -1
  399. package/lib/core/Icon/Icon.mocks.d.ts +3 -0
  400. package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
  401. package/lib/core/Icon/Icon.mocks.js +10 -0
  402. package/lib/core/Icon/Icon.mocks.js.map +1 -0
  403. package/lib/core/Icon/Icon.stories.d.ts +1 -0
  404. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  405. package/lib/core/Icon/Icon.stories.js +7 -1
  406. package/lib/core/Icon/Icon.stories.js.map +1 -1
  407. package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  408. package/lib/core/IconPicker/IconPicker.stories.js +0 -1
  409. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  410. package/lib/core/Input/Input.stories.d.ts +9 -0
  411. package/lib/core/Input/Input.stories.d.ts.map +1 -1
  412. package/lib/core/Input/Input.stories.js +38 -1
  413. package/lib/core/Input/Input.stories.js.map +1 -1
  414. package/lib/core/Label/Label.stories.d.ts +4 -0
  415. package/lib/core/Label/Label.stories.d.ts.map +1 -1
  416. package/lib/core/Label/Label.stories.js +16 -1
  417. package/lib/core/Label/Label.stories.js.map +1 -1
  418. package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  419. package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  420. package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
  421. package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
  422. package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
  423. package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  424. package/lib/core/Lightbox/Lightbox.stories.js +14 -73
  425. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  426. package/lib/core/Link/Link.stories.d.ts +11 -1
  427. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  428. package/lib/core/Link/Link.stories.js +7 -4
  429. package/lib/core/Link/Link.stories.js.map +1 -1
  430. package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  431. package/lib/core/List/CommaSeparatedList.stories.js +17 -17
  432. package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
  433. package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
  434. package/lib/core/List/OrderedList.stories.js +10 -10
  435. package/lib/core/List/OrderedList.stories.js.map +1 -1
  436. package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
  437. package/lib/core/List/UnorderedList.stories.js +10 -10
  438. package/lib/core/List/UnorderedList.stories.js.map +1 -1
  439. package/lib/core/Menu/Menu.stories.d.ts +3 -3
  440. package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
  441. package/lib/core/Menu/Menu.stories.js +8 -12
  442. package/lib/core/Menu/Menu.stories.js.map +1 -1
  443. package/lib/core/Modal/Modal.mocks.js +1 -1
  444. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  445. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  446. package/lib/core/Number/Number.stories.js +1 -4
  447. package/lib/core/Number/Number.stories.js.map +1 -1
  448. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  449. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  450. package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
  451. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  452. package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
  453. package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
  454. package/lib/core/Popover/Popover.stories.d.ts +1 -2
  455. package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
  456. package/lib/core/Popover/Popover.stories.js +24 -25
  457. package/lib/core/Popover/Popover.stories.js.map +1 -1
  458. package/lib/core/Progress/Progress.stories.d.ts +4 -0
  459. package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
  460. package/lib/core/Progress/Progress.stories.js +18 -1
  461. package/lib/core/Progress/Progress.stories.js.map +1 -1
  462. package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
  463. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  464. package/lib/core/RadioButton/RadioButton.stories.js +51 -1
  465. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  466. package/lib/core/Rating/Rating.stories.d.ts +8 -1
  467. package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
  468. package/lib/core/Rating/Rating.stories.js +19 -4
  469. package/lib/core/Rating/Rating.stories.js.map +1 -1
  470. package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
  471. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  472. package/lib/core/SearchInput/SearchInput.stories.js +16 -1
  473. package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
  474. package/lib/core/Select/Select.stories.d.ts +8 -0
  475. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  476. package/lib/core/Select/Select.stories.js +28 -1
  477. package/lib/core/Select/Select.stories.js.map +1 -1
  478. package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
  479. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  480. package/lib/core/Sentiment/Sentiment.stories.js +34 -7
  481. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  482. package/lib/core/SummaryList/SummaryList.stories.js +1 -1
  483. package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
  484. package/lib/core/Switch/Switch.stories.d.ts +7 -0
  485. package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
  486. package/lib/core/Switch/Switch.stories.js +32 -1
  487. package/lib/core/Switch/Switch.stories.js.map +1 -1
  488. package/lib/core/Table/Table.stories.d.ts +25 -0
  489. package/lib/core/Table/Table.stories.d.ts.map +1 -1
  490. package/lib/core/Table/Table.stories.js +113 -1
  491. package/lib/core/Table/Table.stories.js.map +1 -1
  492. package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
  493. package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
  494. package/lib/core/Tabs/Tabs.stories.js +30 -1
  495. package/lib/core/Tabs/Tabs.stories.js.map +1 -1
  496. package/lib/core/Text/Text.stories.d.ts +19 -0
  497. package/lib/core/Text/Text.stories.d.ts.map +1 -1
  498. package/lib/core/Text/Text.stories.js +102 -2
  499. package/lib/core/Text/Text.stories.js.map +1 -1
  500. package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
  501. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
  502. package/lib/core/TextArea/TextArea.stories.js +20 -1
  503. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  504. package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
  505. package/lib/core/Toaster/Toaster.stories.js +8 -3
  506. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  507. package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
  508. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  509. package/lib/core/Tooltip/Tooltip.stories.js +20 -1
  510. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  511. package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
  512. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  513. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  514. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
  515. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  516. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  517. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  518. package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
  519. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  520. package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  521. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  522. package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
  523. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  524. package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
  525. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  526. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  527. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  528. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
  529. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  530. package/lib/social/Chat/Chat.stories.d.ts +33 -22
  531. package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
  532. package/lib/social/Chat/Chat.stories.js +102 -158
  533. package/lib/social/Chat/Chat.stories.js.map +1 -1
  534. package/lib/social/Email/Email.mocks.d.ts +1 -2
  535. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  536. package/lib/social/Email/Email.mocks.js +1 -3
  537. package/lib/social/Email/Email.mocks.js.map +1 -1
  538. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  539. package/lib/social/Email/Email.stories.js +7 -8
  540. package/lib/social/Email/Email.stories.js.map +1 -1
  541. package/lib/social/Feed/FeedNewPost.stories.js +1 -1
  542. package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
  543. package/lib/social/Feed/FeedPost.stories.js +1 -1
  544. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  545. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  546. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
  547. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
  548. package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
  549. package/lib/work/CaseView/FileService.mock.js +6 -2
  550. package/lib/work/CaseView/FileService.mock.js.map +1 -1
  551. package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
  552. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  553. package/lib/work/Confirmation/Confirmation.stories.js +12 -4
  554. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  555. package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
  556. package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  557. package/lib/work/Confirmation/Confirmation.styles.js +7 -0
  558. package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
  559. package/lib/work/Details/Details.stories.js +3 -3
  560. package/lib/work/Details/Details.stories.js.map +1 -1
  561. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  562. package/lib/work/SearchResults/SearchResults.stories.js +3 -9
  563. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  564. package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
  565. package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  566. package/lib/work/SearchResults/SearchResults.styles.js +12 -0
  567. package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
  568. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
  569. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  570. package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
  571. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
  572. package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  573. package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  574. package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
  575. package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
  576. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  577. package/lib/work/Timeline/Timeline.stories.js +2 -2
  578. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  579. package/package.json +16 -16
  580. package/jsx/social/Email/Email.mocks.jsx.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Status.stories.jsx","sourceRoot":"","sources":["../../../src/core/Badges/Status.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,oBAAoB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACnE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,WAAW,CAAC,IAAI,GAAG;IACjB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,WAAW,CAAC,QAAQ,GAAG;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC;QACzD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, StatusProps } from '@pega/cosmos-react-core';\n\nexport default {\n component: Status,\n title: 'Core/Badges/Status'\n} as Meta;\n\nexport const StatusBadge: Story<StatusProps> = (args: StatusProps) => {\n return <Status variant={args.variant}>{args.variant}</Status>;\n};\n\nStatusBadge.args = {\n variant: 'success'\n};\n\nStatusBadge.argTypes = {\n variant: {\n options: ['success', 'urgent', 'warn', 'pending', 'info'],\n control: { type: 'select' }\n }\n};\n"]}
1
+ {"version":3,"file":"Status.stories.jsx","sourceRoot":"","sources":["../../../src/core/Badges/Status.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE7E,eAAe;IACb,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,oBAAoB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACnE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,WAAW,CAAC,IAAI,GAAG;IACjB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,WAAW,CAAC,QAAQ,GAAG;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC;QACzD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC;AAOF,MAAM,CAAC,MAAM,uBAAuB,GAAwC,CAC1E,IAAkC,EAClC,EAAE;IACF,OAAO,CACL,CAAC,aAAa,CACZ,KAAK,CAAC,CAAC;YACL,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,MAAM,EAAE;wBACN,OAAO,EAAE;4BACP,UAAU,EAAE,IAAI,CAAC,UAAU;4BAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;yBAC5B;qBACF;iBACF;aACF;SACF,CAAC,CAEF;MAAA,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,oBAAoB,EAAE,MAAM,CACxD;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,IAAI,GAAG;IAC7B,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,uBAAuB,CAAC,QAAQ,GAAG;IACjC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC1C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Status, StatusProps } from '@pega/cosmos-react-core';\n\nexport default {\n component: Status,\n title: 'Core/Badges/Status'\n} as Meta;\n\nexport const StatusBadge: Story<StatusProps> = (args: StatusProps) => {\n return <Status variant={args.variant}>{args.variant}</Status>;\n};\n\nStatusBadge.args = {\n variant: 'success'\n};\n\nStatusBadge.argTypes = {\n variant: {\n options: ['success', 'urgent', 'warn', 'pending', 'info'],\n control: { type: 'select' }\n }\n};\n\ninterface ConfigurableStatusBadgeProps {\n foreground?: string;\n background?: string;\n}\n\nexport const ConfigurableStatusBadge: Story<ConfigurableStatusBadgeProps> = (\n args: ConfigurableStatusBadgeProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n badges: {\n status: {\n success: {\n foreground: args.foreground,\n background: args.background\n }\n }\n }\n }\n }}\n >\n <Status variant='success'>Configurable Success</Status>\n </Configuration>\n );\n};\n\nConfigurableStatusBadge.args = {\n foreground: '#156f35',\n background: '#d4f7d5'\n};\n\nConfigurableStatusBadge.argTypes = {\n foreground: { control: { type: 'color' } },\n background: { control: { type: 'color' } }\n};\n"]}
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ export interface DemoFormField {
3
+ name: string;
4
+ label: string;
5
+ info: string;
6
+ value: string;
7
+ validator: (value: string) => boolean;
8
+ }
9
+ export declare const demoFields: {
10
+ name: string;
11
+ label: string;
12
+ info: string;
13
+ value: string;
14
+ validator: (value: string) => boolean;
15
+ }[];
16
+ export declare const formActions: JSX.Element;
17
+ export declare const fieldReducer: (fields: DemoFormField[], inputEl: any) => DemoFormField[];
18
+ //# sourceMappingURL=Banner.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Banner/Banner.mocks.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACvC;AAED,eAAO,MAAM,UAAU;;;;;uBAMA,MAAM;GAgB5B,CAAC;AAEF,eAAO,MAAM,WAAW,aASvB,CAAC;AAGF,eAAO,MAAM,YAAY,WAAY,aAAa,EAAE,WAAW,GAAG,oBAOjE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { Button } from '@pega/cosmos-react-core';
2
+ export const demoFields = [
3
+ {
4
+ name: 'field-1',
5
+ label: 'Field 1',
6
+ info: 'Hint: type exact label text above',
7
+ value: '',
8
+ validator: (value) => value === 'Field 1'
9
+ },
10
+ {
11
+ name: 'field-2',
12
+ label: 'Field 2',
13
+ info: 'Hint: type exact label text above',
14
+ value: '',
15
+ validator: (value) => value === 'Field 2'
16
+ },
17
+ {
18
+ name: 'field-3',
19
+ label: 'Field 3',
20
+ info: 'Hint: type exact label text above',
21
+ value: '',
22
+ validator: (value) => value === 'Field 3'
23
+ }
24
+ ];
25
+ export const formActions = (<>
26
+ <Button name='Cancel' variant='secondary'>
27
+ Cancel
28
+ </Button>
29
+ <Button name='Submit' type='submit' variant='primary'>
30
+ Submit
31
+ </Button>
32
+ </>);
33
+ export const fieldReducer = (fields, inputEl) => {
34
+ return fields.map(field => {
35
+ if (inputEl.name === field.name) {
36
+ field.value = inputEl.value;
37
+ }
38
+ return field;
39
+ });
40
+ };
41
+ //# sourceMappingURL=Banner.mocks.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.mocks.jsx","sourceRoot":"","sources":["../../../src/core/Banner/Banner.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAUjD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS;KAClD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,EACE;IAAA,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CACvC;;IACF,EAAE,MAAM,CACR;IAAA,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CACnD;;IACF,EAAE,MAAM,CACV;EAAA,GAAG,CACJ,CAAC;AAGF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAuB,EAAE,OAAY,EAAE,EAAE;IACpE,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACxB,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE;YAC/B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;SAC7B;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { Button } from '@pega/cosmos-react-core';\n\nexport interface DemoFormField {\n name: string;\n label: string;\n info: string;\n value: string;\n validator: (value: string) => boolean;\n}\n\nexport const demoFields = [\n {\n name: 'field-1',\n label: 'Field 1',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 1'\n },\n {\n name: 'field-2',\n label: 'Field 2',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 2'\n },\n {\n name: 'field-3',\n label: 'Field 3',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 3'\n }\n];\n\nexport const formActions = (\n <>\n <Button name='Cancel' variant='secondary'>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n);\n\n// Handles setting of state for all fields\nexport const fieldReducer = (fields: DemoFormField[], inputEl: any) => {\n return fields.map(field => {\n if (inputEl.name === field.name) {\n field.value = inputEl.value;\n }\n return field;\n });\n};\n"]}
@@ -1,11 +1,15 @@
1
1
  /// <reference types="react" />
2
- import { Meta } from '@storybook/react';
2
+ import { Meta, Story } from '@storybook/react';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const SuccessBanner: () => JSX.Element;
6
6
  export declare const ErrorBanner: () => JSX.Element;
7
7
  export declare const WarningBanner: () => JSX.Element;
8
8
  export declare const InfoBanner: () => JSX.Element;
9
+ interface ConfigurableErrorBannerProps {
10
+ background?: string;
11
+ }
12
+ export declare const ConfigurableErrorBanner: Story<ConfigurableErrorBannerProps>;
9
13
  export declare const ShownInForm: () => JSX.Element;
10
14
  export declare const ShownInCaseView: {
11
15
  (): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Banner/Banner.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAOxC,wBAGU;AAEV,eAAO,MAAM,aAAa,mBAiBzB,CAAC;AAEF,eAAO,MAAM,WAAW,mBAcvB,CAAC;AAEF,eAAO,MAAM,aAAa,mBAazB,CAAC;AAEF,eAAO,MAAM,UAAU,mBAkBtB,CAAC;AA0DF,eAAO,MAAM,WAAW,mBA6DvB,CAAC;AAKF,eAAO,MAAM,eAAe;;;;;CAiB3B,CAAC;AASF,eAAO,MAAM,eAAe;;;;;CAsB3B,CAAC"}
1
+ {"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Banner/Banner.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAS/C,wBAGU;AAEV,eAAO,MAAM,aAAa,mBAiBzB,CAAC;AAEF,eAAO,MAAM,WAAW,mBAcvB,CAAC;AAEF,eAAO,MAAM,aAAa,mBAazB,CAAC;AAEF,eAAO,MAAM,UAAU,mBAkBtB,CAAC;AAEF,UAAU,4BAA4B;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CA4BvE,CAAC;AAcF,eAAO,MAAM,WAAW,mBA6DvB,CAAC;AAKF,eAAO,MAAM,eAAe;;;;;CAiB3B,CAAC;AASF,eAAO,MAAM,eAAe;;;;;CAsB3B,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { useState, useCallback, useReducer } from 'react';
2
- import { Banner, Button, Form, Input, Link } from '@pega/cosmos-react-core';
2
+ import { Banner, Button, Configuration, Form, Input, Link } from '@pega/cosmos-react-core';
3
3
  import { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';
4
4
  import { CaseViewDemo } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.stories';
5
+ import { demoFields, fieldReducer, formActions } from './Banner.mocks';
5
6
  export default {
6
7
  title: 'Core/Banner',
7
8
  component: Banner
@@ -32,44 +33,26 @@ export const InfoBanner = () => {
32
33
  ]}/>)}
33
34
  </>);
34
35
  };
35
- const demoFields = [
36
- {
37
- name: 'field-1',
38
- label: 'Field 1',
39
- info: 'Hint: type exact label text above',
40
- value: '',
41
- validator: (value) => value === 'Field 1'
42
- },
43
- {
44
- name: 'field-2',
45
- label: 'Field 2',
46
- info: 'Hint: type exact label text above',
47
- value: '',
48
- validator: (value) => value === 'Field 2'
49
- },
50
- {
51
- name: 'field-3',
52
- label: 'Field 3',
53
- info: 'Hint: type exact label text above',
54
- value: '',
55
- validator: (value) => value === 'Field 3'
56
- }
57
- ];
58
- const formActions = (<>
59
- <Button name='Cancel' variant='secondary'>
60
- Cancel
61
- </Button>
62
- <Button name='Submit' type='submit' variant='primary'>
63
- Submit
64
- </Button>
65
- </>);
66
- const fieldReducer = (fields, inputEl) => {
67
- return fields.map(field => {
68
- if (inputEl.name === field.name) {
69
- field.value = inputEl.value;
70
- }
71
- return field;
72
- });
36
+ export const ConfigurableErrorBanner = (args) => {
37
+ return (<Configuration theme={{
38
+ components: {
39
+ banner: {
40
+ urgent: {
41
+ background: args.background
42
+ }
43
+ }
44
+ }
45
+ }}>
46
+ <Banner id='error' variant='urgent' heading='Error' action={<div>
47
+ <Button variant='link'>Try again</Button>
48
+ </div>} messages={['Your request failed to send!', 'Please review your request and try again']}/>
49
+ </Configuration>);
50
+ };
51
+ ConfigurableErrorBanner.args = {
52
+ background: '#d91c29'
53
+ };
54
+ ConfigurableErrorBanner.argTypes = {
55
+ background: { control: { type: 'color' } }
73
56
  };
74
57
  export const ShownInForm = () => {
75
58
  const [fields, setField] = useReducer(fieldReducer, demoFields);
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.stories.jsx","sourceRoot":"","sources":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C;IAC/C,OAAO,CACL,CAAC,YAAY,CACX,OAAO,CAAC,CACN,SAAS,IAAI,CACX,CAAC,MAAM,CACL,EAAE,CAAC,0BAA0B,CAC7B,OAAO,CAAC,+BAA+B,CACvC,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAClC,OAAO,CAAC,SAAS,CACjB,QAAQ,CAAC,CAAC,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,CAAC,CACvD,MAAM,CAAC,CACL,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAC/C;;cACF,EAAE,IAAI,CAAC,CACR,EACD,CACH,CACF,EACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useCallback, FormEvent, useReducer } from 'react';\n\nimport { Banner, Button, Form, Input, Link } from '@pega/cosmos-react-core';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\nimport { CaseViewDemo } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.stories';\n\nexport default {\n title: 'Core/Banner',\n component: Banner\n} as Meta;\n\nexport const SuccessBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='success'\n variant='success'\n onDismiss={() => setShowBanner(false)}\n heading='2 items uploaded successfully'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n />\n )}\n </>\n );\n};\n\nexport const ErrorBanner = () => {\n return (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n );\n};\n\nexport const WarningBanner = () => {\n return (\n <Banner\n id='warning'\n variant='warning'\n action={\n <div>\n <Button variant='link'>Why this matters</Button>\n </div>\n }\n messages={['Your submission is missing some important documents.']}\n />\n );\n};\n\nexport const InfoBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='info'\n variant='info'\n onDismiss={() => setShowBanner(false)}\n messages={[\n 'US-123456 is currently being modified by Jane Smith and may not be edited simultaneously.'\n ]}\n />\n )}\n </>\n );\n};\n\n// -----------------------------------------------------------------------------\n// Form story\n// -----------------------------------------------------------------------------\ninterface DemoFormField {\n name: string;\n label: string;\n info: string;\n value: string;\n validator: (value: string) => boolean;\n}\n\nconst demoFields = [\n {\n name: 'field-1',\n label: 'Field 1',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 1'\n },\n {\n name: 'field-2',\n label: 'Field 2',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 2'\n },\n {\n name: 'field-3',\n label: 'Field 3',\n info: 'Hint: type exact label text above',\n value: '',\n validator: (value: string) => value === 'Field 3'\n }\n];\n\nconst formActions = (\n <>\n <Button name='Cancel' variant='secondary'>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n);\n\n// Handles setting of state for all fields\nconst fieldReducer = (fields: DemoFormField[], inputEl: any) => {\n return fields.map(field => {\n if (inputEl.name === field.name) {\n field.value = inputEl.value;\n }\n return field;\n });\n};\n\nexport const ShownInForm = () => {\n const [fields, setField] = useReducer(fieldReducer, demoFields);\n const [banner, setBanner] = useState<any>();\n\n const onSubmit = useCallback((e: FormEvent) => {\n e.preventDefault();\n const errorFields = fields.filter(field => !field.validator(field.value));\n let heading = 'Wow, great job!';\n let variant: 'success' | 'urgent' = 'success';\n let messages = fields.map(f => `${f.name} was typed perfectly`);\n let bannerAction;\n\n if (errorFields.length > 0) {\n heading = \"I'm sorry you're having trouble\";\n variant = 'urgent';\n messages = errorFields.map(f => `${f.name} was not typed correctly`);\n bannerAction = (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n );\n }\n\n setBanner(\n <Banner\n {...{\n heading,\n variant,\n messages,\n id: 'formBanner',\n action: bannerAction,\n onDismiss() {\n setBanner(false);\n }\n }}\n />\n );\n }, []);\n\n return (\n <Form\n banners={banner}\n actions={formActions}\n onSubmit={onSubmit}\n style={{ margin: 'auto', padding: '2.5rem', maxWidth: '37.5rem' }}\n >\n {fields.map((field: DemoFormField) => {\n return (\n <Input\n key={field.name}\n autoComplete='off'\n name={field.name}\n label={field.label}\n info={field.info}\n value={field.value}\n onChange={(e: InputEvent) => setField(e.target as any)}\n />\n );\n })}\n </Form>\n );\n};\n\n// -----------------------------------------------------------------------------\n// CaseView story\n// -----------------------------------------------------------------------------\nexport const ShownInCaseView = () => {\n const [hasBanner, setHasBanner] = useState(true);\n return (\n <CaseViewDemo\n banners={\n hasBanner && (\n <Banner\n id='case-view-error'\n heading='Waring'\n onDismiss={() => setHasBanner(false)}\n variant='warning'\n messages={['Your submission is missing some important documents.']}\n />\n )\n }\n />\n );\n};\n\nShownInCaseView.parameters = {\n layout: 'fullscreen'\n};\n\n// -----------------------------------------------------------------------------\n// AppShell story\n// -----------------------------------------------------------------------------\nexport const ShownInAppShell = () => {\n const [hasBanner, setHasBanner] = useState([]);\n return (\n <AppShellDemo\n banners={\n hasBanner && (\n <Banner\n id='app-shell-banner-success'\n heading='2 items uploaded successfully'\n onDismiss={() => setHasBanner([])}\n variant='success'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n action={\n <Link target='_blank' href='https://www.pega.com'>\n Link Here!\n </Link>\n }\n />\n )\n }\n />\n );\n};\n\nShownInAppShell.parameters = {\n layout: 'fullscreen'\n};\n"]}
1
+ {"version":3,"file":"Banner.stories.jsx","sourceRoot":"","sources":["../../../src/core/Banner/Banner.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ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L,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAC/C;;cACF,EAAE,IAAI,CAAC,CACR,EACD,CACH,CACF,EACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,UAAU,GAAG;IAC3B,MAAM,EAAE,YAAY;CACrB,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useCallback, FormEvent, useReducer } from 'react';\n\nimport { Banner, Button, Configuration, Form, Input, Link } from '@pega/cosmos-react-core';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\nimport { CaseViewDemo } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.stories';\n\nimport { demoFields, DemoFormField, fieldReducer, formActions } from './Banner.mocks';\n\nexport default {\n title: 'Core/Banner',\n component: Banner\n} as Meta;\n\nexport const SuccessBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='success'\n variant='success'\n onDismiss={() => setShowBanner(false)}\n heading='2 items uploaded successfully'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n />\n )}\n </>\n );\n};\n\nexport const ErrorBanner = () => {\n return (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n );\n};\n\nexport const WarningBanner = () => {\n return (\n <Banner\n id='warning'\n variant='warning'\n action={\n <div>\n <Button variant='link'>Why this matters</Button>\n </div>\n }\n messages={['Your submission is missing some important documents.']}\n />\n );\n};\n\nexport const InfoBanner = () => {\n const [showBanner, setShowBanner] = useState(true);\n\n return (\n <>\n {!showBanner && <Button onClick={() => setShowBanner(true)}>Open banner</Button>}\n {showBanner && (\n <Banner\n id='info'\n variant='info'\n onDismiss={() => setShowBanner(false)}\n messages={[\n 'US-123456 is currently being modified by Jane Smith and may not be edited simultaneously.'\n ]}\n />\n )}\n </>\n );\n};\n\ninterface ConfigurableErrorBannerProps {\n background?: string;\n}\n\nexport const ConfigurableErrorBanner: Story<ConfigurableErrorBannerProps> = (\n args: ConfigurableErrorBannerProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n banner: {\n urgent: {\n background: args.background\n }\n }\n }\n }}\n >\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n action={\n <div>\n <Button variant='link'>Try again</Button>\n </div>\n }\n messages={['Your request failed to send!', 'Please review your request and try again']}\n />\n </Configuration>\n );\n};\n\nConfigurableErrorBanner.args = {\n background: '#d91c29'\n};\n\nConfigurableErrorBanner.argTypes = {\n background: { control: { type: 'color' } }\n};\n\n// -----------------------------------------------------------------------------\n// Form story\n// -----------------------------------------------------------------------------\n\nexport const ShownInForm = () => {\n const [fields, setField] = useReducer(fieldReducer, demoFields);\n const [banner, setBanner] = useState<any>();\n\n const onSubmit = useCallback((e: FormEvent) => {\n e.preventDefault();\n const errorFields = fields.filter(field => !field.validator(field.value));\n let heading = 'Wow, great job!';\n let variant: 'success' | 'urgent' = 'success';\n let messages = fields.map(f => `${f.name} was typed perfectly`);\n let bannerAction;\n\n if (errorFields.length > 0) {\n heading = \"I'm sorry you're having trouble\";\n variant = 'urgent';\n messages = errorFields.map(f => `${f.name} was not typed correctly`);\n bannerAction = (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n );\n }\n\n setBanner(\n <Banner\n {...{\n heading,\n variant,\n messages,\n id: 'formBanner',\n action: bannerAction,\n onDismiss() {\n setBanner(false);\n }\n }}\n />\n );\n }, []);\n\n return (\n <Form\n banners={banner}\n actions={formActions}\n onSubmit={onSubmit}\n style={{ margin: 'auto', padding: '2.5rem', maxWidth: '37.5rem' }}\n >\n {fields.map((field: DemoFormField) => {\n return (\n <Input\n key={field.name}\n autoComplete='off'\n name={field.name}\n label={field.label}\n info={field.info}\n value={field.value}\n onChange={(e: InputEvent) => setField(e.target as any)}\n />\n );\n })}\n </Form>\n );\n};\n\n// -----------------------------------------------------------------------------\n// CaseView story\n// -----------------------------------------------------------------------------\nexport const ShownInCaseView = () => {\n const [hasBanner, setHasBanner] = useState(true);\n return (\n <CaseViewDemo\n banners={\n hasBanner && (\n <Banner\n id='case-view-error'\n heading='Waring'\n onDismiss={() => setHasBanner(false)}\n variant='warning'\n messages={['Your submission is missing some important documents.']}\n />\n )\n }\n />\n );\n};\n\nShownInCaseView.parameters = {\n layout: 'fullscreen'\n};\n\n// -----------------------------------------------------------------------------\n// AppShell story\n// -----------------------------------------------------------------------------\nexport const ShownInAppShell = () => {\n const [hasBanner, setHasBanner] = useState([]);\n return (\n <AppShellDemo\n banners={\n hasBanner && (\n <Banner\n id='app-shell-banner-success'\n heading='2 items uploaded successfully'\n onDismiss={() => setHasBanner([])}\n variant='success'\n messages={['pega_data.json', 'business-earnings.xlsx']}\n action={\n <Link target='_blank' href='https://www.pega.com'>\n Link Here!\n </Link>\n }\n />\n )\n }\n />\n );\n};\n\nShownInAppShell.parameters = {\n layout: 'fullscreen'\n};\n"]}
@@ -9,4 +9,12 @@ export declare const IconButtons: Story<ButtonProps>;
9
9
  export declare const LoadingButtons: Story<ButtonProps>;
10
10
  export declare const ButtonAsLink: () => JSX.Element;
11
11
  export declare const BareButtonDemo: Story<ButtonProps>;
12
+ interface ConfigurableButtonProps {
13
+ borderWidth?: string;
14
+ borderRadius?: number;
15
+ color?: string;
16
+ secondaryColor?: string;
17
+ padding?: string;
18
+ }
19
+ export declare const ConfigurableButton: Story<ConfigurableButtonProps>;
12
20
  //# sourceMappingURL=Button.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;;AAMlF,wBAMU;AAEV,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC;AAeF,eAAO,MAAM,eAAe,mBAoB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAAW,CAoB1C,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC;AAYF,eAAO,MAAM,YAAY,mBAMxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAEL,WAAW,EAKZ,MAAM,yBAAyB,CAAC;;AAMjC,wBAMU;AAEV,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC;AAeF,eAAO,MAAM,eAAe,mBAoB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAAW,CAoB1C,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC;AAYF,eAAO,MAAM,YAAY,mBAMxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,CAM7C,CAAC;AAYF,UAAU,uBAAuB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAoB7D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Button, Icon, registerIcon } from '@pega/cosmos-react-core';
1
+ import { Button, Configuration, Flex, Icon, registerIcon } from '@pega/cosmos-react-core';
2
2
  import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
3
3
  import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
4
4
  registerIcon(plusIcon);
@@ -45,7 +45,7 @@ export const DisabledButtons = () => {
45
45
  </>);
46
46
  };
47
47
  export const IconButtons = ({ compact }) => {
48
- return (<>
48
+ return (<Flex container={{ alignItems: 'center' }}>
49
49
  <Button variant='primary' label='Icon button primary' icon compact={compact}>
50
50
  <Icon name='plus'/>
51
51
  </Button>
@@ -61,7 +61,7 @@ export const IconButtons = ({ compact }) => {
61
61
  <Button variant='text' label='Icon button text' icon compact={compact}>
62
62
  <Icon name='plus'/>
63
63
  </Button>
64
- </>);
64
+ </Flex>);
65
65
  };
66
66
  IconButtons.args = {
67
67
  compact: false
@@ -100,4 +100,33 @@ BareButtonDemo.argTypes = {
100
100
  disabled: { control: { type: 'boolean' } },
101
101
  href: { control: { type: 'text' } }
102
102
  };
103
+ export const ConfigurableButton = (args) => {
104
+ return (<Configuration theme={{
105
+ components: {
106
+ button: {
107
+ 'border-width': args.borderWidth,
108
+ 'border-radius': args.borderRadius,
109
+ color: args.color,
110
+ 'secondary-color': args.secondaryColor,
111
+ padding: args.padding
112
+ }
113
+ }
114
+ }}>
115
+ <Button>Configurable Button</Button>
116
+ </Configuration>);
117
+ };
118
+ ConfigurableButton.args = {
119
+ borderWidth: '0.0625rem',
120
+ borderRadius: 9999,
121
+ color: '#076bc9',
122
+ secondaryColor: '#ffffff',
123
+ padding: '0rem 1rem'
124
+ };
125
+ ConfigurableButton.argTypes = {
126
+ borderWidth: { control: { type: 'text' } },
127
+ borderRadius: { control: { type: 'number' } },
128
+ color: { control: { type: 'color' } },
129
+ secondaryColor: { control: { type: 'color' } },
130
+ padding: { control: { type: 'text' } }
131
+ };
103
132
  //# sourceMappingURL=Button.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"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M,CAAC,QAAQ,CACnE;;IACF,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACtE,OAAO,CACL,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,CAChE;;IACF,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,EAAE;CACT,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACpC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Button, ButtonProps, Icon, registerIcon } from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Button',\n component: Button,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const ButtonVariants: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} compact={args.compact}>\n Click me\n </Button>\n );\n};\n\nButtonVariants.args = {\n variant: 'primary',\n compact: false\n};\n\nButtonVariants.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'simple', 'link', 'text'],\n control: { type: 'select' }\n },\n compact: { control: { type: 'boolean' } }\n};\n\nexport const DisabledButtons = () => {\n return (\n <>\n <Button variant='primary' disabled>\n Primary disabled\n </Button>\n <Button variant='secondary' disabled>\n Secondary disabled\n </Button>\n <Button variant='simple' disabled>\n Simple disabled\n </Button>\n <Button variant='link' disabled>\n Link disabled\n </Button>\n <Button variant='text' disabled>\n Text disabled\n </Button>\n </>\n );\n};\n\nexport const IconButtons: Story<ButtonProps> = ({ compact }: ButtonProps) => {\n return (\n <>\n <Button variant='primary' label='Icon button primary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='secondary' label='Icon button secondary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='simple' label='Icon button simple' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='link' label='Icon button link' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='text' label='Icon button text' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n </>\n );\n};\n\nIconButtons.args = {\n compact: false\n};\n\nIconButtons.argTypes = {\n compact: { control: { type: 'boolean' } }\n};\n\nexport const LoadingButtons: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} icon={args.icon} label='Loading' loading>\n {args.icon ? <Icon name='plus' /> : 'Loading'}\n </Button>\n );\n};\n\nLoadingButtons.args = {\n variant: 'primary',\n icon: false\n};\n\nLoadingButtons.argTypes = {\n variant: { options: ['primary', 'secondary'], control: { type: 'select' } },\n icon: { control: { type: 'boolean' } }\n};\n\nexport const ButtonAsLink = () => {\n return (\n <Button variant='primary' href='https://www.pega.com' target='_blank'>\n Go to pega.com\n </Button>\n );\n};\n\nexport const BareButtonDemo: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <BareButton disabled={args.disabled} href={args.href || undefined}>\n Click me\n </BareButton>\n );\n};\n\nBareButtonDemo.args = {\n disabled: false,\n href: ''\n};\n\nBareButtonDemo.argTypes = {\n disabled: { control: { type: 'boolean' } },\n href: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"Button.stories.jsx","sourceRoot":"","sources":["../../../src/core/Button/Button.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,aAAa,EACb,IAAI,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CACrB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACrC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC9C,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Button,\n ButtonProps,\n Configuration,\n Flex,\n Icon,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nregisterIcon(plusIcon);\n\nexport default {\n title: 'Core/Button',\n component: Button,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const ButtonVariants: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} compact={args.compact}>\n Click me\n </Button>\n );\n};\n\nButtonVariants.args = {\n variant: 'primary',\n compact: false\n};\n\nButtonVariants.argTypes = {\n variant: {\n options: ['primary', 'secondary', 'simple', 'link', 'text'],\n control: { type: 'select' }\n },\n compact: { control: { type: 'boolean' } }\n};\n\nexport const DisabledButtons = () => {\n return (\n <>\n <Button variant='primary' disabled>\n Primary disabled\n </Button>\n <Button variant='secondary' disabled>\n Secondary disabled\n </Button>\n <Button variant='simple' disabled>\n Simple disabled\n </Button>\n <Button variant='link' disabled>\n Link disabled\n </Button>\n <Button variant='text' disabled>\n Text disabled\n </Button>\n </>\n );\n};\n\nexport const IconButtons: Story<ButtonProps> = ({ compact }: ButtonProps) => {\n return (\n <Flex container={{ alignItems: 'center' }}>\n <Button variant='primary' label='Icon button primary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='secondary' label='Icon button secondary' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='simple' label='Icon button simple' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='link' label='Icon button link' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n <Button variant='text' label='Icon button text' icon compact={compact}>\n <Icon name='plus' />\n </Button>\n </Flex>\n );\n};\n\nIconButtons.args = {\n compact: false\n};\n\nIconButtons.argTypes = {\n compact: { control: { type: 'boolean' } }\n};\n\nexport const LoadingButtons: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <Button variant={args.variant} icon={args.icon} label='Loading' loading>\n {args.icon ? <Icon name='plus' /> : 'Loading'}\n </Button>\n );\n};\n\nLoadingButtons.args = {\n variant: 'primary',\n icon: false\n};\n\nLoadingButtons.argTypes = {\n variant: { options: ['primary', 'secondary'], control: { type: 'select' } },\n icon: { control: { type: 'boolean' } }\n};\n\nexport const ButtonAsLink = () => {\n return (\n <Button variant='primary' href='https://www.pega.com' target='_blank'>\n Go to pega.com\n </Button>\n );\n};\n\nexport const BareButtonDemo: Story<ButtonProps> = (args: ButtonProps) => {\n return (\n <BareButton disabled={args.disabled} href={args.href || undefined}>\n Click me\n </BareButton>\n );\n};\n\nBareButtonDemo.args = {\n disabled: false,\n href: ''\n};\n\nBareButtonDemo.argTypes = {\n disabled: { control: { type: 'boolean' } },\n href: { control: { type: 'text' } }\n};\n\ninterface ConfigurableButtonProps {\n borderWidth?: string;\n borderRadius?: number;\n color?: string;\n secondaryColor?: string;\n padding?: string;\n}\n\nexport const ConfigurableButton: Story<ConfigurableButtonProps> = (\n args: ConfigurableButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n button: {\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius,\n color: args.color,\n 'secondary-color': args.secondaryColor,\n padding: args.padding\n }\n }\n }}\n >\n <Button>Configurable Button</Button>\n </Configuration>\n );\n};\n\nConfigurableButton.args = {\n borderWidth: '0.0625rem',\n borderRadius: 9999,\n color: '#076bc9',\n secondaryColor: '#ffffff',\n padding: '0rem 1rem'\n};\n\nConfigurableButton.argTypes = {\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'number' } },\n color: { control: { type: 'color' } },\n secondaryColor: { control: { type: 'color' } },\n padding: { control: { type: 'text' } }\n};\n"]}
@@ -5,4 +5,9 @@ declare const _default: Meta<import("@storybook/react").Args>;
5
5
  export default _default;
6
6
  export declare const SimpleCard: () => JSX.Element;
7
7
  export declare const FullCard: Story<CardFooterProps>;
8
+ interface ConfigurableCardProps {
9
+ borderRadius?: string;
10
+ background?: string;
11
+ }
12
+ export declare const ConfigurableCard: Story<ConfigurableCardProps>;
8
13
  //# sourceMappingURL=Card.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAML,eAAe,EAIhB,MAAM,yBAAyB,CAAC;;AAIjC,wBAMU;AAEV,eAAO,MAAM,UAAU,mBAatB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,eAAe,CAwC3C,CAAC"}
1
+ {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAML,eAAe,EAKhB,MAAM,yBAAyB,CAAC;;AAIjC,wBAMU;AAEV,eAAO,MAAM,UAAU,mBAatB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,eAAe,CAwC3C,CAAC;AAaF,UAAU,qBAAqB;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAwBzD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Card, CardHeader, CardMedia, CardContent, CardFooter, Image, MenuButton, Text } from '@pega/cosmos-react-core';
1
+ import { Card, CardHeader, CardMedia, CardContent, CardFooter, Image, MenuButton, Text, Configuration } from '@pega/cosmos-react-core';
2
2
  import { StyledCard } from './Card.styles';
3
3
  export default {
4
4
  title: 'Core/Card',
@@ -52,4 +52,33 @@ FullCard.argTypes = {
52
52
  control: { type: 'select' }
53
53
  }
54
54
  };
55
+ export const ConfigurableCard = (args) => {
56
+ return (<Configuration theme={{
57
+ components: {
58
+ card: {
59
+ 'border-radius': args.borderRadius,
60
+ background: args.background
61
+ }
62
+ }
63
+ }}>
64
+ <Card as={StyledCard}>
65
+ <CardHeader>
66
+ <Text variant='h2'>Simple Card</Text>
67
+ </CardHeader>
68
+ <CardContent>
69
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
70
+ ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
71
+ ullamco laboris nisi ut aliquip ex ea commodo consequat.
72
+ </CardContent>
73
+ </Card>
74
+ </Configuration>);
75
+ };
76
+ ConfigurableCard.args = {
77
+ borderRadius: '0.5rem',
78
+ background: '#ffffff'
79
+ };
80
+ ConfigurableCard.argTypes = {
81
+ borderRadius: { control: { type: 'text' } },
82
+ background: { control: { type: 'color' } }
83
+ };
55
84
  //# sourceMappingURL=Card.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.stories.jsx","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAEV,KAAK,EACL,UAAU,EACV,IAAI,EACL,MAAM,yBAA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AO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CACpC;MAAA,EAAE,UAAU,CACZ;MAAA,CAAC,WAAW,CACV;;;;MAGF,EAAE,WAAW,CACb;MAAA,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAChC;QAAA,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,sBAAsB,EAAE,IAAI,CACxD;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,IAAI,GAAG;IACd,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,QAAQ,CAAC,QAAQ,GAAG;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Card,\n CardHeader,\n CardMedia,\n CardContent,\n CardFooter,\n CardFooterProps,\n Image,\n MenuButton,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Card.styles';\n\nexport default {\n title: 'Core/Card',\n component: Card,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const SimpleCard = () => {\n return (\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n );\n};\n\nexport const FullCard: Story<CardFooterProps> = (args: CardFooterProps) => {\n return (\n <Card as={StyledCard}>\n <CardMedia>\n <Image\n src='https://www.pega.com/sites/default/files/default-og.jpg'\n height='100'\n alt='Media'\n />\n </CardMedia>\n <CardHeader\n actions={\n <MenuButton\n portal\n variant='simple'\n text='Card actions'\n icon='more'\n iconOnly\n menu={{\n items: [\n { id: 'action-1', primary: 'Card action 1' },\n { id: 'action-2', primary: 'Card action 2' },\n { id: 'action-3', primary: 'Card action 3' }\n ]\n }}\n />\n }\n >\n <Text variant='h2'>Full Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n <CardFooter justify={args.justify}>\n <Text variant='secondary'>This is the CardFooter</Text>\n </CardFooter>\n </Card>\n );\n};\n\nFullCard.args = {\n justify: 'start'\n};\n\nFullCard.argTypes = {\n justify: {\n options: ['start', 'end', 'center', 'between', 'around', 'evenly'],\n control: { type: 'select' }\n }\n};\n"]}
1
+ {"version":3,"file":"Card.stories.jsx","sourceRoot":"","sources":["../../../src/core/Card/Card.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAEV,KAAK,EACL,UAAU,EACV,IAAI,EACJ,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACnB;MAAA,CAAC,UAAU,CACT;QAAA,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CACtC;MAAA,EAAE,UAAU,CACZ;MAAA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,CAAC,QAAQ,GAAG;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC;AAOF,MAAM,CAAC,MAAM,gBAAgB,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAC5F,OAAO,CACL,CAAC,aAAa,CACZ,KAAK,CAAC,CAAC;YACL,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,eAAe,EAAE,IAAI,CAAC,YAAY;oBAClC,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC5B;aACF;SACF,CAAC,CAEF;MAAA,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CACnB;QAAA,CAAC,UAAU,CACT;UAAA,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CACtC;QAAA,EAAE,UAAU,CACZ;QAAA,CAAC,WAAW,CACV;;;;QAGF,EAAE,WAAW,CACf;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,YAAY,EAAE,QAAQ;IACtB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n Card,\n CardHeader,\n CardMedia,\n CardContent,\n CardFooter,\n CardFooterProps,\n Image,\n MenuButton,\n Text,\n Configuration\n} from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Card.styles';\n\nexport default {\n title: 'Core/Card',\n component: Card,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\nexport const SimpleCard = () => {\n return (\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n );\n};\n\nexport const FullCard: Story<CardFooterProps> = (args: CardFooterProps) => {\n return (\n <Card as={StyledCard}>\n <CardMedia>\n <Image\n src='https://www.pega.com/sites/default/files/default-og.jpg'\n height='100'\n alt='Media'\n />\n </CardMedia>\n <CardHeader\n actions={\n <MenuButton\n portal\n variant='simple'\n text='Card actions'\n icon='more'\n iconOnly\n menu={{\n items: [\n { id: 'action-1', primary: 'Card action 1' },\n { id: 'action-2', primary: 'Card action 2' },\n { id: 'action-3', primary: 'Card action 3' }\n ]\n }}\n />\n }\n >\n <Text variant='h2'>Full Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut\n labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco\n laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n <CardFooter justify={args.justify}>\n <Text variant='secondary'>This is the CardFooter</Text>\n </CardFooter>\n </Card>\n );\n};\n\nFullCard.args = {\n justify: 'start'\n};\n\nFullCard.argTypes = {\n justify: {\n options: ['start', 'end', 'center', 'between', 'around', 'evenly'],\n control: { type: 'select' }\n }\n};\n\ninterface ConfigurableCardProps {\n borderRadius?: string;\n background?: string;\n}\n\nexport const ConfigurableCard: Story<ConfigurableCardProps> = (args: ConfigurableCardProps) => {\n return (\n <Configuration\n theme={{\n components: {\n card: {\n 'border-radius': args.borderRadius,\n background: args.background\n }\n }\n }}\n >\n <Card as={StyledCard}>\n <CardHeader>\n <Text variant='h2'>Simple Card</Text>\n </CardHeader>\n <CardContent>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt\n ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat.\n </CardContent>\n </Card>\n </Configuration>\n );\n};\n\nConfigurableCard.args = {\n borderRadius: '0.5rem',\n background: '#ffffff'\n};\n\nConfigurableCard.argTypes = {\n borderRadius: { control: { type: 'text' } },\n background: { control: { type: 'color' } }\n};\n"]}
@@ -4,4 +4,16 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const DefaultCheckbox: Story<RadioCheckProps>;
6
6
  export declare const CheckboxCard: Story<RadioCheckProps>;
7
+ interface ConfigurableCheckboxProps extends RadioCheckProps {
8
+ size?: string;
9
+ backgroundColor?: string;
10
+ borderColor?: string;
11
+ borderWidth?: string;
12
+ borderRadius?: string;
13
+ labelColor?: string;
14
+ labelFontWeight?: string;
15
+ checkedBackgroundColor?: string;
16
+ checkedBorderColor?: string;
17
+ }
18
+ export declare const ConfigurableCheckbox: Story<ConfigurableCheckboxProps>;
7
19
  //# sourceMappingURL=Checkbox.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAY,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEpE,wBAmBU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,eAAe,CAY/C,CAAC"}
1
+ {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA2B,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEnF,wBAmBU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,eAAe,CAY/C,CAAC;AAEF,UAAU,yBAA0B,SAAQ,eAAe;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CA8BjE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Checkbox } from '@pega/cosmos-react-core';
1
+ import { Checkbox, Configuration } from '@pega/cosmos-react-core';
2
2
  export default {
3
3
  title: 'Core/Checkbox',
4
4
  component: Checkbox,
@@ -25,4 +25,57 @@ export const DefaultCheckbox = (args) => {
25
25
  export const CheckboxCard = (args) => {
26
26
  return (<Checkbox variant='card' status={args.status} label={args.label} required={args.required} disabled={args.disabled} readOnly={args.readOnly} indeterminate={args.indeterminate}/>);
27
27
  };
28
+ export const ConfigurableCheckbox = (args) => {
29
+ return (<Configuration theme={{
30
+ components: {
31
+ checkbox: {
32
+ 'border-radius': args.borderRadius
33
+ },
34
+ 'radio-check': {
35
+ 'border-color': args.borderColor,
36
+ 'border-width': args.borderWidth,
37
+ 'background-color': args.backgroundColor,
38
+ label: {
39
+ color: args.labelColor,
40
+ 'font-weight': args.labelFontWeight
41
+ },
42
+ size: args.size,
43
+ ':checked': {
44
+ 'background-color': args.checkedBackgroundColor,
45
+ 'border-color': args.checkedBorderColor
46
+ }
47
+ }
48
+ }
49
+ }}>
50
+ <Checkbox label='Configurable Checkbox'/>
51
+ </Configuration>);
52
+ };
53
+ ConfigurableCheckbox.args = {
54
+ size: '1.25rem',
55
+ backgroundColor: '#ffffff',
56
+ borderColor: '#939393',
57
+ borderWidth: '0.0625rem',
58
+ borderRadius: '0.5',
59
+ labelColor: '#000000',
60
+ labelFontWeight: '400',
61
+ checkedBackgroundColor: '#076bc9',
62
+ checkedBorderColor: '#076bc9'
63
+ };
64
+ ConfigurableCheckbox.argTypes = {
65
+ size: { control: { type: 'text' } },
66
+ backgroundColor: { control: { type: 'color' } },
67
+ borderColor: { control: { type: 'color' } },
68
+ borderWidth: { control: { type: 'text' } },
69
+ borderRadius: { control: { type: 'text' } },
70
+ labelColor: { control: { type: 'color' } },
71
+ labelFontWeight: { control: { type: 'text' } },
72
+ checkedBackgroundColor: { control: { type: 'color' } },
73
+ checkedBorderColor: { control: { type: 'color' } },
74
+ status: { table: { disable: true } },
75
+ label: { table: { disable: true } },
76
+ required: { table: { disable: true } },
77
+ disabled: { table: { disable: true } },
78
+ readOnly: { table: { disable: true } },
79
+ indeterminate: { table: { disable: true } }
80
+ };
28
81
  //# sourceMappingURL=Checkbox.stories.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;Q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AAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxB,aAAa,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAClC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Checkbox, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Checkbox',\n component: Checkbox,\n args: {\n status: undefined,\n label: 'Check me, please',\n required: false,\n disabled: false,\n readOnly: false,\n indeterminate: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n indeterminate: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultCheckbox: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\nexport const CheckboxCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"Checkbox.stories.jsx","sourceRoot":"","sources":["../../../src/core/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,yBAAyB,CAAC;AAEnF,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,KAAK;QACf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\nexport default {\n title: 'Core/Checkbox',\n component: Checkbox,\n args: {\n status: undefined,\n label: 'Check me, please',\n required: false,\n disabled: false,\n readOnly: false,\n indeterminate: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } },\n indeterminate: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultCheckbox: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\nexport const CheckboxCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <Checkbox\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n indeterminate={args.indeterminate}\n />\n );\n};\n\ninterface ConfigurableCheckboxProps extends RadioCheckProps {\n size?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n labelColor?: string;\n labelFontWeight?: string;\n checkedBackgroundColor?: string;\n checkedBorderColor?: string;\n}\n\nexport const ConfigurableCheckbox: Story<ConfigurableCheckboxProps> = (\n args: ConfigurableCheckboxProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n checkbox: {\n 'border-radius': args.borderRadius\n },\n 'radio-check': {\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'background-color': args.backgroundColor,\n label: {\n color: args.labelColor,\n 'font-weight': args.labelFontWeight\n },\n size: args.size,\n ':checked': {\n 'background-color': args.checkedBackgroundColor,\n 'border-color': args.checkedBorderColor\n }\n }\n }\n }}\n >\n <Checkbox label='Configurable Checkbox' />\n </Configuration>\n );\n};\n\nConfigurableCheckbox.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5',\n labelColor: '#000000',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableCheckbox.argTypes = {\n size: { control: { type: 'text' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } },\n labelColor: { control: { type: 'color' } },\n labelFontWeight: { control: { type: 'text' } },\n checkedBackgroundColor: { control: { type: 'color' } },\n checkedBorderColor: { control: { type: 'color' } },\n status: { table: { disable: true } },\n label: { table: { disable: true } },\n required: { table: { disable: true } },\n disabled: { table: { disable: true } },\n readOnly: { table: { disable: true } },\n indeterminate: { table: { disable: true } }\n};\n"]}
@@ -7,4 +7,21 @@ export declare const ThemedForm: Story<{
7
7
  }>;
8
8
  export declare const ThemingHierarchy: () => JSX.Element;
9
9
  export declare const OverridableActionMenu: () => JSX.Element;
10
+ interface ConfigurableBaseThemeProps {
11
+ interactive?: string;
12
+ }
13
+ export declare const ConfigurableBaseTheme: Story<ConfigurableBaseThemeProps>;
14
+ interface ConfigurableComponentThemeProps {
15
+ buttonColor?: string;
16
+ checkedBackgroundColor?: string;
17
+ }
18
+ export declare const ConfigurableComponentTheme: Story<ConfigurableComponentThemeProps>;
19
+ interface ConfigurableLocaleProps {
20
+ locale?: string;
21
+ }
22
+ export declare const ConfigurableLocale: Story<ConfigurableLocaleProps>;
23
+ interface ConfigurableTranslationsProps {
24
+ placeholderTranslation?: string;
25
+ }
26
+ export declare const ConfigurableTranslations: Story<ConfigurableTranslationsProps>;
10
27
  //# sourceMappingURL=Configuration.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAa/C,wBAGU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,CA+B7D,CAAC;AA2CF,eAAO,MAAM,gBAAgB,mBAyE5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAWjC,CAAC"}
1
+ {"version":3,"file":"Configuration.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Configuration/Configuration.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAmB/C,wBAIU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,CA+B7D,CAAC;AA2CF,eAAO,MAAM,gBAAgB,mBAyE5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAWjC,CAAC;AAEF,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,0BAA0B,CAsBnE,CAAC;AAUF,UAAU,+BAA+B;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,+BAA+B,CA2B7E,CAAC;AAYF,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAU7D,CAAC;AAUF,UAAU,6BAA6B;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,6BAA6B,CAsBzE,CAAC"}