@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
@@ -6,4 +6,12 @@ interface SelectStoryProps extends SelectProps {
6
6
  showAction: boolean;
7
7
  }
8
8
  export declare const SelectDemo: Story<SelectStoryProps>;
9
+ interface ConfigurableSelectProps {
10
+ height?: string;
11
+ padding?: string;
12
+ borderColor?: string;
13
+ borderWidth?: string;
14
+ borderRadius?: string;
15
+ }
16
+ export declare const ConfigurableSelect: Story<ConfigurableSelectProps>;
9
17
  //# sourceMappingURL=Select.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAU,MAAM,yBAAyB,CAAC;;AAEtE,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CA6B9C,CAAC"}
1
+ {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAyB,MAAM,yBAAyB,CAAC;;AAErF,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CA6B9C,CAAC;AAwBF,UAAU,uBAAuB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Select, Option } from '@pega/cosmos-react-core';
2
+ import { Select, Option, Configuration } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/Select',
5
5
  component: Select
@@ -35,4 +35,31 @@ SelectDemo.argTypes = {
35
35
  disabled: { control: { type: 'boolean' } },
36
36
  readOnly: { control: { type: 'boolean' } }
37
37
  };
38
+ export const ConfigurableSelect = (args) => {
39
+ return (_jsx(Configuration, { theme: {
40
+ components: {
41
+ select: {
42
+ height: args.height,
43
+ padding: args.padding,
44
+ 'border-color': args.borderColor,
45
+ 'border-width': args.borderWidth,
46
+ 'border-radius': args.borderRadius
47
+ }
48
+ }
49
+ }, children: _jsxs(Select, { label: 'Select input', info: 'Choose a value', children: [_jsx(Option, { children: "Choose an option\u2026" }, void 0), _jsx(Option, { children: "Option 1" }, void 0), _jsx(Option, { children: "Option 2" }, void 0), _jsx(Option, { children: "Option 3" }, void 0)] }, void 0) }, void 0));
50
+ };
51
+ ConfigurableSelect.args = {
52
+ height: '2rem',
53
+ padding: '0.5rem',
54
+ borderColor: '#939393',
55
+ borderWidth: '0.0625rem',
56
+ borderRadius: '0.5'
57
+ };
58
+ ConfigurableSelect.argTypes = {
59
+ height: { control: { type: 'text' } },
60
+ padding: { control: { type: 'text' } },
61
+ borderColor: { control: { type: 'color' } },
62
+ borderWidth: { control: { type: 'text' } },
63
+ borderRadius: { control: { type: 'text' } }
64
+ };
38
65
  //# sourceMappingURL=Select.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.js","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtE,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,MAAC,MAAM,IACL,EAAE,EAAC,aAAa,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EACL,IAAI,CAAC,UAAU;YACb,CAAC,CAAC;gBACE;oBACE,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,MAAM;iBACb;aACF;YACH,CAAC,CAAC,SAAS,aAGf,KAAC,MAAM,iDAA2B,EAClC,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,YAClB,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC5F,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n"]}
1
+ {"version":3,"file":"Select.stories.js","sourceRoot":"","sources":["../../../src/core/Select/Select.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAErF,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,MAAC,MAAM,IACL,EAAE,EAAC,aAAa,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EACL,IAAI,CAAC,UAAU;YACb,CAAC,CAAC;gBACE;oBACE,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,MAAM;iBACb;aACF;YACH,CAAC,CAAC,SAAS,aAGf,KAAC,MAAM,iDAA2B,EAClC,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,EACzB,KAA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E,IAAI,CAAC,WAAW;oBAChC,cAAc,EAAE,IAAI,CAAC,WAAW;oBAChC,eAAe,EAAE,IAAI,CAAC,YAAY;iBACnC;aACF;SACF,YAED,MAAC,MAAM,IAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,gBAAgB,aAChD,KAAC,MAAM,iDAA2B,EAClC,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,EACzB,KAAC,MAAM,mCAAkB,YAClB,WACK,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Select, SelectProps, Option, Configuration } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Select',\n component: Select\n} as Meta;\n\ninterface SelectStoryProps extends SelectProps {\n showAction: boolean;\n}\n\nexport const SelectDemo: Story<SelectStoryProps> = (args: SelectStoryProps) => {\n return (\n <Select\n id='select-demo'\n label={args.label}\n labelHidden={args.labelHidden}\n info={args.info}\n status={args.status}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n actions={\n args.showAction\n ? [\n {\n id: 'config',\n text: 'Configure',\n icon: 'gear'\n }\n ]\n : undefined\n }\n >\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n );\n};\n\nSelectDemo.args = {\n showAction: false,\n label: 'Select input',\n labelHidden: false,\n info: 'Choose a value',\n status: undefined,\n required: false,\n disabled: false,\n readOnly: false\n};\n\nSelectDemo.argTypes = {\n showAction: { control: { type: 'boolean' } },\n label: { control: { type: 'text' } },\n labelHidden: { control: { type: 'boolean' } },\n info: { control: { type: 'text' } },\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableSelectProps {\n height?: string;\n padding?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n}\n\nexport const ConfigurableSelect: Story<ConfigurableSelectProps> = (\n args: ConfigurableSelectProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n select: {\n height: args.height,\n padding: args.padding,\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <Select label='Select input' info='Choose a value'>\n <Option>Choose an option…</Option>\n <Option>Option 1</Option>\n <Option>Option 2</Option>\n <Option>Option 3</Option>\n </Select>\n </Configuration>\n );\n};\n\nConfigurableSelect.args = {\n height: '2rem',\n padding: '0.5rem',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '0.5'\n};\n\nConfigurableSelect.argTypes = {\n height: { control: { type: 'text' } },\n padding: { control: { type: 'text' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } }\n};\n"]}
@@ -11,4 +11,10 @@ interface SentimentStoryProps extends SentimentProps {
11
11
  negativeIcon: string;
12
12
  }
