@pega/cosmos-react-work 9.0.0-build.9.9 → 9.0.1

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 (276) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +2 -1
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +36 -21
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  5. package/lib/components/Article/ArticleRating.d.ts +1 -1
  6. package/lib/components/Article/ArticleRating.d.ts.map +1 -1
  7. package/lib/components/ArticleList/AIArticleSummary.d.ts +3 -1
  8. package/lib/components/ArticleList/AIArticleSummary.d.ts.map +1 -1
  9. package/lib/components/ArticleList/ArticleBuddy.d.ts +1 -1
  10. package/lib/components/ArticleList/ArticleBuddy.d.ts.map +1 -1
  11. package/lib/components/ArticleList/ArticleBuddy.js +5 -1
  12. package/lib/components/ArticleList/ArticleBuddy.js.map +1 -1
  13. package/lib/components/ArticleList/ArticleBuddyList.d.ts +1 -1
  14. package/lib/components/ArticleList/ArticleBuddyList.d.ts.map +1 -1
  15. package/lib/components/ArticleList/ArticleBuddyResponse.d.ts +189 -3
  16. package/lib/components/ArticleList/ArticleBuddyResponse.d.ts.map +1 -1
  17. package/lib/components/ArticleList/ArticleBuddyResponse.js +1 -1
  18. package/lib/components/ArticleList/ArticleBuddyResponse.js.map +1 -1
  19. package/lib/components/ArticleList/ArticleFeedback.d.ts +3 -1
  20. package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
  21. package/lib/components/ArticleList/ArticleList.d.ts +2 -2
  22. package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
  23. package/lib/components/ArticleList/ArticleList.js +6 -0
  24. package/lib/components/ArticleList/ArticleList.js.map +1 -1
  25. package/lib/components/ArticleList/ArticleList.types.d.ts +17 -2
  26. package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
  27. package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
  28. package/lib/components/ArticleList/ArticleListHeader.d.ts +183 -1
  29. package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
  30. package/lib/components/ArticleList/ArticleSummary.styles.d.ts +2 -2
  31. package/lib/components/ArticleList/ArticleSummary.styles.d.ts.map +1 -1
  32. package/lib/components/ArticleList/ArticleSummaryHeader.d.ts.map +1 -1
  33. package/lib/components/ArticleList/ArticleSummaryHeader.js +3 -1
  34. package/lib/components/ArticleList/ArticleSummaryHeader.js.map +1 -1
  35. package/lib/components/ArticleList/QuestionList.d.ts +5 -3
  36. package/lib/components/ArticleList/QuestionList.d.ts.map +1 -1
  37. package/lib/components/ArticleList/RelatedQuestions.d.ts +4 -2
  38. package/lib/components/ArticleList/RelatedQuestions.d.ts.map +1 -1
  39. package/lib/components/Assignments/Assignments.d.ts +2 -2
  40. package/lib/components/Assignments/Assignments.d.ts.map +1 -1
  41. package/lib/components/Assignments/Assignments.js +1 -1
  42. package/lib/components/Assignments/Assignments.js.map +1 -1
  43. package/lib/components/Assignments/Assignments.styles.d.ts +7 -3
  44. package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -1
  45. package/lib/components/CaseHierarchy/CaseHierarchy.d.ts +2 -2
  46. package/lib/components/CaseHierarchy/CaseHierarchy.d.ts.map +1 -1
  47. package/lib/components/CaseHierarchy/CaseHierarchy.js +4 -3
  48. package/lib/components/CaseHierarchy/CaseHierarchy.js.map +1 -1
  49. package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts +7 -3
  50. package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts.map +1 -1
  51. package/lib/components/CaseHierarchy/CaseHierarchy.styles.js +9 -7
  52. package/lib/components/CaseHierarchy/CaseHierarchy.styles.js.map +1 -1
  53. package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts +1 -1
  54. package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts.map +1 -1
  55. package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js +2 -1
  56. package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js.map +1 -1
  57. package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts +7 -1
  58. package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts.map +1 -1
  59. package/lib/components/CaseHierarchy/CaseHierarchy.types.js.map +1 -1
  60. package/lib/components/CasePreview/CasePreview.d.ts +1 -1
  61. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  62. package/lib/components/CasePreview/CasePreview.js +83 -115
  63. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  64. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
  65. package/lib/components/CaseView/CaseHeader/CaseHeader.js +97 -27
  66. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
  67. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -1
  68. package/lib/components/CaseView/CaseHeader/Summary.js +8 -1
  69. package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -1
  70. package/lib/components/CaseView/CaseSummaryFields.js +1 -1
  71. package/lib/components/CaseView/CaseSummaryFields.js.map +1 -1
  72. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  73. package/lib/components/CaseView/CaseView.js +49 -20
  74. package/lib/components/CaseView/CaseView.js.map +1 -1
  75. package/lib/components/CaseView/CaseView.styles.d.ts +83 -47
  76. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  77. package/lib/components/CaseView/CaseView.styles.js +329 -122
  78. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  79. package/lib/components/CaseView/CaseView.types.d.ts +24 -8
  80. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  81. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  82. package/lib/components/CaseView/UtilitiesSummary.d.ts +1 -1
  83. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
  84. package/lib/components/CaseView/UtilitiesSummary.js +14 -4
  85. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  86. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
  87. package/lib/components/CaseView/UtilitySummaryItemDialog.js +10 -4
  88. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
  89. package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -1
  90. package/lib/components/ConfigurableLayout/LayoutCell.js +25 -25
  91. package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
  92. package/lib/components/Confirmation/Confirmation.d.ts +10 -0
  93. package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
  94. package/lib/components/Confirmation/Confirmation.js +2 -2
  95. package/lib/components/Confirmation/Confirmation.js.map +1 -1
  96. package/lib/components/Confirmation/index.d.ts +1 -1
  97. package/lib/components/Confirmation/index.d.ts.map +1 -1
  98. package/lib/components/Confirmation/index.js.map +1 -1
  99. package/lib/components/Details/Details.d.ts +3 -2
  100. package/lib/components/Details/Details.d.ts.map +1 -1
  101. package/lib/components/Details/Details.js +6 -5
  102. package/lib/components/Details/Details.js.map +1 -1
  103. package/lib/components/Details/Details.styles.d.ts +17 -15
  104. package/lib/components/Details/Details.styles.d.ts.map +1 -1
  105. package/lib/components/Details/Details.styles.js +28 -15
  106. package/lib/components/Details/Details.styles.js.map +1 -1
  107. package/lib/components/Details/Details.test-ids.d.ts +1 -1
  108. package/lib/components/Details/Details.test-ids.d.ts.map +1 -1
  109. package/lib/components/Details/Details.test-ids.js +2 -1
  110. package/lib/components/Details/Details.test-ids.js.map +1 -1
  111. package/lib/components/Details/DetailsList.d.ts.map +1 -1
  112. package/lib/components/Details/DetailsList.js +1 -5
  113. package/lib/components/Details/DetailsList.js.map +1 -1
  114. package/lib/components/GenAICoach/ActiveCases.d.ts +5 -0
  115. package/lib/components/GenAICoach/ActiveCases.d.ts.map +1 -0
  116. package/lib/components/GenAICoach/ActiveCases.js +50 -0
  117. package/lib/components/GenAICoach/ActiveCases.js.map +1 -0
  118. package/lib/components/GenAICoach/CaseWorkflow.d.ts +5 -0
  119. package/lib/components/GenAICoach/CaseWorkflow.d.ts.map +1 -0
  120. package/lib/components/GenAICoach/CaseWorkflow.js +111 -0
  121. package/lib/components/GenAICoach/CaseWorkflow.js.map +1 -0
  122. package/lib/components/GenAICoach/ConversationHistory.d.ts.map +1 -1
  123. package/lib/components/GenAICoach/ConversationHistory.js +11 -13
  124. package/lib/components/GenAICoach/ConversationHistory.js.map +1 -1
  125. package/lib/components/GenAICoach/GenAICoach.d.ts +4 -3
  126. package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
  127. package/lib/components/GenAICoach/GenAICoach.js +721 -141
  128. package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
  129. package/lib/components/GenAICoach/GenAICoach.styles.d.ts +1639 -35
  130. package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
  131. package/lib/components/GenAICoach/GenAICoach.styles.js +867 -82
  132. package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
  133. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +3 -2
  134. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
  135. package/lib/components/GenAICoach/GenAICoach.test-ids.js +6 -1
  136. package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
  137. package/lib/components/GenAICoach/GenAICoach.types.d.ts +215 -9
  138. package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
  139. package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
  140. package/lib/components/GenAICoach/GenAIMessage.d.ts +6 -0
  141. package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
  142. package/lib/components/GenAICoach/GenAIMessage.js +101 -52
  143. package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
  144. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts +4 -0
  145. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -0
  146. package/lib/components/GenAICoach/GenAIMessageFeedback.js +95 -0
  147. package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -0
  148. package/lib/components/GenAICoach/GenAIMessageProgress.d.ts +4 -1
  149. package/lib/components/GenAICoach/GenAIMessageProgress.d.ts.map +1 -1
  150. package/lib/components/GenAICoach/GenAIMessageProgress.js +11 -35
  151. package/lib/components/GenAICoach/GenAIMessageProgress.js.map +1 -1
  152. package/lib/components/GenAICoach/InitialSuggestedMessage.d.ts.map +1 -1
  153. package/lib/components/GenAICoach/InitialSuggestedMessage.js +5 -6
  154. package/lib/components/GenAICoach/InitialSuggestedMessage.js.map +1 -1
  155. package/lib/components/GenAICoach/PortalAgentSplitView.d.ts +6 -0
  156. package/lib/components/GenAICoach/PortalAgentSplitView.d.ts.map +1 -0
  157. package/lib/components/GenAICoach/PortalAgentSplitView.js +75 -0
  158. package/lib/components/GenAICoach/PortalAgentSplitView.js.map +1 -0
  159. package/lib/components/GenAICoach/Questionnaire.d.ts +4 -0
  160. package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -0
  161. package/lib/components/GenAICoach/Questionnaire.js +155 -0
  162. package/lib/components/GenAICoach/Questionnaire.js.map +1 -0
  163. package/lib/components/GenAICoach/ToolCandidates.d.ts +4 -0
  164. package/lib/components/GenAICoach/ToolCandidates.d.ts.map +1 -0
  165. package/lib/components/GenAICoach/ToolCandidates.js +19 -0
  166. package/lib/components/GenAICoach/ToolCandidates.js.map +1 -0
  167. package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts +4 -0
  168. package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts.map +1 -0
  169. package/lib/components/GenAICoach/ToolConfirmationMessage.js +20 -0
  170. package/lib/components/GenAICoach/ToolConfirmationMessage.js.map +1 -0
  171. package/lib/components/GenAICoach/ToolDetails.d.ts +5 -0
  172. package/lib/components/GenAICoach/ToolDetails.d.ts.map +1 -0
  173. package/lib/components/GenAICoach/ToolDetails.js +99 -0
  174. package/lib/components/GenAICoach/ToolDetails.js.map +1 -0
  175. package/lib/components/GenAICoach/index.d.ts +5 -3
  176. package/lib/components/GenAICoach/index.d.ts.map +1 -1
  177. package/lib/components/GenAICoach/index.js +4 -2
  178. package/lib/components/GenAICoach/index.js.map +1 -1
  179. package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts +55 -34
  180. package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
  181. package/lib/components/HierarchicalAssignments/Assignments.styles.js +41 -11
  182. package/lib/components/HierarchicalAssignments/Assignments.styles.js.map +1 -1
  183. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +2 -0
  184. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -1
  185. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -1
  186. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts +1 -1
  187. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
  188. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +7 -4
  189. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
  190. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.d.ts.map +1 -1
  191. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js +2 -2
  192. package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js.map +1 -1
  193. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
  194. package/lib/components/IntelligentGuidance/IntelligentGuidance.js +1 -1
  195. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
  196. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -5
  197. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
  198. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +17 -3
  199. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
  200. package/lib/components/InteractionNotification/InteractionNotification.d.ts +31 -8
  201. package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
  202. package/lib/components/InteractionNotification/InteractionNotification.js +17 -10
  203. package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
  204. package/lib/components/Predictions/Predictions.d.ts.map +1 -1
  205. package/lib/components/Predictions/Predictions.js +11 -2
  206. package/lib/components/Predictions/Predictions.js.map +1 -1
  207. package/lib/components/SearchResults/ActiveFilter.d.ts +1 -1
  208. package/lib/components/SearchResults/ActiveFilter.d.ts.map +1 -1
  209. package/lib/components/SearchResults/Filter.d.ts.map +1 -1
  210. package/lib/components/SearchResults/Filter.js +1 -1
  211. package/lib/components/SearchResults/Filter.js.map +1 -1
  212. package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
  213. package/lib/components/SearchResults/SearchResult.js +14 -6
  214. package/lib/components/SearchResults/SearchResult.js.map +1 -1
  215. package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
  216. package/lib/components/SearchResults/SearchResults.js +18 -3
  217. package/lib/components/SearchResults/SearchResults.js.map +1 -1
  218. package/lib/components/SearchResults/SearchResults.styles.d.ts +12 -10
  219. package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -1
  220. package/lib/components/Shortcuts/Shortcuts.d.ts +7 -0
  221. package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -0
  222. package/lib/components/Shortcuts/Shortcuts.js +47 -0
  223. package/lib/components/Shortcuts/Shortcuts.js.map +1 -0
  224. package/lib/components/Shortcuts/Shortcuts.styles.d.ts +22 -0
  225. package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -0
  226. package/lib/components/Shortcuts/Shortcuts.styles.js +114 -0
  227. package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -0
  228. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +2 -0
  229. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -0
  230. package/lib/components/Shortcuts/Shortcuts.test-ids.js +8 -0
  231. package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -0
  232. package/lib/components/Shortcuts/Shortcuts.types.d.ts +64 -0
  233. package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -0
  234. package/lib/components/Shortcuts/Shortcuts.types.js +2 -0
  235. package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -0
  236. package/lib/components/Shortcuts/index.d.ts +3 -0
  237. package/lib/components/Shortcuts/index.d.ts.map +1 -0
  238. package/lib/components/Shortcuts/index.js +2 -0
  239. package/lib/components/Shortcuts/index.js.map +1 -0
  240. package/lib/components/Stages/Stages.d.ts.map +1 -1
  241. package/lib/components/Stages/Stages.js +37 -12
  242. package/lib/components/Stages/Stages.js.map +1 -1
  243. package/lib/components/Stages/Stages.styles.d.ts +22 -15
  244. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  245. package/lib/components/Stages/Stages.styles.js +285 -119
  246. package/lib/components/Stages/Stages.styles.js.map +1 -1
  247. package/lib/components/Stages/Stages.types.d.ts +5 -0
  248. package/lib/components/Stages/Stages.types.d.ts.map +1 -1
  249. package/lib/components/Stages/Stages.types.js.map +1 -1
  250. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
  251. package/lib/components/Stakeholders/Stakeholders.js +109 -145
  252. package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
  253. package/lib/components/Tags/Tags.d.ts +2 -2
  254. package/lib/components/Tags/Tags.d.ts.map +1 -1
  255. package/lib/components/Tags/Tags.js +12 -2
  256. package/lib/components/Tags/Tags.js.map +1 -1
  257. package/lib/components/Tasks/TaskList.d.ts +10 -3
  258. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  259. package/lib/components/Tasks/TaskList.js +59 -5
  260. package/lib/components/Tasks/TaskList.js.map +1 -1
  261. package/lib/components/Tasks/Tasks.d.ts +10 -3
  262. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  263. package/lib/components/Tasks/Tasks.js +29 -5
  264. package/lib/components/Tasks/Tasks.js.map +1 -1
  265. package/lib/components/UtilitiesLayout/UtilitiesLayout.d.ts.map +1 -1
  266. package/lib/components/UtilitiesLayout/UtilitiesLayout.js +3 -2
  267. package/lib/components/UtilitiesLayout/UtilitiesLayout.js.map +1 -1
  268. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts +2 -2
  269. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts.map +1 -1
  270. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js +3 -2
  271. package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js.map +1 -1
  272. package/lib/index.d.ts +2 -0
  273. package/lib/index.d.ts.map +1 -1
  274. package/lib/index.js +2 -0
  275. package/lib/index.js.map +1 -1
  276. package/package.json +6 -7
