@pega/cosmos-react-work 5.0.0-dev.4.8 → 5.0.0-dev.5.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 (333) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +23 -0
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -0
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +93 -0
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -0
  5. package/lib/components/AppAnnouncement/index.d.ts +3 -0
  6. package/lib/components/AppAnnouncement/index.d.ts.map +1 -0
  7. package/lib/components/AppAnnouncement/index.js +2 -0
  8. package/lib/components/AppAnnouncement/index.js.map +1 -0
  9. package/lib/components/Article/Article.d.ts +60 -0
  10. package/lib/components/Article/Article.d.ts.map +1 -0
  11. package/lib/components/Article/Article.js +87 -0
  12. package/lib/components/Article/Article.js.map +1 -0
  13. package/lib/components/Article/ArticleFooter.d.ts +38 -0
  14. package/lib/components/Article/ArticleFooter.d.ts.map +1 -0
  15. package/lib/components/Article/ArticleFooter.js +58 -0
  16. package/lib/components/Article/ArticleFooter.js.map +1 -0
  17. package/lib/components/Article/ArticleMeta.d.ts +13 -0
  18. package/lib/components/Article/ArticleMeta.d.ts.map +1 -0
  19. package/lib/components/Article/ArticleMeta.js +27 -0
  20. package/lib/components/Article/ArticleMeta.js.map +1 -0
  21. package/lib/components/Article/ArticleRating.d.ts +13 -0
  22. package/lib/components/Article/ArticleRating.d.ts.map +1 -0
  23. package/lib/components/Article/ArticleRating.js +43 -0
  24. package/lib/components/Article/ArticleRating.js.map +1 -0
  25. package/lib/components/Article/index.d.ts +7 -0
  26. package/lib/components/Article/index.d.ts.map +1 -0
  27. package/lib/components/Article/index.js +4 -0
  28. package/lib/components/Article/index.js.map +1 -0
  29. package/lib/components/ArticleList/ArticleList.d.ts +6 -0
  30. package/lib/components/ArticleList/ArticleList.d.ts.map +1 -0
  31. package/lib/components/ArticleList/ArticleList.js +132 -0
  32. package/lib/components/ArticleList/ArticleList.js.map +1 -0
  33. package/lib/components/ArticleList/ArticleList.types.d.ts +92 -0
  34. package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -0
  35. package/lib/components/ArticleList/ArticleList.types.js +2 -0
  36. package/lib/components/ArticleList/ArticleList.types.js.map +1 -0
  37. package/lib/components/ArticleList/ArticleListFilter.d.ts +6 -0
  38. package/lib/components/ArticleList/ArticleListFilter.d.ts.map +1 -0
  39. package/lib/components/ArticleList/ArticleListFilter.js +67 -0
  40. package/lib/components/ArticleList/ArticleListFilter.js.map +1 -0
  41. package/lib/components/ArticleList/ArticleListHeader.d.ts +5 -0
  42. package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -0
  43. package/lib/components/ArticleList/ArticleListHeader.js +20 -0
  44. package/lib/components/ArticleList/ArticleListHeader.js.map +1 -0
  45. package/lib/components/ArticleList/ArticleSummary.d.ts +7 -0
  46. package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -0
  47. package/lib/components/ArticleList/ArticleSummary.js +63 -0
  48. package/lib/components/ArticleList/ArticleSummary.js.map +1 -0
  49. package/lib/components/ArticleList/index.d.ts +6 -0
  50. package/lib/components/ArticleList/index.d.ts.map +1 -0
  51. package/lib/components/ArticleList/index.js +4 -0
  52. package/lib/components/ArticleList/index.js.map +1 -0
  53. package/lib/components/Assignments/Assignments.d.ts +21 -0
  54. package/lib/components/Assignments/Assignments.d.ts.map +1 -0
  55. package/lib/components/Assignments/Assignments.js +20 -0
  56. package/lib/components/Assignments/Assignments.js.map +1 -0
  57. package/lib/components/Assignments/Assignments.styles.d.ts +8 -0
  58. package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -0
  59. package/lib/components/Assignments/Assignments.styles.js +41 -0
  60. package/lib/components/Assignments/Assignments.styles.js.map +1 -0
  61. package/lib/components/Assignments/index.d.ts +2 -0
  62. package/lib/components/Assignments/index.d.ts.map +1 -0
  63. package/lib/components/Assignments/index.js +2 -0
  64. package/lib/components/Assignments/index.js.map +1 -0
  65. package/lib/components/CasePreview/CasePreview.d.ts +27 -0
  66. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -0
  67. package/lib/components/CasePreview/CasePreview.js +82 -0
  68. package/lib/components/CasePreview/CasePreview.js.map +1 -0
  69. package/lib/components/CasePreview/CasePreview.test-ids.d.ts +2 -0
  70. package/lib/components/CasePreview/CasePreview.test-ids.d.ts.map +1 -0
  71. package/lib/components/CasePreview/CasePreview.test-ids.js +3 -0
  72. package/lib/components/CasePreview/CasePreview.test-ids.js.map +1 -0
  73. package/lib/components/CasePreview/index.d.ts +3 -0
  74. package/lib/components/CasePreview/index.d.ts.map +1 -0
  75. package/lib/components/CasePreview/index.js +2 -0
  76. package/lib/components/CasePreview/index.js.map +1 -0
  77. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts +4 -0
  78. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -0
  79. package/lib/components/CaseView/CaseHeader/CaseHeader.js +127 -0
  80. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -0
  81. package/lib/components/CaseView/CaseHeader/Summary.d.ts +6 -0
  82. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -0
  83. package/lib/components/CaseView/CaseHeader/Summary.js +182 -0
  84. package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -0
  85. package/lib/components/CaseView/CaseSummary.d.ts +4 -0
  86. package/lib/components/CaseView/CaseSummary.d.ts.map +1 -0
  87. package/lib/components/CaseView/CaseSummary.js +18 -0
  88. package/lib/components/CaseView/CaseSummary.js.map +1 -0
  89. package/lib/components/CaseView/CaseSummaryFields.d.ts +6 -0
  90. package/lib/components/CaseView/CaseSummaryFields.d.ts.map +1 -0
  91. package/lib/components/CaseView/CaseSummaryFields.js +18 -0
  92. package/lib/components/CaseView/CaseSummaryFields.js.map +1 -0
  93. package/lib/components/CaseView/CaseView.context.d.ts +5 -0
  94. package/lib/components/CaseView/CaseView.context.d.ts.map +1 -0
  95. package/lib/components/CaseView/CaseView.context.js +5 -0
  96. package/lib/components/CaseView/CaseView.context.js.map +1 -0
  97. package/lib/components/CaseView/CaseView.d.ts +8 -0
  98. package/lib/components/CaseView/CaseView.d.ts.map +1 -0
  99. package/lib/components/CaseView/CaseView.js +421 -0
  100. package/lib/components/CaseView/CaseView.js.map +1 -0
  101. package/lib/components/CaseView/CaseView.styles.d.ts +45 -0
  102. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -0
  103. package/lib/components/CaseView/CaseView.styles.js +559 -0
  104. package/lib/components/CaseView/CaseView.styles.js.map +1 -0
  105. package/lib/components/CaseView/CaseView.test-ids.d.ts +2 -0
  106. package/lib/components/CaseView/CaseView.test-ids.d.ts.map +1 -0
  107. package/lib/components/CaseView/CaseView.test-ids.js +18 -0
  108. package/lib/components/CaseView/CaseView.test-ids.js.map +1 -0
  109. package/lib/components/CaseView/CaseView.types.d.ts +98 -0
  110. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -0
  111. package/lib/components/CaseView/CaseView.types.js +2 -0
  112. package/lib/components/CaseView/CaseView.types.js.map +1 -0
  113. package/lib/components/CaseView/UtilitiesSummary.d.ts +9 -0
  114. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -0
  115. package/lib/components/CaseView/UtilitiesSummary.js +53 -0
  116. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -0
  117. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts +9 -0
  118. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -0
  119. package/lib/components/CaseView/UtilitySummaryItemDialog.js +29 -0
  120. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -0
  121. package/lib/components/CaseView/index.d.ts +5 -0
  122. package/lib/components/CaseView/index.d.ts.map +1 -0
  123. package/lib/components/CaseView/index.js +4 -0
  124. package/lib/components/CaseView/index.js.map +1 -0
  125. package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts +4 -0
  126. package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts.map +1 -0
  127. package/lib/components/ConfigurableLayout/ConfigurableLayout.js +86 -0
  128. package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +1 -0
  129. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts +41 -0
  130. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts.map +1 -0
  131. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js +2 -0
  132. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js.map +1 -0
  133. package/lib/components/ConfigurableLayout/LayoutCell.d.ts +6 -0
  134. package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -0
  135. package/lib/components/ConfigurableLayout/LayoutCell.js +64 -0
  136. package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -0
  137. package/lib/components/ConfigurableLayout/defaults.d.ts +4 -0
  138. package/lib/components/ConfigurableLayout/defaults.d.ts.map +1 -0
  139. package/lib/components/ConfigurableLayout/defaults.js +4 -0
  140. package/lib/components/ConfigurableLayout/defaults.js.map +1 -0
  141. package/lib/components/ConfigurableLayout/index.d.ts +4 -0
  142. package/lib/components/ConfigurableLayout/index.d.ts.map +1 -0
  143. package/lib/components/ConfigurableLayout/index.js +3 -0
  144. package/lib/components/ConfigurableLayout/index.js.map +1 -0
  145. package/lib/components/ConfigurableLayout/options.d.ts +10 -0
  146. package/lib/components/ConfigurableLayout/options.d.ts.map +1 -0
  147. package/lib/components/ConfigurableLayout/options.js +10 -0
  148. package/lib/components/ConfigurableLayout/options.js.map +1 -0
  149. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts +7 -0
  150. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +1 -0
  151. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js +37 -0
  152. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js.map +1 -0
  153. package/lib/components/Confirmation/Confirmation.d.ts +19 -0
  154. package/lib/components/Confirmation/Confirmation.d.ts.map +1 -0
  155. package/lib/components/Confirmation/Confirmation.js +29 -0
  156. package/lib/components/Confirmation/Confirmation.js.map +1 -0
  157. package/lib/components/Confirmation/index.d.ts +3 -0
  158. package/lib/components/Confirmation/index.d.ts.map +1 -0
  159. package/lib/components/Confirmation/index.js +2 -0
  160. package/lib/components/Confirmation/index.js.map +1 -0
  161. package/lib/components/Details/Details.d.ts +43 -0
  162. package/lib/components/Details/Details.d.ts.map +1 -0
  163. package/lib/components/Details/Details.js +95 -0
  164. package/lib/components/Details/Details.js.map +1 -0
  165. package/lib/components/Details/Details.styles.d.ts +50 -0
  166. package/lib/components/Details/Details.styles.d.ts.map +1 -0
  167. package/lib/components/Details/Details.styles.js +204 -0
  168. package/lib/components/Details/Details.styles.js.map +1 -0
  169. package/lib/components/Details/Details.test-ids.d.ts +2 -0
  170. package/lib/components/Details/Details.test-ids.d.ts.map +1 -0
  171. package/lib/components/Details/Details.test-ids.js +9 -0
  172. package/lib/components/Details/Details.test-ids.js.map +1 -0
  173. package/lib/components/Details/DetailsContext.d.ts +9 -0
  174. package/lib/components/Details/DetailsContext.d.ts.map +1 -0
  175. package/lib/components/Details/DetailsContext.js +9 -0
  176. package/lib/components/Details/DetailsContext.js.map +1 -0
  177. package/lib/components/Details/index.d.ts +4 -0
  178. package/lib/components/Details/index.d.ts.map +1 -0
  179. package/lib/components/Details/index.js +4 -0
  180. package/lib/components/Details/index.js.map +1 -0
  181. package/lib/components/Glimpse/Glimpse.d.ts +20 -0
  182. package/lib/components/Glimpse/Glimpse.d.ts.map +1 -0
  183. package/lib/components/Glimpse/Glimpse.js +12 -0
  184. package/lib/components/Glimpse/Glimpse.js.map +1 -0
  185. package/lib/components/Glimpse/index.d.ts +3 -0
  186. package/lib/components/Glimpse/index.d.ts.map +1 -0
  187. package/lib/components/Glimpse/index.js +2 -0
  188. package/lib/components/Glimpse/index.js.map +1 -0
  189. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +6 -0
  190. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -0
  191. package/lib/components/IntelligentGuidance/IntelligentGuidance.js +83 -0
  192. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -0
  193. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -0
  194. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -0
  195. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +199 -0
  196. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -0
  197. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +35 -0
  198. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -0
  199. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js +2 -0
  200. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -0
  201. package/lib/components/IntelligentGuidance/index.d.ts +3 -0
  202. package/lib/components/IntelligentGuidance/index.d.ts.map +1 -0
  203. package/lib/components/IntelligentGuidance/index.js +2 -0
  204. package/lib/components/IntelligentGuidance/index.js.map +1 -0
  205. package/lib/components/Predictions/Predictions.d.ts +6 -0
  206. package/lib/components/Predictions/Predictions.d.ts.map +1 -0
  207. package/lib/components/Predictions/Predictions.js +68 -0
  208. package/lib/components/Predictions/Predictions.js.map +1 -0
  209. package/lib/components/Predictions/Predictions.types.d.ts +23 -0
  210. package/lib/components/Predictions/Predictions.types.d.ts.map +1 -0
  211. package/lib/components/Predictions/Predictions.types.js +2 -0
  212. package/lib/components/Predictions/Predictions.types.js.map +1 -0
  213. package/lib/components/Predictions/index.d.ts +3 -0
  214. package/lib/components/Predictions/index.d.ts.map +1 -0
  215. package/lib/components/Predictions/index.js +2 -0
  216. package/lib/components/Predictions/index.js.map +1 -0
  217. package/lib/components/SearchResults/Filter.d.ts +8 -0
  218. package/lib/components/SearchResults/Filter.d.ts.map +1 -0
  219. package/lib/components/SearchResults/Filter.js +45 -0
  220. package/lib/components/SearchResults/Filter.js.map +1 -0
  221. package/lib/components/SearchResults/SearchResult.d.ts +4 -0
  222. package/lib/components/SearchResults/SearchResult.d.ts.map +1 -0
  223. package/lib/components/SearchResults/SearchResult.js +27 -0
  224. package/lib/components/SearchResults/SearchResult.js.map +1 -0
  225. package/lib/components/SearchResults/SearchResults.d.ts +6 -0
  226. package/lib/components/SearchResults/SearchResults.d.ts.map +1 -0
  227. package/lib/components/SearchResults/SearchResults.js +121 -0
  228. package/lib/components/SearchResults/SearchResults.js.map +1 -0
  229. package/lib/components/SearchResults/SearchResults.styles.d.ts +11 -0
  230. package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -0
  231. package/lib/components/SearchResults/SearchResults.styles.js +88 -0
  232. package/lib/components/SearchResults/SearchResults.styles.js.map +1 -0
  233. package/lib/components/SearchResults/SearchResults.types.d.ts +100 -0
  234. package/lib/components/SearchResults/SearchResults.types.d.ts.map +1 -0
  235. package/lib/components/SearchResults/SearchResults.types.js +2 -0
  236. package/lib/components/SearchResults/SearchResults.types.js.map +1 -0
  237. package/lib/components/SearchResults/index.d.ts +3 -0
  238. package/lib/components/SearchResults/index.d.ts.map +1 -0
  239. package/lib/components/SearchResults/index.js +2 -0
  240. package/lib/components/SearchResults/index.js.map +1 -0
  241. package/lib/components/Stages/StageGlimpse.d.ts +8 -0
  242. package/lib/components/Stages/StageGlimpse.d.ts.map +1 -0
  243. package/lib/components/Stages/StageGlimpse.js +11 -0
  244. package/lib/components/Stages/StageGlimpse.js.map +1 -0
  245. package/lib/components/Stages/Stages.d.ts +6 -0
  246. package/lib/components/Stages/Stages.d.ts.map +1 -0
  247. package/lib/components/Stages/Stages.js +107 -0
  248. package/lib/components/Stages/Stages.js.map +1 -0
  249. package/lib/components/Stages/Stages.styles.d.ts +14 -0
  250. package/lib/components/Stages/Stages.styles.d.ts.map +1 -0
  251. package/lib/components/Stages/Stages.styles.js +270 -0
  252. package/lib/components/Stages/Stages.styles.js.map +1 -0
  253. package/lib/components/Stages/Stages.types.d.ts +38 -0
  254. package/lib/components/Stages/Stages.types.d.ts.map +1 -0
  255. package/lib/components/Stages/Stages.types.js +2 -0
  256. package/lib/components/Stages/Stages.types.js.map +1 -0
  257. package/lib/components/Stages/index.d.ts +3 -0
  258. package/lib/components/Stages/index.d.ts.map +1 -0
  259. package/lib/components/Stages/index.js +2 -0
  260. package/lib/components/Stages/index.js.map +1 -0
  261. package/lib/components/Stakeholders/StakeholderForm.d.ts +7 -0
  262. package/lib/components/Stakeholders/StakeholderForm.d.ts.map +1 -0
  263. package/lib/components/Stakeholders/StakeholderForm.js +49 -0
  264. package/lib/components/Stakeholders/StakeholderForm.js.map +1 -0
  265. package/lib/components/Stakeholders/Stakeholders.d.ts +6 -0
  266. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -0
  267. package/lib/components/Stakeholders/Stakeholders.js +220 -0
  268. package/lib/components/Stakeholders/Stakeholders.js.map +1 -0
  269. package/lib/components/Stakeholders/Stakeholders.types.d.ts +75 -0
  270. package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -0
  271. package/lib/components/Stakeholders/Stakeholders.types.js +2 -0
  272. package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -0
  273. package/lib/components/Stakeholders/index.d.ts +3 -0
  274. package/lib/components/Stakeholders/index.d.ts.map +1 -0
  275. package/lib/components/Stakeholders/index.js +2 -0
  276. package/lib/components/Stakeholders/index.js.map +1 -0
  277. package/lib/components/Tags/Tags.d.ts +34 -0
  278. package/lib/components/Tags/Tags.d.ts.map +1 -0
  279. package/lib/components/Tags/Tags.js +230 -0
  280. package/lib/components/Tags/Tags.js.map +1 -0
  281. package/lib/components/Tags/index.d.ts +3 -0
  282. package/lib/components/Tags/index.d.ts.map +1 -0
  283. package/lib/components/Tags/index.js +2 -0
  284. package/lib/components/Tags/index.js.map +1 -0
  285. package/lib/components/Tasks/TaskList.d.ts +39 -0
  286. package/lib/components/Tasks/TaskList.d.ts.map +1 -0
  287. package/lib/components/Tasks/TaskList.js +71 -0
  288. package/lib/components/Tasks/TaskList.js.map +1 -0
  289. package/lib/components/Tasks/Tasks.d.ts +29 -0
  290. package/lib/components/Tasks/Tasks.d.ts.map +1 -0
  291. package/lib/components/Tasks/Tasks.js +52 -0
  292. package/lib/components/Tasks/Tasks.js.map +1 -0
  293. package/lib/components/Tasks/Tasks.test-ids.d.ts +4 -0
  294. package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -0
  295. package/lib/components/Tasks/Tasks.test-ids.js +5 -0
  296. package/lib/components/Tasks/Tasks.test-ids.js.map +1 -0
  297. package/lib/components/Tasks/index.d.ts +4 -0
  298. package/lib/components/Tasks/index.d.ts.map +1 -0
  299. package/lib/components/Tasks/index.js +4 -0
  300. package/lib/components/Tasks/index.js.map +1 -0
  301. package/lib/components/Timeline/Timeline.d.ts +6 -0
  302. package/lib/components/Timeline/Timeline.d.ts.map +1 -0
  303. package/lib/components/Timeline/Timeline.js +26 -0
  304. package/lib/components/Timeline/Timeline.js.map +1 -0
  305. package/lib/components/Timeline/Timeline.styles.d.ts +21 -0
  306. package/lib/components/Timeline/Timeline.styles.d.ts.map +1 -0
  307. package/lib/components/Timeline/Timeline.styles.js +165 -0
  308. package/lib/components/Timeline/Timeline.styles.js.map +1 -0
  309. package/lib/components/Timeline/Timeline.types.d.ts +66 -0
  310. package/lib/components/Timeline/Timeline.types.d.ts.map +1 -0
  311. package/lib/components/Timeline/Timeline.types.js +2 -0
  312. package/lib/components/Timeline/Timeline.types.js.map +1 -0
  313. package/lib/components/Timeline/TimelineItem.d.ts +13 -0
  314. package/lib/components/Timeline/TimelineItem.d.ts.map +1 -0
  315. package/lib/components/Timeline/TimelineItem.js +33 -0
  316. package/lib/components/Timeline/TimelineItem.js.map +1 -0
  317. package/lib/components/Timeline/TimelineToolbar.d.ts +6 -0
  318. package/lib/components/Timeline/TimelineToolbar.d.ts.map +1 -0
  319. package/lib/components/Timeline/TimelineToolbar.js +68 -0
  320. package/lib/components/Timeline/TimelineToolbar.js.map +1 -0
  321. package/lib/components/Timeline/index.d.ts +4 -0
  322. package/lib/components/Timeline/index.d.ts.map +1 -0
  323. package/lib/components/Timeline/index.js +3 -0
  324. package/lib/components/Timeline/index.js.map +1 -0
  325. package/lib/components/Timeline/utils.d.ts +15 -0
  326. package/lib/components/Timeline/utils.d.ts.map +1 -0
  327. package/lib/components/Timeline/utils.js +75 -0
  328. package/lib/components/Timeline/utils.js.map +1 -0
  329. package/lib/index.d.ts +37 -0
  330. package/lib/index.d.ts.map +1 -0
  331. package/lib/index.js +38 -0
  332. package/lib/index.js.map +1 -0
  333. package/package.json +2 -2