13
13
  export declare const SentimentDemo: Story<SentimentStoryProps>;
14
+ interface ConfigurableSentimentProps {
15
+ positiveColor?: string;
16
+ negativeColor?: string;
17
+ neutralColor?: string;
18
+ }
19
+ export declare const ConfigurableSentiment: Story<ConfigurableSentimentProps>;
14
20
  //# sourceMappingURL=Sentiment.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAa,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAEpE,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC"}
1
+ {"version":3,"file":"Sentiment.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAmC,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAE1F,wBAGU;AAEV,UAAU,mBAAoB,SAAQ,cAAc;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAqBpD,CAAC;AAwBF,UAAU,0BAA0B;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,0BAA0B,CA0BnE,CAAC"}
@@ -1,11 +1,11 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Sentiment } from '@pega/cosmos-react-core';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Configuration, icons, Sentiment } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/Sentiment',
5
5
  component: Sentiment
6
6
  };
7
7
  export const SentimentDemo = (args) => {
8
- const icons = {
8
+ const iconNames = {
9
9
  positive: args.positiveIcon,
10
10
  neutral: args.neutralIcon,
11
11
  negative: args.negativeIcon
@@ -15,7 +15,7 @@ export const SentimentDemo = (args) => {
15
15
  neutral: args.neutralLabel,
16
16
  negative: args.negativeLabel
17
17
  };
18
- return (_jsx(Sentiment, { variant: args.variant, labelHidden: args.labelHidden, icons: icons, labels: labels }, void 0));
18
+ return (_jsx(Sentiment, { variant: args.variant, labelHidden: args.labelHidden, icons: iconNames, labels: labels }, void 0));
19
19
  };
20
20
  SentimentDemo.args = {
21
21
  variant: 'positive',
@@ -31,10 +31,37 @@ SentimentDemo.argTypes = {
31
31
  variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },
32
32
  labelHidden: { control: { type: 'boolean' } },
33
33
  positiveLabel: { control: { type: 'text' } },
34
- positiveIcon: { control: { type: 'text' } },
34
+ positiveIcon: { options: icons, control: { type: 'select', icons: true } },
35
35
  neutralLabel: { control: { type: 'text' } },
36
- neutralIcon: { control: { type: 'text' } },
36
+ neutralIcon: { options: icons, control: { type: 'select', icons: true } },
37
37
  negativeLabel: { control: { type: 'text' } },
38
- negativeIcon: { control: { type: 'text' } }
38
+ negativeIcon: { options: icons, control: { type: 'select', icons: true } }
39
+ };
40
+ export const ConfigurableSentiment = (args) => {
41
+ return (_jsxs(Configuration, { theme: {
42
+ components: {
43
+ sentiment: {
44
+ positive: {
45
+ color: args.positiveColor
46
+ },
47
+ negative: {
48
+ color: args.negativeColor
49
+ },
50
+ neutral: {
51
+ color: args.neutralColor
52
+ }
53
+ }
54
+ }
55
+ }, children: [_jsx(Sentiment, { variant: 'positive' }, void 0), _jsx(Sentiment, { variant: 'negative' }, void 0), _jsx(Sentiment, { variant: 'neutral' }, void 0)] }, void 0));
56
+ };
57
+ ConfigurableSentiment.args = {
58
+ positiveColor: '#20aa50',
59
+ negativeColor: '#d91c29',
60
+ neutralColor: '#000000'
61
+ };
62
+ ConfigurableSentiment.argTypes = {
63
+ positiveColor: { control: { type: 'color' } },
64
+ negativeColor: { control: { type: 'color' } },
65
+ neutralColor: { control: { type: 'color' } }
39
66
  };
40
67
  //# sourceMappingURL=Sentiment.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,CAAC,YAAY;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,aAAa;QAC5B,OAAO,EAAE,IAAI,CAAC,YAAY;QAC1B,QAAQ,EAAE,IAAI,CAAC,aAAa;KAC7B,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IACR,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,WACd,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,KAAK;IAClB,aAAa,EAAE,MAAM;IACrB,YAAY,EAAE,kBAAkB;IAChC,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,kBAAkB;IAC/B,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,gBAAgB;CAC/B,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtF,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const icons = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={icons}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { control: { type: 'text' } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { control: { type: 'text' } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"Sentiment.stories.js","sourceRoot":"","sources":["../../../src/core/Sentiment/Sentiment.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,yBAAyB,CAAC;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,SAAS;CACb,CAAC;AAWV,MAAM,CAAC,MAAM,aAAa,GAA+B,CAAC,IAAyB,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG;QAChB,QAAQ,EAAE,IAAI,CAAC,YAAY;QAC3B,OAAO,EAAE,IAAI,CAAC,WAAW;QACzB,QAAQ,EAAE,IAAI,CAAC,YAAY;KAC5B,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,aAAa;Q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AAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;CAC3E,CAAC;AAQF,MAAM,CAAC,MAAM,qBAAqB,GAAsC,CACtE,IAAgC,EAChC,EAAE;IACF,OAAO,CACL,MAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,QAAQ,EAAE;wBACR,KAAK,EAAE,IAAI,CAAC,aAAa;qBAC1B;oBACD,QAAQ,EAAE;wBACR,KAAK,EAAE,IAAI,CAAC,aAAa;qBAC1B;oBACD,OAAO,EAAE;wBACP,KAAK,EAAE,IAAI,CAAC,YAAY;qBACzB;iBACF;aACF;SACF,aAED,KAAC,SAAS,IAAC,OAAO,EAAC,UAAU,WAAG,EAChC,KAAC,SAAS,IAAC,OAAO,EAAC,UAAU,WAAG,EAChC,KAAC,SAAS,IAAC,OAAO,EAAC,SAAS,WAAG,YACjB,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAqB,CAAC,IAAI,GAAG;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,qBAAqB,CAAC,QAAQ,GAAG;IAC/B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, icons, Sentiment, SentimentProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Sentiment',\n component: Sentiment\n} as Meta;\n\ninterface SentimentStoryProps extends SentimentProps {\n positiveLabel: string;\n neutralLabel: string;\n negativeLabel: string;\n positiveIcon: string;\n neutralIcon: string;\n negativeIcon: string;\n}\n\nexport const SentimentDemo: Story<SentimentStoryProps> = (args: SentimentStoryProps) => {\n const iconNames = {\n positive: args.positiveIcon,\n neutral: args.neutralIcon,\n negative: args.negativeIcon\n };\n\n const labels = {\n positive: args.positiveLabel,\n neutral: args.neutralLabel,\n negative: args.negativeLabel\n };\n\n return (\n <Sentiment\n variant={args.variant}\n labelHidden={args.labelHidden}\n icons={iconNames}\n labels={labels}\n />\n );\n};\n\nSentimentDemo.args = {\n variant: 'positive',\n labelHidden: false,\n positiveLabel: 'Yay!',\n positiveIcon: 'face-happy-solid',\n neutralLabel: 'Hm…',\n neutralIcon: 'face-blank-solid',\n negativeLabel: 'Uh-oh!',\n negativeIcon: 'face-sad-solid'\n};\n\nSentimentDemo.argTypes = {\n variant: { options: ['positive', 'neutral', 'negative'], control: { type: 'select' } },\n labelHidden: { control: { type: 'boolean' } },\n positiveLabel: { control: { type: 'text' } },\n positiveIcon: { options: icons, control: { type: 'select', icons: true } },\n neutralLabel: { control: { type: 'text' } },\n neutralIcon: { options: icons, control: { type: 'select', icons: true } },\n negativeLabel: { control: { type: 'text' } },\n negativeIcon: { options: icons, control: { type: 'select', icons: true } }\n};\n\ninterface ConfigurableSentimentProps {\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n}\n\nexport const ConfigurableSentiment: Story<ConfigurableSentimentProps> = (\n args: ConfigurableSentimentProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n sentiment: {\n positive: {\n color: args.positiveColor\n },\n negative: {\n color: args.negativeColor\n },\n neutral: {\n color: args.neutralColor\n }\n }\n }\n }}\n >\n <Sentiment variant='positive' />\n <Sentiment variant='negative' />\n <Sentiment variant='neutral' />\n </Configuration>\n );\n};\n\nConfigurableSentiment.args = {\n positiveColor: '#20aa50',\n negativeColor: '#d91c29',\n neutralColor: '#000000'\n};\n\nConfigurableSentiment.argTypes = {\n positiveColor: { control: { type: 'color' } },\n negativeColor: { control: { type: 'color' } },\n neutralColor: { control: { type: 'color' } }\n};\n"]}
@@ -21,7 +21,7 @@ export default {
21
21
  },
22
22
  argTypes: {
23
23
  name: { control: { type: 'text' } },
24
- icon: { options: icons, control: { type: 'select' } },
24
+ icon: { options: icons, control: { type: 'select', icons: true } },
25
25
  count: { control: { type: 'number' } },
26
26
  loading: { control: { type: 'boolean' } },
27
27
  showSecondary: { control: { type: 'boolean' } },
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryList.stories.js","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;KACxB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACnC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACrD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QACtC,OAAO,EAAE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ACF,EACD,SAAS,EAAE,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"SummaryList.stories.js","sourceRoot":"","sources":["../../../src/core/SummaryList/SummaryList.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,KAAK,EAEL,KAAK,EACL,mBAAmB,EACnB,WAAW,EAEX,OAAO,EACP,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;KACxB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACnC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAClE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;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BACL,CAAC;aACF;SACF,EACD,SAAS,EAAE,GAAG,EAAE;YACd,WAAW,CAAC,uBAAuB,EAAE;gBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext, useMemo, useState } from 'react';\n\nimport {\n icons,\n OmitStrict,\n Modal,\n ModalManagerContext,\n SummaryList,\n SummaryListProps,\n ViewAll,\n createStringMatcher\n} from '@pega/cosmos-react-core';\n\nimport { useMockListData } from './SummaryList.mocks';\n\nexport default {\n title: 'Core/SummaryList',\n component: SummaryList,\n parameters: {\n layout: 'centered'\n },\n args: {\n name: 'People',\n icon: 'users-solid',\n count: 5,\n loading: false,\n showSecondary: true,\n showVisual: true,\n showActions: true,\n noItems: false,\n noItemsText: 'No items'\n },\n argTypes: {\n name: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select', icons: true } },\n count: { control: { type: 'number' } },\n loading: { control: { type: 'boolean' } },\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showActions: { control: { type: 'boolean' } },\n noItems: { control: { type: 'boolean' } },\n noItemsText: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface SummaryListStoryProps extends SummaryListProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showActions?: boolean;\n noItems?: boolean;\n}\n\nexport const SummaryListDemo: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: args.count }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n />\n );\n};\n\nexport const SummaryListViewAll: Story<SummaryListStoryProps> = (args: SummaryListStoryProps) => {\n const SummaryListViewAllModal = ({\n name,\n count,\n loading\n }: OmitStrict<SummaryListProps, 'items'>) => {\n const [search, setSearch] = useState('');\n const [modalLoading, setModalLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setModalLoading(false);\n },\n {\n count\n }\n );\n\n const itemsToRender = useMemo(() => {\n if (search.trim()) {\n const filterRegex = createStringMatcher(search, 'boundary');\n return items.filter(({ primary }) => filterRegex.test(primary));\n }\n\n return items;\n }, [items, search]);\n\n return (\n <Modal heading={args.name}>\n <ViewAll\n loading={loading || modalLoading}\n items={itemsToRender}\n actions={[\n {\n id: 'addNew',\n text: `Add ${name}`\n }\n ]}\n searchInputProps={{ onSearchChange: setSearch }}\n />\n </Modal>\n );\n };\n\n const { create: createModal } = useContext(ModalManagerContext);\n const [loading, setLoading] = useState(true);\n\n const [items] = useMockListData(\n () => {\n setLoading(false);\n },\n { count: 3 }\n );\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n secondary: args.showSecondary ? item.secondary : undefined,\n visual: args.showVisual ? item.visual : undefined,\n actions: args.showActions\n ? ['Action 1', 'Action 2', 'Action 3'].map(text => ({\n text,\n id: text\n }))\n : undefined\n };\n });\n\n return (\n <SummaryList\n name={args.name}\n icon={args.icon}\n count={args.loading || loading ? undefined : args.count}\n items={args.noItems ? [] : itemsToRender}\n loading={args.loading || loading}\n noItemsText={args.noItemsText}\n actions={[\n {\n text: `Add new ${args.name}`,\n id: `${args.name}:addNew`,\n icon: 'plus',\n onClick() {\n createModal(() => {\n return (\n <Modal heading={`Add new ${args.name}`}>\n {`Content for adding new ${args.name} goes here…`}\n </Modal>\n );\n });\n }\n }\n ]}\n onViewAll={() => {\n createModal(SummaryListViewAllModal, {\n name: args.name,\n count: args.count,\n loading: args.loading\n });\n }}\n />\n );\n};\n"]}
@@ -4,4 +4,11 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const SwitchDemo: Story<SwitchProps>;
6
6
  export declare const SwitchInCard: Story<SwitchProps>;
7
+ interface ConfigurableSwitchProps extends SwitchProps {
8
+ height?: string;
9
+ width?: string;
10
+ onColor?: string;
11
+ offColor?: string;
12
+ }
13
+ export declare const ConfigurableSwitch: Story<ConfigurableSwitchProps>;
7
14
  //# sourceMappingURL=Switch.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAgB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAIpE,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC"}
1
+ {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA+B,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAInF,wBAWU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAYzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,WAAW,CAc3C,CAAC;AAEF,UAAU,uBAAwB,SAAQ,WAAW;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAyB7D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { Card, Switch } from '@pega/cosmos-react-core';
3
+ import { Card, Configuration, Switch } from '@pega/cosmos-react-core';
4
4
  import { StyledCard } from './Switch.styles';
5
5
  export default {
6
6
  title: 'Core/Switch',
@@ -22,4 +22,35 @@ export const SwitchInCard = (args) => {
22
22
  const [on, setOn] = useState(false);
23
23
  return (_jsx(Card, { as: StyledCard, children: _jsx(Switch, { id: 'switch', on: on, onChange: () => setOn(curr => !curr), label: args.label, disabled: args.disabled }, void 0) }, void 0));
24
24
  };
25
+ export const ConfigurableSwitch = (args) => {
26
+ const [on, setOn] = useState(false);
27
+ return (_jsx(Configuration, { theme: {
28
+ components: {
29
+ switch: {
30
+ height: args.height,
31
+ width: args.width,
32
+ on: {
33
+ color: args.onColor
34
+ },
35
+ off: {
36
+ color: args.offColor
37
+ }
38
+ }
39
+ }
40
+ }, children: _jsx(Switch, { on: on, onChange: () => setOn(curr => !curr), label: 'Toggle on/off' }, void 0) }, void 0));
41
+ };
42
+ ConfigurableSwitch.args = {
43
+ height: '1.5rem',
44
+ width: '3rem',
45
+ onColor: '#076bc9',
46
+ offColor: '#939393'
47
+ };
48
+ ConfigurableSwitch.argTypes = {
49
+ height: { control: { type: 'text' } },
50
+ width: { control: { type: 'text' } },
51
+ onColor: { control: { type: 'color' } },
52
+ offColor: { control: { type: 'color' } },
53
+ label: { table: { disable: true } },
54
+ disabled: { table: { disable: true } }
55
+ };
25
56
  //# sourceMappingURL=Switch.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.stories.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,KAAC,MAAM,IACL,EAAE,EAAC,QAAQ,EACX,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EACpC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,IAAiB,EAAE,EAAE;IACpE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,UAAU,YAClB,KAAC,MAAM,IACL,EAAE,EAAC,QAAQ,EACX,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EACpC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,WACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n"]}
1
+ {"version":3,"file":"Switch.stories.js","sourceRoot":"","sources":["../../../src/core/Switch/Switch.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE;QACJ,KAA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AC,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,EAAE,EAAE;wBACF,KAAK,EAAE,IAAI,CAAC,OAAO;qBACpB;oBACD,GAAG,EAAE;wBACH,KAAK,EAAE,IAAI,CAAC,QAAQ;qBACrB;iBACF;aACF;SACF,YAED,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,eAAe,WAAG,WAChE,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACvC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACxC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Card, Configuration, Switch, SwitchProps } from '@pega/cosmos-react-core';\n\nimport { StyledCard } from './Switch.styles';\n\nexport default {\n title: 'Core/Switch',\n component: Switch,\n args: {\n label: 'Toggle on/off',\n disabled: false\n },\n argTypes: {\n label: { control: { type: 'text' } },\n disabled: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const SwitchDemo: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n );\n};\n\nexport const SwitchInCard: Story<SwitchProps> = (args: SwitchProps) => {\n const [on, setOn] = useState(false);\n\n return (\n <Card as={StyledCard}>\n <Switch\n id='switch'\n on={on}\n onChange={() => setOn(curr => !curr)}\n label={args.label}\n disabled={args.disabled}\n />\n </Card>\n );\n};\n\ninterface ConfigurableSwitchProps extends SwitchProps {\n height?: string;\n width?: string;\n onColor?: string;\n offColor?: string;\n}\n\nexport const ConfigurableSwitch: Story<ConfigurableSwitchProps> = (\n args: ConfigurableSwitchProps\n) => {\n const [on, setOn] = useState(false);\n\n return (\n <Configuration\n theme={{\n components: {\n switch: {\n height: args.height,\n width: args.width,\n on: {\n color: args.onColor\n },\n off: {\n color: args.offColor\n }\n }\n }\n }}\n >\n <Switch on={on} onChange={() => setOn(curr => !curr)} label='Toggle on/off' />\n </Configuration>\n );\n};\n\nConfigurableSwitch.args = {\n height: '1.5rem',\n width: '3rem',\n onColor: '#076bc9',\n offColor: '#939393'\n};\n\nConfigurableSwitch.argTypes = {\n height: { control: { type: 'text' } },\n width: { control: { type: 'text' } },\n onColor: { control: { type: 'color' } },\n offColor: { control: { type: 'color' } },\n label: { table: { disable: true } },\n disabled: { table: { disable: true } }\n};\n"]}
@@ -11,4 +11,29 @@ interface TableStoryProps {
11
11
  }
12
12
  export declare const TableDemo: Story<TableStoryProps>;
13
13
  export declare const StyledTableDemo: Story<TableStoryProps>;
14
+ interface ConfigurableTableProps extends TableStoryProps {
15
+ headerFontSize?: string;
16
+ headerFontWeight?: string;
17
+ headerForegroundColor?: string;
18
+ headerBackgroundColor?: string;
19
+ headerVerticalSpacing?: number;
20
+ headerHorizontalSpacing?: number;
21
+ headerBorderWidth?: string;
22
+ headerBorderColor?: string;
23
+ bodyForegroundColor?: string;
24
+ bodyBackgroundColor?: string;
25
+ bodyVerticalSpacing?: number;
26
+ bodyHorizontalSpacing?: number;
27
+ bodyBorderWidth?: string;
28
+ bodyBorderColor?: string;
29
+ borderHorizontalInner?: boolean;
30
+ borderHorizontalOuter?: boolean;
31
+ borderVerticalInner?: boolean;
32
+ borderVerticalOuter?: boolean;
33
+ spacingHorizontalInner?: boolean;
34
+ spacingHorizontalOuter?: boolean;
35
+ spacingVerticalInner?: boolean;
36
+ spacingVerticalOuter?: boolean;
37
+ }
38
+ export declare const ConfigurableTable: Story<ConfigurableTableProps>;
14
39
  //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,UAAU,EAAE,MAAM,yBAAyB,CAAC;;AAKjF,wBAiBU;AAEV,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,eAAe,CAmB5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAuClD,CAAC"}
1
+ {"version":3,"file":"Table.stories.d.ts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,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,sBAAsB,CAuE3D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Status, Table } from '@pega/cosmos-react-core';
2
+ import { Status, Table, Configuration } from '@pega/cosmos-react-core';
3
3
  import { tableData } from './Table.mocks';
4
4
  import { StyledBalance } from './Table.styles';
5
5
  export default {
@@ -51,4 +51,116 @@ export const StyledTableDemo = (args) => {
51
51
  ];
52
52
  return (_jsx(Table, { title: args.title, hoverHighlight: args.hoverHighlight, loading: args.loading, loadingMessage: args.loadingMessage, data: args.emptyTable ? [] : tableData, columns: columns }, void 0));
53
53
  };
54
+ export const ConfigurableTable = (args) => {
55
+ const columns = [
56
+ { renderer: data => _jsx("b", { children: data.name }, void 0), label: 'Name' },
57
+ { renderer: 'dob', label: 'Date of Birth' },
58
+ { renderer: 'address', label: 'Address' },
59
+ {
60
+ renderer: data => {
61
+ return (_jsxs(_Fragment, { children: [data.email && data.emailVerified && _jsx(Status, { variant: 'success', children: data.email }, void 0), data.email && !data.emailVerified && _jsx(Status, { variant: 'urgent', children: data.email }, void 0)] }, void 0));
62
+ },
63
+ label: 'Email'
64
+ },
65
+ {
66
+ renderer: data => {
67
+ return (_jsx(StyledBalance, { negativeBalance: data.balance.startsWith('-'), children: data.balance }, void 0));
68
+ },
69
+ label: 'Account Balance',
70
+ align: 'right'
71
+ }
72
+ ];
73
+ return (_jsx(Configuration, { theme: {
74
+ components: {
75
+ table: {
76
+ header: {
77
+ 'font-size': args.headerFontSize,
78
+ 'font-weight': args.headerFontWeight,
79
+ 'foreground-color': args.headerForegroundColor,
80
+ 'background-color': args.headerBackgroundColor,
81
+ 'vertical-spacing': args.headerVerticalSpacing,
82
+ 'horizontal-spacing': args.headerHorizontalSpacing,
83
+ 'border-width': args.headerBorderWidth,
84
+ 'border-color': args.headerBorderColor
85
+ },
86
+ body: {
87
+ 'foreground-color': args.bodyForegroundColor,
88
+ 'background-color': args.bodyBackgroundColor,
89
+ 'vertical-spacing': args.bodyVerticalSpacing,
90
+ 'horizontal-spacing': args.bodyHorizontalSpacing,
91
+ 'border-width': args.bodyBorderWidth,
92
+ 'border-color': args.bodyBorderColor
93
+ },
94
+ border: {
95
+ 'horizontal-inner': args.borderHorizontalInner,
96
+ 'horizontal-outer': args.borderHorizontalOuter,
97
+ 'vertical-inner': args.borderVerticalInner,
98
+ 'vertical-outer': args.borderVerticalOuter
99
+ },
100
+ spacing: {
101
+ 'horizontal-inner': args.spacingHorizontalInner,
102
+ 'horizontal-outer': args.spacingHorizontalOuter,
103
+ 'vertical-inner': args.spacingVerticalInner,
104
+ 'vertical-outer': args.spacingVerticalOuter
105
+ }
106
+ }
107
+ }
108
+ }, children: _jsx(Table, { title: 'Accounts', data: tableData, columns: columns }, void 0) }, void 0));
109
+ };
110
+ ConfigurableTable.args = {
111
+ headerFontSize: 's',
112
+ headerFontWeight: '600',
113
+ headerForegroundColor: '#000000',
114
+ headerBackgroundColor: '#f5f5f5',
115
+ headerVerticalSpacing: 1,
116
+ headerHorizontalSpacing: 2,
117
+ headerBorderWidth: '0.0625rem',
118
+ headerBorderColor: '#cfcfcf',
119
+ bodyForegroundColor: '#000000',
120
+ bodyBackgroundColor: '#ffffff',
121
+ bodyVerticalSpacing: 1,
122
+ bodyHorizontalSpacing: 1,
123
+ bodyBorderWidth: '0.0625rem',
124
+ bodyBorderColor: '#cfcfcf',
125
+ borderHorizontalInner: true,
126
+ borderHorizontalOuter: true,
127
+ borderVerticalInner: true,
128
+ borderVerticalOuter: true,
129
+ spacingHorizontalInner: true,
130
+ spacingHorizontalOuter: true,
131
+ spacingVerticalInner: true,
132
+ spacingVerticalOuter: true
133
+ };
134
+ ConfigurableTable.argTypes = {
135
+ headerFontSize: {
136
+ options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],
137
+ control: { type: 'select' }
138
+ },
139
+ headerFontWeight: { control: { type: 'text' } },
140
+ headerForegroundColor: { control: { type: 'color' } },
141
+ headerBackgroundColor: { control: { type: 'color' } },
142
+ headerVerticalSpacing: { control: { type: 'number' } },
143
+ headerHorizontalSpacing: { control: { type: 'number' } },
144
+ headerBorderWidth: { control: { type: 'text' } },
145
+ headerBorderColor: { control: { type: 'color' } },
146
+ bodyForegroundColor: { control: { type: 'color' } },
147
+ bodyBackgroundColor: { control: { type: 'color' } },
148
+ bodyVerticalSpacing: { control: { type: 'number' } },
149
+ bodyHorizontalSpacing: { control: { type: 'number' } },
150
+ bodyBorderWidth: { control: { type: 'text' } },
151
+ bodyBorderColor: { control: { type: 'color' } },
152
+ borderHorizontalInner: { control: { type: 'boolean' } },
153
+ borderHorizontalOuter: { control: { type: 'boolean' } },
154
+ borderVerticalInner: { control: { type: 'boolean' } },
155
+ borderVerticalOuter: { control: { type: 'boolean' } },
156
+ spacingHorizontalInner: { control: { type: 'boolean' } },
157
+ spacingHorizontalOuter: { control: { type: 'boolean' } },
158
+ spacingVerticalInner: { control: { type: 'boolean' } },
159
+ spacingVerticalOuter: { control: { type: 'boolean' } },
160
+ title: { table: { disable: true } },
161
+ hoverHighlight: { table: { disable: true } },
162
+ loading: { table: { disable: true } },
163
+ loadingMessage: { table: { disable: true } },
164
+ emptyTable: { table: { disable: true } }
165
+ };
54
166
  //# sourceMappingURL=Table.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,K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AAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACtC,OAAO,EAAE,OAAO,WAChB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"Table.stories.js","sourceRoot":"","sources":["../../../src/core/Table/Table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,KAAK,EAA2B,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAChD,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACzC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC7C,UAAU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AE,SAAS,EAAE,EAAE;IACvD,qBAAqB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACvD,mBAAmB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACrD,mBAAmB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACrD,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxD,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACxD,oBAAoB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACtD,oBAAoB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACtD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACrC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC5C,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACzC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Status, Table, ColumnProps, TableProps, Configuration } from '@pega/cosmos-react-core';\n\nimport { tableData } from './Table.mocks';\nimport { StyledBalance } from './Table.styles';\n\nexport default {\n title: 'Core/Table',\n component: Table,\n args: {\n title: 'Accounts',\n hoverHighlight: false,\n loading: false,\n loadingMessage: 'Loading data',\n emptyTable: false\n },\n argTypes: {\n title: { control: { type: 'text' } },\n hoverHighlight: { control: { type: 'boolean' } },\n loading: { control: { type: 'boolean' } },\n loadingMessage: { control: { type: 'text' } },\n emptyTable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface TableStoryProps {\n title?: TableProps['title'];\n hoverHighlight?: TableProps['hoverHighlight'];\n loading?: TableProps['loading'];\n loadingMessage?: TableProps['loadingMessage'];\n emptyTable?: boolean;\n}\n\nexport const TableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\nexport const StyledTableDemo: Story<TableStoryProps> = (args: TableStoryProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Table\n title={args.title}\n hoverHighlight={args.hoverHighlight}\n loading={args.loading}\n loadingMessage={args.loadingMessage}\n data={args.emptyTable ? [] : tableData}\n columns={columns}\n />\n );\n};\n\ninterface ConfigurableTableProps extends TableStoryProps {\n headerFontSize?: string;\n headerFontWeight?: string;\n headerForegroundColor?: string;\n headerBackgroundColor?: string;\n headerVerticalSpacing?: number;\n headerHorizontalSpacing?: number;\n headerBorderWidth?: string;\n headerBorderColor?: string;\n bodyForegroundColor?: string;\n bodyBackgroundColor?: string;\n bodyVerticalSpacing?: number;\n bodyHorizontalSpacing?: number;\n bodyBorderWidth?: string;\n bodyBorderColor?: string;\n borderHorizontalInner?: boolean;\n borderHorizontalOuter?: boolean;\n borderVerticalInner?: boolean;\n borderVerticalOuter?: boolean;\n spacingHorizontalInner?: boolean;\n spacingHorizontalOuter?: boolean;\n spacingVerticalInner?: boolean;\n spacingVerticalOuter?: boolean;\n}\n\nexport const ConfigurableTable: Story<ConfigurableTableProps> = (args: ConfigurableTableProps) => {\n const columns: ColumnProps<typeof tableData[number]>[] = [\n { renderer: data => <b>{data.name}</b>, label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n {\n renderer: data => {\n return (\n <>\n {data.email && data.emailVerified && <Status variant='success'>{data.email}</Status>}\n {data.email && !data.emailVerified && <Status variant='urgent'>{data.email}</Status>}\n </>\n );\n },\n label: 'Email'\n },\n {\n renderer: data => {\n return (\n <StyledBalance negativeBalance={data.balance.startsWith('-')}>\n {data.balance}\n </StyledBalance>\n );\n },\n label: 'Account Balance',\n align: 'right'\n }\n ];\n\n return (\n <Configuration\n theme={{\n components: {\n table: {\n header: {\n 'font-size': args.headerFontSize,\n 'font-weight': args.headerFontWeight,\n 'foreground-color': args.headerForegroundColor,\n 'background-color': args.headerBackgroundColor,\n 'vertical-spacing': args.headerVerticalSpacing,\n 'horizontal-spacing': args.headerHorizontalSpacing,\n 'border-width': args.headerBorderWidth,\n 'border-color': args.headerBorderColor\n },\n body: {\n 'foreground-color': args.bodyForegroundColor,\n 'background-color': args.bodyBackgroundColor,\n 'vertical-spacing': args.bodyVerticalSpacing,\n 'horizontal-spacing': args.bodyHorizontalSpacing,\n 'border-width': args.bodyBorderWidth,\n 'border-color': args.bodyBorderColor\n },\n border: {\n 'horizontal-inner': args.borderHorizontalInner,\n 'horizontal-outer': args.borderHorizontalOuter,\n 'vertical-inner': args.borderVerticalInner,\n 'vertical-outer': args.borderVerticalOuter\n },\n spacing: {\n 'horizontal-inner': args.spacingHorizontalInner,\n 'horizontal-outer': args.spacingHorizontalOuter,\n 'vertical-inner': args.spacingVerticalInner,\n 'vertical-outer': args.spacingVerticalOuter\n }\n }\n }\n }}\n >\n <Table title='Accounts' data={tableData} columns={columns} />\n </Configuration>\n );\n};\n\nConfigurableTable.args = {\n headerFontSize: 's',\n headerFontWeight: '600',\n headerForegroundColor: '#000000',\n headerBackgroundColor: '#f5f5f5',\n headerVerticalSpacing: 1,\n headerHorizontalSpacing: 2,\n headerBorderWidth: '0.0625rem',\n headerBorderColor: '#cfcfcf',\n bodyForegroundColor: '#000000',\n bodyBackgroundColor: '#ffffff',\n bodyVerticalSpacing: 1,\n bodyHorizontalSpacing: 1,\n bodyBorderWidth: '0.0625rem',\n bodyBorderColor: '#cfcfcf',\n borderHorizontalInner: true,\n borderHorizontalOuter: true,\n borderVerticalInner: true,\n borderVerticalOuter: true,\n spacingHorizontalInner: true,\n spacingHorizontalOuter: true,\n spacingVerticalInner: true,\n spacingVerticalOuter: true\n};\n\nConfigurableTable.argTypes = {\n headerFontSize: {\n options: ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'],\n control: { type: 'select' }\n },\n headerFontWeight: { control: { type: 'text' } },\n headerForegroundColor: { control: { type: 'color' } },\n headerBackgroundColor: { control: { type: 'color' } },\n headerVerticalSpacing: { control: { type: 'number' } },\n headerHorizontalSpacing: { control: { type: 'number' } },\n headerBorderWidth: { control: { type: 'text' } },\n headerBorderColor: { control: { type: 'color' } },\n bodyForegroundColor: { control: { type: 'color' } },\n bodyBackgroundColor: { control: { type: 'color' } },\n bodyVerticalSpacing: { control: { type: 'number' } },\n bodyHorizontalSpacing: { control: { type: 'number' } },\n bodyBorderWidth: { control: { type: 'text' } },\n bodyBorderColor: { control: { type: 'color' } },\n borderHorizontalInner: { control: { type: 'boolean' } },\n borderHorizontalOuter: { control: { type: 'boolean' } },\n borderVerticalInner: { control: { type: 'boolean' } },\n borderVerticalOuter: { control: { type: 'boolean' } },\n spacingHorizontalInner: { control: { type: 'boolean' } },\n spacingHorizontalOuter: { control: { type: 'boolean' } },\n spacingVerticalInner: { control: { type: 'boolean' } },\n spacingVerticalOuter: { control: { type: 'boolean' } },\n title: { table: { disable: true } },\n hoverHighlight: { table: { disable: true } },\n loading: { table: { disable: true } },\n loadingMessage: { table: { disable: true } },\n emptyTable: { table: { disable: true } }\n};\n"]}
@@ -4,4 +4,9 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const TabsDemo: Story<TabsProps>;
6
6
  export declare const TabsCountDemo: Story<TabsProps>;
7
+ interface ConfigurableTabsProps {
8
+ foreground?: string;
9
+ type?: TabsProps['type'];
10
+ }
11
+ export declare const ConfigurableTabs: Story<ConfigurableTabsProps>;
7
12
  //# sourceMappingURL=Tabs.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAwB,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAE1E,wBASU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAAS,CA6B1C,CAAC"}
1
+ {"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAuC,SAAS,EAAE,MAAM,yBAAyB,CAAC;;AAEzF,wBASU;AAEV,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CA6BrC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAAS,CA6B1C,CAAC;AAEF,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,qBAAqB,CAuCzD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
3
+ import { Configuration, Flex, TabPanel, Tabs } from '@pega/cosmos-react-core';
4
4
  export default {
5
5
  title: 'Core/Tabs',
6
6
  component: Tabs,
@@ -39,4 +39,33 @@ export const TabsCountDemo = (args) => {
39
39
  ];
40
40
  return (_jsxs(Flex, { container: { direction: args.type === 'horizontal' ? 'column' : 'row' }, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, type: args.type, onTabClick: handleTabChange, currentTabId: panelShown }, void 0) }, void 0), _jsx(Flex, { container: { pad: [1, 2] }, item: { grow: 1 }, children: tabs.map(tab => (_jsx(TabPanel, { tabId: tab.id, currentTabId: panelShown, children: _jsxs("div", { children: [tab.name, " content"] }, void 0) }, tab.id))) }, void 0)] }, void 0));
41
41
  };