@@ -1,12 +1,12 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { getContrast, hideVisually, meetsContrastGuidelines, rgba, transparentize } from 'polished';
2
+ import { getContrast, hideVisually, mix, rgba, transparentize } from 'polished';
3
3
  import { useContext } from 'react';
4
- import { Button, calculateFontSize, CardContent, defaultThemeProp, StyledBreadcrumbs, StyledButtonLink, StyledFieldValue, StyledStackedFieldValue, StyledIcon, StyledLabel, StyledPopover, StyledText, StyledTooltip, tryCatch, FieldValueList, StyledLink, readableHue, StyledCard, Text, readableColor, AppShellContext, AIButton, StyledButton, calculateForegroundColor, calculateBackgroundAndContrastColor, isSolidColor, StyledSummaryListItem, StyledProgressBackdrop } from '@pega/cosmos-react-core';
4
+ import { Button, calculateFontSize, CardContent, defaultThemeProp, resolveSupplementalColor, StyledBreadcrumbs, StyledButtonLink, StyledFieldValue, StyledInlineFieldValueRow, StyledStackedFieldValue, StyledIcon, StyledLabel, StyledPopover, StyledText, StyledTooltip, tryCatch, FieldValueList, StyledLink, readableHue, StyledCard, Text, readableColor, AppShellContext, AIButton, StyledButton, calculateForegroundColor, calculateBackgroundAndContrastColor, isSolidColor, StyledSummaryListItem, StyledProgressBackdrop, Image, Icon, animations, useDirection } from '@pega/cosmos-react-core';
5
5
  import { StyledMenu } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';
