@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (580) hide show
  1. package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
  2. package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  3. package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
  4. package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
  5. package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
  6. package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
  7. package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
  8. package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
  9. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  10. package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  11. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  12. package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  13. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  14. package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  15. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
  16. package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
  17. package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
  18. package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  19. package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  20. package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
  21. package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
  22. package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  23. package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
  24. package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  25. package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
  26. package/jsx/build/Workbench/Workbench.stories.jsx +10 -12
  27. package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
  28. package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
  29. package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
  30. package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
  31. package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
  32. package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
  33. package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
  34. package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
  35. package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
  36. package/jsx/core/Badges/Status.stories.d.ts +5 -0
  37. package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
  38. package/jsx/core/Badges/Status.stories.jsx +25 -1
  39. package/jsx/core/Badges/Status.stories.jsx.map +1 -1
  40. package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
  41. package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
  42. package/jsx/core/Banner/Banner.mocks.jsx +41 -0
  43. package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
  44. package/jsx/core/Banner/Banner.stories.d.ts +5 -1
  45. package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
  46. package/jsx/core/Banner/Banner.stories.jsx +22 -39
  47. package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
  48. package/jsx/core/Button/Button.stories.d.ts +8 -0
  49. package/jsx/core/Button/Button.stories.d.ts.map +1 -1
  50. package/jsx/core/Button/Button.stories.jsx +32 -3
  51. package/jsx/core/Button/Button.stories.jsx.map +1 -1
  52. package/jsx/core/Card/Card.stories.d.ts +5 -0
  53. package/jsx/core/Card/Card.stories.d.ts.map +1 -1
  54. package/jsx/core/Card/Card.stories.jsx +30 -1
  55. package/jsx/core/Card/Card.stories.jsx.map +1 -1
  56. package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
  57. package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  58. package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
  59. package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
  60. package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
  61. package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
  62. package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
  63. package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
  64. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
  65. package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
  66. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  67. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  68. package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  69. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  70. package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  71. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
  72. package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
  73. package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  74. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
  75. package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
  76. package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
  77. package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
  78. package/jsx/core/File/FileDisplay.stories.jsx +37 -2
  79. package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
  80. package/jsx/core/Flex/Flex.styles.d.ts +2 -2
  81. package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
  82. package/jsx/core/Flex/Flex.styles.js +17 -17
  83. package/jsx/core/Flex/Flex.styles.js.map +1 -1
  84. package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
  85. package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  86. package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
  87. package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
  88. package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
  89. package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
  90. package/jsx/core/Form/Form.mocks.d.ts +8 -0
  91. package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
  92. package/jsx/core/Form/Form.mocks.jsx +138 -0
  93. package/jsx/core/Form/Form.mocks.jsx.map +1 -0
  94. package/jsx/core/Form/Form.stories.d.ts +10 -7
  95. package/jsx/core/Form/Form.stories.d.ts.map +1 -1
  96. package/jsx/core/Form/Form.stories.jsx +44 -138
  97. package/jsx/core/Form/Form.stories.jsx.map +1 -1
  98. package/jsx/core/Grid/Grid.styles.d.ts +2 -2
  99. package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
  100. package/jsx/core/Grid/Grid.styles.js +4 -4
  101. package/jsx/core/Grid/Grid.styles.js.map +1 -1
  102. package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
  103. package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
  104. package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
  105. package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
  106. package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
  107. package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
  108. package/jsx/core/Grid/GridItem.stories.jsx +28 -28
  109. package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
  110. package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
  111. package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
  112. package/jsx/core/Icon/Icon.mocks.jsx +9 -0
  113. package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
  114. package/jsx/core/Icon/Icon.stories.d.ts +1 -0
  115. package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
  116. package/jsx/core/Icon/Icon.stories.jsx +7 -1
  117. package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
  118. package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  119. package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
  120. package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
  121. package/jsx/core/Input/Input.stories.d.ts +9 -0
  122. package/jsx/core/Input/Input.stories.d.ts.map +1 -1
  123. package/jsx/core/Input/Input.stories.jsx +40 -1
  124. package/jsx/core/Input/Input.stories.jsx.map +1 -1
  125. package/jsx/core/Label/Label.stories.d.ts +4 -0
  126. package/jsx/core/Label/Label.stories.d.ts.map +1 -1
  127. package/jsx/core/Label/Label.stories.jsx +18 -1
  128. package/jsx/core/Label/Label.stories.jsx.map +1 -1
  129. package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  130. package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  131. package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
  132. package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
  133. package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
  134. package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  135. package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
  136. package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
  137. package/jsx/core/Link/Link.stories.d.ts +11 -1
  138. package/jsx/core/Link/Link.stories.d.ts.map +1 -1
  139. package/jsx/core/Link/Link.stories.jsx +22 -5
  140. package/jsx/core/Link/Link.stories.jsx.map +1 -1
  141. package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  142. package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
  143. package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
  144. package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
  145. package/jsx/core/List/OrderedList.stories.jsx +10 -10
  146. package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
  147. package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
  148. package/jsx/core/List/UnorderedList.stories.jsx +10 -10
  149. package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
  150. package/jsx/core/Menu/Menu.stories.d.ts +3 -3
  151. package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
  152. package/jsx/core/Menu/Menu.stories.jsx +8 -12
  153. package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
  154. package/jsx/core/Modal/Modal.mocks.jsx +1 -1
  155. package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
  156. package/jsx/core/Number/Number.stories.d.ts.map +1 -1
  157. package/jsx/core/Number/Number.stories.jsx +1 -4
  158. package/jsx/core/Number/Number.stories.jsx.map +1 -1
  159. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  160. package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  161. package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
  162. package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
  163. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
  164. package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
  165. package/jsx/core/Popover/Popover.stories.d.ts +1 -2
  166. package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
  167. package/jsx/core/Popover/Popover.stories.jsx +35 -37
  168. package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
  169. package/jsx/core/Progress/Progress.stories.d.ts +4 -0
  170. package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
  171. package/jsx/core/Progress/Progress.stories.jsx +22 -1
  172. package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
  173. package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
  174. package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  175. package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
  176. package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
  177. package/jsx/core/Rating/Rating.stories.d.ts +8 -1
  178. package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
  179. package/jsx/core/Rating/Rating.stories.jsx +21 -4
  180. package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
  181. package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
  182. package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  183. package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
  184. package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
  185. package/jsx/core/Select/Select.stories.d.ts +8 -0
  186. package/jsx/core/Select/Select.stories.d.ts.map +1 -1
  187. package/jsx/core/Select/Select.stories.jsx +35 -1
  188. package/jsx/core/Select/Select.stories.jsx.map +1 -1
  189. package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
  190. package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  191. package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
  192. package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
  193. package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
  194. package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
  195. package/jsx/core/Switch/Switch.stories.d.ts +7 -0
  196. package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
  197. package/jsx/core/Switch/Switch.stories.jsx +34 -1
  198. package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
  199. package/jsx/core/Table/Table.stories.d.ts +25 -0
  200. package/jsx/core/Table/Table.stories.d.ts.map +1 -1
  201. package/jsx/core/Table/Table.stories.jsx +120 -1
  202. package/jsx/core/Table/Table.stories.jsx.map +1 -1
  203. package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
  204. package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
  205. package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
  206. package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
  207. package/jsx/core/Text/Text.stories.d.ts +19 -0
  208. package/jsx/core/Text/Text.stories.d.ts.map +1 -1
  209. package/jsx/core/Text/Text.stories.jsx +112 -1
  210. package/jsx/core/Text/Text.stories.jsx.map +1 -1
  211. package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
  212. package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
  213. package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
  214. package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
  215. package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
  216. package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
  217. package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
  218. package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
  219. package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  220. package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
  221. package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
  222. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
  223. package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
  224. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  225. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
  226. package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
  227. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  228. package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  229. package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
  230. package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  231. package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  232. package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  233. package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
  234. package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
  235. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
  236. package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
  237. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  238. package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  239. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
  240. package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
  241. package/jsx/social/Chat/Chat.stories.d.ts +31 -22
  242. package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
  243. package/jsx/social/Chat/Chat.stories.jsx +106 -153
  244. package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
  245. package/jsx/social/Email/Email.mocks.d.ts +1 -2
  246. package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
  247. package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
  248. package/jsx/social/Email/Email.mocks.js.map +1 -0
  249. package/jsx/social/Email/Email.stories.d.ts.map +1 -1
  250. package/jsx/social/Email/Email.stories.jsx +7 -8
  251. package/jsx/social/Email/Email.stories.jsx.map +1 -1
  252. package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
  253. package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
  254. package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
  255. package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
  256. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  257. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
  258. package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
  259. package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
  260. package/jsx/work/CaseView/FileService.mock.jsx +6 -2
  261. package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
  262. package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
  263. package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  264. package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
  265. package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
  266. package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
  267. package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  268. package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
  269. package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
  270. package/jsx/work/Details/Details.stories.jsx +3 -3
  271. package/jsx/work/Details/Details.stories.jsx.map +1 -1
  272. package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  273. package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
  274. package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
  275. package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
  276. package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  277. package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
  278. package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
  279. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
  280. package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  281. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
  282. package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
  283. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  284. package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  285. package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
  286. package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
  287. package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
  288. package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
  289. package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
  290. package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
  291. package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
  292. package/lib/build/AppHeader/AppHeader.stories.js +46 -13
  293. package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
  294. package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
  295. package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
  296. package/lib/build/AppShell/AppShell.stories.js +46 -13
  297. package/lib/build/AppShell/AppShell.stories.js.map +1 -1
  298. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
  299. package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
  300. package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
  301. package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
  302. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
  303. package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
  304. package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
  305. package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
  306. package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
  307. package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
  308. package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
  309. package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
  310. package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
  311. package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  312. package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
  313. package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
  314. package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
  315. package/lib/build/Workbench/Workbench.stories.js +15 -17
  316. package/lib/build/Workbench/Workbench.stories.js.map +1 -1
  317. package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
  318. package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
  319. package/lib/core/AppShell/AppShell.stories.js +23 -1
  320. package/lib/core/AppShell/AppShell.stories.js.map +1 -1
  321. package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
  322. package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
  323. package/lib/core/Avatar/Avatar.stories.js +30 -5
  324. package/lib/core/Avatar/Avatar.stories.js.map +1 -1
  325. package/lib/core/Badges/Status.stories.d.ts +5 -0
  326. package/lib/core/Badges/Status.stories.d.ts.map +1 -1
  327. package/lib/core/Badges/Status.stories.js +23 -1
  328. package/lib/core/Badges/Status.stories.js.map +1 -1
  329. package/lib/core/Banner/Banner.mocks.d.ts +18 -0
  330. package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
  331. package/lib/core/Banner/Banner.mocks.js +36 -0
  332. package/lib/core/Banner/Banner.mocks.js.map +1 -0
  333. package/lib/core/Banner/Banner.stories.d.ts +5 -1
  334. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  335. package/lib/core/Banner/Banner.stories.js +21 -33
  336. package/lib/core/Banner/Banner.stories.js.map +1 -1
  337. package/lib/core/Button/Button.stories.d.ts +8 -0
  338. package/lib/core/Button/Button.stories.d.ts.map +1 -1
  339. package/lib/core/Button/Button.stories.js +29 -2
  340. package/lib/core/Button/Button.stories.js.map +1 -1
  341. package/lib/core/Card/Card.stories.d.ts +5 -0
  342. package/lib/core/Card/Card.stories.d.ts.map +1 -1
  343. package/lib/core/Card/Card.stories.js +19 -1
  344. package/lib/core/Card/Card.stories.js.map +1 -1
  345. package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
  346. package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
  347. package/lib/core/Checkbox/Checkbox.stories.js +52 -1
  348. package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
  349. package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
  350. package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
  351. package/lib/core/Configuration/Configuration.stories.js +62 -3
  352. package/lib/core/Configuration/Configuration.stories.js.map +1 -1
  353. package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
  354. package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
  355. package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
  356. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
  357. package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
  358. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
  359. package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
  360. package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
  361. package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
  362. package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
  363. package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
  364. package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
  365. package/lib/core/File/FileDisplay.stories.d.ts +8 -1
  366. package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
  367. package/lib/core/File/FileDisplay.stories.js +32 -2
  368. package/lib/core/File/FileDisplay.stories.js.map +1 -1
  369. package/lib/core/Flex/Flex.styles.d.ts +2 -2
  370. package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
  371. package/lib/core/Flex/Flex.styles.js +17 -17
  372. package/lib/core/Flex/Flex.styles.js.map +1 -1
  373. package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
  374. package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
  375. package/lib/core/Flex/FlexContainer.stories.js +10 -7
  376. package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
  377. package/lib/core/Flex/FlexItem.stories.js +4 -4
  378. package/lib/core/Flex/FlexItem.stories.js.map +1 -1
  379. package/lib/core/Form/Form.mocks.d.ts +8 -0
  380. package/lib/core/Form/Form.mocks.d.ts.map +1 -0
  381. package/lib/core/Form/Form.mocks.js +97 -0
  382. package/lib/core/Form/Form.mocks.js.map +1 -0
  383. package/lib/core/Form/Form.stories.d.ts +10 -7
  384. package/lib/core/Form/Form.stories.d.ts.map +1 -1
  385. package/lib/core/Form/Form.stories.js +42 -96
  386. package/lib/core/Form/Form.stories.js.map +1 -1
  387. package/lib/core/Grid/Grid.styles.d.ts +2 -2
  388. package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
  389. package/lib/core/Grid/Grid.styles.js +4 -4
  390. package/lib/core/Grid/Grid.styles.js.map +1 -1
  391. package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
  392. package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
  393. package/lib/core/Grid/GridContainer.stories.js +27 -24
  394. package/lib/core/Grid/GridContainer.stories.js.map +1 -1
  395. package/lib/core/Grid/GridItem.stories.d.ts +2 -2
  396. package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
  397. package/lib/core/Grid/GridItem.stories.js +10 -10
  398. package/lib/core/Grid/GridItem.stories.js.map +1 -1
  399. package/lib/core/Icon/Icon.mocks.d.ts +3 -0
  400. package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
  401. package/lib/core/Icon/Icon.mocks.js +10 -0
  402. package/lib/core/Icon/Icon.mocks.js.map +1 -0
  403. package/lib/core/Icon/Icon.stories.d.ts +1 -0
  404. package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
  405. package/lib/core/Icon/Icon.stories.js +7 -1
  406. package/lib/core/Icon/Icon.stories.js.map +1 -1
  407. package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
  408. package/lib/core/IconPicker/IconPicker.stories.js +0 -1
  409. package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
  410. package/lib/core/Input/Input.stories.d.ts +9 -0
  411. package/lib/core/Input/Input.stories.d.ts.map +1 -1
  412. package/lib/core/Input/Input.stories.js +38 -1
  413. package/lib/core/Input/Input.stories.js.map +1 -1
  414. package/lib/core/Label/Label.stories.d.ts +4 -0
  415. package/lib/core/Label/Label.stories.d.ts.map +1 -1
  416. package/lib/core/Label/Label.stories.js +16 -1
  417. package/lib/core/Label/Label.stories.js.map +1 -1
  418. package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
  419. package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
  420. package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
  421. package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
  422. package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
  423. package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
  424. package/lib/core/Lightbox/Lightbox.stories.js +14 -73
  425. package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
  426. package/lib/core/Link/Link.stories.d.ts +11 -1
  427. package/lib/core/Link/Link.stories.d.ts.map +1 -1
  428. package/lib/core/Link/Link.stories.js +7 -4
  429. package/lib/core/Link/Link.stories.js.map +1 -1
  430. package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
  431. package/lib/core/List/CommaSeparatedList.stories.js +17 -17
  432. package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
  433. package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
  434. package/lib/core/List/OrderedList.stories.js +10 -10
  435. package/lib/core/List/OrderedList.stories.js.map +1 -1
  436. package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
  437. package/lib/core/List/UnorderedList.stories.js +10 -10
  438. package/lib/core/List/UnorderedList.stories.js.map +1 -1
  439. package/lib/core/Menu/Menu.stories.d.ts +3 -3
  440. package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
  441. package/lib/core/Menu/Menu.stories.js +8 -12
  442. package/lib/core/Menu/Menu.stories.js.map +1 -1
  443. package/lib/core/Modal/Modal.mocks.js +1 -1
  444. package/lib/core/Modal/Modal.mocks.js.map +1 -1
  445. package/lib/core/Number/Number.stories.d.ts.map +1 -1
  446. package/lib/core/Number/Number.stories.js +1 -4
  447. package/lib/core/Number/Number.stories.js.map +1 -1
  448. package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
  449. package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
  450. package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
  451. package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
  452. package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
  453. package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
  454. package/lib/core/Popover/Popover.stories.d.ts +1 -2
  455. package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
  456. package/lib/core/Popover/Popover.stories.js +24 -25
  457. package/lib/core/Popover/Popover.stories.js.map +1 -1
  458. package/lib/core/Progress/Progress.stories.d.ts +4 -0
  459. package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
  460. package/lib/core/Progress/Progress.stories.js +18 -1
  461. package/lib/core/Progress/Progress.stories.js.map +1 -1
  462. package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
  463. package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
  464. package/lib/core/RadioButton/RadioButton.stories.js +51 -1
  465. package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
  466. package/lib/core/Rating/Rating.stories.d.ts +8 -1
  467. package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
  468. package/lib/core/Rating/Rating.stories.js +19 -4
  469. package/lib/core/Rating/Rating.stories.js.map +1 -1
  470. package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
  471. package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
  472. package/lib/core/SearchInput/SearchInput.stories.js +16 -1
  473. package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
  474. package/lib/core/Select/Select.stories.d.ts +8 -0
  475. package/lib/core/Select/Select.stories.d.ts.map +1 -1
  476. package/lib/core/Select/Select.stories.js +28 -1
  477. package/lib/core/Select/Select.stories.js.map +1 -1
  478. package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
  479. package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
  480. package/lib/core/Sentiment/Sentiment.stories.js +34 -7
  481. package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
  482. package/lib/core/SummaryList/SummaryList.stories.js +1 -1
  483. package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
  484. package/lib/core/Switch/Switch.stories.d.ts +7 -0
  485. package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
  486. package/lib/core/Switch/Switch.stories.js +32 -1
  487. package/lib/core/Switch/Switch.stories.js.map +1 -1
  488. package/lib/core/Table/Table.stories.d.ts +25 -0
  489. package/lib/core/Table/Table.stories.d.ts.map +1 -1
  490. package/lib/core/Table/Table.stories.js +113 -1
  491. package/lib/core/Table/Table.stories.js.map +1 -1
  492. package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
  493. package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
  494. package/lib/core/Tabs/Tabs.stories.js +30 -1
  495. package/lib/core/Tabs/Tabs.stories.js.map +1 -1
  496. package/lib/core/Text/Text.stories.d.ts +19 -0
  497. package/lib/core/Text/Text.stories.d.ts.map +1 -1
  498. package/lib/core/Text/Text.stories.js +102 -2
  499. package/lib/core/Text/Text.stories.js.map +1 -1
  500. package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
  501. package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
  502. package/lib/core/TextArea/TextArea.stories.js +20 -1
  503. package/lib/core/TextArea/TextArea.stories.js.map +1 -1
  504. package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
  505. package/lib/core/Toaster/Toaster.stories.js +8 -3
  506. package/lib/core/Toaster/Toaster.stories.js.map +1 -1
  507. package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
  508. package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
  509. package/lib/core/Tooltip/Tooltip.stories.js +20 -1
  510. package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
  511. package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
  512. package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
  513. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
  514. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
  515. package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
  516. package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
  517. package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
  518. package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
  519. package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
  520. package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
  521. package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
  522. package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
  523. package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
  524. package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
  525. package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  526. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
  527. package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
  528. package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
  529. package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
  530. package/lib/social/Chat/Chat.stories.d.ts +33 -22
  531. package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
  532. package/lib/social/Chat/Chat.stories.js +102 -158
  533. package/lib/social/Chat/Chat.stories.js.map +1 -1
  534. package/lib/social/Email/Email.mocks.d.ts +1 -2
  535. package/lib/social/Email/Email.mocks.d.ts.map +1 -1
  536. package/lib/social/Email/Email.mocks.js +1 -3
  537. package/lib/social/Email/Email.mocks.js.map +1 -1
  538. package/lib/social/Email/Email.stories.d.ts.map +1 -1
  539. package/lib/social/Email/Email.stories.js +7 -8
  540. package/lib/social/Email/Email.stories.js.map +1 -1
  541. package/lib/social/Feed/FeedNewPost.stories.js +1 -1
  542. package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
  543. package/lib/social/Feed/FeedPost.stories.js +1 -1
  544. package/lib/social/Feed/FeedPost.stories.js.map +1 -1
  545. package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
  546. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
  547. package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
  548. package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
  549. package/lib/work/CaseView/FileService.mock.js +6 -2
  550. package/lib/work/CaseView/FileService.mock.js.map +1 -1
  551. package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
  552. package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
  553. package/lib/work/Confirmation/Confirmation.stories.js +12 -4
  554. package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
  555. package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
  556. package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
  557. package/lib/work/Confirmation/Confirmation.styles.js +7 -0
  558. package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
  559. package/lib/work/Details/Details.stories.js +3 -3
  560. package/lib/work/Details/Details.stories.js.map +1 -1
  561. package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
  562. package/lib/work/SearchResults/SearchResults.stories.js +3 -9
  563. package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
  564. package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
  565. package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
  566. package/lib/work/SearchResults/SearchResults.styles.js +12 -0
  567. package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
  568. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
  569. package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
  570. package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
  571. package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
  572. package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
  573. package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
  574. package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
  575. package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
  576. package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
  577. package/lib/work/Timeline/Timeline.stories.js +2 -2
  578. package/lib/work/Timeline/Timeline.stories.js.map +1 -1
  579. package/package.json +16 -16
  580. package/jsx/social/Email/Email.mocks.jsx.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplates.stories.js","sourceRoot":"","sources":["../../../src/core/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,aAAa,EAEb,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,EACL,WAAW,EAIX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAsBV,MAAM,CAAC,MAAM,iBA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gBACD;oBACE,EAAE,EAAE,iBAAiB;oBACrB,IAAI,EAAE,mBAAmB;iBAC1B;aACF,EACD,MAAM,EACJ,KAAC,eAAe,IAAC,SAAS,kBACxB,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,WAAI,WACtB,WAEpB,EAEJ,SAAS,iBACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,IAAI,GAAG;IACzB,QAAQ,EAAE,gBAAgB;IAC1B,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7D,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useMemo, MouseEvent } from 'react';\n\nimport {\n Banner,\n Button,\n CategorySubPage,\n ComboBox,\n DashboardPage,\n DashboardPageLayoutProps,\n TabbedPage,\n OneColumnPage,\n TwoColumnPage,\n ThreeColumnPage,\n FourColumnPage,\n WideNarrowPage,\n NarrowWidePage,\n WideWideNarrowPage,\n NarrowWideWidePage,\n NarrowWideNarrowPage,\n PageTemplateProps,\n icons,\n menuHelpers,\n MenuItemProps,\n MenuProps,\n TemplateProps,\n createUID\n} from '@pega/cosmos-react-core';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\nimport { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';\nimport { MockSummaryList } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.mocks';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nimport { StyledStoryPage } from './PageTemplates.styles';\nimport { getPath } from './PageTemplates.mocks';\n\nexport default {\n title: 'Core/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface PageTemplatesStoryProps extends PageTemplateProps {\n template:\n | 'demo page'\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n showIcon?: boolean;\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n}\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps> = (\n args: PageTemplatesStoryProps\n) => {\n const [currentTabId, setCurrentTabId] = useState('1');\n\n const actions: PageTemplateProps['actions'] = args.showActions && (\n <>\n <Button>Page action 1</Button>\n <Button>Page action 2</Button>\n </>\n );\n\n const banners: PageTemplateProps['banners'] = args.showBanners && (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n );\n\n const pageTemplateProps = {\n scrollContent: args.scrollContent,\n title: args.title,\n icon: args.showIcon ? args.icon : undefined,\n actions,\n banners,\n path: getPath(args.showBreadcrumbs, args.pathData),\n as: args.template !== 'demo page' ? StyledStoryPage : undefined\n };\n\n let page;\n\n switch (args.template) {\n case 'demo page':\n page = (\n <TwoColumnPage\n a={<FeedDemo />}\n b={\n <>\n <TasksDemo />\n <MockSummaryList name='My team' limit={10} actions={null} />\n </>\n }\n {...pageTemplateProps}\n />\n );\n break;\n case 'one column':\n page = <OneColumnPage a='a' {...pageTemplateProps} />;\n break;\n case 'two column':\n page = <TwoColumnPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'three column':\n page = <ThreeColumnPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'four column':\n page = <FourColumnPage a='a' b='b' c='c' d='d' {...pageTemplateProps} />;\n break;\n case 'wide narrow':\n page = <WideNarrowPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'narrow wide':\n page = <NarrowWidePage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'wide wide narrow':\n page = <WideWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide wide':\n page = <NarrowWideWidePage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide narrow':\n page = <NarrowWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n page = (\n <TabbedPage\n a={`Content for: Tab ${currentTabId}`}\n tabs={{\n tabs: Array.from({ length: 5 }, (_, i) => {\n return {\n id: `${i + 1}`,\n name: `Tab ${i + 1}`\n };\n }),\n type: 'horizontal',\n currentTabId,\n onTabClick: setCurrentTabId\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return <AppShellDemo main={page} appHeader />;\n};\n\nPageTemplatesDemo.args = {\n template: 'demo page',\n scrollContent: false,\n title: 'Demo page',\n icon: 'home-solid',\n showIcon: true,\n showBreadcrumbs: true,\n pathData: 'Page 1,Page2,Page 3,Page 4,Page 5',\n showActions: true,\n showBanners: false\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: [\n 'demo page',\n 'one column',\n 'two column',\n 'three column',\n 'four column',\n 'wide narrow',\n 'narrow wide',\n 'wide wide narrow',\n 'narrow wide wide',\n 'narrow wide narrow',\n 'tabbed'\n ],\n control: { type: 'select' }\n },\n scrollContent: { control: { type: 'boolean' } },\n title: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select' } },\n showIcon: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } }\n};\n\ninterface DashboardPageStoryProps {\n title?: DashboardPageLayoutProps['title'];\n filterPosition?: DashboardPageLayoutProps['filterPosition'];\n numberOfFilters?: number;\n}\n\nexport const DashboardPageDemo: Story<DashboardPageStoryProps> = (\n args: DashboardPageStoryProps\n) => {\n const FilterComboBox = () => {\n const [filterSearchValue, setFilterSearchValue] = useState('');\n const [filterOptions, setFilterOptions] = useState<MenuProps['items']>(() =>\n Array.from({ length: 10 }, (_, i) => ({\n id: createUID(),\n primary: `Filter ${i + 1}`,\n selected: false\n }))\n );\n\n const selected = useMemo(() => {\n return menuHelpers\n .getSelected(filterOptions)\n .map(item => ({ text: item.primary, id: item.id }));\n }, [filterOptions]);\n\n const toggleItem = (id: MenuItemProps['id']) => {\n setFilterOptions(cur => menuHelpers.toggleSelected(cur, id, 'multi-select'));\n };\n\n return (\n <ComboBox\n mode='multi-select'\n label='Filters'\n placeholder='Choose filters'\n value={filterSearchValue}\n onChange={e => {\n setFilterSearchValue(e.target.value);\n }}\n selected={{ items: selected, onRemove: toggleItem }}\n menu={{\n items: filterSearchValue\n ? menuHelpers\n .flatten(filterOptions)\n .filter(({ primary }) => primary.includes(filterSearchValue))\n : filterOptions,\n emptyText: 'No filters',\n onItemClick: toggleItem\n }}\n />\n );\n };\n\n const filterControls = Array.from({ length: args.numberOfFilters || 3 }, (_, i) => (\n <FilterComboBox key={i} />\n ));\n\n return (\n <AppShellDemo\n main={\n <DashboardPage\n a='a'\n b='b'\n c='c'\n path={getPath()}\n filters={filterControls}\n filterPosition={args.filterPosition}\n fitToViewport\n title={args.title || 'Dashboard'}\n as={StyledStoryPage}\n />\n }\n appHeader\n />\n );\n};\n\nDashboardPageDemo.args = {\n title: 'Dashboard',\n filterPosition: 'block-start',\n numberOfFilters: 3\n};\n\nDashboardPageDemo.argTypes = {\n title: { control: { type: 'text' } },\n filterPosition: {\n options: ['block-start', 'inline-start', 'inline-end'],\n control: { type: 'select' }\n },\n numberOfFilters: { control: { type: 'number' } }\n};\n\ninterface CategorySubPageStoryProps {\n category?: TemplateProps['category'];\n categoryIcon?: TemplateProps['categoryIcon'];\n showIcon?: boolean;\n viewLoading?: TemplateProps['viewLoading'];\n maxActions?: TemplateProps['maxActions'];\n}\n\nexport const CategorySubPageDemo: Story<CategorySubPageStoryProps> = (\n args: CategorySubPageStoryProps\n) => {\n const [activeItem, setActiveItem] = useState('Profile');\n\n const mockNavLinks = (itemTextArray: string[]) => {\n return itemTextArray.map(itemText => {\n return {\n text: itemText,\n active: itemText === activeItem,\n href: '#',\n onClick: (event: MouseEvent) => setActiveItem((event.target as Element).textContent || '')\n };\n });\n };\n\n return (\n <AppShellDemo\n main={\n <CategorySubPage\n viewLoading={args.viewLoading}\n category={args.category || 'Administration'}\n categoryIcon={args.showIcon ? args.categoryIcon : undefined}\n navItemGroups={[\n {\n title: 'General',\n items: useMemo(\n () => mockNavLinks(['Configurations', 'Profile', 'Authentication', 'Connections']),\n [activeItem]\n )\n },\n {\n title: 'Second Group',\n items: useMemo(() => mockNavLinks(['Option 1', 'Option 2']), [activeItem])\n },\n {\n items: useMemo(() => mockNavLinks(['All configurations']), [activeItem])\n },\n {\n items: useMemo(\n () => mockNavLinks(['Visually Grouped SubPage A', 'Visually Grouped SubPage B']),\n [activeItem]\n )\n },\n {\n items: [\n {\n text: 'Button Item'\n }\n ]\n }\n ]}\n pageTitle={activeItem}\n maxActions={args.maxActions}\n pageActions={[\n {\n id: 'saveChanges',\n text: 'Save'\n },\n {\n id: 'cancelChanges',\n text: 'Cancel'\n },\n {\n id: 'goToRule',\n text: 'Go to Rule'\n },\n {\n id: 'viewInClipboard',\n text: 'View in Clipboard'\n }\n ]}\n region={\n <StyledStoryPage secondary>\n <div style={{ minHeight: '150vh' }} />\n </StyledStoryPage>\n }\n />\n }\n appHeader\n />\n );\n};\n\nCategorySubPageDemo.args = {\n category: 'Administration',\n categoryIcon: 'gear-solid',\n showIcon: true,\n viewLoading: false,\n maxActions: 3\n};\n\nCategorySubPageDemo.argTypes = {\n category: { control: { type: 'text' } },\n categoryIcon: { options: icons, control: { type: 'select' } },\n showIcon: { control: { type: 'boolean' } },\n viewLoading: { control: { type: 'boolean' } },\n maxActions: { control: { type: 'number' } }\n};\n"]}