42
+ export const ConfigurableTabs = (args) => {
43
+ const [panelShown, changePanel] = useState('1');
44
+ const handleTabChange = (id) => {
45
+ changePanel(id);
46
+ };
47
+ const tabs = [
48
+ { name: 'Tab 1', id: '1' },
49
+ { name: 'Tab 2', id: '2' },
50
+ { name: 'Tab 3', id: '3' },
51
+ { name: 'Tab 4', id: '4', disabled: true },
52
+ { name: 'Tab 5', id: '5' }
53
+ ];
54
+ return (_jsxs(Configuration, { theme: {
55
+ components: {
56
+ tabs: {
57
+ base: {
58
+ foreground: args.foreground
59
+ }
60
+ }
61
+ }
62
+ }, children: [_jsx(Flex, { item: { grow: 1 }, children: _jsx(Tabs, { tabs: tabs, onTabClick: handleTabChange, currentTabId: panelShown }, void 0) }, void 0), _jsx(Flex, { container: { pad: [1, 2] }, item: { grow: 1 }, children: tabs.map(tab => (_jsx(TabPanel, { tabId: tab.id, currentTabId: panelShown, children: _jsxs("div", { children: [tab.name, " content"] }, void 0) }, tab.id))) }, void 0)] }, void 0));
63
+ };
64
+ ConfigurableTabs.args = {
65
+ foreground: '#076bc9'
66
+ };
67
+ ConfigurableTabs.argTypes = {
68
+ foreground: { control: { type: 'color' } },
69
+ type: { table: { disable: true } }
70
+ };
42
71
  //# sourceMappingURL=Tabs.stories.js.map