6
6
  import { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';
7
7
  import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
8
8
  import { StyledAllTabsWrapper, StyledTabs, StylesAllTabsButtonWrapper } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';
9
- import { resizeDrawerMinWidth, resizeDrawerMaxWidth, resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';
9
+ import { resizeDrawerMinWidth, resizeDrawerMaxWidth, resizeDrawerDefaultWidth, wcagContrast } from '@pega/cosmos-react-core/lib/styles/constants';
10
10
  import { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';
11
11
  import { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';
12
12
  import { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';
@@ -14,12 +14,58 @@ import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/C
14
14
  import { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';
15
15
  import { StyledAssignments } from '../Assignments/Assignments.styles';
16
16
  import { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';
17
- import { StyledGenAICoachContainer } from '../GenAICoach/GenAICoach.styles';
17
+ import { StyledGenAICoachContainer, StyledInitialMessageContainer } from '../GenAICoach/GenAICoach.styles';
18
18
  import { StyledTaskList } from '../Tasks/TaskList';
19
19
  import { oneColumnDetailsColumnWidth } from '../Details/Details.styles';
20
20
  import { useCaseViewContext } from './CaseView.context';
21
21
  const labelWidth = '16ch';
22
22
  const inlineEndButtonOffset = '0.375rem';
23
+ export const resolveCaseTypeColor = (theme, color) => {
24
+ if (!color)
25
+ return undefined;
26
+ const supplementalColor = resolveSupplementalColor(theme, color);
27
+ if (supplementalColor !== undefined)
28
+ return supplementalColor;
29
+ return color;
30
+ };
31
+ const mixCaseColorWithBackground = (color, background) => mix(0.85, background, color);
32
+ const getCaseTypeHeaderColors = (theme, color) => {
33
+ const resolvedCaseTypeColor = resolveCaseTypeColor(theme, color);
34
+ const headerBackground = resolvedCaseTypeColor &&
35
+ theme.base['case-type-colors'] === 'header-and-icon' &&
36
+ isSolidColor(theme.components.card.background)
37
+ ? mixCaseColorWithBackground(resolvedCaseTypeColor, theme.components.card.background)
38
+ : theme.components['case-view'].header.background;
39
+ const headerForeground = resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'
40
+ ? readableColor(headerBackground)
41
+ : calculateForegroundColor(headerBackground, theme.components['case-view'].header['foreground-color']);
42
+ return { caseTypeColor: resolvedCaseTypeColor ?? undefined, headerBackground, headerForeground };
43
+ };
44
+ const getCaseViewColors = (theme, caseTypeColor) => {
45
+ const interactive = theme.base.palette.interactive;
46
+ const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);
47
+ const headerBackground = caseTypeHeaderColors.headerBackground;
48
+ const foregroundColor = caseTypeHeaderColors.headerForeground;
49
+ const isGradientBackground = !isSolidColor(headerBackground);
50
+ const elementBackground = isGradientBackground
51
+ ? readableColor(foregroundColor)
52
+ : headerBackground;
53
+ const interactiveUsable = getContrast(elementBackground, interactive) >= wcagContrast.AA;
54
+ const interactiveColor = !isGradientBackground && interactiveUsable ? interactive : foregroundColor;
55
+ let hoverBackground = rgba(interactiveColor, 0.15);
56
+ if (!isGradientBackground && interactiveUsable) {
57
+ hoverBackground = readableHue(interactive, interactiveColor);
58
+ }
59
+ return {
60
+ caseTypeColor: caseTypeHeaderColors.caseTypeColor,
61
+ headerBackground,
62
+ foregroundColor,
63
+ elementBackground,
64
+ interactiveColor,
65
+ interactiveUsable,
66
+ hoverBackground
67
+ };
68
+ };
23
69
  export const StyledSummaryPrimaryList = styled(FieldValueList)(({ theme, wrapped }) => {
24
70
  const fontSizes = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
25
71
  const detached = theme.components['field-value-list'].inline.detached;
@@ -35,10 +81,10 @@ export const StyledSummaryPrimaryList = styled(FieldValueList)(({ theme, wrapped
35
81
  `}
36
82
  grid-template-columns: ${labelWidth} auto;
37
83
  `}
38
-
39
84
  ${StyledFieldValue} {
40
85
  font-size: ${fontSizes[theme.components.text.h1['font-size']]};
41
86
  font-weight: ${theme.components.text.h1['font-weight']};
87
+
42
88
  > ${StyledButtonLink} {
43
89
  font-weight: inherit;
44
90
  }
@@ -57,12 +103,13 @@ export const StyledCaseSummaryFields = styled.div(({ theme }) => {
57
103
  const { components: { 'field-value-list': { inline: { detached } } } } = theme;
58
104
  return (detached &&
59
105
  css `
60
- ${StyledSummaryPrimaryList},${StyledSummarySecondaryList} {
61
- padding: calc(${theme.components.card.padding} * 2);
106
+ ${StyledSummaryPrimaryList} {
107
+ padding-block-start: calc(${theme.components.card.padding} * 2);
108
+ padding-inline: calc(${theme.components.card.padding} * 2);
62
109
  }
63
110
 
64
- ${StyledSummaryPrimaryList} + ${StyledSummarySecondaryList} {
65
- border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};
111
+ ${StyledSummarySecondaryList} {
112
+ padding: calc(${theme.components.card.padding} * 2);
66
113
  }
67
114
  `);
68
115
  });
@@ -75,7 +122,7 @@ export const StyledSummaryTabContent = styled(CardContent)(({ theme }) => {
75
122
  max-width: ${oneColumnDetailsColumnWidth};
76
123
  }
77
124
 
78
- > ${StyledFieldValue} {
125
+ > ${StyledFieldValue}, > ${StyledInlineFieldValueRow} > ${StyledFieldValue} {
79
126
  max-width: calc(${oneColumnDetailsColumnWidth} - ${labelWidth} - 2 * ${spacing});
80
127
  }
81
128
  }
@@ -88,27 +135,33 @@ export const StyledSummaryHeading = styled(Text)(({ theme }) => {
88
135
  `;
89
136
  });
90
137
  StyledSummaryHeading.defaultProps = defaultThemeProp;
91
- export const StyledCaseHeader = styled.header(({ theme }) => {
92
- const { components: { 'case-view': { header: { 'foreground-color': caseHeaderForegroundColor, background }, summary: { detached: summaryDetached }, utilities: { detached: utilitiesDetached } } }, base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette } } = theme;
93
- const foregroundColor = calculateForegroundColor(background, caseHeaderForegroundColor);
94
- const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } = useCaseViewContext();
138
+ export const StyledCaseViewImage = styled(Image) `
139
+ max-height: 100%;
140
+ `;
141
+ export const StyledCaseHeader = styled.div(({ theme }) => {
142
+ const { components: { 'case-view': { summary: { detached: summaryDetached }, utilities: { detached: utilitiesDetached } } }, base: { 'border-radius': borderRadius, spacing, shadow, 'z-index': zIndex, palette } } = theme;
143
+ const { aboveSM, aboveMD, color, persistentUtility, aboveXL, summaryExpanded, isPreview } = useCaseViewContext();
95
144
  const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;
96
145
  const caseHeaderBorderRadius = shouldRenderMobileTabs
97
146
  ? `0 0 ${utilitiesDetached ? borderRadius : 0} ${borderRadius}`
98
147
  : `${borderRadius} ${borderRadius} 0 0`;
148
+ const { headerBackground, foregroundColor } = getCaseViewColors(theme, color);
99
149
  return css `
100
- background: ${background};
150
+ background: ${headerBackground};
101
151
  color: ${foregroundColor};
102
152
  padding: ${spacing} calc(2 * ${spacing});
103
153
  position: relative;
104
154
 
155
+ ${summaryDetached &&
156
+ css `
157
+ border-bottom: 0.0625rem solid ${palette['border-line']};
158
+ `}
105
159
  ${summaryDetached &&
106
160
  !isPreview &&
107
161
  aboveSM &&
108
162
  css `
109
163
  border-radius: ${caseHeaderBorderRadius};
110
164
  `}
111
-
112
165
  h1:focus-visible {
113
166
  outline: transparent;
114
167
  box-shadow: ${shadow.focus};
@@ -123,6 +176,7 @@ export const StyledCaseHeader = styled.header(({ theme }) => {
123
176
  StyledCaseHeader.defaultProps = defaultThemeProp;
124
177
  export const StyledFollowIconWrap = styled.label `
125
178
  font-size: 1.25rem;
179
+
126
180
  input {
127
181
  ${hideVisually}
128
182
  }
@@ -132,8 +186,35 @@ export const StyledFollowIconWrap = styled.label `
132
186
  }
133
187
  `;
134
188
  StyledFollowIconWrap.defaultProps = defaultThemeProp;
135
- export const StyledSubheading = styled.p ``;
189
+ export const StyledSubheading = styled.div ``;
136
190
  StyledSubheading.defaultProps = defaultThemeProp;
191
+ export const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {
192
+ const { color: caseTypeColor } = useCaseViewContext();
193
+ const { elementBackground, interactiveColor, hoverBackground } = getCaseViewColors(theme, caseTypeColor);
194
+ return css `
195
+ --button-background-color: ${elementBackground};
196
+ color: ${interactiveColor};
197
+ background-color: transparent;
198
+ border-color: ${interactiveColor};
199
+
200
+ @media (hover: hover) {
201
+ &:hover {
202
+ --button-background-color: ${hoverBackground};
203
+ color: ${interactiveColor};
204
+ background-color: ${hoverBackground};
205
+ border-color: ${interactiveColor};
206
+ }
207
+
208
+ &:active {
209
+ --button-background-color: ${hoverBackground};
210
+ color: ${interactiveColor};
211
+ background-color: ${hoverBackground};
212
+ border-color: ${interactiveColor};
213
+ }
214
+ }
215
+ `;
216
+ });
217
+ StyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;
137
218
  export const StyledHeaderActions = styled.div(({ offsetEnd, theme }) => {
138
219
  return css `
139
220
  margin-inline-start: auto;
@@ -145,20 +226,23 @@ export const StyledHeaderActions = styled.div(({ offsetEnd, theme }) => {
145
226
  padding-inline-end: ${inlineEndButtonOffset};
146
227
  `};
147
228
 
148
- ${StyledButton} {
229
+ ${StyledButton}:not(${StyledCaseHeaderPromotedAction}) {
149
230
  margin-inline-start: 0;
150
231
  }
232
+
233
+ ${StyledCaseHeaderPromotedAction}:not(:has(+ ${StyledCaseHeaderPromotedAction})) {
234
+ margin-inline-end: ${theme.base.spacing};
235
+ }
151
236
  `;
152
237
  });
153
238
  StyledHeaderActions.defaultProps = defaultThemeProp;
154
- export const StyledCaseHeaderText = styled.hgroup(({ theme }) => {
155
- const { components: { 'case-view': { header: { 'foreground-color': foregroundColor, background: caseHeaderBackground } } } } = theme;
156
- /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */
157
- const color = calculateForegroundColor(caseHeaderBackground, foregroundColor);
239
+ export const StyledCaseHeaderText = styled.div(({ theme }) => {
240
+ const { color } = useCaseViewContext();
241
+ const { foregroundColor, interactiveColor } = getCaseViewColors(theme, color);
158
242
  const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
159
243
  const idStyle = css `
160
- color: ${color};
161
- font-size: ${fontSize.s};
244
+ color: ${foregroundColor};
245
+ font-size: ${fontSize.xs};
162
246
  font-weight: normal;
163
247
  `;
164
248
  return css `
@@ -166,6 +250,9 @@ export const StyledCaseHeaderText = styled.hgroup(({ theme }) => {
166
250
 
167
251
  ${StyledSubheading} {
168
252
  ${idStyle}
253
+ ${StyledText} {
254
+ ${idStyle}
255
+ }
169
256
  }
170
257
 
171
258
  ${StyledBreadcrumbs} {
@@ -191,7 +278,7 @@ export const StyledCaseHeaderText = styled.hgroup(({ theme }) => {
191
278
  }
192
279
 
193
280
  > ${StyledText} > ${StyledLink} {
194
- color: ${color};
281
+ color: ${interactiveColor};
195
282
  }
196
283
 
197
284
  + ${StyledHeaderActions} {
@@ -200,42 +287,6 @@ export const StyledCaseHeaderText = styled.hgroup(({ theme }) => {
200
287
  `;
201
288
  });
202
289
  StyledCaseHeaderText.defaultProps = defaultThemeProp;
203
- export const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {
204
- const { base: { palette: { interactive } }, components: { 'case-view': { header: { background, 'foreground-color': foregroundColor } } } } = theme;
205
- /* If foreground color is auto, we calculate the text color based on the background color. */
206
- const textColor = calculateForegroundColor(background, foregroundColor);
207
- const isGradientBackground = !isSolidColor(background);
208
- const backgroundColor = isGradientBackground ? readableColor(textColor) : background;
209
- const interactiveUsable = getContrast(backgroundColor, interactive) >= 4.5;
210
- const color = !isGradientBackground && interactiveUsable ? interactive : textColor;
211
- let hoverBackground = rgba(color, 0.15);
212
- if (!isGradientBackground && interactiveUsable) {
213
- hoverBackground = readableHue(interactive, color);
214
- }
215
- return css `
216
- --button-background-color: ${backgroundColor};
217
- color: ${color};
218
- background-color: transparent;
219
- border-color: ${color};
220
-
221
- @media (hover: hover) {
222
- &:hover {
223
- --button-background-color: ${hoverBackground};
224
- color: ${color};
225
- background-color: ${hoverBackground};
226
- border-color: ${color};
227
- }
228
-
229
- &:active {
230
- --button-background-color: ${hoverBackground};
231
- color: ${color};
232
- background-color: ${hoverBackground};
233
- border-color: ${color};
234
- }
235
- }
236
- `;
237
- });
238
- StyledCaseHeaderPromotedAction.defaultProps = defaultThemeProp;
239
290
  export const StyledHeaderSummaryBlock = styled.div(({ hasItems, theme }) => {
240
291
  const { base: { spacing, palette: { 'brand-primary': primary } } } = theme;
241
292
  const color = readableColor(primary);
@@ -245,7 +296,6 @@ export const StyledHeaderSummaryBlock = styled.div(({ hasItems, theme }) => {
245
296
  css `
246
297
  border-inline-start: 0.0625rem solid ${transparentColor};
247
298
  `}
248
-
249
299
  ${StyledStackedFieldValue}:first-child {
250
300
  margin-inline-start: calc(2 * ${spacing});
251
301
  }
@@ -278,35 +328,32 @@ const popoverColorReset = (theme) => {
278
328
  `;
279
329
  };
280
330
  export const StyledHeaderSummary = styled.dl(({ theme }) => {
281
- const { base: { palette: { interactive } }, components: { 'case-view': { header: { 'foreground-color': foregroundColor, background } } } } = theme;
282
- /* If the foreground-color is auto, we calculate the text color and transparentColor based on the background color. */
283
- const color = calculateForegroundColor(background, foregroundColor);
284
- const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);
285
- const interactiveUsable = meetsContrastGuidelines(backgroundColor, interactive).AA;
331
+ const { color: caseTypeColor } = useCaseViewContext();
332
+ const { foregroundColor, interactiveUsable } = getCaseViewColors(theme, caseTypeColor);
286
333
  return css `
287
334
  max-width: 100%;
288
335
  min-width: 0;
289
336
 
290
337
  > ${StyledStackedFieldValue} {
291
338
  > ${StyledLabel} {
292
- color: ${color};
339
+ color: ${foregroundColor};
293
340
  white-space: nowrap;
294
341
  }
295
342
 
296
343
  > ${StyledFieldValue} {
297
- color: ${color};
344
+ color: ${foregroundColor};
298
345
  white-space: nowrap;
299
346
  }
300
347
 
301
348
  ${StyledButtonLink},
302
349
  ${StyledLink} {
303
350
  &:focus-visible {
304
- box-shadow: inset 0 0 0 0.0625rem ${color};
351
+ box-shadow: inset 0 0 0 0.0625rem ${foregroundColor};
305
352
  }
306
353
 
307
354
  ${!interactiveUsable &&
308
355
  css `
309
- color: ${color};
356
+ color: ${foregroundColor};
310
357
  text-decoration: underline;
311
358
  `}
312
359
  }
@@ -326,30 +373,28 @@ export const StyledHeaderSummaryValue = styled(StyledFieldValue)(({ bold, trunca
326
373
  css `
327
374
  max-width: ${xs};
328
375
  `}
329
-
330
376
  ${bold &&
331
377
  css `
332
378
  font-weight: ${h1Weight};
333
379
  `}
334
-
335
380
  /*
336
381
  * :not([hidden]) necessary to prevent hidden span with preview a11y instructions from
337
382
  * factoring into scrollWidth of element when determining truncation.
338
383
  */
339
- > :not([hidden]) {
384
+ > :not([hidden]) {
340
385
  display: inline;
341
386
  }
342
387
  `;
343
388
  });
344
389
  StyledHeaderSummaryValue.defaultProps = defaultThemeProp;
345
- export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { palette: { 'primary-background': primaryBackground }, 'border-radius': borderRadius }, components: { tabs: { detached: tabsDetached } } } }) => {
390
+ export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { 'border-radius': borderRadius }, components: { tabs: { detached: tabsDetached }, card: { background } } } }) => {
346
391
  const { intelligentGuidance } = useCaseViewContext();
347
392
  return css `
348
393
  overflow: auto;
349
394
  flex: 1;
350
395
  ${tabsDetached &&
351
396
  css `
352
- background: ${primaryBackground};
397
+ background: ${background};
353
398
  border-radius: ${borderRadius};
354
399
  border-start-start-radius: 0;
355
400
  border-start-end-radius: 0;
@@ -363,14 +408,14 @@ export const StyledCaseSummaryInfo = styled.div(({ theme: { base: { palette: { '
363
408
  });
364
409
  StyledCaseSummaryInfo.defaultProps = defaultThemeProp;
365
410
  export const StyledCaseSummaryContainer = styled.div(({ theme }) => {
366
- const { base: { palette: { 'primary-background': primaryBackground } }, components: { 'field-value-list': { inline: { detached } } } } = theme;
411
+ const { components: { 'field-value-list': { inline: { detached } }, card: { background } } } = theme;
367
412
  return css `
368
413
  padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);
369
414
 
370
415
  ${detached &&
371
416
  css `
372
417
  padding: 0;
373
- background: ${primaryBackground};
418
+ background: ${background};
374
419
  `}
375
420
  `;
376
421
  });
@@ -378,6 +423,7 @@ StyledCaseSummaryContainer.defaultProps = defaultThemeProp;
378
423
  export const StyledExpandCollapseButton = styled(Button)(() => {
379
424
  return css `
380
425
  border: none;
426
+
381
427
  ${StyledIcon} {
382
428
  width: 1.5rem;
383
429
  height: 1.5rem;
@@ -418,10 +464,11 @@ export const StyledExpandCollapseSummaryButton = styled(StyledExpandCollapseButt
418
464
  `;
419
465
  });
420
466
  StyledExpandCollapseSummaryButton.defaultProps = defaultThemeProp;
421
- export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette: { 'primary-background': primaryBackground, 'border-line': borderLine }, 'border-radius': borderRadius, 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin } }, components: { 'case-view': { summary: { detached } }, tabs: { detached: tabsDetached } } } }) => {
422
- const { summaryExpanded, aboveMD } = useCaseViewContext();
467
+ export const StyledCaseSummary = styled.div(({ theme, theme: { base: { spacing, palette: { 'border-line': borderLine }, 'border-radius': borderRadius, 'hit-area': { 'mouse-min': mouseMin, 'finger-min': fingerMin } }, components: { 'case-view': { summary: { detached } }, card: { background: cardBackground }, tabs: { detached: tabsDetached } } } }) => {
468
+ const { summaryExpanded, aboveMD, color } = useCaseViewContext();
469
+ const { caseTypeColor, headerBackground, interactiveColor } = getCaseViewColors(theme, color);
423
470
  return css `
424
- background: ${primaryBackground};
471
+ background: ${cardBackground};
425
472
  position: relative;
426
473
  height: 100%;
427
474
  ${aboveMD &&
@@ -442,6 +489,7 @@ export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette
442
489
  &[aria-orientation='vertical'] {
443
490
  padding-top: calc(1.5 * ${spacing});
444
491
  border-block-start: 0.0625rem solid ${borderLine};
492
+
445
493
  & ${StyledTab} {
446
494
  height: ${mouseMin};
447
495
 
@@ -452,6 +500,28 @@ export const StyledCaseSummary = styled.div(({ theme: { base: { spacing, palette
452
500
  }
453
501
  }
454
502
  `}
503
+
504
+ ${caseTypeColor &&
505
+ theme.base['case-type-colors'] === 'header-and-icon' &&
506
+ css `
507
+ & ${StyledTabs} {
508
+ &[aria-orientation='vertical']::after {
509
+ background: ${caseTypeColor};
510
+ }
511
+
512
+ &[aria-orientation='vertical']::before {
513
+ background: ${headerBackground};
514
+ }
515
+ }
516
+
517
+ & ${StyledTab}[aria-selected='true'] {
518
+ background-color: ${headerBackground};
519
+
520
+ span {
521
+ color: ${interactiveColor};
522
+ }
523
+ }
524
+ `}
455
525
  `;
456
526
  });
457
527
  StyledCaseSummary.defaultProps = defaultThemeProp;
@@ -464,15 +534,76 @@ export const StyledTasks = styled.div(({ theme: { base: { spacing } } }) => {
464
534
  `;
465
535
  });
466
536
  StyledTasks.defaultProps = defaultThemeProp;
467
- export const StyledTabPanelWrapper = styled.div(({ theme: { components: { card: { 'border-radius': cardBorderRadius } } } }) => {
537
+ export const StyledTabPanelWrapper = styled.div(({ theme: { base: { animation: { speed, timing } }, components: { card: { 'border-radius': cardBorderRadius } } } }) => {
538
+ const { start } = useDirection();
468
539
  return css `
469
- ${StyledTabPanel} ${StyledProgressBackdrop} {
470
- border-radius: ${cardBorderRadius};
540
+ ${StyledTabPanel} {
541
+ ${StyledProgressBackdrop} {
542
+ border-radius: ${cardBorderRadius};
543
+ }
544
+ }
545
+
546
+ /* Top-level horizontal tabs (with or without overflow "All tabs" button) - slide in from top */
547
+ ${StyledTabs} ~ &,
548
+ ${StyledAllTabsWrapper} ~ & {
549
+ position: relative;
550
+ z-index: 0;
551
+
552
+ > ${StyledTabPanel} {
553
+ --reveal-from: 0.7;
554
+ --slide-in-y-start-offset: -0.8rem;
555
+ animation-name: ${animations.reveal}, ${animations.slideInYStart};
556
+ animation-duration: max(calc(${speed} * 2), 1ms);
557
+ animation-timing-function: ${timing.ease};
558
+
559
+ @media (prefers-reduced-motion: reduce) {
560
+ animation-duration: 1ms;
561
+ }
562
+ }
563
+ }
564
+
565
+ /* Top-level vertical tabs - slide in from start*/
566
+ &:not(${StyledTabs} ~ &):not(${StyledAllTabsWrapper} ~ &) > ${StyledTabPanel} {
567
+ ${start === 'right'
568
+ ? css `
569
+ --slide-in-x-end-offset: 1.5rem;
570
+ animation-name: ${animations.reveal}, ${animations.slideInXEnd};
571
+ `
572
+ : css `
573
+ --slide-in-x-start-offset: -1.5rem;
574
+ animation-name: ${animations.reveal}, ${animations.slideInXStart};
575
+ `}
576
+ animation-duration: max(calc(${speed} * 2), 1ms);
577
+ animation-timing-function: ${timing.ease};
578
+
579
+ @media (prefers-reduced-motion: reduce) {
580
+ animation-duration: 1ms;
581
+ }
582
+ }
583
+
584
+ /* Nested tab panels - always fade only */
585
+ ${StyledTabPanel} & ${StyledTabPanel} {
586
+ --reveal-from: 0.7;
587
+ animation-name: ${animations.reveal};
588
+ animation-duration: max(calc(${speed} * 2), 1ms);
589
+ animation-timing-function: ${timing.ease};
590
+
591
+ @media (prefers-reduced-motion: reduce) {
592
+ animation-duration: 1ms;
593
+ }
471
594
  }
472
595
  `;
473
596
  });
474
597
  StyledTabPanelWrapper.defaultProps = defaultThemeProp;
475
- export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-line': borderLine }, spacing, 'border-radius': borderRadius }, components: { 'case-view': { assignments: { detached: assignmentDetached, background: assignmentBackground, 'foreground-color': assignmentForegroundColor } }, tabs: { detached: tabsDetached }, card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius } } } }) => {
598
+ // This component defintion was primarily required to conditionally hide empty div and avoid unnecessary row gap in work area.
599
+ export const StyledBannersStagesTasksContainer = styled.div(() => {
600
+ return css `
601
+ &:has(> ${StyledTasks}:only-child > :only-child:empty[data-flow]) {
602
+ display: none;
603
+ }
604
+ `;
605
+ });
606
+ export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-line': borderLine }, spacing, 'border-radius': borderRadius, breakpoints }, components: { 'case-view': { assignments: { detached: assignmentDetached, background: assignmentBackground, 'foreground-color': assignmentForegroundColor } }, tabs: { detached: tabsDetached }, card: { background, 'foreground-color': foregroundColor, 'border-radius': cardBorderRadius } } } }) => {
476
607
  const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);
477
608
  const foregroundColorForAssignment = calculateForegroundColor(assignmentBackground, assignmentForegroundColor);
478
609
  const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();
@@ -483,6 +614,16 @@ export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-
483
614
  return css `
484
615
  grid-area: work-area;
485
616
  padding: calc(2 * ${spacing});
617
+ @media (width < ${breakpoints.sm}) {
618
+ padding: calc(2 * ${spacing}) calc(0.75 * ${spacing});
619
+ }
620
+
621
+ /* Prevents unnecessary gap when case view has neither stages nor assignments */
622
+ &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {
623
+ ${StyledBannersStagesTasksContainer} {
624
+ display: none;
625
+ }
626
+ }
486
627
 
487
628
  ${aboveMD &&
488
629
  css `
@@ -499,16 +640,14 @@ export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-
499
640
  margin-inline-start: calc(2 * ${spacing});
500
641
  `}
501
642
  `}
502
-
503
643
  /* Order of style here is necessary for overriding styles above. */
504
- ${pbeRem > 0 &&
644
+ ${pbeRem > 0 &&
505
645
  css `
506
646
  /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */
507
647
  padding-block-end: ${pbeRem}rem;
508
648
  `}
509
-
510
- &:has(${StyledAssignments}),
511
- &:has(${StyledHierarchicalAssignments}) {
649
+ &:has(${StyledAssignments}),
650
+ &:has(${StyledHierarchicalAssignments}) {
512
651
  ${StyledStages} {
513
652
  border-block-end: 0.0625rem solid ${borderLine};
514
653
 
@@ -541,6 +680,12 @@ export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-
541
680
  }
542
681
  `}
543
682
 
683
+ /* Ensure horizontal tabs stay above sliding tab content */
684
+ ${StyledTabs}[aria-orientation='horizontal'],
685
+ ${StyledAllTabsWrapper} {
686
+ z-index: 1;
687
+ }
688
+
544
689
  &:has(${StyledStages}) {
545
690
  ${StyledCard}${StyledAssignments},
546
691
  ${StyledCard}${StyledHierarchicalAssignments} {
@@ -561,6 +706,7 @@ export const StyledWorkArea = styled.div(({ theme: { base: { palette: { 'border-
561
706
  background-color: ${backgroundColor};
562
707
  border: solid 0.0625rem ${borderLine};
563
708
  border-radius: var(--border-radius, ${borderRadius});
709
+
564
710
  ${StyledSummaryListItem} {
565
711
  padding: calc(${spacing} / 2) ${spacing};
566
712
  }
@@ -581,8 +727,9 @@ export const StyledExpandCollapseUtilitiesButton = styled(StyledExpandCollapseBu
581
727
  `;
582
728
  });
583
729
  StyledExpandCollapseUtilitiesButton.defaultProps = defaultThemeProp;
730
+ const genAICoachReservedSpace = '4rem';
584
731
  export const StyledUtilities = styled.div(({ theme }) => {
585
- const { utilitiesExpanded, aboveLG, aboveMD } = useCaseViewContext();
732
+ const { utilitiesExpanded, aboveLG, aboveMD, hasGenAICoach } = useCaseViewContext();
586
733
  return css `
587
734
  height: max-content;
588
735
  margin-block: calc(2 * ${theme.base.spacing});
@@ -592,6 +739,7 @@ export const StyledUtilities = styled.div(({ theme }) => {
592
739
  }
593
740
 
594
741
  /* If utilities are in an expanded drawer. */
742
+
595
743
  ${utilitiesExpanded &&
596
744
  aboveMD &&
597
745
  !aboveLG &&
@@ -599,28 +747,34 @@ export const StyledUtilities = styled.div(({ theme }) => {
599
747
  /* Maintains the column width to avoid page content shift. */
600
748
  visibility: hidden;
601
749
  `}
602
-
603
750
  ${aboveLG &&
604
751
  utilitiesExpanded &&
605
752
  css `
606
753
  width: 25rem;
607
754
  `}
608
-
609
-
610
- /* Selects the h2 in the utilities column, not the drawer. */
755
+ /* Selects the h2 in the utilities column, not the drawer. */
611
756
  ${StyledUtilitiesHeading} {
612
757
  /* Hide the utilities h2 under certain conditions.*/
613
758
  ${((aboveMD && !utilitiesExpanded) || (aboveMD && utilitiesExpanded && !aboveLG)) &&
614
759
  hideVisually()}
615
760
  }
761
+
762
+ /* Reserve space below so the docked GenAI coach doesn't overlap utility items. */
763
+ ${hasGenAICoach &&
764
+ css `
765
+ margin-block-end: ${genAICoachReservedSpace};
766
+ `}
616
767
  `;
617
768
  });
618
769
  StyledUtilities.defaultProps = defaultThemeProp;
619
- export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints, 'z-index': zIndex }, components: { 'case-view': { summary: { detached: summaryDetached }, utilities: { detached: utilitiesDetached } } } } }) => {
770
+ export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints, 'z-index': zIndex, palette: { 'app-background': appBackground } }, components: { 'app-shell': { nav: { background: navBackground } }, 'case-view': { summary: { detached: summaryDetached }, utilities: { detached: utilitiesDetached } } } } }) => {
620
771
  const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } = useCaseViewContext();
621
772
  const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;
773
+ const inlineStartPadding = navBackground === appBackground && summaryExpanded ? `${spacing}` : `calc(${spacing} * 2)`;
622
774
  return css `
623
- top: ${summaryExpanded ? 'var(--top-offset)' : 'var(--appshell-offset, 0)'};
775
+ top: ${summaryExpanded
776
+ ? 'var(--top-offset)'
777
+ : 'calc(var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--appshell-top-offset, 0rem))'};
624
778
  width: 100%;
625
779
  z-index: ${zIndex.popover};
626
780
 
@@ -633,7 +787,7 @@ export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints
633
787
  ${summaryDetached &&
634
788
  aboveSM &&
635
789
  css `
636
- padding: calc(2 * ${spacing});
790
+ padding-inline-start: ${inlineStartPadding};
637
791
  padding-inline-end: ${utilitiesDetached && shouldRenderMobileTabs
638
792
  ? `calc(2 * ${spacing})`
639
793
  : 0};
@@ -659,40 +813,48 @@ export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints
659
813
  StyledSummary.defaultProps = defaultThemeProp;
660
814
  export const StyledCaseDrawer = styled.div(({ previewActive, utilitiesExpanded, theme }) => {
661
815
  return css `
662
- --utilities-drawer-width: var(--resize-drawer-width);
663
- --utilities-drawer-min-width: ${resizeDrawerMinWidth};
664
- min-width: var(--utilities-drawer-min-width);
665
- max-width: ${resizeDrawerMaxWidth};
666
- width: var(--utilities-drawer-width);
667
816
  background-color: ${theme.base.palette['primary-background']};
668
- height: calc(100vh - ${headerHeight});
669
- inset-block-start: ${headerHeight};
817
+ height: calc(
818
+ 100dvh - var(--appshell-offset, ${headerHeight}) - var(--appshell-top-offset, 0rem) - var(
819
+ --appshell-bottom-offset,
820
+ 0rem
821
+ )
822
+ );
823
+ inset-block-start: calc(
824
+ var(--appshell-offset, ${headerHeight}) + var(--appshell-top-offset, 0rem)
825
+ );
670
826
  z-index: ${theme.base['z-index'].drawer - 1};
827
+ max-width: ${resizeDrawerMinWidth};
671
828
 
672
829
  ${previewActive &&
673
830
  css `
674
- @media (min-width: ${theme.base.breakpoints.xl}) {
831
+ @media (min-width: ${theme.base.breakpoints.md}) {
675
832
  inset-inline-end: ${resizeDrawerDefaultWidth};
676
833
  ${utilitiesExpanded &&
677
834
  css `
678
835
  inset-inline-end: var(--resize-drawer-width);
679
- width: var(--utilities-drawer-min-width);
680
836
  `}
681
837
  }
682
838
  `}
683
-
684
839
  ${StyledGenAICoachContainer} {
685
- width: calc(var(--utilities-drawer-width) - 2rem);
840
+ width: calc(${resizeDrawerMinWidth} - 2rem);
686
841
  }
687
842
  `;
688
843
  });
689
844
  StyledCaseDrawer.defaultProps = defaultThemeProp;
690
845
  export const StyledCaseDrawerContent = styled.div(({ theme: { base: { palette: { 'app-background': appBackground }, spacing } } }) => {
846
+ const { hasGenAICoach } = useCaseViewContext();
691
847
  return css `
692
848
  background: ${appBackground};
693
849
  padding: calc(2 * ${spacing});
694
850
  height: 100%;
695
851
  overflow: auto;
852
+
853
+ /* Reserve scroll space so the docked GenAI coach doesn't overlap utility items. */
854
+ ${hasGenAICoach &&
855
+ css `
856
+ padding-block-end: ${genAICoachReservedSpace};
857
+ `}
696
858
  `;
697
859
  });
698
860
  StyledCaseDrawerContent.defaultProps = defaultThemeProp;
@@ -704,6 +866,7 @@ export const StyledPersistentUtility = styled.div(({ theme, persistentUtilityExp
704
866
  z-index: 1;
705
867
  height: var(--case-view-height);
706
868
  inset-block-start: var(--top-offset);
869
+ inset-block-end: var(--bottom-offset);
707
870
  padding-block: calc(2 * ${theme.base.spacing});
708
871
  `;
709
872
  });
@@ -732,8 +895,13 @@ export const StyledCaseView = styled.div(({ theme: { base: { palette: { 'app-bac
732
895
  const utilitiesForegroundComputed = calculateForegroundColor(utilitiesBackground, utilitiesForegroundColor);
733
896
  const { aboveSM, aboveMD, isPreview } = useCaseViewContext();
734
897
  return css `
735
- --top-offset: calc(var(--appshell-offset, 0rem) + var(--summary-height));
736
- --case-view-height: calc(100vh - var(--top-offset));
898
+ --top-offset: calc(
899
+ var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--summary-height) +
900
+ ${aboveSM ? 'var(--appshell-top-offset, 0rem)' : '0rem'}
901
+ );
902
+ /* stylelint-disable-next-line length-zero-no-unit */
903
+ --bottom-offset: var(--appshell-bottom-offset, 0rem);
904
+ --case-view-height: calc(100dvh - var(--top-offset) - var(--bottom-offset));
737
905
  position: relative;
738
906
  min-height: var(--case-view-height);
739
907
  background: ${appBackground};
@@ -750,12 +918,15 @@ export const StyledCaseView = styled.div(({ theme: { base: { palette: { 'app-bac
750
918
  margin-inline-end: 0;
751
919
  padding: calc(2 * ${spacing});
752
920
  padding-inline-end: 0;
753
- border-radius: ${borderRadius} 0 0 ${borderRadius};
921
+ border-start-start-radius: ${borderRadius};
922
+ border-end-start-radius: ${borderRadius};
923
+ border-start-end-radius: 0;
924
+ border-end-end-radius: 0;
754
925
 
755
926
  ${StyledCard},
756
927
  ${StyledGenAICoachContainer} {
757
- border-top-right-radius: 0;
758
- border-bottom-right-radius: 0;
928
+ border-start-end-radius: 0;
929
+ border-end-end-radius: 0;
759
930
  }
760
931
 
761
932
  ${StyledGenAICoachContainer} {
@@ -773,6 +944,7 @@ export const StyledCaseView = styled.div(({ theme: { base: { palette: { 'app-bac
773
944
  ${StyledSummary} {
774
945
  padding-inline-end: calc(2 * ${spacing});
775
946
  }
947
+
776
948
  ${StyledCaseHeader} {
777
949
  border-end-end-radius: ${borderRadius};
778
950
  }
@@ -783,6 +955,10 @@ export const StyledCaseView = styled.div(({ theme: { base: { palette: { 'app-bac
783
955
  css `
784
956
  ${StyledGenAICoachContainer} {
785
957
  height: 42.5rem;
958
+
959
+ ${StyledInitialMessageContainer} {
960
+ justify-content: center;
961
+ }
786
962
  }
787
963
  `}
788
964
  `;
@@ -802,22 +978,53 @@ export const StyledCoachButton = styled(AIButton)(({ theme: { base: { spacing, b
802
978
  position: fixed;
803
979
  width: 2.75rem;
804
980
  height: 2.75rem;
805
- inset-block-end: calc(2 * ${spacing});
981
+ inset-block-end: calc(
982
+ var(--footer-height, var(--appshell-bottom-offset, 0rem)) + 2 * ${spacing}
983
+ );
806
984
  inset-inline-end: calc(2 * ${spacing});
807
985
  ${previewActive &&
808
986
  css `
809
- @media (min-width: ${breakpoints.xl}) {
987
+ @media (min-width: ${breakpoints.md}) {
810
988
  margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});
811
989
  }
812
990
  `}
813
991
  `;
814
992
  });
815
993
  StyledCoachButton.defaultProps = defaultThemeProp;
816
- export const StyledUtilitiesWrapper = styled.div(({ genAIHeight }) => {
817
- return genAIHeight !== undefined
818
- ? css `
819
- padding-block-end: calc(${genAIHeight}px + 1rem);
820
- `
821
- : null;
994
+ export const StyledUtilitiesWrapper = styled.div ``;
995
+ export const StyledCaseViewIcon = styled(Icon)(({ theme }) => {
996
+ const { color } = useCaseViewContext();
997
+ const caseTypeColorsEnabled = theme.base['case-type-colors'] === 'icon-only' ||
998
+ theme.base['case-type-colors'] === 'header-and-icon';
999
+ const resolvedCaseTypeColor = caseTypeColorsEnabled && color !== undefined ? resolveCaseTypeColor(theme, color) : undefined;
1000
+ return css `
1001
+ --icon-color: ${resolvedCaseTypeColor ?? theme.base.palette['brand-accent']};
1002
+ --gradient-start: oklch(from var(--icon-color) calc(l - 0.3) calc(c * 1.5) h);
1003
+ --gradient-mid: oklch(from var(--icon-color) l c h);
1004
+ --gradient-end: oklch(from var(--icon-color) calc(l + 0.5) calc(c * 1.5) h);
1005
+
1006
+ ${theme.components['case-view'].icon.color !== 'auto' &&
1007
+ css `
1008
+ color: ${theme.components['case-view'].icon.color};
1009
+ `}
1010
+
1011
+ ${theme.components['case-view'].icon.background !== 'auto' &&
1012
+ css `
1013
+ background: ${theme.components['case-view'].icon.background};
1014
+ `}
1015
+
1016
+ ${theme.components['case-view'].icon.background === 'auto' &&
1017
+ caseTypeColorsEnabled &&
1018
+ resolvedCaseTypeColor &&
1019
+ css `
1020
+ background: ${resolvedCaseTypeColor};
1021
+ `}
1022
+
1023
+ ${theme.components['case-view'].icon['box-shadow'] !== 'auto' &&
1024
+ css `
1025
+ box-shadow: ${theme.components['case-view'].icon['box-shadow']};
1026
+ `}
1027
+ `;
822
1028
  });
1029
+ StyledCaseViewIcon.defaultProps = defaultThemeProp;
823
1030
  //# sourceMappingURL=CaseView.styles.js.map