@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":"Form.stories.js","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,UAAU,EAIV,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,MAAM,IAAI,cAAc,EAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,IAAI,EAEJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,0DAA0D,CAAC;AACzF,OAAO,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AAEhI,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE;QACb,SAAS;KACV;IACD,cAAc,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;IACvF,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,OAAO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AC,EAAE,CAAC,CAAC;QACpB,CAAC,YAED,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,YAClD,KAAC,KAAK,IACJ,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,uBAAuB,EAC5B,QAAQ,QACR,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,CAAgC,EAAE,EAAE;oBAC7C,UAAU,CAAC,EAAE,CAAC,CAAC;oBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAChC,CAAC,WACD,WACG,WACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,IAAI,GAAG;IACpB,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,cAAc,CAAC,QAAQ,GAAG;IACxB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport {\n useReducer,\n ChangeEvent,\n FocusEvent,\n FormEvent,\n useRef,\n useContext,\n useState\n} from 'react';\n\nimport {\n Editor as RichTextEditor,\n EditorState as RichTextEditorState\n} from '@pega/cosmos-react-rte';\nimport {\n Banner,\n Button,\n Checkbox,\n CheckboxGroup,\n Flex,\n Form,\n FormControlProps,\n FormField,\n Grid,\n Input,\n RadioButton,\n RadioButtonGroup,\n Select,\n Option,\n TextArea,\n ToasterContext\n} from '@pega/cosmos-react-core';\nimport { FileInputDemo } from '@pega/cosmos-react-demos/lib/core/File/FileInput.stories';\nimport { FilterableSingleSelect as ComboboxFilterableStory } from '@pega/cosmos-react-demos/lib/core/ComboBox/ComboBox.stories';\n\nexport default {\n title: 'Core/Form',\n component: Form,\n subcomponents: {\n FormField\n },\n includeStories: ['OneColumnForm', 'TwoColumnForm', 'ThreeColumnForm', 'SimpleFormDemo'],\n args: {\n heading: 'Form demo',\n description: ''\n },\n argTypes: {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } }\n }\n} as Meta;\n\ninterface Field extends FormControlProps {\n help?: string;\n error?: string;\n validator: (this: Field) => boolean;\n}\n\n// Get initial field properties\nconst initFields = (): Field[] => {\n const common = { value: undefined, status: undefined };\n return [\n {\n ...common,\n name: 'name',\n required: true,\n error: 'Please enter first and last name',\n validator() {\n if (!this.value) return false;\n return /^[a-z]+\\s[a-z]+$/i.test(this.value);\n }\n },\n {\n ...common,\n name: 'email',\n required: true,\n error: 'Enter a @pega.com address',\n validator() {\n if (!this.value) return false;\n return /^\\S+@pega\\.com$/.test(this.value);\n }\n },\n {\n ...common,\n name: 'notes',\n required: true,\n help: 'See how fast you can type 20 characters…go',\n error: 'You need to tell us more than 20 characters',\n validator() {\n if (!this.value) return false;\n return this.value.length >= 20;\n }\n }\n ];\n};\n\n// Handles setting of state for all fields\nconst fieldReducer = (\n fields: Field[],\n {\n target,\n type\n }:\n | ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n | FocusEvent<HTMLInputElement | HTMLTextAreaElement>\n) => {\n return fields.map(field => {\n if (field.name === target.name) {\n field.value = target.value;\n if (type === 'blur' || field.status === 'error') {\n if ((field.required || field.value) && !field.validator()) {\n field.status = 'error';\n field.info = field.error;\n } else {\n field.status = undefined;\n field.info = field.help;\n }\n }\n }\n return field;\n });\n};\n\nexport const FormContent = ({\n cols,\n heading,\n description,\n showActions\n}: {\n cols: number;\n showActions: boolean;\n heading?: string;\n description?: string;\n}) => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [fields, setField] = useReducer(fieldReducer, undefined, initFields);\n const { push } = useContext(ToasterContext);\n\n const name = fields.find(field => field.name === 'name');\n const email = fields.find(field => field.name === 'email');\n const notes = fields.find(field => field.name === 'notes');\n\n if (!name || !email || !notes) return null;\n\n const canSubmit = fields.every(field => field.value && field.validator());\n\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={() => {\n push({ content: 'Form cancelled!' });\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>\n Submit\n </Button>\n </>\n );\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n return (\n <Form\n actions={showActions ? actions : undefined}\n description={description}\n heading={heading}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n push({ content: 'Form submitted!' });\n }}\n style={{ margin: 'auto', maxWidth: '37.5rem' }}\n >\n <Grid container={{ gap: 1, cols: `repeat(${cols}, minmax(0, 1fr))` }}>\n <Input\n name='name'\n label='Name'\n value={name.value}\n required={name.required}\n status={name.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Input\n name='email'\n value={email.value}\n type='email'\n label='Email'\n required={email.required}\n status={email.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <CheckboxGroup name='visited' label='Places you have worked'>\n {['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (\n <Checkbox\n key={office}\n label={office}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </CheckboxGroup>\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>\n {['Yes', \"No… no I don't\"].map(option => (\n <RadioButton\n key={option}\n label={option}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </RadioButtonGroup>\n </Grid>\n\n <Select label='What would you like to eat?' info='FYI: options are limited'>\n <Option>choose meal…</Option>\n <Option>Pizza</Option>\n <Option>Sandwich</Option>\n <Option>Salad</Option>\n </Select>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <TextArea\n name='notes'\n required={notes.required}\n label='Meeting Notes'\n status={notes.status}\n info={notes.info || notes.help}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n />\n </Grid>\n\n <Grid item={{ colStartEnd: '1/-1' }}>\n <RichTextEditor\n label='Detailed meeting notes'\n info='The rich text editor can be used in forms, comments, and documents'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n ref={editorRef}\n />\n </Grid>\n <Grid item={{ colStartEnd: '1/-1' }}>\n <FileInputDemo />\n </Grid>\n <ComboboxFilterableStory />\n </Grid>\n </Form>\n );\n};\n\ninterface FormStoryProps {\n heading?: string;\n description?: string;\n}\n\nexport const OneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={1} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const TwoColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={2} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const ThreeColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={3} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const SimpleFormDemo: Story<FormStoryProps & { withBanners?: boolean }> = (\n args: FormStoryProps & { withBanners?: boolean }\n) => {\n const [inputValue, setInputValue] = useState('');\n const [success, setSuccess] = useState('');\n\n const actions = (\n <>\n <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n );\n\n const successBanner = (\n <Banner\n id='success'\n variant='success'\n heading='Success'\n messages={['Form submitted', `Input value: ${success}`]}\n />\n );\n\n const errorBanner = (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n messages={['All required fields in the form must be completed.']}\n />\n );\n\n const banner = success ? successBanner : errorBanner;\n\n return (\n <Form\n banners={args.withBanners ? banner : undefined}\n actions={actions}\n heading={args.heading}\n description={args.description}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n setSuccess(inputValue);\n setInputValue('');\n }}\n >\n <Flex container={{ direction: 'column', itemGap: 2 }}>\n <Input\n label='Name'\n info='Enter your first name'\n required\n value={inputValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setSuccess('');\n setInputValue(e.target.value);\n }}\n />\n </Flex>\n </Form>\n );\n};\n\nSimpleFormDemo.args = {\n withBanners: false\n};\n\nSimpleFormDemo.argTypes = {\n withBanners: { control: { type: 'boolean' } }\n};\n"]}
1
+ {"version":3,"file":"Form.stories.js","sourceRoot":"","sources":["../../../src/core/Form/Form.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAA0B,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACN,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE;QACb,SAAS;KACV;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KAC3C;CACM,CAAC;AAMV,MAAM,CAAC,MAAM,aAAa,GAA0B,CAAC,IAAoB,EAAE,EAAE;IAC3E,OAAO,KAAC,WAAW,IAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,I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AAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAChD,gBAAgB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAChD,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACrC,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CAC1C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { ChangeEvent, FormEvent, useState } from 'react';\n\nimport {\n Banner,\n Button,\n Configuration,\n Flex,\n Form,\n FormField,\n Input\n} from '@pega/cosmos-react-core';\n\nimport { FormContent } from './Form.mocks';\n\nexport default {\n title: 'Core/Form',\n component: Form,\n subcomponents: {\n FormField\n },\n args: {\n heading: 'Form demo',\n description: ''\n },\n argTypes: {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } }\n }\n} as Meta;\ninterface FormStoryProps {\n heading?: string;\n description?: string;\n}\n\nexport const OneColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={1} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const TwoColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={2} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const ThreeColumnForm: Story<FormStoryProps> = (args: FormStoryProps) => {\n return <FormContent cols={3} heading={args.heading} description={args.description} showActions />;\n};\n\nexport const SimpleFormDemo: Story<FormStoryProps & { withBanners?: boolean }> = (\n args: FormStoryProps & { withBanners?: boolean }\n) => {\n const [inputValue, setInputValue] = useState('');\n const [success, setSuccess] = useState('');\n\n const actions = (\n <>\n <Button name='Cancel' variant='secondary' onClick={() => setInputValue('')}>\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Submit\n </Button>\n </>\n );\n\n const successBanner = (\n <Banner\n id='success'\n variant='success'\n heading='Success'\n messages={['Form submitted', `Input value: ${success}`]}\n />\n );\n\n const errorBanner = (\n <Banner\n id='error'\n variant='urgent'\n heading='Error'\n messages={['All required fields in the form must be completed.']}\n />\n );\n\n const banner = success ? successBanner : errorBanner;\n\n return (\n <Form\n banners={args.withBanners ? banner : undefined}\n actions={actions}\n heading={args.heading}\n description={args.description}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n setSuccess(inputValue);\n setInputValue('');\n }}\n >\n <Flex container={{ direction: 'column', itemGap: 2 }}>\n <Input\n label='Name'\n info='Enter your first name'\n required\n value={inputValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n setSuccess('');\n setInputValue(e.target.value);\n }}\n />\n </Flex>\n </Form>\n );\n};\n\nSimpleFormDemo.args = {\n withBanners: false\n};\n\nSimpleFormDemo.argTypes = {\n withBanners: { control: { type: 'boolean' } }\n};\n\ninterface ConfigurableFormProps extends FormStoryProps {\n foregroundColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n borderWidth?: string;\n borderRadius?: number;\n hoverBorderColor?: string;\n focusBorderColor?: string;\n}\n\nexport const ConfigurableForm: Story<ConfigurableFormProps> = (args: ConfigurableFormProps) => {\n return (\n <Configuration\n theme={{\n components: {\n 'form-control': {\n 'foreground-color': args.foregroundColor,\n 'background-color': args.backgroundColor,\n 'border-color': args.borderColor,\n 'border-width': args.borderWidth,\n 'border-radius': args.borderRadius,\n ':hover': {\n 'border-color': args.hoverBorderColor\n },\n ':focus': {\n 'border-color': args.focusBorderColor\n }\n }\n }\n }}\n >\n <FormContent cols={2} showActions />\n </Configuration>\n );\n};\n\nConfigurableForm.args = {\n foregroundColor: '#000000',\n backgroundColor: '#ffffff',\n borderColor: '#939393',\n borderWidth: '0.0625rem',\n borderRadius: 0.5,\n hoverBorderColor: '#3f3f3f',\n focusBorderColor: 'transparent'\n};\n\nConfigurableForm.argTypes = {\n foregroundColor: { control: { type: 'color' } },\n backgroundColor: { control: { type: 'color' } },\n borderColor: { control: { type: 'color' } },\n borderWidth: { control: { type: 'text' } },\n borderRadius: { control: { type: 'number' } },\n hoverBorderColor: { control: { type: 'color' } },\n focusBorderColor: { control: { type: 'color' } },\n heading: { table: { disable: true } },\n description: { table: { disable: true } }\n};\n"]}
@@ -1,6 +1,6 @@
1
- export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
1
+ export declare const StyledGridContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
2
  fitContent?: boolean | undefined;