1
+ {"version":3,"file":"PageTemplates.stories.js","sourceRoot":"","sources":["../../../src/core/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,OAAO,CAAC;AAEtD,OAAO,EACL,MAAM,EACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,aAAa,EAEb,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,EACL,WAAW,EAIX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAyBV,MAAM,CAAC,MAAM,iBAAiB,GAAmC,CAC/D,IAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAiC,IAAI,CAAC,WAAW,IAAI,CAChE,8BACE,KAAC,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,EAAE,OAAO,EAAE,WAAI,WACtB,WAEpB,EAEJ,SAAS,iBACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,IAAI,GAAG;IACzB,QAAQ,EAAE,gBAAgB;IAC1B,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAC1E,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC1C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState, useMemo, MouseEvent } from 'react';\n\nimport {\n Banner,\n Button,\n CategorySubPage,\n ComboBox,\n DashboardPage,\n DashboardPageLayoutProps,\n TabbedPage,\n OneColumnPage,\n TwoColumnPage,\n ThreeColumnPage,\n FourColumnPage,\n WideNarrowPage,\n NarrowWidePage,\n WideWideNarrowPage,\n NarrowWideWidePage,\n NarrowWideNarrowPage,\n PageTemplateProps,\n icons,\n menuHelpers,\n MenuItemProps,\n MenuProps,\n TemplateProps,\n createUID\n} from '@pega/cosmos-react-core';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\nimport { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';\nimport { MockSummaryList } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.mocks';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nimport { StyledStoryPage } from './PageTemplates.styles';\nimport { getPath } from './PageTemplates.mocks';\n\nexport default {\n title: 'Core/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface PageTemplatesStoryProps {\n template?:\n | 'demo page'\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n title?: PageTemplateProps['title'];\n icon?: PageTemplateProps['icon'];\n scrollContent?: PageTemplateProps['scrollContent'];\n showIcon?: boolean;\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n}\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps> = (\n args: PageTemplatesStoryProps\n) => {\n const [currentTabId, setCurrentTabId] = useState('1');\n\n const actions: PageTemplateProps['actions'] = args.showActions && (\n <>\n <Button>Page action 1</Button>\n <Button>Page action 2</Button>\n </>\n );\n\n const banners: PageTemplateProps['banners'] = args.showBanners && (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n );\n\n const pageTemplateProps = {\n scrollContent: args.scrollContent,\n title: args.title || 'Demo page',\n icon: args.showIcon ? args.icon : undefined,\n actions,\n banners,\n path: getPath(args.showBreadcrumbs, args.pathData),\n as: args.template !== 'demo page' ? StyledStoryPage : undefined\n };\n\n let page;\n\n switch (args.template) {\n case 'demo page':\n page = (\n <TwoColumnPage\n a={<FeedDemo />}\n b={\n <>\n <TasksDemo />\n <MockSummaryList name='My team' limit={10} actions={null} />\n </>\n }\n {...pageTemplateProps}\n />\n );\n break;\n case 'one column':\n page = <OneColumnPage a='a' {...pageTemplateProps} />;\n break;\n case 'two column':\n page = <TwoColumnPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'three column':\n page = <ThreeColumnPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'four column':\n page = <FourColumnPage a='a' b='b' c='c' d='d' {...pageTemplateProps} />;\n break;\n case 'wide narrow':\n page = <WideNarrowPage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'narrow wide':\n page = <NarrowWidePage a='a' b='b' {...pageTemplateProps} />;\n break;\n case 'wide wide narrow':\n page = <WideWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide wide':\n page = <NarrowWideWidePage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'narrow wide narrow':\n page = <NarrowWideNarrowPage a='a' b='b' c='c' {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n page = (\n <TabbedPage\n a={`Content for: Tab ${currentTabId}`}\n tabs={{\n tabs: Array.from({ length: 5 }, (_, i) => {\n return {\n id: `${i + 1}`,\n name: `Tab ${i + 1}`\n };\n }),\n type: 'horizontal',\n currentTabId,\n onTabClick: setCurrentTabId\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return <AppShellDemo main={page} appHeader />;\n};\n\nPageTemplatesDemo.args = {\n template: 'demo page',\n scrollContent: false,\n title: 'Demo page',\n icon: 'home-solid',\n showIcon: true,\n showBreadcrumbs: true,\n pathData: 'Page 1,Page2,Page 3,Page 4,Page 5',\n showActions: true,\n showBanners: false\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: [\n 'demo page',\n 'one column',\n 'two column',\n 'three column',\n 'four column',\n 'wide narrow',\n 'narrow wide',\n 'wide wide narrow',\n 'narrow wide wide',\n 'narrow wide narrow',\n 'tabbed'\n ],\n control: { type: 'select' }\n },\n scrollContent: { control: { type: 'boolean' } },\n title: { control: { type: 'text' } },\n icon: { options: icons, control: { type: 'select', icons: true } },\n showIcon: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } }\n};\n\ninterface DashboardPageStoryProps {\n title?: DashboardPageLayoutProps['title'];\n filterPosition?: DashboardPageLayoutProps['filterPosition'];\n numberOfFilters?: number;\n}\n\nexport const DashboardPageDemo: Story<DashboardPageStoryProps> = (\n args: DashboardPageStoryProps\n) => {\n const FilterComboBox = () => {\n const [filterSearchValue, setFilterSearchValue] = useState('');\n const [filterOptions, setFilterOptions] = useState<MenuProps['items']>(() =>\n Array.from({ length: 10 }, (_, i) => ({\n id: createUID(),\n primary: `Filter ${i + 1}`,\n selected: false\n }))\n );\n\n const selected = useMemo(() => {\n return menuHelpers\n .getSelected(filterOptions)\n .map(item => ({ text: item.primary, id: item.id }));\n }, [filterOptions]);\n\n const toggleItem = (id: MenuItemProps['id']) => {\n setFilterOptions(cur => menuHelpers.toggleSelected(cur, id, 'multi-select'));\n };\n\n return (\n <ComboBox\n mode='multi-select'\n label='Filters'\n placeholder='Choose filters'\n value={filterSearchValue}\n onChange={e => {\n setFilterSearchValue(e.target.value);\n }}\n selected={{ items: selected, onRemove: toggleItem }}\n menu={{\n items: filterSearchValue\n ? menuHelpers\n .flatten(filterOptions)\n .filter(({ primary }) => primary.includes(filterSearchValue))\n : filterOptions,\n emptyText: 'No filters',\n onItemClick: toggleItem\n }}\n />\n );\n };\n\n const filterControls = Array.from({ length: args.numberOfFilters || 3 }, (_, i) => (\n <FilterComboBox key={i} />\n ));\n\n return (\n <AppShellDemo\n main={\n <DashboardPage\n a='a'\n b='b'\n c='c'\n path={getPath()}\n filters={filterControls}\n filterPosition={args.filterPosition}\n fitToViewport\n title={args.title || 'Dashboard'}\n as={StyledStoryPage}\n />\n }\n appHeader\n />\n );\n};\n\nDashboardPageDemo.args = {\n title: 'Dashboard',\n filterPosition: 'block-start',\n numberOfFilters: 3\n};\n\nDashboardPageDemo.argTypes = {\n title: { control: { type: 'text' } },\n filterPosition: {\n options: ['block-start', 'inline-start', 'inline-end'],\n control: { type: 'select' }\n },\n numberOfFilters: { control: { type: 'number' } }\n};\n\ninterface CategorySubPageStoryProps {\n category?: TemplateProps['category'];\n categoryIcon?: TemplateProps['categoryIcon'];\n showIcon?: boolean;\n viewLoading?: TemplateProps['viewLoading'];\n maxActions?: TemplateProps['maxActions'];\n}\n\nexport const CategorySubPageDemo: Story<CategorySubPageStoryProps> = (\n args: CategorySubPageStoryProps\n) => {\n const [activeItem, setActiveItem] = useState('Profile');\n\n const mockNavLinks = (itemTextArray: string[]) => {\n return itemTextArray.map(itemText => {\n return {\n text: itemText,\n active: itemText === activeItem,\n href: '#',\n onClick: (event: MouseEvent) => setActiveItem((event.target as Element).textContent || '')\n };\n });\n };\n\n return (\n <AppShellDemo\n main={\n <CategorySubPage\n viewLoading={args.viewLoading}\n category={args.category || 'Administration'}\n categoryIcon={args.showIcon ? args.categoryIcon : undefined}\n navItemGroups={[\n {\n title: 'General',\n items: useMemo(\n () => mockNavLinks(['Configurations', 'Profile', 'Authentication', 'Connections']),\n [activeItem]\n )\n },\n {\n title: 'Second Group',\n items: useMemo(() => mockNavLinks(['Option 1', 'Option 2']), [activeItem])\n },\n {\n items: useMemo(() => mockNavLinks(['All configurations']), [activeItem])\n },\n {\n items: useMemo(\n () => mockNavLinks(['Visually Grouped SubPage A', 'Visually Grouped SubPage B']),\n [activeItem]\n )\n },\n {\n items: [\n {\n text: 'Button Item'\n }\n ]\n }\n ]}\n pageTitle={activeItem}\n maxActions={args.maxActions}\n pageActions={[\n {\n id: 'saveChanges',\n text: 'Save'\n },\n {\n id: 'cancelChanges',\n text: 'Cancel'\n },\n {\n id: 'goToRule',\n text: 'Go to Rule'\n },\n {\n id: 'viewInClipboard',\n text: 'View in Clipboard'\n }\n ]}\n region={\n <StyledStoryPage secondary>\n <div style={{ minHeight: '150vh' }} />\n </StyledStoryPage>\n }\n />\n }\n appHeader\n />\n );\n};\n\nCategorySubPageDemo.args = {\n category: 'Administration',\n categoryIcon: 'gear-solid',\n showIcon: true,\n viewLoading: false,\n maxActions: 3\n};\n\nCategorySubPageDemo.argTypes = {\n category: { control: { type: 'text' } },\n categoryIcon: { options: icons, control: { type: 'select', icons: true } },\n showIcon: { control: { type: 'boolean' } },\n viewLoading: { control: { type: 'boolean' } },\n maxActions: { control: { type: 'number' } }\n};\n"]}
@@ -10,4 +10,7 @@ export const ParagraphDisplayDemo = (args) => {
10
10
  ParagraphDisplayDemo.args = {
11
11
  value: "Here's a string with\na new line in it."
12
12
  };
13
+ ParagraphDisplayDemo.argTypes = {
14
+ value: { control: { type: 'text', multiLine: true } }
15
+ };
13
16
  //# sourceMappingURL=ParagraphDisplay.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ParagraphDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Paragraph/ParagraphDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,yBAAyB,CAAC;AAElF,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,oBAAoB,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAChG,OAAO,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAAI,CAAC;AACjD,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,KAAK,EAAE,yCAAyC;CACjD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { ParagraphDisplay, ParagraphDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Paragraph',\n component: ParagraphDisplay\n} as Meta;\n\nexport const ParagraphDisplayDemo: Story<ParagraphDisplayProps> = (args: ParagraphDisplayProps) => {\n return <ParagraphDisplay value={args.value} />;\n};\n\nParagraphDisplayDemo.args = {\n value: \"Here's a string with\\na new line in it.\"\n};\n\n// ParagraphDisplayDemo.argTypes = {\n// value: { control: { type: 'Paragraph' } }\n// };\n"]}
1
+ {"version":3,"file":"ParagraphDisplay.stories.js","sourceRoot":"","sources":["../../../src/core/Paragraph/ParagraphDisplay.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,yBAAyB,CAAC;AAElF,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;CACpB,CAAC;AAEV,MAAM,CAAC,MAAM,oBAAoB,GAAiC,CAAC,IAA2B,EAAE,EAAE;IAChG,OAAO,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAAI,CAAC;AACjD,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,KAAK,EAAE,yCAAyC;CACjD,CAAC;AAEF,oBAAoB,CAAC,QAAQ,GAAG;IAC9B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;CACtD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { ParagraphDisplay, ParagraphDisplayProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Paragraph',\n component: ParagraphDisplay\n} as Meta;\n\nexport const ParagraphDisplayDemo: Story<ParagraphDisplayProps> = (args: ParagraphDisplayProps) => {\n return <ParagraphDisplay value={args.value} />;\n};\n\nParagraphDisplayDemo.args = {\n value: \"Here's a string with\\na new line in it.\"\n};\n\nParagraphDisplayDemo.argTypes = {\n value: { control: { type: 'text', multiLine: true } }\n};\n"]}
@@ -2,7 +2,6 @@ import { Meta, Story } from '@storybook/react';
2
2
  import { PopoverProps } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
- export declare const HoverPopover: Story<PopoverProps>;
6
- export declare const ClickPopover: Story<PopoverProps>;
5
+ export declare const PopoverDemo: Story<PopoverProps>;
7
6
  export declare const PopoverGroups: Story;
8
7
  //# sourceMappingURL=Popover.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,YAAY,EAIb,MAAM,yBAAyB,CAAC;;AAEjC,wBAkCU;AAEV,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,YAAY,CA2C5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,YAAY,CA0C5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmF3B,CAAC"}
1
+ {"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAOL,YAAY,EAIb,MAAM,yBAAyB,CAAC;;AAEjC,wBAkCU;AAEV,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,YAAY,CAoF3C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmF3B,CAAC"}
@@ -36,44 +36,43 @@ export default {
36
36
  }
37
37
  }