@@ -0,0 +1,100 @@
1
+ import { Ref } from 'react';
2
+ import { LinkProps, MetaListProps, NoChildrenProp, OmitStrict, RadioCheckProps, SearchInputProps } from '@pega/cosmos-react-core';
3
+ interface BaseFilterProps {
4
+ /** The name of the filter. */
5
+ name: string;
6
+ /**
7
+ * Determines if the filter will start in an expanded state.
8
+ * @default true
9
+ */
10
+ expanded?: boolean;
11
+ }
12
+ export interface SelectFilterItemProps {
13
+ /** The id for the filter option. */
14
+ id: NonNullable<RadioCheckProps['id']>;
15
+ /** The label for the filter option. */
16
+ label: RadioCheckProps['label'];
17
+ /** Determines if the filter option is active or not. */
18
+ checked: RadioCheckProps['checked'];
19
+ /** The name for the filter item that will show in the selected filters section */
20
+ name: NonNullable<RadioCheckProps['name']>;
21
+ }
22
+ export interface SelectFilterProps extends BaseFilterProps {
23
+ /** Internal prop designating this object as a select filter. */
24
+ type: 'select';
25
+ /** The set of options for the filter. */
26
+ items: SelectFilterItemProps[];
27
+ /**
28
+ * Determines if the filter will render as a RadioButtonGroup or CheckboxGroup.
29
+ * @default 'multi-select'
30
+ */
31
+ selectType?: 'single-select' | 'multi-select';
32
+ }
33
+ export interface ActiveSelectFilter {
34
+ id: SelectFilterItemProps['id'];
35
+ name: SelectFilterItemProps['name'];
36
+ resetValue: SelectFilterItemProps & {
37
+ checked: false;
38
+ };
39
+ groupName: SelectFilterProps['name'];
40
+ type: SelectFilterProps['type'];
41
+ }
42
+ export interface TextFilterProps extends BaseFilterProps {
43
+ /** Internal prop designating this object as a text filter. */
44
+ type: 'text';
45
+ /** The value of the filter. */
46
+ value?: string;
47
+ /**
48
+ * Placeholder text. The default value is a locale translation of 'Search…'
49
+ * @default 'Search…'
50
+ */
51
+ placeholder?: string;
52
+ }
53
+ export type FilterProps = SelectFilterProps;
54
+ export type ActiveFilters = ActiveSelectFilter;
55
+ export interface SearchResultProps {
56
+ /** The id of the search result to be displayed. */
57
+ id: string;
58
+ /** The title of the search result. */
59
+ title: string;
60
+ /** LinkProps to be passed to . */
61
+ link: OmitStrict<LinkProps, 'children' | 'variant' | 'icon'>;
62
+ /** A description for the search result. */
63
+ description?: string;
64
+ /** A list of elements to be rendered within a MetaList categorizing the result. */
65
+ meta?: MetaListProps['items'];
66
+ /** Accents the search results with text that matches the regex */
67
+ accent?: RegExp;
68
+ }
69
+ interface BaseFilterEvent {
70
+ name: string;
71
+ }
72
+ interface SelectFilterEvent extends BaseFilterEvent {
73
+ type: 'select';
74
+ value: SelectFilterItemProps;
75
+ }
76
+ export type FilterEvent = SelectFilterEvent;
77
+ export interface SearchResultsProps extends NoChildrenProp {
78
+ /** A set of results to render for a given search. */
79
+ results: SearchResultProps[];
80
+ /** Props related to the SearchInput. */
81
+ searchInputProps: SearchInputProps;
82
+ /** The number of total results related to a given search. */
83
+ count: number;
84
+ /** A set of filters and their current states for a given search. */
85
+ filters: FilterProps[];
86
+ /** Callback that is fired when the value of a filter changes. */
87
+ onFilterChange?: (filter: FilterEvent) => void;
88
+ /** Callback that is fired when the Clear all button is clicked. */
89
+ onClearAllFilters?: () => void;
90
+ /** Callback that is fired when the Clear button is clicked within a filter. */
91
+ onClearFilter?: (name: BaseFilterProps['name']) => void;
92
+ /** Callback that will render a Show more button at the bottom of the results and is fired when that button is clicked. */
93
+ onShowMore?: () => void;
94
+ /** Sets a loading indicator if true */
95
+ loading?: boolean;
96
+ /** A ref for the wrapping element. */
97
+ ref?: Ref<HTMLDivElement>;
98
+ }
99
+ export {};
100
+ //# sourceMappingURL=SearchResults.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchResults.types.d.ts","sourceRoot":"","sources":["../../../src/components/SearchResults/SearchResults.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,eAAe;IACvB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,EAAE,EAAE,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChC,wDAAwD;IACxD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,kFAAkF;IAClF,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,gEAAgE;IAChE,IAAI,EAAE,QAAQ,CAAC;IACf,yCAAyC;IACzC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,EAAE,qBAAqB,GAAG;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CAAC;IACvD,SAAS,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AC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACxD,0HAA0H;IAC1H,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SearchResults.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchResults.types.js","sourceRoot":"","sources":["../../../src/components/SearchResults/SearchResults.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport {\n LinkProps,\n MetaListProps,\n NoChildrenProp,\n OmitStrict,\n RadioCheckProps,\n SearchInputProps\n} from '@pega/cosmos-react-core';\n\ninterface BaseFilterProps {\n /** The name of the filter. */\n name: string;\n /**\n * Determines if the filter will start in an expanded state.\n * @default true\n */\n expanded?: boolean;\n}\n\nexport interface SelectFilterItemProps {\n /** The id for the filter option. */\n id: NonNullable<RadioCheckProps['id']>;\n /** The label for the filter option. */\n label: RadioCheckProps['label'];\n /** Determines if the filter option is active or not. */\n checked: RadioCheckProps['checked'];\n /** The name for the filter item that will show in the selected filters section */\n name: NonNullable<RadioCheckProps['name']>;\n}\n\nexport interface SelectFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a select filter. */\n type: 'select';\n /** The set of options for the filter. */\n items: SelectFilterItemProps[];\n /**\n * Determines if the filter will render as a RadioButtonGroup or CheckboxGroup.\n * @default 'multi-select'\n */\n selectType?: 'single-select' | 'multi-select';\n}\n\nexport interface ActiveSelectFilter {\n id: SelectFilterItemProps['id'];\n name: SelectFilterItemProps['name'];\n resetValue: SelectFilterItemProps & { checked: false };\n groupName: SelectFilterProps['name'];\n type: SelectFilterProps['type'];\n}\n\nexport interface TextFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a text filter. */\n type: 'text';\n /** The value of the filter. */\n value?: string;\n /**\n * Placeholder text. The default value is a locale translation of 'Search…'\n * @default 'Search…'\n */\n placeholder?: string;\n}\n\n// For use later: export type FilterProps = TextFilterProps | SelectFilterProps;\nexport type FilterProps = SelectFilterProps;\n\nexport type ActiveFilters = ActiveSelectFilter;\n\nexport interface SearchResultProps {\n /** The id of the search result to be displayed. */\n id: string;\n /** The title of the search result. */\n title: string;\n /** LinkProps to be passed to . */\n link: OmitStrict<LinkProps, 'children' | 'variant' | 'icon'>;\n /** A description for the search result. */\n description?: string;\n /** A list of elements to be rendered within a MetaList categorizing the result. */\n meta?: MetaListProps['items'];\n /** Accents the search results with text that matches the regex */\n accent?: RegExp;\n}\n\ninterface BaseFilterEvent {\n name: string;\n}\ninterface SelectFilterEvent extends BaseFilterEvent {\n type: 'select';\n value: SelectFilterItemProps;\n}\n\n// For use later: export type FilterEvent = SelectFilterEvent | TextFilterEvent;\nexport type FilterEvent = SelectFilterEvent;\n\nexport interface SearchResultsProps extends NoChildrenProp {\n /** A set of results to render for a given search. */\n results: SearchResultProps[];\n /** Props related to the SearchInput. */\n searchInputProps: SearchInputProps;\n /** The number of total results related to a given search. */\n count: number;\n /** A set of filters and their current states for a given search. */\n filters: FilterProps[];\n /** Callback that is fired when the value of a filter changes. */\n onFilterChange?: (filter: FilterEvent) => void;\n /** Callback that is fired when the Clear all button is clicked. */\n onClearAllFilters?: () => void;\n /** Callback that is fired when the Clear button is clicked within a filter. */\n onClearFilter?: (name: BaseFilterProps['name']) => void;\n /** Callback that will render a Show more button at the bottom of the results and is fired when that button is clicked. */\n onShowMore?: () => void;\n /** Sets a loading indicator if true */\n loading?: boolean;\n /** A ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './SearchResults';
2
+ export type { SearchResultsProps, SearchResultProps, FilterEvent } from './SearchResults.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SearchResults/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './SearchResults';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SearchResults/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { default } from './SearchResults';\nexport type { SearchResultsProps, SearchResultProps, FilterEvent } from './SearchResults.types';\n"]}
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { StageProps } from './Stages.types';
3
+ export interface StageGlimpseProps {
4
+ stage: StageProps;
5
+ }
6
+ declare const StageGlimpse: FunctionComponent<StageGlimpseProps>;
7
+ export default StageGlimpse;
8
+ //# sourceMappingURL=StageGlimpse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StageGlimpse.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/StageGlimpse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK5C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA6BtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Icon, Flex, registerIcon, Text, useI18n, StyledIcon } from '@pega/cosmos-react-core';
3
+ import * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';
4
+ import { StyledDateTimeDisplay, StyledStep, StyledStepsContainer } from './Stages.styles';
5
+ registerIcon(checkIcon);
6
+ const StageGlimpse = ({ stage }) => {
7
+ const t = useI18n();
8
+ return (_jsxs(_Fragment, { children: [_jsx("div", { children: stage.date ? (_jsx(StyledDateTimeDisplay, { value: stage.date, variant: 'relative', format: 'short' })) : (_jsx(Text, { variant: 'secondary', children: t('not_started') })) }), stage.steps && (_jsx(StyledStepsContainer, { children: stage.steps.map(({ id, name, completed }) => (_jsxs(Flex, { as: StyledStep, container: { gap: 0.5 }, completed: completed, children: [completed ? (_jsx(Icon, { name: 'check' })) : (_jsx(StyledIcon, { as: 'span', role: 'presentation', "aria-hidden": 'true', children: "\u2022" })), _jsx("div", { children: name })] }, id))) }))] }));
9
+ };
10
+ export default StageGlimpse;
11
+ //# sourceMappingURL=StageGlimpse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StageGlimpse.js","sourceRoot":"","sources":["../../../src/components/Stages/StageGlimpse.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAG1F,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE1F,YAAY,CAAC,SAAS,CAAC,CAAC;AAMxB,MAAM,YAAY,GAAyC,CAAC,EAAE,KAAK,EAAqB,EAAE,EAAE;IAC1F,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,8BACE,wBACG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACZ,KAAC,qBAAqB,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAC,UAAU,EAAC,MAAM,EAAC,OAAO,GAAG,CAC/E,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,CAAC,CAAC,aAAa,CAAC,GAAQ,CACpD,GACG,EACL,KAAK,CAAC,KAAK,IAAI,CACd,KAAC,oBAAoB,cAClB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5C,MAAC,IAAI,IAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAW,SAAS,EAAE,SAAS,aACzE,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,CACtB,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,cAAc,iBAAa,MAAM,uBAE/C,CACd,EACD,wBAAM,IAAI,GAAO,KARiC,EAAE,CAS/C,CACR,CAAC,GACmB,CACxB,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\n\nimport { Icon, Flex, registerIcon, Text, useI18n, StyledIcon } from '@pega/cosmos-react-core';\nimport * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';\n\nimport { StageProps } from './Stages.types';\nimport { StyledDateTimeDisplay, StyledStep, StyledStepsContainer } from './Stages.styles';\n\nregisterIcon(checkIcon);\n\nexport interface StageGlimpseProps {\n stage: StageProps;\n}\n\nconst StageGlimpse: FunctionComponent<StageGlimpseProps> = ({ stage }: StageGlimpseProps) => {\n const t = useI18n();\n return (\n <>\n <div>\n {stage.date ? (\n <StyledDateTimeDisplay value={stage.date} variant='relative' format='short' />\n ) : (\n <Text variant='secondary'>{t('not_started')}</Text>\n )}\n </div>\n {stage.steps && (\n <StyledStepsContainer>\n {stage.steps.map(({ id, name, completed }) => (\n <Flex as={StyledStep} container={{ gap: 0.5 }} key={id} completed={completed}>\n {completed ? (\n <Icon name='check' />\n ) : (\n <StyledIcon as='span' role='presentation' aria-hidden='true'>\n •\n </StyledIcon>\n )}\n <div>{name}</div>\n </Flex>\n ))}\n </StyledStepsContainer>\n )}\n </>\n );\n};\n\nexport default StageGlimpse;\n"]}
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ForwardProps } from '@pega/cosmos-react-core';
3
+ import type { StagesProps } from './Stages.types';
4
+ declare const Stages: FunctionComponent<StagesProps & ForwardProps>;
5
+ export default Stages;
6
+ //# sourceMappingURL=Stages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAQlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,YAAY,EAab,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAalD,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,GAAG,YAAY,CAmLxD,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect, forwardRef, Fragment } from 'react';
3
+ import { remToPx } from 'polished';
4
+ import { Icon, Text, registerIcon, Flex, useI18n, Button, Modal, useBreakpoint, debounce, useModalManager, useConsolidatedRef, useUID, InfoDialog, useArrows, useAfterInitialEffect } from '@pega/cosmos-react-core';
5
+ import * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';
6
+ import StageGlimpse from './StageGlimpse';
7
+ import { StyledInnerStage, StyledStage, StyledStageContainer, StyledStageGlimpse, StyledStages, StyledStagesDescription } from './Stages.styles';
8
+ registerIcon(checkIcon);
9
+ const Stages = forwardRef(function Stages({ current, stages, caseTitle, onLoadStage, ...restProps }, ref) {
10
+ const t = useI18n();
11
+ const stagesRef = useConsolidatedRef(ref);
12
+ const stagesRefs = useRef([]);
13
+ const [target, setTarget] = useState(null);
14
+ const { create: createModal } = useModalManager();
15
+ const modalMethods = useRef();
16
+ const [showModal, setShowModal] = useState(false);
17
+ const isSmallOrAbove = useBreakpoint('sm');
18
+ const [compressedView, setCompressedView] = useState(false);
19
+ const [minExpandedWidth, setMinExpandedWidth] = useState(0);
20
+ useArrows(stagesRef, {
21
+ selector: ':scope > li > button:not([aria-expanded])',
22
+ dir: 'left-right'
23
+ });
24
+ const dialogId = useUID();
25
+ const descriptionId = useUID();
26
+ useEffect(() => {
27
+ if (stagesRef.current) {
28
+ if (compressedView) {
29
+ const resizeObserver = new ResizeObserver(debounce((entries) => {
30
+ if (entries[0].contentRect.width > minExpandedWidth) {
31
+ setCompressedView(false);
32
+ }
33
+ }, 100));
34
+ resizeObserver.observe(stagesRef.current);
35
+ return () => resizeObserver.disconnect();
36
+ }
37
+ const intersectionObserver = new IntersectionObserver(entries => {
38
+ if (!entries[0].isIntersecting) {
39
+ setCompressedView(true);
40
+ if (entries[0].rootBounds)
41
+ setMinExpandedWidth(entries[0].rootBounds.width);
42
+ }
43
+ }, {
44
+ root: stagesRef.current,
45
+ rootMargin: remToPx(0.0625),
46
+ threshold: 1
47
+ });
48
+ if (stagesRef.current.lastElementChild) {
49
+ intersectionObserver.observe(stagesRef.current.lastElementChild);
50
+ return () => intersectionObserver.disconnect();
51
+ }
52
+ }
53
+ }, [minExpandedWidth, compressedView, stages.length]);
54
+ const stagesToLoad = onLoadStage
55
+ ? stages.filter(stage => !Array.isArray(stage.steps)).map(stage => stage.id)
56
+ : [];
57
+ const openModal = () => {
58
+ setShowModal(true);
59
+ if (stagesToLoad.length > 0)
60
+ onLoadStage?.(stagesToLoad);
61
+ modalMethods.current = createModal(Modal, {
62
+ heading: caseTitle
63
+ ? t('stages_case_lifecycle', [caseTitle])
64
+ : t('stages_default_case_lifecycle'),
65
+ progress: stagesToLoad.length > 0,
66
+ children: stages.map(stage => (_jsxs(Fragment, { children: [_jsx(Text, { variant: 'h2', children: stage.name }), _jsx(StageGlimpse, { stage: stage })] }, stage.id))),
67
+ onBeforeClose: () => {
68
+ setShowModal(false);
69
+ target?.focus();
70
+ setTarget(null);
71
+ modalMethods.current = undefined;
72
+ }
73
+ });
74
+ };
75
+ useAfterInitialEffect(() => {
76
+ modalMethods.current?.update({
77
+ progress: stagesToLoad.length > 0,
78
+ children: stages.map(stage => (_jsxs(Fragment, { children: [_jsx(Text, { variant: 'h2', children: stage.name }), _jsx(StageGlimpse, { stage: stage })] }, stage.id)))
79
+ });
80
+ }, [stagesToLoad.length]);
81
+ return (_jsxs(Flex, { ...restProps, container: true, as: StyledStages, ref: stagesRef, "aria-orientation": 'horizontal', "aria-label": t('stages_label'), "aria-describedby": descriptionId, children: [_jsx(StyledStagesDescription, { id: descriptionId, children: t('stages_description') }), stages.map((stage, index) => {
82
+ const isCurrent = stage.id === current;
83
+ let stageStatusText = t(stage.completed ? 'completed' : 'not_started');
84
+ if (isCurrent)
85
+ stageStatusText = t('current');
86
+ const hasToLoad = stagesToLoad.includes(stage.id);
87
+ return (_jsxs(Fragment, { children: [_jsx(Flex, { as: StyledStageContainer, item: { grow: 1, shrink: 0 }, children: _jsxs(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledStage, item: {
88
+ grow: compressedView && !isCurrent ? 0 : 1,
89
+ shrink: compressedView && isCurrent ? 1 : 0
90
+ }, "aria-current": isCurrent ? 'step' : undefined, "aria-label": t('stages_stage_label', [stage.name, stageStatusText]), onClick: (e) => {
91
+ if (isSmallOrAbove) {
92
+ if (hasToLoad)
93
+ onLoadStage?.([stage.id]);
94
+ setTarget(e.currentTarget);
95
+ }
96
+ else {
97
+ openModal();
98
+ }
99
+ }, ref: (el) => {
100
+ stagesRefs.current[index] = el;
101
+ }, "aria-expanded": target && isSmallOrAbove, "aria-controls": target ? dialogId : undefined, "aria-haspopup": true, children: [stage.completed && _jsx(Icon, { name: 'check' }), (!compressedView || isCurrent || !stage.completed) && (_jsx(StyledInnerStage, { ellipsis: isCurrent && compressedView, children: !isCurrent && compressedView ? index + 1 : stage.name }))] }) }), target && stagesRefs.current[index] === target && isSmallOrAbove && !showModal && (_jsx(InfoDialog, { heading: stage.name, target: target, progress: hasToLoad ? t('loading') : undefined, onDismiss: () => {
102
+ setTarget(null);
103
+ }, placement: 'bottom-start', children: !hasToLoad && (_jsxs(StyledStageGlimpse, { children: [_jsx(StageGlimpse, { stage: stage }), _jsx(Button, { variant: 'secondary', onClick: openModal, children: t('stages_see_full_lifecycle') })] })) }))] }, stage.id));
104
+ })] }));
105
+ });
106
+ export default Stages;
107
+ //# sourceMappingURL=Stages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EAGV,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,IAAI,EAEJ,OAAO,EACP,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,MAAM,EAEN,UAAU,EACV,SAAS,EACT,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAG1F,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ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AS,EAC9C,SAAS,EAAE,GAAG,EAAE;gCACd,SAAS,CAAC,IAAI,CAAC,CAAC;4BAClB,CAAC,EACD,SAAS,EAAC,cAAc,YAEvB,CAAC,SAAS,IAAI,CACb,MAAC,kBAAkB,eACjB,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,EAC9B,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,SAAS,YAC3C,CAAC,CAAC,2BAA2B,CAAC,GACxB,IACU,CACtB,GACU,CACd,KArDY,KAAK,CAAC,EAAE,CAsDZ,CACZ,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import {\n FunctionComponent,\n useState,\n useRef,\n useEffect,\n forwardRef,\n MouseEvent,\n PropsWithoutRef,\n Fragment\n} from 'react';\nimport { remToPx } from 'polished';\n\nimport {\n Icon,\n Text,\n registerIcon,\n Flex,\n ForwardProps,\n useI18n,\n Button,\n Modal,\n useBreakpoint,\n debounce,\n useModalManager,\n useConsolidatedRef,\n useUID,\n ModalMethods,\n InfoDialog,\n useArrows,\n useAfterInitialEffect\n} from '@pega/cosmos-react-core';\nimport * as checkIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/check.icon';\n\nimport type { StagesProps } from './Stages.types';\nimport StageGlimpse from './StageGlimpse';\nimport {\n StyledInnerStage,\n StyledStage,\n StyledStageContainer,\n StyledStageGlimpse,\n StyledStages,\n StyledStagesDescription\n} from './Stages.styles';\n\nregisterIcon(checkIcon);\n\nconst Stages: FunctionComponent<StagesProps & ForwardProps> = forwardRef(function Stages(\n { current, stages, caseTitle, onLoadStage, ...restProps }: PropsWithoutRef<StagesProps>,\n ref: StagesProps['ref']\n) {\n const t = useI18n();\n\n const stagesRef = useConsolidatedRef(ref);\n const stagesRefs = useRef<HTMLButtonElement[]>([]);\n\n const [target, setTarget] = useState<HTMLButtonElement | null>(null);\n\n const { create: createModal } = useModalManager();\n const modalMethods = useRef<ModalMethods>();\n const [showModal, setShowModal] = useState(false);\n\n const isSmallOrAbove = useBreakpoint('sm');\n const [compressedView, setCompressedView] = useState(false);\n const [minExpandedWidth, setMinExpandedWidth] = useState(0);\n\n useArrows(stagesRef, {\n selector: ':scope > li > button:not([aria-expanded])',\n dir: 'left-right'\n });\n\n const dialogId = useUID();\n const descriptionId = useUID();\n\n useEffect(() => {\n if (stagesRef.current) {\n if (compressedView) {\n const resizeObserver = new ResizeObserver(\n debounce((entries: ResizeObserverEntry[]) => {\n if (entries[0].contentRect.width > minExpandedWidth) {\n setCompressedView(false);\n }\n }, 100)\n );\n resizeObserver.observe(stagesRef.current);\n return () => resizeObserver.disconnect();\n }\n\n const intersectionObserver = new IntersectionObserver(\n entries => {\n if (!entries[0].isIntersecting) {\n setCompressedView(true);\n if (entries[0].rootBounds) setMinExpandedWidth(entries[0].rootBounds.width);\n }\n },\n {\n root: stagesRef.current,\n rootMargin: remToPx(0.0625),\n threshold: 1\n }\n );\n\n if (stagesRef.current.lastElementChild) {\n intersectionObserver.observe(stagesRef.current.lastElementChild);\n return () => intersectionObserver.disconnect();\n }\n }\n }, [minExpandedWidth, compressedView, stages.length]);\n\n const stagesToLoad = onLoadStage\n ? stages.filter(stage => !Array.isArray(stage.steps)).map(stage => stage.id)\n : [];\n\n const openModal = () => {\n setShowModal(true);\n if (stagesToLoad.length > 0) onLoadStage?.(stagesToLoad);\n modalMethods.current = createModal(Modal, {\n heading: caseTitle\n ? t('stages_case_lifecycle', [caseTitle])\n : t('stages_default_case_lifecycle'),\n progress: stagesToLoad.length > 0,\n children: stages.map(stage => (\n <Fragment key={stage.id}>\n <Text variant='h2'>{stage.name}</Text>\n <StageGlimpse stage={stage} />\n </Fragment>\n )),\n onBeforeClose: () => {\n setShowModal(false);\n target?.focus();\n setTarget(null);\n modalMethods.current = undefined;\n }\n });\n };\n\n useAfterInitialEffect(() => {\n modalMethods.current?.update({\n progress: stagesToLoad.length > 0,\n children: stages.map(stage => (\n <Fragment key={stage.id}>\n <Text variant='h2'>{stage.name}</Text>\n <StageGlimpse stage={stage} />\n </Fragment>\n ))\n });\n }, [stagesToLoad.length]);\n\n return (\n <Flex\n {...restProps}\n container\n as={StyledStages}\n ref={stagesRef}\n aria-orientation='horizontal'\n aria-label={t('stages_label')}\n aria-describedby={descriptionId}\n >\n <StyledStagesDescription id={descriptionId}>\n {t('stages_description')}\n </StyledStagesDescription>\n {stages.map((stage, index) => {\n const isCurrent = stage.id === current;\n let stageStatusText = t(stage.completed ? 'completed' : 'not_started');\n if (isCurrent) stageStatusText = t('current');\n const hasToLoad = stagesToLoad.includes(stage.id);\n return (\n <Fragment key={stage.id}>\n <Flex as={StyledStageContainer} item={{ grow: 1, shrink: 0 }}>\n <Flex\n container={{ justify: 'center', alignItems: 'center' }}\n as={StyledStage}\n item={{\n grow: compressedView && !isCurrent ? 0 : 1,\n shrink: compressedView && isCurrent ? 1 : 0\n }}\n aria-current={isCurrent ? 'step' : undefined}\n aria-label={t('stages_stage_label', [stage.name, stageStatusText])}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n if (isSmallOrAbove) {\n if (hasToLoad) onLoadStage?.([stage.id]);\n setTarget(e.currentTarget);\n } else {\n openModal();\n }\n }}\n ref={(el: HTMLButtonElement) => {\n stagesRefs.current[index] = el;\n }}\n aria-expanded={target && isSmallOrAbove}\n aria-controls={target ? dialogId : undefined}\n aria-haspopup\n >\n {stage.completed && <Icon name='check' />}\n {(!compressedView || isCurrent || !stage.completed) && (\n <StyledInnerStage ellipsis={isCurrent && compressedView}>\n {!isCurrent && compressedView ? index + 1 : stage.name}\n </StyledInnerStage>\n )}\n </Flex>\n </Flex>\n {target && stagesRefs.current[index] === target && isSmallOrAbove && !showModal && (\n <InfoDialog\n heading={stage.name}\n target={target}\n progress={hasToLoad ? t('loading') : undefined}\n onDismiss={() => {\n setTarget(null);\n }}\n placement='bottom-start'\n >\n {!hasToLoad && (\n <StyledStageGlimpse>\n <StageGlimpse stage={stage} />\n <Button variant='secondary' onClick={openModal}>\n {t('stages_see_full_lifecycle')}\n </Button>\n </StyledStageGlimpse>\n )}\n </InfoDialog>\n )}\n </Fragment>\n );\n })}\n </Flex>\n );\n});\n\nexport default Stages;\n"]}
@@ -0,0 +1,14 @@
1
+ export declare const StyledStages: import("styled-components").StyledComponent<"ol", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledInnerStage: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
3
+ ellipsis?: boolean | undefined;
4
+ }, never>;
5
+ export declare const StyledStage: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const StyledStageContainer: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const StyledStepsContainer: import("styled-components").StyledComponent<"ol", import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const StyledStep: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
9
+ completed: boolean;
10
+ }, never>;
11
+ export declare const StyledDateTimeDisplay: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").DateTimeDisplayProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
12
+ export declare const StyledStageGlimpse: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
13
+ export declare const StyledStagesDescription: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
14
+ //# sourceMappingURL=Stages.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY,wGAYvB,CAAC;AAIH,eAAO,MAAM,gBAAgB;;SAW3B,CAAC;AAEH,eAAO,MAAM,WAAW,4GAgJvB,CAAC;AAIF,eAAO,MAAM,oBAAoB,wGAoDhC,CAAC;AAIF,eAAO,MAAM,oBAAoB,wGAS/B,CAAC;AAIH,eAAO,MAAM,UAAU;eAA0B,OAAO;SAyBtD,CAAC;AAIH,eAAO,MAAM,qBAAqB,8OAMhC,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAI7B,CAAC;AAIH,eAAO,MAAM,uBAAuB,uGAEnC,CAAC"}
@@ -0,0 +1,270 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { rgba } from 'polished';
3
+ import { calculateFontSize, DateTimeDisplay, defaultThemeProp, StyledIcon, tryCatch, useDirection } from '@pega/cosmos-react-core';
4
+ export const StyledStages = styled.ol(({ theme }) => {
5
+ return css `
6
+ background-color: ${theme.base.palette['primary-background']};
7
+ border-radius: ${theme.base['border-radius']};
8
+ width: 100%;
9
+ overflow: hidden;
10
+ list-style: none;
11
+
12
+ &:has(:focus-visible) {
13
+ box-shadow: ${theme.base.shadow['focus-group']};
14
+ }
15
+ `;
16
+ });
17
+ StyledStages.defaultProps = defaultThemeProp;
18
+ export const StyledInnerStage = styled.span(props => {
19
+ return css `
20
+ display: inline-block;
21
+ text-align: center;
22
+ white-space: nowrap;
23
+ ${props.ellipsis &&
24
+ css `
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ `}
28
+ `;
29
+ });
30
+ export const StyledStage = styled.button(({ theme: { base: { spacing, palette, 'hit-area': hitArea, transparency } } }) => {
31
+ const thinBorderWidth = '0.0625rem';
32
+ const thickBorderWidth = '0.125rem';
33
+ const { rtl } = useDirection();
34
+ const borderShadow = tryCatch(() => rgba(palette['border-line'], 1));
35
+ return css `
36
+ background-color: inherit;
37
+ color: ${palette['foreground-color']};
38
+ outline: none;
39
+ border-color: transparent;
40
+ border-width: ${thinBorderWidth} 0;
41
+ border-style: solid;
42
+ position: relative;
43
+ height: calc(4 * ${spacing});
44
+ padding-inline-start: calc(2 * ${spacing});
45
+ padding-inline-end: ${spacing};
46
+ width: 100%;
47
+
48
+ ::before,
49
+ ::after {
50
+ content: '';
51
+ position: absolute;
52
+ display: block;
53
+ width: calc(2.25 * ${spacing});
54
+ height: calc(2.25 * ${spacing});
55
+ border-style: solid;
56
+ border-color: ${palette['border-line']};
57
+ border-inline-end-width: ${thinBorderWidth};
58
+ border-inline-start-width: 0;
59
+ border-top-width: ${rtl ? 0 : thinBorderWidth};
60
+ border-bottom-width: ${rtl ? thinBorderWidth : 0};
61
+ transform: rotateZ(45deg) skew(15deg, 15deg);
62
+
63
+ @media (pointer: coarse) {
64
+ width: calc(2.875 * ${spacing});
65
+ height: calc(2.875 * ${spacing});
66
+ transform: rotateZ(45deg) skew(20deg, 20deg);
67
+ }
68
+ }
69
+
70
+ ::before {
71
+ inset-inline-start: calc(-1.125 * ${spacing});
72
+
73
+ @media (pointer: coarse) {
74
+ inset-inline-start: calc(-1.375 * ${spacing});
75
+ }
76
+ }
77
+
78
+ ::after {
79
+ inset-inline-end: calc(-1.125 * ${spacing});
80
+ z-index: 1;
81
+
82
+ @media (pointer: coarse) {
83
+ inset-inline-end: calc(-1.375 * ${spacing});
84
+ }
85
+ }
86
+
87
+ &:hover,
88
+ &:hover::before,
89
+ &:hover::after {
90
+ border-color: ${palette['border-line']};
91
+ }
92
+
93
+ &:focus,
94
+ &:active,
95
+ &:focus::before,
96
+ &:active::before,
97
+ &:focus::after,
98
+ &:active::after {
99
+ border-color: ${palette.interactive};
100
+ }
101
+
102
+ &:focus {
103
+ border-width: ${thickBorderWidth} 0;
104
+ }
105
+
106
+ &:focus::before,
107
+ &:focus::after {
108
+ z-index: 1;
109
+ border-inline-end-width: ${thickBorderWidth};
110
+ border-top-width: ${rtl ? 0 : thickBorderWidth};
111
+ border-bottom-width: ${rtl ? thickBorderWidth : 0};
112
+ }
113
+
114
+ &:focus::before {
115
+ pointer-events: none;
116
+ }
117
+
118
+ &:active {
119
+ border-width: ${thinBorderWidth} 0;
120
+
121
+ ${StyledInnerStage} {
122
+ opacity: ${transparency['transparent-3']};
123
+ }
124
+ }
125
+
126
+ &:active::before,
127
+ &:active::after {
128
+ border-inline-end-width: ${thinBorderWidth};
129
+ border-top-width: ${rtl ? 0 : thinBorderWidth};
130
+ border-bottom-width: ${rtl ? thinBorderWidth : 0};
131
+ }
132
+
133
+ &[aria-current] {
134
+ ${StyledInnerStage} {
135
+ font-weight: bold;
136
+ opacity: 1;
137
+ }
138
+
139
+ :hover {
140
+ ${StyledInnerStage} {
141
+ opacity: ${transparency['transparent-2']};
142
+ }
143
+ }
144
+
145
+ ::after {
146
+ filter: drop-shadow(0.0625rem -0.0625rem 0.125rem ${borderShadow});
147
+ }
148
+ }
149
+
150
+ @media (pointer: coarse) {
151
+ height: ${hitArea['finger-min']};
152
+ padding-inline-start: calc(2.25 * ${spacing});
153
+ }
154
+
155
+ ${StyledIcon} {
156
+ color: ${palette.success};
157
+
158
+ & ~ ${StyledInnerStage} {
159
+ margin-inline-start: 0.25rem;
160
+ }
161
+ }
162
+
163
+ ${StyledInnerStage} {
164
+ opacity: ${transparency['transparent-2']};
165
+ }
166
+ `;
167
+ });
168
+ StyledStage.defaultProps = defaultThemeProp;
169
+ export const StyledStageContainer = styled.li(({ theme: { base: { spacing, 'border-radius': borderRadius } } }) => {
170
+ const thinBorderWidth = '0.0625rem';
171
+ const thickBorderWidth = '0.125rem';
172
+ return css `
173
+ &:first-of-type > ${StyledStage} {
174
+ border-start-start-radius: ${borderRadius};
175
+ border-end-start-radius: ${borderRadius};
176
+ border-inline-start-width: ${thinBorderWidth};
177
+ padding-inline-start: ${spacing};
178
+
179
+ &:active {
180
+ padding-inline-start: ${spacing};
181
+ }
182
+
183
+ &:focus {
184
+ border-inline-start-width: ${thickBorderWidth};
185
+ padding-inline-start: calc(${spacing} - ${thickBorderWidth} + ${thinBorderWidth});
186
+ }
187
+
188
+ ::before {
189
+ display: none;
190
+ }
191
+ }
192
+
193
+ &:last-of-type > ${StyledStage} {
194
+ border-start-end-radius: ${borderRadius};
195
+ border-end-end-radius: ${borderRadius};
196
+ border-inline-end-width: ${thinBorderWidth};
197
+ padding-inline-end: ${spacing};
198
+
199
+ &:active {
200
+ border-inline-end-width: ${thinBorderWidth};
201
+ padding-inline-end: ${spacing};
202
+ }
203
+
204
+ &:focus {
205
+ border-inline-end-width: ${thickBorderWidth};
206
+ padding-inline-end: calc(${spacing} - ${thinBorderWidth});
207
+ }
208
+
209
+ ::after {
210
+ display: none;
211
+ }
212
+ }
213
+ `;
214
+ });
215
+ StyledStageContainer.defaultProps = defaultThemeProp;
216
+ export const StyledStepsContainer = styled.ol(({ theme }) => {
217
+ return css `
218
+ list-style-type: none;
219
+ margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});
220
+
221
+ &:empty {
222
+ margin-block-end: 0;
223
+ }
224
+ `;
225
+ });
226
+ StyledStepsContainer.defaultProps = defaultThemeProp;
227
+ export const StyledStep = styled.li(({ completed, theme }) => {
228
+ const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;
229
+ return css `
230
+ border-radius: 0;
231
+ margin-block-end: calc(${theme.base.spacing});
232
+ color: ${theme.base.palette['foreground-color']};
233
+
234
+ &:last-child {
235
+ margin-block-end: 0;
236
+ }
237
+
238
+ & > ${StyledIcon} {
239
+ text-align: center;
240
+
241
+ ${completed &&
242
+ css `
243
+ color: ${theme.base.palette.success};
244
+ `}
245
+ }
246
+
247
+ div {
248
+ opacity: ${textOpacity};
249
+ }
250
+ `;
251
+ });
252
+ StyledStep.defaultProps = defaultThemeProp;
253
+ export const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {
254
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
255
+ return css `
256
+ font-size: ${fontSize.xs};
257
+ opacity: ${theme.base.transparency['transparent-2']};
258
+ `;
259
+ });
260
+ StyledDateTimeDisplay.defaultProps = defaultThemeProp;
261
+ export const StyledStageGlimpse = styled.div(({ theme }) => {
262
+ return css `
263
+ max-width: ${theme.base['content-width'].sm};
264
+ `;
265
+ });
266
+ StyledStageGlimpse.defaultProps = defaultThemeProp;
267
+ export const StyledStagesDescription = styled.p `
268
+ display: none;
269
+ `;
270
+ //# sourceMappingURL=Stages.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.styles.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAClD,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;qBAC3C,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;;;;oBAM5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;GAEjD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAyB,KAAK,CAAC,EAAE;IAC1E,OAAO,GAAG,CAAA;;;;MAIN,KAAK,CAAC,QAAQ;QAChB,GAAG,CAAA;;;KAGF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CACtC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,EAC9D,EACF,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,WAAW,CAAC;IACpC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACpC,MAAM,EA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,\n defaultThemeProp,\n StyledIcon,\n tryCatch,\n useDirection\n} from '@pega/cosmos-react-core';\n\nexport const StyledStages = styled.ol(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border-radius: ${theme.base['border-radius']};\n width: 100%;\n overflow: hidden;\n list-style: none;\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(props => {\n return css`\n display: inline-block;\n text-align: center;\n white-space: nowrap;\n ${props.ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nexport const StyledStage = styled.button(\n ({\n theme: {\n base: { spacing, palette, 'hit-area': hitArea, transparency }\n }\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n const { rtl } = useDirection();\n const borderShadow = tryCatch(() => rgba(palette['border-line'], 1));\n\n return css`\n background-color: inherit;\n color: ${palette['foreground-color']};\n outline: none;\n border-color: transparent;\n border-width: ${thinBorderWidth} 0;\n border-style: solid;\n position: relative;\n height: calc(4 * ${spacing});\n padding-inline-start: calc(2 * ${spacing});\n padding-inline-end: ${spacing};\n width: 100%;\n\n ::before,\n ::after {\n content: '';\n position: absolute;\n display: block;\n width: calc(2.25 * ${spacing});\n height: calc(2.25 * ${spacing});\n border-style: solid;\n border-color: ${palette['border-line']};\n border-inline-end-width: ${thinBorderWidth};\n border-inline-start-width: 0;\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n transform: rotateZ(45deg) skew(15deg, 15deg);\n\n @media (pointer: coarse) {\n width: calc(2.875 * ${spacing});\n height: calc(2.875 * ${spacing});\n transform: rotateZ(45deg) skew(20deg, 20deg);\n }\n }\n\n ::before {\n inset-inline-start: calc(-1.125 * ${spacing});\n\n @media (pointer: coarse) {\n inset-inline-start: calc(-1.375 * ${spacing});\n }\n }\n\n ::after {\n inset-inline-end: calc(-1.125 * ${spacing});\n z-index: 1;\n\n @media (pointer: coarse) {\n inset-inline-end: calc(-1.375 * ${spacing});\n }\n }\n\n &:hover,\n &:hover::before,\n &:hover::after {\n border-color: ${palette['border-line']};\n }\n\n &:focus,\n &:active,\n &:focus::before,\n &:active::before,\n &:focus::after,\n &:active::after {\n border-color: ${palette.interactive};\n }\n\n &:focus {\n border-width: ${thickBorderWidth} 0;\n }\n\n &:focus::before,\n &:focus::after {\n z-index: 1;\n border-inline-end-width: ${thickBorderWidth};\n border-top-width: ${rtl ? 0 : thickBorderWidth};\n border-bottom-width: ${rtl ? thickBorderWidth : 0};\n }\n\n &:focus::before {\n pointer-events: none;\n }\n\n &:active {\n border-width: ${thinBorderWidth} 0;\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &:active::before,\n &:active::after {\n border-inline-end-width: ${thinBorderWidth};\n border-top-width: ${rtl ? 0 : thinBorderWidth};\n border-bottom-width: ${rtl ? thinBorderWidth : 0};\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: bold;\n opacity: 1;\n }\n\n :hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n\n ::after {\n filter: drop-shadow(0.0625rem -0.0625rem 0.125rem ${borderShadow});\n }\n }\n\n @media (pointer: coarse) {\n height: ${hitArea['finger-min']};\n padding-inline-start: calc(2.25 * ${spacing});\n }\n\n ${StyledIcon} {\n color: ${palette.success};\n\n & ~ ${StyledInnerStage} {\n margin-inline-start: 0.25rem;\n }\n }\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledStageContainer = styled.li(\n ({\n theme: {\n base: { spacing, 'border-radius': borderRadius }\n }\n }) => {\n const thinBorderWidth = '0.0625rem';\n const thickBorderWidth = '0.125rem';\n\n return css`\n &:first-of-type > ${StyledStage} {\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n border-inline-start-width: ${thinBorderWidth};\n padding-inline-start: ${spacing};\n\n &:active {\n padding-inline-start: ${spacing};\n }\n\n &:focus {\n border-inline-start-width: ${thickBorderWidth};\n padding-inline-start: calc(${spacing} - ${thickBorderWidth} + ${thinBorderWidth});\n }\n\n ::before {\n display: none;\n }\n }\n\n &:last-of-type > ${StyledStage} {\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n\n &:active {\n border-inline-end-width: ${thinBorderWidth};\n padding-inline-end: ${spacing};\n }\n\n &:focus {\n border-inline-end-width: ${thickBorderWidth};\n padding-inline-end: calc(${spacing} - ${thinBorderWidth});\n }\n\n ::after {\n display: none;\n }\n }\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.ol(({ theme }) => {\n return css`\n list-style-type: none;\n margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});\n\n &:empty {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.li<{ completed: boolean }>(({ completed, theme }) => {\n const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;\n\n return css`\n border-radius: 0;\n margin-block-end: calc(${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n\n &:last-child {\n margin-block-end: 0;\n }\n\n & > ${StyledIcon} {\n text-align: center;\n\n ${completed &&\n css`\n color: ${theme.base.palette.success};\n `}\n }\n\n div {\n opacity: ${textOpacity};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nexport const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-size: ${fontSize.xs};\n opacity: ${theme.base.transparency['transparent-2']};\n `;\n});\n\nStyledDateTimeDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledStageGlimpse = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n `;\n});\n\nStyledStageGlimpse.defaultProps = defaultThemeProp;\n\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n"]}