3
3
  height?: number | undefined;
4
4
  }, never>;
5
- export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const StyledGridItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
6
  //# sourceMappingURL=Grid.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;SAiB3B,CAAC;AAIF,eAAO,MAAM,UAAU,yGAerB,CAAC"}
1
+ {"version":3,"file":"Grid.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;SAiB/B,CAAC;AAIF,eAAO,MAAM,cAAc,yGAezB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';
3
- export const StyledContainer = styled.div(({ fitContent, height, theme }) => {
3
+ export const StyledGridContainer = styled.div(({ fitContent, height, theme }) => {
4
4
  return css `
5
5
  border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
6
6
  background-color: ${theme.base.colors.blue.light};
@@ -16,8 +16,8 @@ export const StyledContainer = styled.div(({ fitContent, height, theme }) => {
16
16
  `}
17
17
  `;
18
18
  });
19
- StyledContainer.defaultProps = defaultThemeProp;
20
- export const StyledItem = styled.div(({ theme }) => {
19
+ StyledGridContainer.defaultProps = defaultThemeProp;
20
+ export const StyledGridItem = styled.div(({ theme }) => {
21
21
  const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
22
22
  return css `
23
23
  border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};
@@ -32,5 +32,5 @@ export const StyledItem = styled.div(({ theme }) => {
32
32
  }
33
33
  `;
34
34
  });
35
- StyledItem.defaultProps = defaultThemeProp;
35
+ StyledGridItem.defaultProps = defaultThemeProp;
36
36
  //# sourceMappingURL=Grid.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.styles.js","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CACvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,OAAO,GAAG,CAAA;2BACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;0BACrD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;;QAE9C,MAAM;QACR,GAAG,CAAA;kBACS,MAAM;OACjB;;QAEC,UAAU;QACZ,GAAG,CAAA;;OAEF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtF,OAAO,GAAG,CAAA;yBACa,KAAK,CAAC,IAAI,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;eAC9D,KAAK,CAAC,IAAI,CAAC,OAAO;;wBAET,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK;aACzC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;mBAGjB,QAAQ,CAAC,EAAE;qBACT,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { calculateFontSize, defaultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledContainer = styled.div<{ fitContent?: boolean; height?: number }>(\n ({ fitContent, height, theme }) => {\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n background-color: ${theme.base.colors.blue.light};\n\n ${height &&\n css`\n height: ${height}rem;\n `}\n\n ${fitContent &&\n css`\n width: fit-content;\n `}\n `;\n }\n);\n\nStyledContainer.defaultProps = defaultThemeProp;\n\nexport const StyledItem = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n padding: ${theme.base.spacing};\n text-align: center;\n background-color: ${theme.base.colors.orange.light};\n color: ${theme.base.colors.black};\n\n span {\n font-size: ${fontSize.xl};\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n});\n\nStyledItem.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Grid.styles.js","sourceRoot":"","sources":["../../../src/core/Grid/Grid.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC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ultThemeProp } from '@pega/cosmos-react-core';\n\nexport const StyledGridContainer = styled.div<{ fitContent?: boolean; height?: number }>(\n ({ fitContent, height, theme }) => {\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n background-color: ${theme.base.colors.blue.light};\n\n ${height &&\n css`\n height: ${height}rem;\n `}\n\n ${fitContent &&\n css`\n width: fit-content;\n `}\n `;\n }\n);\n\nStyledGridContainer.defaultProps = defaultThemeProp;\n\nexport const StyledGridItem = styled.div(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n border: calc(0.5 * ${theme.base.spacing}) solid ${theme.base.colors.black};\n padding: ${theme.base.spacing};\n text-align: center;\n background-color: ${theme.base.colors.orange.light};\n color: ${theme.base.colors.black};\n\n span {\n font-size: ${fontSize.xl};\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n});\n\nStyledGridItem.defaultProps = defaultThemeProp;\n"]}
@@ -15,9 +15,10 @@ interface GridStoryProps {
15
15
  export declare const ColumnsAndRows: () => JSX.Element;
16
16
  export declare const Areas: () => JSX.Element;
17
17
  export declare const Template: () => JSX.Element;
18
- export declare const GapAndPadding: Story<GridStoryProps>;
19
- export declare const JustifyItems: Story<GridStoryProps>;
20
- export declare const JustifyContent: Story<GridStoryProps>;
21
- export declare const AlignItems: Story<GridStoryProps>;
22
- export declare const AlignContent: Story<GridStoryProps>;
18
+ export declare const GapsAndPadding: Story<GridStoryProps>;
19
+ export declare const JustifyGridItems: Story<GridStoryProps>;
20
+ export declare const JustifyGridContent: Story<GridStoryProps>;
21
+ export declare const AlignGridItems: Story<GridStoryProps>;
22
+ export declare const AlignGridContent: Story<GridStoryProps>;
23
+ export declare const ResponsiveGrid: () => JSX.Element;
23
24
  //# sourceMappingURL=GridContainer.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridContainer.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.stories.tsx"],"names":[],"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V,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,cAAc,mBAkB1B,CAAC;AAEF,eAAO,MAAM,KAAK,mBA0BjB,CAAC;AAEF,eAAO,MAAM,QAAQ,mBAyBpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,CAoBhD,CAAC;AAcF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAmBlD,CAAC;AAUF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,cAAc,CAkBpD,CAAC;AAaF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAAc,CAmBhD,CAAC;AAUF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAoBlD,CAAC;AAaF,eAAO,MAAM,cAAc,mBAkB1B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Grid, Text } from '@pega/cosmos-react-core';
3
- import { StyledContainer, StyledItem } from './Grid.styles';
3
+ import { StyledGridContainer, StyledGridItem } from './Grid.styles';
4
4
  export default {
5
5
  title: 'Core/Grid/Container',
6
6
  component: Grid,
@@ -13,7 +13,7 @@ export const ColumnsAndRows = () => {
13
13
  cols: '7rem [line1] 1fr [line2] 3fr [line3]',
14
14
  rows: 'repeat(3, 3rem) auto',
15
15
  pad: 2
16
- }, as: StyledContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `colRows-${index}`))) }, void 0));
16
+ }, as: StyledGridContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `colRows-${index}`))) }, void 0));
17
17
  };
18
18
  export const Areas = () => {
19
19
  return (_jsxs(Grid, { container: {
@@ -21,92 +21,95 @@ export const Areas = () => {
21
21
  rows: 'repeat(3, 3rem) auto',
22
22
  areas: '"sidebar header header" "sidebar . main" "sidebar . main" "sidebar footer footer"',
23
23
  pad: 2
24
- }, as: StyledContainer, height: 20, children: [_jsx(Grid, { item: { area: 'header' }, as: StyledItem, children: _jsx(Text, { children: "Header" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'sidebar' }, as: StyledItem, children: _jsx(Text, { children: "Side" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'main' }, as: StyledItem, children: _jsx(Text, { children: "Main" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'footer' }, as: StyledItem, children: _jsx(Text, { children: "Footer" }, void 0) }, void 0)] }, void 0));
24
+ }, as: StyledGridContainer, height: 20, children: [_jsx(Grid, { item: { area: 'header' }, as: StyledGridItem, children: _jsx(Text, { children: "Header" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'sidebar' }, as: StyledGridItem, children: _jsx(Text, { children: "Side" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'main' }, as: StyledGridItem, children: _jsx(Text, { children: "Main" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'footer' }, as: StyledGridItem, children: _jsx(Text, { children: "Footer" }, void 0) }, void 0)] }, void 0));
25
25
  };
26
26
  export const Template = () => {
27
27
  const rowsAndAreas = '"sidebar header header" 3rem "sidebar . main" 3rem "sidebar . main" 3rem "sidebar footer footer" auto';
28
28
  const columns = '5rem 1fr 3fr';
29
- return (_jsxs(Grid, { container: { template: `${rowsAndAreas} / ${columns}`, pad: 2 }, as: StyledContainer, height: 20, children: [_jsx(Grid, { item: { area: 'header' }, as: StyledItem, children: _jsx(Text, { children: "Header" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'sidebar' }, as: StyledItem, children: _jsx(Text, { children: "Side" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'main' }, as: StyledItem, children: _jsx(Text, { children: "Main" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'footer' }, as: StyledItem, children: _jsx(Text, { children: "Footer" }, void 0) }, void 0)] }, void 0));
29
+ return (_jsxs(Grid, { container: { template: `${rowsAndAreas} / ${columns}`, pad: 2 }, as: StyledGridContainer, height: 20, children: [_jsx(Grid, { item: { area: 'header' }, as: StyledGridItem, children: _jsx(Text, { children: "Header" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'sidebar' }, as: StyledGridItem, children: _jsx(Text, { children: "Side" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'main' }, as: StyledGridItem, children: _jsx(Text, { children: "Main" }, void 0) }, void 0), _jsx(Grid, { item: { area: 'footer' }, as: StyledGridItem, children: _jsx(Text, { children: "Footer" }, void 0) }, void 0)] }, void 0));
30
30
  };
31
- export const GapAndPadding = (args) => {
31
+ export const GapsAndPadding = (args) => {
32
32
  return (_jsx(Grid, { container: {
33
33
  cols: '7rem 1fr 3fr',
34
34
  colGap: args.colGap,
35
35
  rows: 'repeat(3, 3rem) auto',
36
36
  rowGap: args.rowGap,
37
37
  pad: args.pad
38
- }, as: StyledContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `colRowGap-${index}`))) }, void 0));
38
+ }, as: StyledGridContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `colRowGap-${index}`))) }, void 0));
39
39
  };
40
- GapAndPadding.args = {
40
+ GapsAndPadding.args = {
41
41
  pad: 1,
42
42
  colGap: 1,
43
43
  rowGap: 1
44
44
  };
45
- GapAndPadding.argTypes = {
45
+ GapsAndPadding.argTypes = {
46
46
  pad: { control: { type: 'number' } },
47
47
  colGap: { control: { type: 'number' } },
48
48
  rowGap: { control: { type: 'number' } }
49
49
  };
50
- export const JustifyItems = (args) => {
50
+ export const JustifyGridItems = (args) => {
51
51
  return (_jsx(Grid, { container: {
52
52
  cols: '7rem 1fr 3fr',
53
53
  rows: 'repeat(3, 3rem) auto',
54
54
  justifyItems: args.justifyItems,
55
55
  pad: 2
56
- }, as: StyledContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `justifyItems-${index}`))) }, void 0));
56
+ }, as: StyledGridContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `justifyItems-${index}`))) }, void 0));
57
57
  };
58
- JustifyItems.args = {
58
+ JustifyGridItems.args = {
59
59
  justifyItems: 'stretch'
60
60
  };
61
- JustifyItems.argTypes = {
61
+ JustifyGridItems.argTypes = {
62
62
  justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
63
63
  };
64
- export const JustifyContent = (args) => {
64
+ export const JustifyGridContent = (args) => {
65
65
  return (_jsx(Grid, { container: {
66
66
  cols: 'repeat(3, 7rem)',
67
67
  rows: 'repeat(4, 3rem)',
68
68
  justifyContent: args.justifyContent,
69
69
  pad: 2
70
- }, as: StyledContainer, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `justifyContent-${index}`))) }, void 0));
70
+ }, as: StyledGridContainer, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `justifyContent-${index}`))) }, void 0));
71
71
  };
72
- JustifyContent.args = {
72
+ JustifyGridContent.args = {
73
73
  justifyContent: 'start'
74
74
  };
75
- JustifyContent.argTypes = {
75
+ JustifyGridContent.argTypes = {
76
76
  justifyContent: {
77
77
  options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
78
78
  control: { type: 'select' }
79
79
  }
80
80
  };
81
- export const AlignItems = (args) => {
81
+ export const AlignGridItems = (args) => {
82
82
  return (_jsx(Grid, { container: {
83
83
  cols: '7rem 1fr 3fr',
84
84
  rows: 'repeat(3, 5rem) auto',
85
85
  alignItems: args.alignItems,
86
86
  pad: 2
87
- }, as: StyledContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `alignItems-${index}`))) }, void 0));
87
+ }, as: StyledGridContainer, height: 20, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `alignItems-${index}`))) }, void 0));
88
88
  };
89
- AlignItems.args = {
89
+ AlignGridItems.args = {
90
90
  alignItems: 'stretch'
91
91
  };
92
- AlignItems.argTypes = {
92
+ AlignGridItems.argTypes = {
93
93
  alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
94
94
  };
95
- export const AlignContent = (args) => {
95
+ export const AlignGridContent = (args) => {
96
96
  return (_jsx(Grid, { container: {
97
97
  cols: 'repeat(3, 7rem)',
98
98
  rows: 'repeat(4, 3rem)',
99
99
  alignContent: args.alignContent,
100
100
  pad: 2
101
- }, as: StyledContainer, height: 30, fitContent: true, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `alignContent-${index}`))) }, void 0));
101
+ }, as: StyledGridContainer, height: 30, fitContent: true, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `alignContent-${index}`))) }, void 0));
102
102
  };
103
- AlignContent.args = {
103
+ AlignGridContent.args = {
104
104
  alignContent: 'start'
105
105
  };
106
- AlignContent.argTypes = {
106
+ AlignGridContent.argTypes = {
107
107
  alignContent: {
108
108
  options: ['start', 'end', 'center', 'around', 'between', 'evenly'],
109
109
  control: { type: 'select' }
110
110
  }
111
111
  };
112
+ export const ResponsiveGrid = () => {
113
+ return (_jsx(Grid, { container: { pad: 1, cols: 'repeat(3, 7rem)', rows: 'repeat(4, 3rem)' }, xl: { container: { cols: 'repeat(12, 1fr)', rows: 'repeat(1, 3rem)' } }, lg: { container: { cols: 'repeat(6, 1fr)', rows: 'repeat(2, 3rem)' } }, md: { container: { cols: 'repeat(4, 1fr)', rows: 'repeat(3, 3rem)' } }, sm: { container: { cols: 'repeat(3, 1fr)', rows: 'repeat(4, 3rem)' } }, xs: { container: { cols: 'repeat(2, 1fr)', rows: 'repeat(6, 3rem)' } }, as: StyledGridContainer, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (_jsx(StyledGridItem, { children: _jsxs(Text, { children: ["Item ", index] }, void 0) }, `colRows-${index}`))) }, void 0));
114
+ };
112
115
  //# sourceMappingURL=GridContainer.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridContainer.stories.js","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAsB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EAAE,eAAe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,EAAE,EAAE,EACV,UAAU,kBAET,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACpD,KAAC,UAAU,cACT,MAAC,IAAI,wBAAO,KAAK,YAAQ,IADV,gBAAgB,KAAK,EAAE,CAE3B,CACd,CAAC,WACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,YAAY,EAAE,OAAO;CACtB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;QAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridContainerProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Container',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n colGap?: GridContainerProps['colGap'];\n rowGap?: GridContainerProps['rowGap'];\n pad?: GridContainerProps['pad'];\n justifyItems?: GridContainerProps['justifyItems'];\n justifyContent?: GridContainerProps['justifyContent'];\n alignItems?: GridContainerProps['alignItems'];\n alignContent?: GridContainerProps['alignContent'];\n}\n\nexport const ColumnsAndRows = () => {\n return (\n <Grid\n container={{\n cols: '7rem [line1] 1fr [line2] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRows-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nexport const Areas = () => {\n return (\n <Grid\n container={{\n cols: '5rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n areas: '\"sidebar header header\" \"sidebar . main\" \"sidebar . main\" \"sidebar footer footer\"',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const Template = () => {\n const rowsAndAreas =\n '\"sidebar header header\" 3rem \"sidebar . main\" 3rem \"sidebar . main\" 3rem \"sidebar footer footer\" auto';\n const columns = '5rem 1fr 3fr';\n\n return (\n <Grid\n container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const GapAndPadding: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n colGap: args.colGap,\n rows: 'repeat(3, 3rem) auto',\n rowGap: args.rowGap,\n pad: args.pad\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`colRowGap-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nGapAndPadding.args = {\n pad: 1,\n colGap: 1,\n rowGap: 1\n};\n\nGapAndPadding.argTypes = {\n pad: { control: { type: 'number' } },\n colGap: { control: { type: 'number' } },\n rowGap: { control: { type: 'number' } }\n};\n\nexport const JustifyItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n justifyItems: args.justifyItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyItems.args = {\n justifyItems: 'stretch'\n};\n\nJustifyItems.argTypes = {\n justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const JustifyContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n justifyContent: args.justifyContent,\n pad: 2\n }}\n as={StyledContainer}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`justifyContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nJustifyContent.args = {\n justifyContent: 'start'\n};\n\nJustifyContent.argTypes = {\n justifyContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 5rem) auto',\n alignItems: args.alignItems,\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignItems.args = {\n alignItems: 'stretch'\n};\n\nAlignItems.argTypes = {\n alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n alignContent: args.alignContent,\n pad: 2\n }}\n as={StyledContainer}\n height={30}\n fitContent\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledItem key={`alignContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledItem>\n ))}\n </Grid>\n );\n};\n\nAlignContent.args = {\n alignContent: 'start'\n};\n\nAlignContent.argTypes = {\n alignContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n"]}
1
+ {"version":3,"file":"GridContainer.stories.js","sourceRoot":"","sources":["../../../src/core/Grid/GridContainer.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAsB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAYV,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE;YACT,IAAI,EAAE,sCAAsC;YAC5C,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAAE,CAAC;SACP,EACD,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,EAAE,YAET,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,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CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridContainerProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledGridContainer, StyledGridItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Container',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n colGap?: GridContainerProps['colGap'];\n rowGap?: GridContainerProps['rowGap'];\n pad?: GridContainerProps['pad'];\n justifyItems?: GridContainerProps['justifyItems'];\n justifyContent?: GridContainerProps['justifyContent'];\n alignItems?: GridContainerProps['alignItems'];\n alignContent?: GridContainerProps['alignContent'];\n}\n\nexport const ColumnsAndRows = () => {\n return (\n <Grid\n container={{\n cols: '7rem [line1] 1fr [line2] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledGridContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`colRows-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nexport const Areas = () => {\n return (\n <Grid\n container={{\n cols: '5rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n areas: '\"sidebar header header\" \"sidebar . main\" \"sidebar . main\" \"sidebar footer footer\"',\n pad: 2\n }}\n as={StyledGridContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledGridItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledGridItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledGridItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledGridItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const Template = () => {\n const rowsAndAreas =\n '\"sidebar header header\" 3rem \"sidebar . main\" 3rem \"sidebar . main\" 3rem \"sidebar footer footer\" auto';\n const columns = '5rem 1fr 3fr';\n\n return (\n <Grid\n container={{ template: `${rowsAndAreas} / ${columns}`, pad: 2 }}\n as={StyledGridContainer}\n height={20}\n >\n <Grid item={{ area: 'header' }} as={StyledGridItem}>\n <Text>Header</Text>\n </Grid>\n <Grid item={{ area: 'sidebar' }} as={StyledGridItem}>\n <Text>Side</Text>\n </Grid>\n <Grid item={{ area: 'main' }} as={StyledGridItem}>\n <Text>Main</Text>\n </Grid>\n <Grid item={{ area: 'footer' }} as={StyledGridItem}>\n <Text>Footer</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const GapsAndPadding: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n colGap: args.colGap,\n rows: 'repeat(3, 3rem) auto',\n rowGap: args.rowGap,\n pad: args.pad\n }}\n as={StyledGridContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`colRowGap-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nGapsAndPadding.args = {\n pad: 1,\n colGap: 1,\n rowGap: 1\n};\n\nGapsAndPadding.argTypes = {\n pad: { control: { type: 'number' } },\n colGap: { control: { type: 'number' } },\n rowGap: { control: { type: 'number' } }\n};\n\nexport const JustifyGridItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 3rem) auto',\n justifyItems: args.justifyItems,\n pad: 2\n }}\n as={StyledGridContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`justifyItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nJustifyGridItems.args = {\n justifyItems: 'stretch'\n};\n\nJustifyGridItems.argTypes = {\n justifyItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const JustifyGridContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n justifyContent: args.justifyContent,\n pad: 2\n }}\n as={StyledGridContainer}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`justifyContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nJustifyGridContent.args = {\n justifyContent: 'start'\n};\n\nJustifyGridContent.argTypes = {\n justifyContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const AlignGridItems: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: '7rem 1fr 3fr',\n rows: 'repeat(3, 5rem) auto',\n alignItems: args.alignItems,\n pad: 2\n }}\n as={StyledGridContainer}\n height={20}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`alignItems-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nAlignGridItems.args = {\n alignItems: 'stretch'\n};\n\nAlignGridItems.argTypes = {\n alignItems: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignGridContent: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{\n cols: 'repeat(3, 7rem)',\n rows: 'repeat(4, 3rem)',\n alignContent: args.alignContent,\n pad: 2\n }}\n as={StyledGridContainer}\n height={30}\n fitContent\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`alignContent-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n\nAlignGridContent.args = {\n alignContent: 'start'\n};\n\nAlignGridContent.argTypes = {\n alignContent: {\n options: ['start', 'end', 'center', 'around', 'between', 'evenly'],\n control: { type: 'select' }\n }\n};\n\nexport const ResponsiveGrid = () => {\n return (\n <Grid\n container={{ pad: 1, cols: 'repeat(3, 7rem)', rows: 'repeat(4, 3rem)' }}\n xl={{ container: { cols: 'repeat(12, 1fr)', rows: 'repeat(1, 3rem)' } }}\n lg={{ container: { cols: 'repeat(6, 1fr)', rows: 'repeat(2, 3rem)' } }}\n md={{ container: { cols: 'repeat(4, 1fr)', rows: 'repeat(3, 3rem)' } }}\n sm={{ container: { cols: 'repeat(3, 1fr)', rows: 'repeat(4, 3rem)' } }}\n xs={{ container: { cols: 'repeat(2, 1fr)', rows: 'repeat(6, 3rem)' } }}\n as={StyledGridContainer}\n >\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => (\n <StyledGridItem key={`colRows-${index}`}>\n <Text>Item {index}</Text>\n </StyledGridItem>\n ))}\n </Grid>\n );\n};\n"]}
@@ -8,6 +8,6 @@ interface GridStoryProps {
8
8
  alignSelf?: GridItemProps['alignSelf'];
9
9
  }
10
10
  export declare const StartAndEnd: () => JSX.Element;
11
- export declare const JustifySelf: Story<GridStoryProps>;
12
- export declare const AlignSelf: Story<GridStoryProps>;
11
+ export declare const JustifyGridSelf: Story<GridStoryProps>;
12
+ export declare const AlignGridSelf: Story<GridStoryProps>;
13
13
  //# sourceMappingURL=GridItem.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,aAAa,EAAQ,MAAM,yBAAyB,CAAC;;AAIpE,wBAMU;AAEV,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,mBAkCvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,cAAc,CAc7C,CAAC;AAUF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,cAAc,CAc3C,CAAC"}
1
+ {"version":3,"file":"GridItem.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAQ,aAAa,EAAQ,MAAM,yBAAyB,CAAC;;AAIpE,wBAMU;AAEV,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,mBAkCvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,cAAc,CAcjD,CAAC;AAUF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,cAAc,CAmB/C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Grid, Text } from '@pega/cosmos-react-core';
3
- import { StyledContainer, StyledItem } from './Grid.styles';
3
+ import { StyledGridContainer, StyledGridItem } from './Grid.styles';
4
4
  export default {
5
5
  title: 'Core/Grid/Item',
6
6
  component: Grid,
@@ -13,24 +13,24 @@ export const StartAndEnd = () => {
13
13
  cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',
14
14
  rows: 'repeat(3, 3rem) auto',
15
15
  pad: 2
16
- }, as: StyledContainer, height: 20, children: [_jsx(Grid, { item: { colStart: 'line0', colEnd: 'col3-start' }, as: StyledItem, children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(StyledItem, { children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0), _jsx(Grid, { item: { colStart: 'line1', colEnd: 'line3' }, as: StyledItem, children: _jsx(Text, { children: "Item 4" }, void 0) }, void 0), _jsx(Grid, { item: { rowStart: '3', rowEnd: '5' }, as: StyledItem, children: _jsx(Text, { children: "Item 5" }, void 0) }, void 0), _jsx(Grid, { item: { colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }, as: StyledItem, children: _jsx(Text, { children: "Item 6" }, void 0) }, void 0)] }, void 0));
16
+ }, as: StyledGridContainer, height: 20, children: [_jsx(Grid, { item: { colStart: 'line0', colEnd: 'col3-start' }, as: StyledGridItem, children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0), _jsx(Grid, { item: { colStart: 'line1', colEnd: 'line3' }, as: StyledGridItem, children: _jsx(Text, { children: "Item 4" }, void 0) }, void 0), _jsx(Grid, { item: { rowStart: '3', rowEnd: '5' }, as: StyledGridItem, children: _jsx(Text, { children: "Item 5" }, void 0) }, void 0), _jsx(Grid, { item: { colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }, as: StyledGridItem, children: _jsx(Text, { children: "Item 6" }, void 0) }, void 0)] }, void 0));
17
17
  };