38
38
  };
39
- export const HoverPopover = (args) => {
40
- const [mountPopover, setMountPopover] = useState(false);
41
- const setPopoverEl = useElement()[1];
39
+ export const PopoverDemo = (args) => {
40
+ const [mountHoverPopover, setMountHoverPopover] = useState(false);
41
+ const setHoverPopoverEl = useElement()[1];
42
42
  const [textEl, setTextEl] = useElement();
43
- const togglePopover = ({ type, key }) => {
43
+ const [mountClickPopover, setMountClickPopover] = useState(false);
44
+ const setClickPopoverEl = useElement()[1];
45
+ const [buttonEl, setButtonEl] = useElement();
46
+ const toggleHoverPopover = ({ type, key }) => {
44
47
  if (type === 'keydown') {
45
48
  if (key === 'Escape')
46
- setMountPopover(false);
49
+ setMountHoverPopover(false);
47
50
  return;
48
51
  }
49
- setMountPopover(type === 'mouseover' || type === 'focus');
52
+ setMountHoverPopover(type === 'mouseover' || type === 'focus');
50
53
  };
51
- const mountingHandlers = {
52
- onMouseOver: togglePopover,
53
- onMouseOut: togglePopover,
54
- onFocus: togglePopover,
55
- onBlur: togglePopover
54
+ const hoverMountingHandlers = {
55
+ onMouseOver: toggleHoverPopover,
56
+ onMouseOut: toggleHoverPopover,
57
+ onKeyDown: toggleHoverPopover,
58
+ onFocus: toggleHoverPopover,
59
+ onBlur: toggleHoverPopover
56
60
  };
57
- return (_jsxs(Flex, { container: { justify: 'center', pad: 4 }, children: [_jsx(Text, { ref: setTextEl, variant: 'h1', ...mountingHandlers, children: "Hover Over Me" }, void 0), _jsx(Popover, { ref: setPopoverEl, show: mountPopover, target: textEl, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...mountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on hover!" }, void 0) }, void 0) }, void 0) }, void 0)] }, void 0));
58
- };
59
- export const ClickPopover = (args) => {
60
- const [mountPopover, setMountPopover] = useState(false);
61
- const setPopoverEl = useElement()[1];
62
- const [buttonEl, setButtonEl] = useElement();
63
- const togglePopover = ({ type, key }) => {
61
+ const toggleClickPopover = ({ type, key }) => {
64
62
  if (type === 'keydown') {
65
63
  if (key === 'Escape')
66
- setMountPopover(false);
64
+ setMountClickPopover(false);
67
65
  return;
68
66
  }
69
- setMountPopover(type === 'click' || type === 'focus');
67
+ setMountClickPopover(type === 'click' || type === 'focus');
70
68
  };
71
- const mountingHandlers = {
72
- onClick: togglePopover,
73
- onFocus: togglePopover,
74
- onBlur: togglePopover
69
+ const clickMountingHandlers = {
70
+ onClick: toggleClickPopover,
71
+ onKeyDown: toggleClickPopover,
72
+ onFocus: toggleClickPopover,
73
+ onBlur: toggleClickPopover
75
74
  };
76
- return (_jsxs(Flex, { container: { justify: 'center', pad: 4 }, children: [_jsx(Button, { ref: setButtonEl, ...mountingHandlers, children: "Click Me" }, void 0), _jsx(Popover, { ref: setPopoverEl, show: mountPopover, target: buttonEl, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...mountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on hover!" }, void 0) }, void 0) }, void 0) }, void 0)] }, void 0));
75
+ return (_jsxs(Flex, { container: { justify: 'center', pad: 4, gap: 4, alignItems: 'center' }, children: [_jsx(Text, { ref: setTextEl, variant: 'h1', ...hoverMountingHandlers, children: "Hover Over Me" }, void 0), _jsx(Popover, { ref: setHoverPopoverEl, show: mountHoverPopover, target: textEl, portal: true, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...hoverMountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on hover!" }, void 0) }, void 0) }, void 0) }, void 0), _jsx(Button, { ref: setButtonEl, ...clickMountingHandlers, children: "Click Me" }, void 0), _jsx(Popover, { ref: setClickPopoverEl, show: mountClickPopover, target: buttonEl, portal: true, arrow: args.arrow, showDelay: args.showDelay, hideDelay: args.hideDelay, placement: args.placement, ...clickMountingHandlers, children: _jsx(Card, { children: _jsx(CardContent, { children: _jsx(Text, { children: "This Popover appears on click!" }, void 0) }, void 0) }, void 0) }, void 0)] }, void 0));
77
76
  };
78
77
  export const PopoverGroups = () => {
79
78
  const [firstTooltipButton, setFirstTooltipButton] = useElement();
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EAEP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;IAClB,I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port { useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n Flex,\n Link,\n Popover,\n PopoverProps,\n Text,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Popover',\n component: Popover,\n args: {\n arrow: false,\n showDelay: 'none',\n hideDelay: 'none',\n placement: 'bottom'\n },\n argTypes: {\n arrow: { control: { type: 'boolean' } },\n showDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n hideDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n placement: {\n options: [\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'top',\n 'top-start',\n 'top-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n 'auto',\n 'auto-start',\n 'auto-end'\n ],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const HoverPopover: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountPopover, setMountPopover] = useState(false);\n const setPopoverEl = useElement<HTMLDivElement>()[1];\n const [textEl, setTextEl] = useElement<HTMLDivElement>();\n\n const togglePopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountPopover(false);\n return;\n }\n setMountPopover(type === 'mouseover' || type === 'focus');\n };\n\n const mountingHandlers = {\n onMouseOver: togglePopover,\n onMouseOut: togglePopover,\n onFocus: togglePopover,\n onBlur: togglePopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4 }}>\n <Text ref={setTextEl} variant='h1' {...mountingHandlers}>\n Hover Over Me\n </Text>\n <Popover\n ref={setPopoverEl}\n show={mountPopover}\n target={textEl}\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...mountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const ClickPopover: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountPopover, setMountPopover] = useState(false);\n const setPopoverEl = useElement<HTMLDivElement>()[1];\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement>();\n\n const togglePopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountPopover(false);\n return;\n }\n setMountPopover(type === 'click' || type === 'focus');\n };\n\n const mountingHandlers = {\n onClick: togglePopover,\n onFocus: togglePopover,\n onBlur: togglePopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4 }}>\n <Button ref={setButtonEl} {...mountingHandlers}>\n Click Me\n </Button>\n <Popover\n ref={setPopoverEl}\n show={mountPopover}\n target={buttonEl}\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...mountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const PopoverGroups: Story = () => {\n const [firstTooltipButton, setFirstTooltipButton] = useElement<HTMLButtonElement>();\n const [secondTooltipButton, setSecondTooltipButton] = useElement<HTMLButtonElement>();\n const [thirdTooltipButton, setThirdTooltipButton] = useElement<HTMLButtonElement>();\n\n const [firstPopoverButton, setFirstPopoverButton] = useElement<HTMLButtonElement>();\n const [secondPopoverButton, setSecondPopoverButton] = useElement<HTMLButtonElement>();\n const [thirdPopoverButton, setThirdPopoverButton] = useElement<HTMLButtonElement>();\n\n const [showFirstPopover, setShowFirstPopover] = useState(false);\n const [showSecondPopover, setShowSecondPopover] = useState(false);\n const [showThirdPopover, setShowThirdPopover] = useState(false);\n\n return (\n <Flex container={{ direction: 'column', gap: 4 }}>\n <Text variant='h2'>groupId: link_preview</Text>\n <Flex>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n </Flex>\n <Text variant='h2'>groupId: tooltip</Text>\n <Flex>\n <Button ref={setFirstTooltipButton} aria-describedby='first-tooltip'>\n Hover me\n </Button>\n <Tooltip target={firstTooltipButton} id='first-tooltip'>\n This is a tooltip for the first button.\n </Tooltip>\n <Button ref={setSecondTooltipButton} aria-describedby='second-tooltip'>\n Hover me\n </Button>\n <Tooltip target={secondTooltipButton} id='second-tooltip'>\n This is a tooltip for the second button.\n </Tooltip>\n <Button ref={setThirdTooltipButton} aria-describedby='third-tooltip'>\n Hover me\n </Button>\n <Tooltip target={thirdTooltipButton} id='third-tooltip'>\n This is a tooltip for the third button.\n </Tooltip>\n </Flex>\n <Text variant='h2'>No groupId</Text>\n <Flex>\n <Button ref={setFirstPopoverButton} onClick={() => setShowFirstPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showFirstPopover} target={firstPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #1</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setSecondPopoverButton} onClick={() => setShowSecondPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showSecondPopover} target={secondPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #2</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setThirdPopoverButton} onClick={() => setShowThirdPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showThirdPopover} target={thirdPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #3</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n </Flex>\n );\n};\n\nPopoverGroups.argTypes = {\n arrow: { table: { disable: true } },\n showDelay: { table: { disable: true } },\n hideDelay: { table: { disable: true } },\n placement: { table: { disable: true } }\n};\n"]}
1
+ {"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../src/core/Popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EAEP,IAAI,EAC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AAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACxC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n Button,\n Card,\n CardContent,\n Flex,\n Link,\n Popover,\n PopoverProps,\n Text,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Popover',\n component: Popover,\n args: {\n arrow: false,\n showDelay: 'none',\n hideDelay: 'none',\n placement: 'bottom'\n },\n argTypes: {\n arrow: { control: { type: 'boolean' } },\n showDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n hideDelay: { options: ['none', 'short', 'long'], control: { type: 'select' } },\n placement: {\n options: [\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'top',\n 'top-start',\n 'top-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n 'auto',\n 'auto-start',\n 'auto-end'\n ],\n control: { type: 'select' }\n }\n }\n} as Meta;\n\nexport const PopoverDemo: Story<PopoverProps> = (args: PopoverProps) => {\n const [mountHoverPopover, setMountHoverPopover] = useState(false);\n const setHoverPopoverEl = useElement<HTMLDivElement>()[1];\n const [textEl, setTextEl] = useElement<HTMLDivElement>();\n\n const [mountClickPopover, setMountClickPopover] = useState(false);\n const setClickPopoverEl = useElement<HTMLDivElement>()[1];\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement>();\n\n const toggleHoverPopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountHoverPopover(false);\n return;\n }\n setMountHoverPopover(type === 'mouseover' || type === 'focus');\n };\n\n const hoverMountingHandlers = {\n onMouseOver: toggleHoverPopover,\n onMouseOut: toggleHoverPopover,\n onKeyDown: toggleHoverPopover,\n onFocus: toggleHoverPopover,\n onBlur: toggleHoverPopover\n };\n\n const toggleClickPopover = ({ type, key }: { type: string; key: string }) => {\n if (type === 'keydown') {\n if (key === 'Escape') setMountClickPopover(false);\n return;\n }\n setMountClickPopover(type === 'click' || type === 'focus');\n };\n\n const clickMountingHandlers = {\n onClick: toggleClickPopover,\n onKeyDown: toggleClickPopover,\n onFocus: toggleClickPopover,\n onBlur: toggleClickPopover\n };\n\n return (\n <Flex container={{ justify: 'center', pad: 4, gap: 4, alignItems: 'center' }}>\n <Text ref={setTextEl} variant='h1' {...hoverMountingHandlers}>\n Hover Over Me\n </Text>\n <Popover\n ref={setHoverPopoverEl}\n show={mountHoverPopover}\n target={textEl}\n portal\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...hoverMountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on hover!</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setButtonEl} {...clickMountingHandlers}>\n Click Me\n </Button>\n <Popover\n ref={setClickPopoverEl}\n show={mountClickPopover}\n target={buttonEl}\n portal\n arrow={args.arrow}\n showDelay={args.showDelay}\n hideDelay={args.hideDelay}\n placement={args.placement}\n {...clickMountingHandlers}\n >\n <Card>\n <CardContent>\n <Text>This Popover appears on click!</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n );\n};\n\nexport const PopoverGroups: Story = () => {\n const [firstTooltipButton, setFirstTooltipButton] = useElement<HTMLButtonElement>();\n const [secondTooltipButton, setSecondTooltipButton] = useElement<HTMLButtonElement>();\n const [thirdTooltipButton, setThirdTooltipButton] = useElement<HTMLButtonElement>();\n\n const [firstPopoverButton, setFirstPopoverButton] = useElement<HTMLButtonElement>();\n const [secondPopoverButton, setSecondPopoverButton] = useElement<HTMLButtonElement>();\n const [thirdPopoverButton, setThirdPopoverButton] = useElement<HTMLButtonElement>();\n\n const [showFirstPopover, setShowFirstPopover] = useState(false);\n const [showSecondPopover, setShowSecondPopover] = useState(false);\n const [showThirdPopover, setShowThirdPopover] = useState(false);\n\n return (\n <Flex container={{ direction: 'column', gap: 4 }}>\n <Text variant='h2'>groupId: link_preview</Text>\n <Flex>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n <Link href='http://www.google.com' previewable>\n Previewable Link\n </Link>\n </Flex>\n <Text variant='h2'>groupId: tooltip</Text>\n <Flex>\n <Button ref={setFirstTooltipButton} aria-describedby='first-tooltip'>\n Hover me\n </Button>\n <Tooltip target={firstTooltipButton} id='first-tooltip'>\n This is a tooltip for the first button.\n </Tooltip>\n <Button ref={setSecondTooltipButton} aria-describedby='second-tooltip'>\n Hover me\n </Button>\n <Tooltip target={secondTooltipButton} id='second-tooltip'>\n This is a tooltip for the second button.\n </Tooltip>\n <Button ref={setThirdTooltipButton} aria-describedby='third-tooltip'>\n Hover me\n </Button>\n <Tooltip target={thirdTooltipButton} id='third-tooltip'>\n This is a tooltip for the third button.\n </Tooltip>\n </Flex>\n <Text variant='h2'>No groupId</Text>\n <Flex>\n <Button ref={setFirstPopoverButton} onClick={() => setShowFirstPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showFirstPopover} target={firstPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #1</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setSecondPopoverButton} onClick={() => setShowSecondPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showSecondPopover} target={secondPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #2</Text>\n </CardContent>\n </Card>\n </Popover>\n <Button ref={setThirdPopoverButton} onClick={() => setShowThirdPopover(curr => !curr)}>\n Click me\n </Button>\n <Popover show={showThirdPopover} target={thirdPopoverButton}>\n <Card>\n <CardContent>\n <Text>Popover #3</Text>\n </CardContent>\n </Card>\n </Popover>\n </Flex>\n </Flex>\n );\n};\n\nPopoverGroups.argTypes = {\n arrow: { table: { disable: true } },\n showDelay: { table: { disable: true } },\n hideDelay: { table: { disable: true } },\n placement: { table: { disable: true } }\n};\n"]}
@@ -4,4 +4,8 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const IndeterminateProgress: Story<ProgressProps>;
6
6
  export declare const DeterminateProgress: Story<ProgressProps>;
7
+ interface ConfigurableProgressProps extends ProgressProps {
8
+ progressColor?: string;
9
+ }
10
+ export declare const ConfigurableProgress: Story<ConfigurableProgressProps>;
7
11
  //# sourceMappingURL=Progress.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAA0B,aAAa,EAAQ,MAAM,yBAAyB,CAAC;;AAItF,wBAaU;AAEV,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,aAAa,CA+BtD,CAAC;AAMF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAgCpD,CAAC"}
1
+ {"version":3,"file":"Progress.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAKL,aAAa,EAEd,MAAM,yBAAyB,CAAC;;AAIjC,wBAaU;AAEV,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,aAAa,CA+BtD,CAAC;AAMF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAgCpD,CAAC;AAUF,UAAU,yBAA0B,SAAQ,aAAa;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CAkBjE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import { Button, Flex, Progress, Text } from '@pega/cosmos-react-core';
3
+ import { Button, Configuration, Flex, Progress, Text } from '@pega/cosmos-react-core';
4
4
  import { StyledDemoWrap } from './Progress.styles';
5
5
  export default {
6
6
  title: 'Core/Progress',
@@ -61,4 +61,21 @@ DeterminateProgress.args = {
61
61
  DeterminateProgress.argTypes = {
62
62
  value: { control: { type: 'number' } }
63
63
  };
64
+ export const ConfigurableProgress = (args) => {
65
+ return (_jsx(Configuration, { theme: {
66
+ components: {
67
+ progress: {
68
+ 'progress-color': args.progressColor
69
+ }
70
+ }
71
+ }, children: _jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledDemoWrap, children: _jsx(Progress, { variant: args.variant, placement: 'local', message: 'Loading', visible: true }, void 0) }, void 0) }, void 0));
72
+ };
73
+ ConfigurableProgress.args = {
74
+ progressColor: '#076bc9'
75
+ };
76
+ ConfigurableProgress.argTypes = {
77
+ progressColor: { control: { type: 'color' } },
78
+ placement: { table: { disable: true } },
79
+ message: { table: { disable: true } }
80
+ };
64
81
  //# sourceMappingURL=Progress.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.stories.js","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAiB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,OAAO;QAClB,OAAO,EAAE,EAAE;KACZ;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SA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IACzB,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport { Button, Flex, Progress, ProgressProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledDemoWrap } from './Progress.styles';\n\nexport default {\n title: 'Core/Progress',\n component: Progress,\n args: {\n variant: 'ring',\n placement: 'local',\n message: ''\n },\n argTypes: {\n variant: { options: ['ring', 'bar', 'ellipsis'], control: { type: 'select' } },\n placement: { options: ['local', 'global', 'inline'], control: { type: 'select' } },\n message: { control: { type: 'text' } }\n }\n} as Meta;\n\nexport const IndeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n variant={args.variant}\n placement={args.placement}\n message={args.message}\n visible={loading}\n />\n </Flex>\n );\n};\n\nIndeterminateProgress.args = {\n message: 'Loading'\n};\n\nexport const DeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n value={args.value}\n variant={args.variant}\n placement={args.placement}\n message={args.message || `${args.value}%`}\n visible={loading}\n />\n </Flex>\n );\n};\n\nDeterminateProgress.args = {\n value: 67\n};\n\nDeterminateProgress.argTypes = {\n value: { control: { type: 'number' } }\n};\n"]}
1
+ {"version":3,"file":"Progress.stories.js","sourceRoot":"","sources":["../../../src/core/Progress/Progress.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACL,MAAM,EACN,aAAa,EACb,IAAI,EACJ,QAAQ,EAER,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,OAAO;QAClB,OAAO,EAAE,EAAE;KACZ;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC9E,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAClF,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KACvC;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,qBAAqB,GAAyB,CAAC,IAAmB,EAAE,EAAE;IACjF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,WAAW,GAAG,GAAG,EAAE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E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,YAC9E,KAAC,QAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,iBAAG,WAC1E,WACO,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,IAAI,GAAG;IAC1B,aAAa,EAAE,SAAS;CACzB,CAAC;AAEF,oBAAoB,CAAC,QAAQ,GAAG;IAC9B,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC7C,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport {\n Button,\n Configuration,\n Flex,\n Progress,\n ProgressProps,\n Text\n} from '@pega/cosmos-react-core';\n\nimport { StyledDemoWrap } from './Progress.styles';\n\nexport default {\n title: 'Core/Progress',\n component: Progress,\n args: {\n variant: 'ring',\n placement: 'local',\n message: ''\n },\n argTypes: {\n variant: { options: ['ring', 'bar', 'ellipsis'], control: { type: 'select' } },\n placement: { options: ['local', 'global', 'inline'], control: { type: 'select' } },\n message: { control: { type: 'text' } }\n }\n} as Meta;\n\nexport const IndeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n variant={args.variant}\n placement={args.placement}\n message={args.message}\n visible={loading}\n />\n </Flex>\n );\n};\n\nIndeterminateProgress.args = {\n message: 'Loading'\n};\n\nexport const DeterminateProgress: Story<ProgressProps> = (args: ProgressProps) => {\n const [loading, setLoading] = useState(false);\n\n const handleClick = () => {\n setLoading(true);\n\n setTimeout(() => {\n setLoading(false);\n }, 2000);\n };\n\n useEffect(() => {\n if (args.placement === 'global') {\n setLoading(false);\n } else {\n setLoading(true);\n }\n }, [args.placement]);\n\n return (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n {args.placement === 'global' && <Button onClick={handleClick}>Start loading</Button>}\n {args.placement === 'inline' && <Text>Progress demo</Text>}\n <Progress\n value={args.value}\n variant={args.variant}\n placement={args.placement}\n message={args.message || `${args.value}%`}\n visible={loading}\n />\n </Flex>\n );\n};\n\nDeterminateProgress.args = {\n value: 67\n};\n\nDeterminateProgress.argTypes = {\n value: { control: { type: 'number' } }\n};\n\ninterface ConfigurableProgressProps extends ProgressProps {\n progressColor?: string;\n}\n\nexport const ConfigurableProgress: Story<ConfigurableProgressProps> = (\n args: ConfigurableProgressProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n progress: {\n 'progress-color': args.progressColor\n }\n }\n }}\n >\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledDemoWrap}>\n <Progress variant={args.variant} placement='local' message='Loading' visible />\n </Flex>\n </Configuration>\n );\n};\n\nConfigurableProgress.args = {\n progressColor: '#076bc9'\n};\n\nConfigurableProgress.argTypes = {\n progressColor: { control: { type: 'color' } },\n placement: { table: { disable: true } },\n message: { table: { disable: true } }\n};\n"]}
@@ -4,4 +4,16 @@ declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const DefaultRadioButton: Story<RadioCheckProps>;
6
6
  export declare const RadioButtonCard: Story<RadioCheckProps>;
7
+ interface ConfigurableRadioButtonProps extends RadioCheckProps {
8
+ size?: string;
9
+ backgroundColor?: string;
10
+ borderColor?: string;
11
+ borderWidth?: string;
12
+ borderRadius?: string;
13
+ labelColor?: string;
14
+ labelFontWeight?: string;
15
+ checkedBackgroundColor?: string;
16
+ checkedBorderColor?: string;
17
+ }
18
+ export declare const ConfigurableRadioButton: Story<ConfigurableRadioButtonProps>;
7
19
  //# sourceMappingURL=RadioButton.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.stories.d.ts","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAe,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEvE,wBAiBU;AAEV,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAUrD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC"}
1
+ {"version":3,"file":"RadioButton.stories.d.ts","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,eAAe,EAAE,MAAM,yBAAyB,CAAC;;AAEtF,wBAiBU;AAEV,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAUrD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAWlD,CAAC;AAEF,UAAU,4BAA6B,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CA8BvE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { RadioButton } from '@pega/cosmos-react-core';
2
+ import { Configuration, RadioButton } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/RadioButton',
5
5
  component: RadioButton,
@@ -24,4 +24,54 @@ export const DefaultRadioButton = (args) => {
24
24
  export const RadioButtonCard = (args) => {
25
25
  return (_jsx(RadioButton, { variant: 'card', status: args.status, label: args.label, required: args.required, disabled: args.disabled, readOnly: args.readOnly }, void 0));
26
26
  };
27
+ export const ConfigurableRadioButton = (args) => {
28
+ return (_jsx(Configuration, { theme: {
29
+ components: {
30
+ 'radio-button': {
31
+ 'border-radius': args.borderRadius
32
+ },
33
+ 'radio-check': {
34
+ 'border-color': args.borderColor,
35
+ 'border-width': args.borderWidth,
36
+ 'background-color': args.backgroundColor,
37
+ label: {
38
+ color: args.labelColor,
39
+ 'font-weight': args.labelFontWeight
40
+ },
41
+ size: args.size,
42
+ ':checked': {
43
+ 'background-color': args.checkedBackgroundColor,
44
+ 'border-color': args.checkedBorderColor
45
+ }
46
+ }
47
+ }
48
+ }, children: _jsx(RadioButton, { label: 'Configurable Radio Button' }, void 0) }, void 0));
49
+ };
50
+ ConfigurableRadioButton.args = {
51
+ size: '1.25rem',
52
+ backgroundColor: '#ffffff',
53
+ borderColor: '#939393',
54
+ borderWidth: '0.0625rem',
55
+ borderRadius: '50%',
56
+ labelColor: '#000000',
57
+ labelFontWeight: '400',
58
+ checkedBackgroundColor: '#076bc9',
59
+ checkedBorderColor: '#076bc9'
60
+ };
61
+ ConfigurableRadioButton.argTypes = {
62
+ size: { control: { type: 'text' } },
63
+ backgroundColor: { control: { type: 'color' } },
64
+ borderColor: { control: { type: 'color' } },
65
+ borderWidth: { control: { type: 'text' } },
66
+ borderRadius: { control: { type: 'text' } },
67
+ labelColor: { control: { type: 'color' } },
68
+ labelFontWeight: { control: { type: 'text' } },
69
+ checkedBackgroundColor: { control: { type: 'color' } },
70
+ checkedBorderColor: { control: { type: 'color' } },
71
+ status: { table: { disable: true } },
72
+ label: { table: { disable: true } },
73
+ required: { table: { disable: true } },
74
+ disabled: { table: { disable: true } },
75
+ readOnly: { table: { disable: true } }
76
+ };
27
77
  //# sourceMappingURL=RadioButton.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.stories.js","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAmB,MAAM,yBAAyB,CAAC;AAEvE,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAClF,OAAO,CACL,KAAC,WAAW,IACV,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAC/E,OAAO,CACL,KAAC,WAAW,IACV,OAAO,EAAC,MAAM,EACd,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { RadioButton, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/RadioButton',\n component: RadioButton,\n args: {\n status: undefined,\n label: 'Choose me',\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultRadioButton: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RadioButtonCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"RadioButton.stories.js","sourceRoot":"","sources":["../../../src/core/RadioButton/RadioButton.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAmB,MAAM,yBAAyB,CAAC;AAEtF,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC5F,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC1C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;KAC3C;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CAAC,IAAqB,EAAE,EAAE;IAClF,OAAO,CACL,KAAC,WAAW,IACV,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,WACvB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA2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AC;AAEF,uBAAuB,CAAC,QAAQ,GAAG;IACjC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACnC,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC/C,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;IAC3C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAC1C,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC9C,sBAAsB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACtD,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAClD,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACpC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACnC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, RadioButton, RadioCheckProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/RadioButton',\n component: RadioButton,\n args: {\n status: undefined,\n label: 'Choose me',\n required: false,\n disabled: false,\n readOnly: false\n },\n argTypes: {\n status: { options: [undefined, 'success', 'warning', 'error'], control: { type: 'select' } },\n label: { control: { type: 'text' } },\n required: { control: { type: 'boolean' } },\n disabled: { control: { type: 'boolean' } },\n readOnly: { control: { type: 'boolean' } }\n }\n} as Meta;\n\nexport const DefaultRadioButton: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\nexport const RadioButtonCard: Story<RadioCheckProps> = (args: RadioCheckProps) => {\n return (\n <RadioButton\n variant='card'\n status={args.status}\n label={args.label}\n required={args.required}\n disabled={args.disabled}\n readOnly={args.readOnly}\n />\n );\n};\n\ninterface ConfigurableRadioButtonProps extends RadioCheckProps {\n size?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: string;\n labelColor?: string;\n labelFontWeight?: string;\n checkedBackgroundColor?: string;\n checkedBorderColor?: string;\n}\n\nexport const ConfigurableRadioButton: Story<ConfigurableRadioButtonProps> = (\n args: ConfigurableRadioButtonProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'radio-button': {\n 'border-radius': args.borderRadius\n },\n 'radio-check': {\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'background-color': args.backgroundColor,\n label: {\n color: args.labelColor,\n 'font-weight': args.labelFontWeight\n },\n size: args.size,\n ':checked': {\n 'background-color': args.checkedBackgroundColor,\n 'border-color': args.checkedBorderColor\n }\n }\n }\n }}\n >\n <RadioButton label='Configurable Radio Button' />\n </Configuration>\n );\n};\n\nConfigurableRadioButton.args = {\n size: '1.25rem',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: '50%',\n labelColor: '#000000',\n labelFontWeight: '400',\n checkedBackgroundColor: '#076bc9',\n checkedBorderColor: '#076bc9'\n};\n\nConfigurableRadioButton.argTypes = {\n size: { control: { type: 'text' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'text' } },\n labelColor: { control: { type: 'color' } },\n labelFontWeight: { control: { type: 'text' } },\n checkedBackgroundColor: { control: { type: 'color' } },\n checkedBorderColor: { control: { type: 'color' } },\n status: { table: { disable: true } },\n label: { table: { disable: true } },\n required: { table: { disable: true } },\n disabled: { table: { disable: true } },\n readOnly: { table: { disable: true } }\n};\n"]}
@@ -2,5 +2,12 @@ import { Meta, Story } from '@storybook/react';
2
2
  import { RatingProps } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
- export declare const RatingDemo: Story<RatingProps>;
5
+ interface RatingStoryProps extends RatingProps {
6
+ ariaLabel?: string;
7
+ }
8
+ export declare const RatingDemo: Story<RatingStoryProps>;
9
+ interface ConfigurableRatingProps {
10
+ color?: string;
11
+ }
12
+ export declare const ConfigurableRating: Story<ConfigurableRatingProps>;
6
13
  //# sourceMappingURL=Rating.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAGU;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,CAUzC,CAAC"}
1
+ {"version":3,"file":"Rating.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAyB,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE7E,wBAGU;AAEV,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAU9C,CAAC;AAgBF,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,uBAAuB,CAqB7D,CAAC"}
@@ -1,22 +1,37 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Rating } from '@pega/cosmos-react-core';
2
+ import { Configuration, Rating } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/Rating',
5
5
  component: Rating
6
6
  };
7
7
  export const RatingDemo = (args) => {
8
- return (_jsx(Rating, { ...args, maxRating: args.maxRating, value: args.value, metaInfo: args.metaInfo, "aria-label": args['aria-label'] }, void 0));
8
+ return (_jsx(Rating, { ...args, maxRating: args.maxRating, value: args.value, metaInfo: args.metaInfo, "aria-label": args.ariaLabel }, void 0));
9
9
  };
10
10
  RatingDemo.args = {
11
11
  maxRating: 5,
12
12
  value: 3.6,
13
13
  metaInfo: '52 reviews',
14
- 'aria-label': '3.6 out of 5 stars based on 52 reviews'
14
+ ariaLabel: '3.6 out of 5 stars based on 52 reviews'
15
15
  };
16
16
  RatingDemo.argTypes = {
17
17
  maxRating: { control: { type: 'number' } },
18
18
  value: { control: { type: 'number' } },
19
19
  metaInfo: { control: { type: 'text' } },
20
- 'aria-label': { control: { type: 'text' } }
20
+ ariaLabel: { control: { type: 'text' } }
21
+ };
22
+ export const ConfigurableRating = (args) => {
23
+ return (_jsx(Configuration, { theme: {
24
+ components: {
25
+ rating: {
26
+ color: args.color
27
+ }
28
+ }
29
+ }, children: _jsx(Rating, { maxRating: 5, value: 3.6, metaInfo: '52 reviews', "aria-label": '3.6 out of 5 stars based on 52 reviews' }, void 0) }, void 0));
30
+ };
31
+ ConfigurableRating.args = {
32
+ color: '#000000'
33
+ };
34
+ ConfigurableRating.argTypes = {
35
+ color: { control: { type: 'color' } }
21
36
  };
22
37
  //# sourceMappingURL=Rating.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.stories.js","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,CAAC,MAAM,UAAU,GAAuB,CAAC,IAAiB,EAAE,EAAE;IAClE,OAAO,CACL,KAAC,MAAM,OACD,IAAI,EACR,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,gBACX,IAAI,CAAC,YAAY,CAAC,WAC9B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,YAAY;IACtB,YAAY,EAAE,wCAAwC;CACvD,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC5C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\nexport const RatingDemo: Story<RatingProps> = (args: RatingProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args['aria-label']}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n 'aria-label': '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n 'aria-label': { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"Rating.stories.js","sourceRoot":"","sources":["../../../src/core/Rating/Rating.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE7E,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;CACV,CAAC;AAMV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,OAAO,CACL,KAAC,MAAM,OACD,IAAI,EACR,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,gBACX,IAAI,CAAC,SAAS,WAC1B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,wCAAwC;CACpD,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACzC,CAAC;AAMF,MAAM,CAAC,MAAM,kBAAkB,GAAmC,CAChE,IAA6B,EAC7B,EAAE;IACF,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,IAAI,CAAC,KAAK;iBAClB;aACF;SACF,YAED,KAAC,MAAM,IACL,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,GAAG,EACV,QAAQ,EAAC,YAAY,gBACV,wCAAwC,WACnD,WACY,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,IAAI,GAAG;IACxB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,kBAAkB,CAAC,QAAQ,GAAG;IAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;CACtC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, Rating, RatingProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/Rating',\n component: Rating\n} as Meta;\n\ninterface RatingStoryProps extends RatingProps {\n ariaLabel?: string;\n}\n\nexport const RatingDemo: Story<RatingStoryProps> = (args: RatingStoryProps) => {\n return (\n <Rating\n {...args}\n maxRating={args.maxRating}\n value={args.value}\n metaInfo={args.metaInfo}\n aria-label={args.ariaLabel}\n />\n );\n};\n\nRatingDemo.args = {\n maxRating: 5,\n value: 3.6,\n metaInfo: '52 reviews',\n ariaLabel: '3.6 out of 5 stars based on 52 reviews'\n};\n\nRatingDemo.argTypes = {\n maxRating: { control: { type: 'number' } },\n value: { control: { type: 'number' } },\n metaInfo: { control: { type: 'text' } },\n ariaLabel: { control: { type: 'text' } }\n};\n\ninterface ConfigurableRatingProps {\n color?: string;\n}\n\nexport const ConfigurableRating: Story<ConfigurableRatingProps> = (\n args: ConfigurableRatingProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n rating: {\n color: args.color\n }\n }\n }}\n >\n <Rating\n maxRating={5}\n value={3.6}\n metaInfo='52 reviews'\n aria-label='3.6 out of 5 stars based on 52 reviews'\n />\n </Configuration>\n );\n};\n\nConfigurableRating.args = {\n color: '#000000'\n};\n\nConfigurableRating.argTypes = {\n color: { control: { type: 'color' } }\n};\n"]}
@@ -3,4 +3,8 @@ import { SearchInputProps } from '@pega/cosmos-react-core';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const SearchInputDemo: Story<SearchInputProps>;
6
+ interface ConfigurableSearchInputProps {
7
+ borderRadius?: number;
8
+ }
9
+ export declare const ConfigurableSearchInput: Story<ConfigurableSearchInputProps>;
6
10
  //# sourceMappingURL=SearchInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAe,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAExE,wBAGU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAEnD,CAAC"}
1
+ {"version":3,"file":"SearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAA8B,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAEvF,wBAGU;AAEV,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAEnD,CAAC;AAUF,UAAU,4BAA4B;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,4BAA4B,CAgBvE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SearchInput } from '@pega/cosmos-react-core';
2
+ import { Configuration, SearchInput } from '@pega/cosmos-react-core';
3
3
  export default {
4
4
  title: 'Core/SearchInput',
5
5
  component: SearchInput
@@ -13,4 +13,19 @@ SearchInputDemo.args = {
13
13
  SearchInputDemo.argTypes = {
14
14
  placeholder: { control: { type: 'text' } }
15
15
  };
16
+ export const ConfigurableSearchInput = (args) => {
17
+ return (_jsx(Configuration, { theme: {
18
+ components: {
19
+ 'search-input': {
20
+ 'border-radius': args.borderRadius
21
+ }
22
+ }
23
+ }, children: _jsx(SearchInput, {}, void 0) }, void 0));
24
+ };
25
+ ConfigurableSearchInput.args = {
26
+ borderRadius: 9999
27
+ };
28
+ ConfigurableSearchInput.argTypes = {
29
+ borderRadius: { control: { type: 'number' } }
30
+ };
16
31
  //# sourceMappingURL=SearchInput.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.stories.js","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAExE,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,IAAsB,EAAE,EAAE;IACjF,OAAO,KAAC,WAAW,OAAK,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,WAAI,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC3C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { SearchInput, SearchInputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SearchInput',\n component: SearchInput\n} as Meta;\n\nexport const SearchInputDemo: Story<SearchInputProps> = (args: SearchInputProps) => {\n return <SearchInput {...args} placeholder={args.placeholder} />;\n};\n\nSearchInputDemo.args = {\n placeholder: 'Search…'\n};\n\nSearchInputDemo.argTypes = {\n placeholder: { control: { type: 'text' } }\n};\n"]}
1
+ {"version":3,"file":"SearchInput.stories.js","sourceRoot":"","sources":["../../../src/core/SearchInput/SearchInput.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAEvF,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;CACf,CAAC;AAEV,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,IAAsB,EAAE,EAAE;IACjF,OAAO,KAAC,WAAW,OAAK,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,WAAI,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC3C,CAAC;AAMF,MAAM,CAAC,MAAM,uBAAuB,GAAwC,CAC1E,IAAkC,EAClC,EAAE;IACF,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE;YACL,UAAU,EAAE;gBACV,cAAc,EAAE;oBACd,eAAe,EAAE,IAAI,CAAC,YAAY;iBACnC;aACF;SACF,YAED,KAAC,WAAW,aAAG,WACD,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,uBAAuB,CAAC,IAAI,GAAG;IAC7B,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,uBAAuB,CAAC,QAAQ,GAAG;IACjC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Configuration, SearchInput, SearchInputProps } from '@pega/cosmos-react-core';\n\nexport default {\n title: 'Core/SearchInput',\n component: SearchInput\n} as Meta;\n\nexport const SearchInputDemo: Story<SearchInputProps> = (args: SearchInputProps) => {\n return <SearchInput {...args} placeholder={args.placeholder} />;\n};\n\nSearchInputDemo.args = {\n placeholder: 'Search…'\n};\n\nSearchInputDemo.argTypes = {\n placeholder: { control: { type: 'text' } }\n};\n\ninterface ConfigurableSearchInputProps {\n borderRadius?: number;\n}\n\nexport const ConfigurableSearchInput: Story<ConfigurableSearchInputProps> = (\n args: ConfigurableSearchInputProps\n) => {\n return (\n <Configuration\n theme={{\n components: {\n 'search-input': {\n 'border-radius': args.borderRadius\n }\n }\n }}\n >\n <SearchInput />\n </Configuration>\n );\n};\n\nConfigurableSearchInput.args = {\n borderRadius: 9999\n};\n\nConfigurableSearchInput.argTypes = {\n borderRadius: { control: { type: 'number' } }\n};\n"]}