18
- export const JustifySelf = (args) => {
19
- return (_jsxs(Grid, { container: { cols: '7rem 1fr 3fr', pad: 2 }, as: StyledContainer, children: [_jsx(StyledItem, { children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(Grid, { item: { justifySelf: args.justifySelf }, as: StyledItem, editable: true, children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0)] }, void 0));
18
+ export const JustifyGridSelf = (args) => {
19
+ return (_jsxs(Grid, { container: { cols: '7rem 1fr 3fr', pad: 2 }, as: StyledGridContainer, children: [_jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(Grid, { item: { justifySelf: args.justifySelf }, as: StyledGridItem, editable: true, children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0)] }, void 0));
20
20
  };
21
- JustifySelf.args = {
21
+ JustifyGridSelf.args = {
22
22
  justifySelf: 'stretch'
23
23
  };
24
- JustifySelf.argTypes = {
24
+ JustifyGridSelf.argTypes = {
25
25
  justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
26
26
  };
27
- export const AlignSelf = (args) => {
28
- return (_jsxs(Grid, { container: { cols: '7rem 1fr 3fr', pad: 2 }, as: StyledContainer, height: 10, fitContent: true, children: [_jsx(StyledItem, { children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(Grid, { item: { alignSelf: args.alignSelf }, as: StyledItem, editable: true, children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0)] }, void 0));
27
+ export const AlignGridSelf = (args) => {
28
+ return (_jsxs(Grid, { container: { cols: '7rem 1fr 3fr', pad: 2 }, as: StyledGridContainer, height: 10, fitContent: true, children: [_jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 1" }, void 0) }, void 0), _jsx(Grid, { item: { alignSelf: args.alignSelf }, as: StyledGridItem, editable: true, children: _jsx(Text, { children: "Item 2" }, void 0) }, void 0), _jsx(StyledGridItem, { children: _jsx(Text, { children: "Item 3" }, void 0) }, void 0)] }, void 0));
29
29
  };
30
- AlignSelf.args = {
30
+ AlignGridSelf.args = {
31
31
  alignSelf: 'stretch'
32
32
  };
33
- AlignSelf.argTypes = {
33
+ AlignGridSelf.argTypes = {
34
34
  alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }
35
35
  };
36
36
  //# sourceMappingURL=GridItem.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridItem.stories.js","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAiB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAOV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE;YACT,IAAI,EAAE,4DAA4D;YAClE,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAAE,CAAC;SACP,EACD,EAAE,EAAE,eAAe,EACnB,MAAM,EAAE,EAAE,aAEV,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,UAAU,YACrE,KAAC,IAAI,iCAAc,WACd,EACP,KAAC,UAAU,cACT,KAAC,IAAI,iCAAc,WACR,EACb,KAAC,UAAU,cACT,KAAC,IAAI,iCAAc,WACR,EACb,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,UAAU,YAChE,KAAC,IAAI,iCAAc,WACd,EACP,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,UAAU,YACxD,KAAC,IAAI,iCAAc,WACd,EACP,KAAC,IAAI,IACH,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE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kBACjE,KAAC,IAAI,iCAAc,WACd,EACP,KAAC,UAAU,cACT,KAAC,IAAI,iCAAc,WACR,YACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC3F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridItemProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledContainer, StyledItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Item',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n justifySelf?: GridItemProps['justifySelf'];\n alignSelf?: GridItemProps['alignSelf'];\n}\n\nexport const StartAndEnd = () => {\n return (\n <Grid\n container={{\n cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledContainer}\n height={20}\n >\n <Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledItem}>\n <Text>Item 1</Text>\n </Grid>\n <StyledItem>\n <Text>Item 2</Text>\n </StyledItem>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n <Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledItem}>\n <Text>Item 4</Text>\n </Grid>\n <Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledItem}>\n <Text>Item 5</Text>\n </Grid>\n <Grid\n item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }}\n as={StyledItem}\n >\n <Text>Item 6</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const JustifySelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer}>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ justifySelf: args.justifySelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nJustifySelf.args = {\n justifySelf: 'stretch'\n};\n\nJustifySelf.argTypes = {\n justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignSelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledContainer} height={10} fitContent>\n <StyledItem>\n <Text>Item 1</Text>\n </StyledItem>\n <Grid item={{ alignSelf: args.alignSelf }} as={StyledItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledItem>\n <Text>Item 3</Text>\n </StyledItem>\n </Grid>\n );\n};\n\nAlignSelf.args = {\n alignSelf: 'stretch'\n};\n\nAlignSelf.argTypes = {\n alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n"]}
1
+ {"version":3,"file":"GridItem.stories.js","sourceRoot":"","sources":["../../../src/core/Grid/GridItem.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAiB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpE,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAOV,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE;YACT,IAAI,EAAE,4DAA4D;YAClE,IAAI,EAAE,sBAAsB;YAC5B,GAAG,EAA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AAC,IAAI,iCAAc,WACJ,YACZ,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,IAAI,GAAG;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,eAAe,CAAC,QAAQ,GAAG;IACzB,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA0B,CAAC,IAAoB,EAAE,EAAE;IAC3E,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,EAC3C,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,EAAE,EACV,UAAU,mBAEV,KAAC,cAAc,cACb,KAAC,IAAI,iCAAc,WACJ,EACjB,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,QAAQ,kBACrE,KAAC,IAAI,iCAAc,WACd,EACP,KAAC,cAAc,cACb,KAAC,IAAI,iCAAc,WACJ,YACZ,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC3F,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Grid, GridItemProps, Text } from '@pega/cosmos-react-core';\n\nimport { StyledGridContainer, StyledGridItem } from './Grid.styles';\n\nexport default {\n title: 'Core/Grid/Item',\n component: Grid,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ninterface GridStoryProps {\n justifySelf?: GridItemProps['justifySelf'];\n alignSelf?: GridItemProps['alignSelf'];\n}\n\nexport const StartAndEnd = () => {\n return (\n <Grid\n container={{\n cols: '[line0] 7rem [line1] 1fr [col2-end col3-start] 3fr [line3]',\n rows: 'repeat(3, 3rem) auto',\n pad: 2\n }}\n as={StyledGridContainer}\n height={20}\n >\n <Grid item={{ colStart: 'line0', colEnd: 'col3-start' }} as={StyledGridItem}>\n <Text>Item 1</Text>\n </Grid>\n <StyledGridItem>\n <Text>Item 2</Text>\n </StyledGridItem>\n <StyledGridItem>\n <Text>Item 3</Text>\n </StyledGridItem>\n <Grid item={{ colStart: 'line1', colEnd: 'line3' }} as={StyledGridItem}>\n <Text>Item 4</Text>\n </Grid>\n <Grid item={{ rowStart: '3', rowEnd: '5' }} as={StyledGridItem}>\n <Text>Item 5</Text>\n </Grid>\n <Grid\n item={{ colStart: '2', colEnd: 'span line3', rowStart: '3', rowEnd: 'span 2' }}\n as={StyledGridItem}\n >\n <Text>Item 6</Text>\n </Grid>\n </Grid>\n );\n};\n\nexport const JustifyGridSelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid container={{ cols: '7rem 1fr 3fr', pad: 2 }} as={StyledGridContainer}>\n <StyledGridItem>\n <Text>Item 1</Text>\n </StyledGridItem>\n <Grid item={{ justifySelf: args.justifySelf }} as={StyledGridItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledGridItem>\n <Text>Item 3</Text>\n </StyledGridItem>\n </Grid>\n );\n};\n\nJustifyGridSelf.args = {\n justifySelf: 'stretch'\n};\n\nJustifyGridSelf.argTypes = {\n justifySelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n\nexport const AlignGridSelf: Story<GridStoryProps> = (args: GridStoryProps) => {\n return (\n <Grid\n container={{ cols: '7rem 1fr 3fr', pad: 2 }}\n as={StyledGridContainer}\n height={10}\n fitContent\n >\n <StyledGridItem>\n <Text>Item 1</Text>\n </StyledGridItem>\n <Grid item={{ alignSelf: args.alignSelf }} as={StyledGridItem} editable>\n <Text>Item 2</Text>\n </Grid>\n <StyledGridItem>\n <Text>Item 3</Text>\n </StyledGridItem>\n </Grid>\n );\n};\n\nAlignGridSelf.args = {\n alignSelf: 'stretch'\n};\n\nAlignGridSelf.argTypes = {\n alignSelf: { options: ['stretch', 'start', 'center', 'end'], control: { type: 'select' } }\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ export declare const createCustomIcon: (theme: DefaultTheme) => void;
3
+ //# sourceMappingURL=Icon.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.mocks.d.ts","sourceRoot":"","sources":["../../../src/core/Icon/Icon.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,eAAO,MAAM,gBAAgB,UAAW,YAAY,SAWnD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { registerIcon } from '@pega/cosmos-react-core';
3
+ export const createCustomIcon = (theme) => {
4
+ registerIcon({
5
+ name: 'custom-pega',
6
+ Component: () => (_jsx("path", { fill: theme.base.palette.interactive, d: 'M12.9734375,9.91015625 C12.9734375,9.91015625 12.9734375,9.91015625 12.9734375,9.91015625 C13.5960937,9.2875 14.3625,9 15.3203125,9 C15.3203125,9 15.3203125,9 15.3203125,9 C16.2304688,9 16.9484375,9.2390625 17.5234375,9.76640625 C17.5234375,9.76640625 17.5234375,9.76640625 17.5234375,9.76640625 C17.5234375,9.76640625 16.8046875,10.7242188 16.8046875,10.7242188 C16.6132812,10.5328125 16.421875,10.3890625 16.1820313,10.3414063 C16.1820313,10.3414063 16.1820313,10.3414063 16.1820313,10.3414063 C15.9429687,10.2453125 15.703125,10.1976563 15.3679687,10.1976563 C15.3679687,10.1976563 15.3679687,10.1976563 15.3679687,10.1976563 C14.7929687,10.1976563 14.3140625,10.3890625 13.93125,10.7726563 C13.5484375,11.15625 13.35625,11.634375 13.35625,12.209375 C13.35625,12.209375 13.35625,12.209375 13.35625,12.209375 C13.35625,12.8320313 13.5476562,13.3109375 13.93125,13.69375 C13.93125,13.69375 13.93125,13.69375 13.93125,13.69375 C14.3625,14.0289063 14.7929688,14.2203125 15.271875,14.2203125 C15.271875,14.2203125 15.271875,14.2203125 15.271875,14.2203125 C15.7984375,14.2203125 16.2296875,14.1242188 16.5648438,13.9328125 C16.5648438,13.9328125 16.5648438,13.9328125 16.5648438,13.9328125 C16.5648438,13.9328125 16.5648438,12.7835938 16.5648438,12.7835938 C16.5648438,12.7835938 15.2242188,12.7835938 15.2242188,12.7835938 C15.2242188,12.7835938 15.2242188,11.6820313 15.2242188,11.6820313 C15.2242188,11.6820313 17.8585938,11.6820313 17.8585938,11.6820313 C17.8585938,11.6820313 17.8585938,14.4601563 17.8585938,14.4601563 C17.8585938,14.4601563 17.8109375,14.5078125 17.8109375,14.5078125 C17.2359375,15.1304688 16.421875,15.465625 15.3203125,15.465625 C15.3203125,15.465625 15.3203125,15.465625 15.3203125,15.465625 C14.4101563,15.465625 13.64375,15.178125 12.9734375,14.5554688 C12.9734375,14.5554688 12.9734375,14.5554688 12.9734375,14.5554688 C12.3507812,13.9328125 12.015625,13.11875 12.015625,12.2085938 C12.015625,12.2085938 12.015625,12.2085938 12.015625,12.2085938 C12.015625,11.2984375 12.3507812,10.5320313 12.9734375,9.909375 L12.9734375,9.91015625 Z M1,9.23984375 C1,9.23984375 3.39453125,9.23984375 3.39453125,9.23984375 C4.11328125,9.23984375 4.6875,9.43125 5.11875,9.81484375 C5.55,10.1984375 5.74140625,10.725 5.74140625,11.3476562 C5.74140625,11.3476562 5.74140625,11.3476562 5.74140625,11.3476562 C5.74140625,12.0179687 5.50234375,12.5453125 5.07109375,12.8804688 C4.5921875,13.2632812 4.0171875,13.4554687 3.29921875,13.4554687 C3.29921875,13.4554687 3.29921875,13.4554687 3.29921875,13.4554687 C3.29921875,13.4554687 2.29375,13.4554687 2.29375,13.4554687 C2.29375,13.4554687 2.29375,15.275 2.29375,15.275 C2.29375,15.275 1.00078125,15.275 1.00078125,15.275 C1.00078125,15.275 1.00078125,9.240625 1.00078125,9.240625 L1,9.23984375 Z M10.675,12.83125 C10.675,12.83125 8.040625,12.83125 8.040625,12.83125 C8.040625,12.83125 8.040625,14.0765625 8.040625,14.0765625 C8.040625,14.0765625 11.2976563,14.0765625 11.2976563,14.0765625 C11.2976563,14.0765625 11.2976563,15.2742188 11.2976563,15.2742188 C11.2976563,15.2742188 6.7,15.2742188 6.7,15.2742188 C6.7,15.2742188 6.7,9.23984375 6.7,9.23984375 C6.7,9.23984375 11.2976563,9.23984375 11.2976563,9.23984375 C11.2976563,9.23984375 11.2976563,10.4375 11.2976563,10.4375 C11.2976563,10.4375 8.040625,10.4375 8.040625,10.4375 C8.040625,10.4375 8.040625,11.6828125 8.040625,11.6828125 C8.040625,11.6828125 10.675,11.6828125 10.675,11.6828125 C10.675,11.6828125 10.675,12.8320312 10.675,12.8320312 L10.675,12.83125 Z M18.48125,15.2742187 C18.48125,15.2742187 21.0671875,9.23984375 21.0671875,9.23984375 C21.0671875,9.23984375 22.2648438,9.23984375 22.2648438,9.23984375 C22.2648438,9.23984375 24.8507813,15.2742187 24.8507813,15.2742187 C24.8507813,15.2742187 23.4617188,15.2742187 23.4617188,15.2742187 C23.4617188,15.2742187 22.8867188,13.9335937 22.8867188,13.9335937 C22.8867188,13.9335937 20.3960938,13.9335937 20.3960938,13.9335937 C20.3960938,13.9335937 19.8210938,15.2742187 19.8210938,15.2742187 C19.8210938,15.2742187 18.4804688,15.2742187 18.4804688,15.2742187 L18.48125,15.2742187 Z M23.8453125,9.23984375 C23.8453125,9.23984375 23.8453125,9.23984375 23.8453125,9.23984375 C24.1804687,9.23984375 24.3242188,9.38359375 24.3242188,9.67109375 C24.3242188,9.67109375 24.3242188,9.67109375 24.3242188,9.67109375 C24.3242188,10.00625 24.1804687,10.15 23.8453125,10.15 C23.8453125,10.15 23.8453125,10.15 23.8453125,10.15 C23.5578125,10.15 23.4140625,10.00625 23.4140625,9.67109375 C23.4140625,9.67109375 23.4140625,9.67109375 23.4140625,9.67109375 C23.4140625,9.38359375 23.5578125,9.23984375 23.8453125,9.23984375 Z M24.228125,9.67109375 C24.228125,9.67109375 24.228125,9.67109375 24.228125,9.67109375 C24.228125,9.43203125 24.084375,9.28828125 23.8453125,9.28828125 C23.60625,9.28828125 23.4625,9.43203125 23.4625,9.67109375 C23.4625,9.67109375 23.4625,9.67109375 23.4625,9.67109375 C23.4625,9.95859375 23.60625,10.1023437 23.8453125,10.1023437 C24.084375,10.1023437 24.228125,9.95859375 24.228125,9.67109375 Z M23.796875,9.76640625 C23.796875,9.76640625 23.796875,9.9578125 23.796875,9.9578125 C23.796875,9.9578125 23.7007812,9.9578125 23.7007812,9.9578125 C23.7007812,9.9578125 23.7007812,9.43125 23.7007812,9.43125 C23.7007812,9.43125 23.8445312,9.43125 23.8445312,9.43125 C23.8445312,9.43125 23.9882812,9.43125 23.9882812,9.43125 C24.0359375,9.47890625 24.0359375,9.52734375 24.0359375,9.575 C24.0359375,9.575 24.0359375,9.575 24.0359375,9.575 C24.0359375,9.62265625 24.0359375,9.62265625 23.9882812,9.67109375 C23.9882812,9.67109375 23.9882812,9.67109375 23.9882812,9.67109375 C23.9882812,9.67109375 23.940625,9.71875 23.940625,9.71875 C23.940625,9.71875 24.084375,9.9578125 24.084375,9.9578125 C24.084375,9.9578125 23.940625,9.9578125 23.940625,9.9578125 C23.940625,9.9578125 23.8445312,9.76640625 23.8445312,9.76640625 C23.8445312,9.76640625 23.796875,9.76640625 23.796875,9.76640625 L23.796875,9.76640625 Z M23.8453125,9.47890625 C23.8453125,9.47890625 23.7976562,9.47890625 23.7976562,9.47890625 C23.7976562,9.47890625 23.7976562,9.6703125 23.7976562,9.6703125 C23.7976562,9.6703125 23.8453125,9.6703125 23.8453125,9.6703125 C23.8929687,9.6703125 23.8929687,9.6703125 23.9414062,9.62265625 C23.9414062,9.62265625 23.9414062,9.62265625 23.9414062,9.62265625 C23.9414062,9.62265625 23.9414062,9.575 23.9414062,9.575 C23.9414062,9.575 23.9414062,9.52734375 23.9414062,9.52734375 C23.89375,9.4796875 23.89375,9.4796875 23.8453125,9.4796875 C23.8453125,9.4796875 23.8453125,9.4796875 23.8453125,9.4796875 L23.8453125,9.47890625 Z M3.346875,12.2570312 C4.065625,12.2570312 4.40078125,11.9695312 4.40078125,11.346875 C4.40078125,10.7242187 4.01796875,10.4367187 3.29921875,10.4367187 C3.29921875,10.4367187 3.29921875,10.4367187 3.29921875,10.4367187 C3.29921875,10.4367187 2.29375,10.4367187 2.29375,10.4367187 C2.29375,10.4367187 2.29375,12.25625 2.29375,12.25625 C2.29375,12.25625 3.34765625,12.25625 3.34765625,12.25625 L3.346875,12.2570312 Z M21.6421875,10.8203125 C21.6421875,10.8203125 20.828125,12.7835937 20.828125,12.7835937 C20.828125,12.7835937 22.45625,12.7835937 22.45625,12.7835937 C22.45625,12.7835937 21.6421875,10.8203125 21.6421875,10.8203125 L21.6421875,10.8203125 Z' }, void 0)),
7
+ viewBox: '0 0 25 25'
8
+ });
9
+ };
10
+ //# sourceMappingURL=Icon.mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.mocks.js","sourceRoot":"","sources":["../../../src/core/Icon/Icon.mocks.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACtD,YAAY,CAAC;QACX,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,GAAG,EAAE,CAAC,CACf,eACE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EACpC,CAAC,EAAC,s/NAAs/N,WACx/N,CACH;QACD,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { DefaultTheme } from 'styled-components';\n\nimport { registerIcon } from '@pega/cosmos-react-core';\n\nexport const createCustomIcon = (theme: DefaultTheme) => {\n registerIcon({\n name: 'custom-pega',\n Component: () => (\n <path\n fill={theme.base.palette.interactive}\n d='M12.9734375,9.91015625 C12.9734375,9.91015625 12.9734375,9.91015625 12.9734375,9.91015625 C13.5960937,9.2875 14.3625,9 15.3203125,9 C15.3203125,9 15.3203125,9 15.3203125,9 C16.2304688,9 16.9484375,9.2390625 17.5234375,9.76640625 C17.5234375,9.76640625 17.5234375,9.76640625 17.5234375,9.76640625 C17.5234375,9.76640625 16.8046875,10.7242188 16.8046875,10.7242188 C16.6132812,10.5328125 16.421875,10.3890625 16.1820313,10.3414063 C16.1820313,10.3414063 16.1820313,10.3414063 16.1820313,10.3414063 C15.9429687,10.2453125 15.703125,10.1976563 15.3679687,10.1976563 C15.3679687,10.1976563 15.3679687,10.1976563 15.3679687,10.1976563 C14.7929687,10.1976563 14.3140625,10.3890625 13.93125,10.7726563 C13.5484375,11.15625 13.35625,11.634375 13.35625,12.209375 C13.35625,12.209375 13.35625,12.209375 13.35625,12.209375 C13.35625,12.8320313 13.5476562,13.3109375 13.93125,13.69375 C13.93125,13.69375 13.93125,13.69375 13.93125,13.69375 C14.3625,14.0289063 14.7929688,14.2203125 15.271875,14.2203125 C15.271875,14.2203125 15.271875,14.2203125 15.271875,14.2203125 C15.7984375,14.2203125 16.2296875,14.1242188 16.5648438,13.9328125 C16.5648438,13.9328125 16.5648438,13.9328125 16.5648438,13.9328125 C16.5648438,13.9328125 16.5648438,12.7835938 16.5648438,12.7835938 C16.5648438,12.7835938 15.2242188,12.7835938 15.2242188,12.7835938 C15.2242188,12.7835938 15.2242188,11.6820313 15.2242188,11.6820313 C15.2242188,11.6820313 17.8585938,11.6820313 17.8585938,11.6820313 C17.8585938,11.6820313 17.8585938,14.4601563 17.8585938,14.4601563 C17.8585938,14.4601563 17.8109375,14.5078125 17.8109375,14.5078125 C17.2359375,15.1304688 16.421875,15.465625 15.3203125,15.465625 C15.3203125,15.465625 15.3203125,15.465625 15.3203125,15.465625 C14.4101563,15.465625 13.64375,15.178125 12.9734375,14.5554688 C12.9734375,14.5554688 12.9734375,14.5554688 12.9734375,14.5554688 C12.3507812,13.9328125 12.015625,13.11875 12.015625,12.2085938 C12.015625,12.2085938 12.015625,12.2085938 12.015625,12.2085938 C12.015625,11.2984375 12.3507812,10.5320313 12.9734375,9.909375 L12.9734375,9.91015625 Z M1,9.23984375 C1,9.23984375 3.39453125,9.23984375 3.39453125,9.23984375 C4.11328125,9.23984375 4.6875,9.43125 5.11875,9.81484375 C5.55,10.1984375 5.74140625,10.725 5.74140625,11.3476562 C5.74140625,11.3476562 5.74140625,11.3476562 5.74140625,11.3476562 C5.74140625,12.0179687 5.50234375,12.5453125 5.07109375,12.8804688 C4.5921875,13.2632812 4.0171875,13.4554687 3.29921875,13.4554687 C3.29921875,13.4554687 3.29921875,13.4554687 3.29921875,13.4554687 C3.29921875,13.4554687 2.29375,13.4554687 2.29375,13.4554687 C2.29375,13.4554687 2.29375,15.275 2.29375,15.275 C2.29375,15.275 1.00078125,15.275 1.00078125,15.275 C1.00078125,15.275 1.00078125,9.240625 1.00078125,9.240625 L1,9.23984375 Z M10.675,12.83125 C10.675,12.83125 8.040625,12.83125 8.040625,12.83125 C8.040625,12.83125 8.040625,14.0765625 8.040625,14.0765625 C8.040625,14.0765625 11.2976563,14.0765625 11.2976563,14.0765625 C11.2976563,14.0765625 11.2976563,15.2742188 11.2976563,15.2742188 C11.2976563,15.2742188 6.7,15.2742188 6.7,15.2742188 C6.7,15.2742188 6.7,9.23984375 6.7,9.23984375 C6.7,9.23984375 11.2976563,9.23984375 11.2976563,9.23984375 C11.2976563,9.23984375 11.2976563,10.4375 11.2976563,10.4375 C11.2976563,10.4375 8.040625,10.4375 8.040625,10.4375 C8.040625,10.4375 8.040625,11.6828125 8.040625,11.6828125 C8.040625,11.6828125 10.675,11.6828125 10.675,11.6828125 C10.675,11.6828125 10.675,12.8320312 10.675,12.8320312 L10.675,12.83125 Z M18.48125,15.2742187 C18.48125,15.2742187 21.0671875,9.23984375 21.0671875,9.23984375 C21.0671875,9.23984375 22.2648438,9.23984375 22.2648438,9.23984375 C22.2648438,9.23984375 24.8507813,15.2742187 24.8507813,15.2742187 C24.8507813,15.2742187 23.4617188,15.2742187 23.4617188,15.2742187 C23.4617188,15.2742187 22.8867188,13.9335937 22.8867188,13.9335937 C22.8867188,13.9335937 20.3960938,13.9335937 20.3960938,13.9335937 C20.3960938,13.9335937 19.8210938,15.2742187 19.8210938,15.2742187 C19.8210938,15.2742187 18.4804688,15.2742187 18.4804688,15.2742187 L18.48125,15.2742187 Z M23.8453125,9.23984375 C23.8453125,9.23984375 23.8453125,9.23984375 23.8453125,9.23984375 C24.1804687,9.23984375 24.3242188,9.38359375 24.3242188,9.67109375 C24.3242188,9.67109375 24.3242188,9.67109375 24.3242188,9.67109375 C24.3242188,10.00625 24.1804687,10.15 23.8453125,10.15 C23.8453125,10.15 23.8453125,10.15 23.8453125,10.15 C23.5578125,10.15 23.4140625,10.00625 23.4140625,9.67109375 C23.4140625,9.67109375 23.4140625,9.67109375 23.4140625,9.67109375 C23.4140625,9.38359375 23.5578125,9.23984375 23.8453125,9.23984375 Z M24.228125,9.67109375 C24.228125,9.67109375 24.228125,9.67109375 24.228125,9.67109375 C24.228125,9.43203125 24.084375,9.28828125 23.8453125,9.28828125 C23.60625,9.28828125 23.4625,9.43203125 23.4625,9.67109375 C23.4625,9.67109375 23.4625,9.67109375 23.4625,9.67109375 C23.4625,9.95859375 23.60625,10.1023437 23.8453125,10.1023437 C24.084375,10.1023437 24.228125,9.95859375 24.228125,9.67109375 Z M23.796875,9.76640625 C23.796875,9.76640625 23.796875,9.9578125 23.796875,9.9578125 C23.796875,9.9578125 23.7007812,9.9578125 23.7007812,9.9578125 C23.7007812,9.9578125 23.7007812,9.43125 23.7007812,9.43125 C23.7007812,9.43125 23.8445312,9.43125 23.8445312,9.43125 C23.8445312,9.43125 23.9882812,9.43125 23.9882812,9.43125 C24.0359375,9.47890625 24.0359375,9.52734375 24.0359375,9.575 C24.0359375,9.575 24.0359375,9.575 24.0359375,9.575 C24.0359375,9.62265625 24.0359375,9.62265625 23.9882812,9.67109375 C23.9882812,9.67109375 23.9882812,9.67109375 23.9882812,9.67109375 C23.9882812,9.67109375 23.940625,9.71875 23.940625,9.71875 C23.940625,9.71875 24.084375,9.9578125 24.084375,9.9578125 C24.084375,9.9578125 23.940625,9.9578125 23.940625,9.9578125 C23.940625,9.9578125 23.8445312,9.76640625 23.8445312,9.76640625 C23.8445312,9.76640625 23.796875,9.76640625 23.796875,9.76640625 L23.796875,9.76640625 Z M23.8453125,9.47890625 C23.8453125,9.47890625 23.7976562,9.47890625 23.7976562,9.47890625 C23.7976562,9.47890625 23.7976562,9.6703125 23.7976562,9.6703125 C23.7976562,9.6703125 23.8453125,9.6703125 23.8453125,9.6703125 C23.8929687,9.6703125 23.8929687,9.6703125 23.9414062,9.62265625 C23.9414062,9.62265625 23.9414062,9.62265625 23.9414062,9.62265625 C23.9414062,9.62265625 23.9414062,9.575 23.9414062,9.575 C23.9414062,9.575 23.9414062,9.52734375 23.9414062,9.52734375 C23.89375,9.4796875 23.89375,9.4796875 23.8453125,9.4796875 C23.8453125,9.4796875 23.8453125,9.4796875 23.8453125,9.4796875 L23.8453125,9.47890625 Z M3.346875,12.2570312 C4.065625,12.2570312 4.40078125,11.9695312 4.40078125,11.346875 C4.40078125,10.7242187 4.01796875,10.4367187 3.29921875,10.4367187 C3.29921875,10.4367187 3.29921875,10.4367187 3.29921875,10.4367187 C3.29921875,10.4367187 2.29375,10.4367187 2.29375,10.4367187 C2.29375,10.4367187 2.29375,12.25625 2.29375,12.25625 C2.29375,12.25625 3.34765625,12.25625 3.34765625,12.25625 L3.346875,12.2570312 Z M21.6421875,10.8203125 C21.6421875,10.8203125 20.828125,12.7835937 20.828125,12.7835937 C20.828125,12.7835937 22.45625,12.7835937 22.45625,12.7835937 C22.45625,12.7835937 21.6421875,10.8203125 21.6421875,10.8203125 L21.6421875,10.8203125 Z'\n />\n ),\n viewBox: '0 0 25 25'\n });\n};\n"]}
@@ -3,6 +3,7 @@ import { Meta } from '@storybook/react';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const StaticIcon: () => JSX.Element;
6
+ export declare const CustomIcon: () => JSX.Element;
6
7
  export declare const DynamicIcon: () => JSX.Element;
7
8
  export declare const IconList: () => JSX.Element;
8
9
  //# sourceMappingURL=Icon.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Icon/Icon.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAoBxC,wBAGU;AAIV,eAAO,MAAM,UAAU,mBAItB,CAAC;AAEF,eAAO,MAAM,WAAW,mBAEvB,CAAC;AAkCF,eAAO,MAAM,QAAQ,mBAoEpB,CAAC"}
1
+ {"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Icon/Icon.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAuBxC,wBAGU;AAIV,eAAO,MAAM,UAAU,mBAItB,CAAC;AAEF,eAAO,MAAM,UAAU,mBAQtB,CAAC;AAEF,eAAO,MAAM,WAAW,mBAEvB,CAAC;AAkCF,eAAO,MAAM,QAAQ,mBAoEpB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState, useCallback, useRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { defaultThemeProp, EmptyState, StyledEmptyState, Flex, Icon, icons, registerIcon, Progress, SearchInput, Text, useItemIntersection } from '@pega/cosmos-react-core';
4
+ import { defaultThemeProp, EmptyState, StyledEmptyState, Flex, Icon, icons, registerIcon, Progress, SearchInput, Text, useItemIntersection, useTheme } from '@pega/cosmos-react-core';
5
5
  import * as pegasusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/pegasus.icon';
6
+ import { createCustomIcon } from './Icon.mocks';
6
7
  export default {
7
8
  title: 'Core/Icon',
8
9
  component: Icon
@@ -11,6 +12,11 @@ registerIcon(pegasusIcon);
11
12
  export const StaticIcon = () => {
12
13
  return (_jsx(Icon, { style: { height: '5rem', width: '5rem' }, name: 'pegasus', "aria-label": 'Informative label' }, void 0));
13
14
  };
15
+ export const CustomIcon = () => {
16
+ const theme = useTheme();
17
+ createCustomIcon(theme);
18
+ return (_jsx(Icon, { style: { height: '5rem', width: '5rem' }, name: 'custom-pega', "aria-label": 'Custom icon' }, void 0));
19
+ };
14
20
  export const DynamicIcon = () => {
15
21
  return _jsx(Icon, { style: { height: '5rem', width: '5rem' }, name: 'pega' }, void 0);
16
22
  };