@pega/cosmos-react-work 10.0.0-build.1.8 → 10.0.0-build.10.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 (232) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +8 -4
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +38 -11
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  5. package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts +2 -0
  6. package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts.map +1 -0
  7. package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js +8 -0
  8. package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js.map +1 -0
  9. package/lib/components/Article/ArticleRating.d.ts.map +1 -1
  10. package/lib/components/Article/ArticleRating.js +2 -2
  11. package/lib/components/Article/ArticleRating.js.map +1 -1
  12. package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
  13. package/lib/components/ArticleList/ArticleFeedback.js +2 -2
  14. package/lib/components/ArticleList/ArticleFeedback.js.map +1 -1
  15. package/lib/components/CasePreview/CasePreview.d.ts +2 -0
  16. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  17. package/lib/components/CasePreview/CasePreview.js +33 -13
  18. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  19. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
  20. package/lib/components/CaseView/CaseHeader/CaseHeader.js +5 -3
  21. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
  22. package/lib/components/CaseView/CaseSummary.d.ts +3 -2
  23. package/lib/components/CaseView/CaseSummary.d.ts.map +1 -1
  24. package/lib/components/CaseView/CaseSummary.js +2 -2
  25. package/lib/components/CaseView/CaseSummary.js.map +1 -1
  26. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  27. package/lib/components/CaseView/CaseView.js +6 -12
  28. package/lib/components/CaseView/CaseView.js.map +1 -1
  29. package/lib/components/CaseView/CaseView.styles.d.ts +2 -2
  30. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  31. package/lib/components/CaseView/CaseView.styles.js +193 -153
  32. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  33. package/lib/components/CaseView/CaseView.types.d.ts +6 -2
  34. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  35. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  36. package/lib/components/CaseView/UtilitiesSummary.js +1 -4
  37. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  38. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
  39. package/lib/components/CaseView/UtilitySummaryItemDialog.js +7 -4
  40. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
  41. package/lib/components/Details/Details.d.ts.map +1 -1
  42. package/lib/components/Details/Details.js +9 -6
  43. package/lib/components/Details/Details.js.map +1 -1
  44. package/lib/components/Details/Details.styles.d.ts.map +1 -1
  45. package/lib/components/Details/Details.styles.js +10 -7
  46. package/lib/components/Details/Details.styles.js.map +1 -1
  47. package/lib/components/Details/DetailsList.d.ts.map +1 -1
  48. package/lib/components/Details/DetailsList.js +2 -2
  49. package/lib/components/Details/DetailsList.js.map +1 -1
  50. package/lib/components/GenAICoach/ActiveCases.d.ts.map +1 -1
  51. package/lib/components/GenAICoach/ActiveCases.js +2 -1
  52. package/lib/components/GenAICoach/ActiveCases.js.map +1 -1
  53. package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
  54. package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
  55. package/lib/components/GenAICoach/GenAICoach.js +267 -73
  56. package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
  57. package/lib/components/GenAICoach/GenAICoach.styles.d.ts +232 -9
  58. package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
  59. package/lib/components/GenAICoach/GenAICoach.styles.js +374 -192
  60. package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
  61. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +1 -1
  62. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
  63. package/lib/components/GenAICoach/GenAICoach.test-ids.js +3 -1
  64. package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
  65. package/lib/components/GenAICoach/GenAICoach.types.d.ts +36 -3
  66. package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
  67. package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
  68. package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
  69. package/lib/components/GenAICoach/GenAIMessage.js +44 -21
  70. package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
  71. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -1
  72. package/lib/components/GenAICoach/GenAIMessageFeedback.js +10 -3
  73. package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -1
  74. package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -1
  75. package/lib/components/GenAICoach/Questionnaire.js +10 -3
  76. package/lib/components/GenAICoach/Questionnaire.js.map +1 -1
  77. package/lib/components/GenAICoach/index.d.ts +1 -1
  78. package/lib/components/GenAICoach/index.d.ts.map +1 -1
  79. package/lib/components/GenAICoach/index.js.map +1 -1
  80. package/lib/components/HeroBanner/HeroBanner.d.ts +7 -0
  81. package/lib/components/HeroBanner/HeroBanner.d.ts.map +1 -0
  82. package/lib/components/HeroBanner/HeroBanner.js +63 -0
  83. package/lib/components/HeroBanner/HeroBanner.js.map +1 -0
  84. package/lib/components/HeroBanner/HeroBanner.styles.d.ts +35 -0
  85. package/lib/components/HeroBanner/HeroBanner.styles.d.ts.map +1 -0
  86. package/lib/components/HeroBanner/HeroBanner.styles.js +118 -0
  87. package/lib/components/HeroBanner/HeroBanner.styles.js.map +1 -0
  88. package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts +2 -0
  89. package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts.map +1 -0
  90. package/lib/components/HeroBanner/HeroBanner.test-ids.js +11 -0
  91. package/lib/components/HeroBanner/HeroBanner.test-ids.js.map +1 -0
  92. package/lib/components/HeroBanner/HeroBanner.types.d.ts +51 -0
  93. package/lib/components/HeroBanner/HeroBanner.types.d.ts.map +1 -0
  94. package/lib/components/HeroBanner/HeroBanner.types.js +2 -0
  95. package/lib/components/HeroBanner/HeroBanner.types.js.map +1 -0
  96. package/lib/components/HeroBanner/index.d.ts +3 -0
  97. package/lib/components/HeroBanner/index.d.ts.map +1 -0
  98. package/lib/components/HeroBanner/index.js +2 -0
  99. package/lib/components/HeroBanner/index.js.map +1 -0
  100. package/lib/components/HeroBanner/utils.d.ts +20 -0
  101. package/lib/components/HeroBanner/utils.d.ts.map +1 -0
  102. package/lib/components/HeroBanner/utils.js +125 -0
  103. package/lib/components/HeroBanner/utils.js.map +1 -0
  104. package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
  105. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +5 -1
  106. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -1
  107. package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -1
  108. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts +5 -1
  109. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
  110. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +25 -15
  111. package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
  112. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
  113. package/lib/components/IntelligentGuidance/IntelligentGuidance.js +6 -5
  114. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
  115. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
  116. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +27 -9
  117. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
  118. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +8 -0
  119. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -1
  120. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -1
  121. package/lib/components/InteractionNotification/InteractionNotification.d.ts +2 -2
  122. package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
  123. package/lib/components/InteractionNotification/InteractionNotification.js +6 -4
  124. package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
  125. package/lib/components/MasterDetail/DetailPanelHeader.d.ts +29 -0
  126. package/lib/components/MasterDetail/DetailPanelHeader.d.ts.map +1 -0
  127. package/lib/components/MasterDetail/DetailPanelHeader.js +14 -0
  128. package/lib/components/MasterDetail/DetailPanelHeader.js.map +1 -0
  129. package/lib/components/MasterDetail/MasterDetail.d.ts +6 -0
  130. package/lib/components/MasterDetail/MasterDetail.d.ts.map +1 -0
  131. package/lib/components/MasterDetail/MasterDetail.js +116 -0
  132. package/lib/components/MasterDetail/MasterDetail.js.map +1 -0
  133. package/lib/components/MasterDetail/MasterDetail.styles.d.ts +595 -0
  134. package/lib/components/MasterDetail/MasterDetail.styles.d.ts.map +1 -0
  135. package/lib/components/MasterDetail/MasterDetail.styles.js +246 -0
  136. package/lib/components/MasterDetail/MasterDetail.styles.js.map +1 -0
  137. package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts +2 -0
  138. package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts.map +1 -0
  139. package/lib/components/MasterDetail/MasterDetail.test-ids.js +19 -0
  140. package/lib/components/MasterDetail/MasterDetail.test-ids.js.map +1 -0
  141. package/lib/components/MasterDetail/MasterDetail.types.d.ts +71 -0
  142. package/lib/components/MasterDetail/MasterDetail.types.d.ts.map +1 -0
  143. package/lib/components/MasterDetail/MasterDetail.types.js +2 -0
  144. package/lib/components/MasterDetail/MasterDetail.types.js.map +1 -0
  145. package/lib/components/MasterDetail/MasterDetailActions.d.ts +10 -0
  146. package/lib/components/MasterDetail/MasterDetailActions.d.ts.map +1 -0
  147. package/lib/components/MasterDetail/MasterDetailActions.js +45 -0
  148. package/lib/components/MasterDetail/MasterDetailActions.js.map +1 -0
  149. package/lib/components/MasterDetail/index.d.ts +5 -0
  150. package/lib/components/MasterDetail/index.d.ts.map +1 -0
  151. package/lib/components/MasterDetail/index.js +4 -0
  152. package/lib/components/MasterDetail/index.js.map +1 -0
  153. package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
  154. package/lib/components/SearchResults/SearchResults.js +11 -7
  155. package/lib/components/SearchResults/SearchResults.js.map +1 -1
  156. package/lib/components/SearchResults/SearchResults.styles.js +3 -3
  157. package/lib/components/SearchResults/SearchResults.styles.js.map +1 -1
  158. package/lib/components/Shortcuts/Shortcuts.d.ts +1 -1
  159. package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -1
  160. package/lib/components/Shortcuts/Shortcuts.js +40 -18
  161. package/lib/components/Shortcuts/Shortcuts.js.map +1 -1
  162. package/lib/components/Shortcuts/Shortcuts.styles.d.ts +17 -6
  163. package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -1
  164. package/lib/components/Shortcuts/Shortcuts.styles.js +104 -58
  165. package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -1
  166. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +1 -1
  167. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -1
  168. package/lib/components/Shortcuts/Shortcuts.test-ids.js +4 -3
  169. package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -1
  170. package/lib/components/Shortcuts/Shortcuts.types.d.ts +18 -2
  171. package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -1
  172. package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -1
  173. package/lib/components/Stages/Stages.d.ts +4 -2
  174. package/lib/components/Stages/Stages.d.ts.map +1 -1
  175. package/lib/components/Stages/Stages.js +123 -88
  176. package/lib/components/Stages/Stages.js.map +1 -1
  177. package/lib/components/Stages/Stages.styles.d.ts +88 -3
  178. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  179. package/lib/components/Stages/Stages.styles.js +873 -171
  180. package/lib/components/Stages/Stages.styles.js.map +1 -1
  181. package/lib/components/Stages/Stages.test-ids.d.ts +2 -0
  182. package/lib/components/Stages/Stages.test-ids.d.ts.map +1 -0
  183. package/lib/components/Stages/Stages.test-ids.js +7 -0
  184. package/lib/components/Stages/Stages.test-ids.js.map +1 -0
  185. package/lib/components/Stages/Stages.types.d.ts +9 -3
  186. package/lib/components/Stages/Stages.types.d.ts.map +1 -1
  187. package/lib/components/Stages/Stages.types.js.map +1 -1
  188. package/lib/components/Stages/index.d.ts +2 -1
  189. package/lib/components/Stages/index.d.ts.map +1 -1
  190. package/lib/components/Stages/index.js +1 -0
  191. package/lib/components/Stages/index.js.map +1 -1
  192. package/lib/components/Stages/useStagesScrollbar.d.ts +21 -0
  193. package/lib/components/Stages/useStagesScrollbar.d.ts.map +1 -0
  194. package/lib/components/Stages/useStagesScrollbar.js +152 -0
  195. package/lib/components/Stages/useStagesScrollbar.js.map +1 -0
  196. package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
  197. package/lib/components/Stakeholders/Stakeholders.js +13 -11
  198. package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
  199. package/lib/components/Stakeholders/Stakeholders.types.d.ts +1 -1
  200. package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -1
  201. package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -1
  202. package/lib/components/Tags/Tags.d.ts.map +1 -1
  203. package/lib/components/Tags/Tags.js +2 -13
  204. package/lib/components/Tags/Tags.js.map +1 -1
  205. package/lib/components/Tasks/TaskCard.d.ts +8 -0
  206. package/lib/components/Tasks/TaskCard.d.ts.map +1 -0
  207. package/lib/components/Tasks/TaskCard.js +42 -0
  208. package/lib/components/Tasks/TaskCard.js.map +1 -0
  209. package/lib/components/Tasks/TaskCards.d.ts +9 -0
  210. package/lib/components/Tasks/TaskCards.d.ts.map +1 -0
  211. package/lib/components/Tasks/TaskCards.js +40 -0
  212. package/lib/components/Tasks/TaskCards.js.map +1 -0
  213. package/lib/components/Tasks/TaskList.d.ts +13 -1
  214. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  215. package/lib/components/Tasks/TaskList.js +31 -19
  216. package/lib/components/Tasks/TaskList.js.map +1 -1
  217. package/lib/components/Tasks/Tasks.d.ts +46 -6
  218. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  219. package/lib/components/Tasks/Tasks.js +11 -5
  220. package/lib/components/Tasks/Tasks.js.map +1 -1
  221. package/lib/components/Tasks/Tasks.test-ids.d.ts +1 -1
  222. package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -1
  223. package/lib/components/Tasks/Tasks.test-ids.js +1 -1
  224. package/lib/components/Tasks/Tasks.test-ids.js.map +1 -1
  225. package/lib/components/Tasks/index.d.ts +1 -1
  226. package/lib/components/Tasks/index.d.ts.map +1 -1
  227. package/lib/components/Tasks/index.js.map +1 -1
  228. package/lib/index.d.ts +4 -0
  229. package/lib/index.d.ts.map +1 -1
  230. package/lib/index.js +4 -0
  231. package/lib/index.js.map +1 -1
  232. package/package.json +5 -6
@@ -1,17 +1,18 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { getContrast, hideVisually, mix, rgba, transparentize } from 'polished';
2
+ import { hideVisually, mix, rgba, transparentize } from 'polished';
3
3
  import { useContext } from 'react';
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';
4
+ import { Button, calculateFontSize, CardContent, defaultThemeProp, resolveSupplementalColor, StyledBreadcrumbs, StyledButtonLink, StyledFieldValue, StyledInlineFieldValueRow, StyledStackedFieldValue, StyledIcon, StyledLabel, StyledPopover, StyledText, StyledTooltip, tryCatch, FieldValueList, StyledLink, StyledCard, Text, AppShellContext, AIButton, StyledButton, calculateForegroundColor, calculateBackgroundAndContrastColor, isSolidColor, resolveContrastColor, meetsMinContrast, 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
- import { headerHeight } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.styles';
7
6
  import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
8
7
  import { StyledAllTabsWrapper, StyledTabs, StylesAllTabsButtonWrapper } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';
9
- import { resizeDrawerMinWidth, resizeDrawerMaxWidth, resizeDrawerDefaultWidth, wcagContrast } from '@pega/cosmos-react-core/lib/styles/constants';
8
+ import { resizeDrawerMinWidth, resizeDrawerMaxWidth, resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';
9
+ import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
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';
13
13
  import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
14
- import { StyledStage, StyledStageContainer, StyledStages } from '../Stages/Stages.styles';
14
+ import { StyledStatus } from '@pega/cosmos-react-core/lib/components/Badges/Status';
15
+ import { StyledStage, StyledStageContainer, StyledStages, StyledStagesWrapper } from '../Stages/Stages.styles';
15
16
  import { StyledAssignments } from '../Assignments/Assignments.styles';
16
17
  import { StyledAssignments as StyledHierarchicalAssignments } from '../HierarchicalAssignments/Assignments.styles';
17
18
  import { StyledGenAICoachContainer, StyledInitialMessageContainer } from '../GenAICoach/GenAICoach.styles';
@@ -37,24 +38,35 @@ const getCaseTypeHeaderColors = (theme, color) => {
37
38
  ? mixCaseColorWithBackground(resolvedCaseTypeColor, theme.components.card.background)
38
39
  : theme.components['case-view'].header.background;
39
40
  const headerForeground = resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'
40
- ? readableColor(headerBackground)
41
- : calculateForegroundColor(headerBackground, theme.components['case-view'].header['foreground-color']);
41
+ ? resolveContrastColor({
42
+ background: headerBackground,
43
+ theme
44
+ })
45
+ : calculateForegroundColor(headerBackground, theme.components['case-view'].header['foreground-color'], theme);
42
46
  return { caseTypeColor: resolvedCaseTypeColor ?? undefined, headerBackground, headerForeground };
43
47
  };
44
48
  const getCaseViewColors = (theme, caseTypeColor) => {
45
49
  const interactive = theme.base.palette.interactive;
50
+ const minContrast = theme.base['min-contrast'];
46
51
  const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);
47
52
  const headerBackground = caseTypeHeaderColors.headerBackground;
48
53
  const foregroundColor = caseTypeHeaderColors.headerForeground;
49
54
  const isGradientBackground = !isSolidColor(headerBackground);
50
55
  const elementBackground = isGradientBackground
51
- ? readableColor(foregroundColor)
56
+ ? resolveContrastColor({
57
+ background: foregroundColor,
58
+ theme
59
+ })
52
60
  : headerBackground;
53
- const interactiveUsable = getContrast(elementBackground, interactive) >= wcagContrast.AA;
61
+ const interactiveUsable = meetsMinContrast(interactive, elementBackground, minContrast);
54
62
  const interactiveColor = !isGradientBackground && interactiveUsable ? interactive : foregroundColor;
55
63
  let hoverBackground = rgba(interactiveColor, 0.15);
56
64
  if (!isGradientBackground && interactiveUsable) {
57
- hoverBackground = readableHue(interactive, interactiveColor);
65
+ hoverBackground = resolveContrastColor({
66
+ background: interactiveColor,
67
+ foreground: interactive,
68
+ theme
69
+ });
58
70
  }
59
71
  return {
60
72
  caseTypeColor: caseTypeHeaderColors.caseTypeColor,
@@ -196,6 +208,8 @@ export const StyledCaseHeaderPromotedAction = styled(Button)(({ theme }) => {
196
208
  color: ${interactiveColor};
197
209
  background-color: transparent;
198
210
  border-color: ${interactiveColor};
211
+ white-space: normal;
212
+ text-align: start;
199
213
 
200
214
  @media (hover: hover) {
201
215
  &:hover {
@@ -289,7 +303,10 @@ export const StyledCaseHeaderText = styled.div(({ theme }) => {
289
303
  StyledCaseHeaderText.defaultProps = defaultThemeProp;
290
304
  export const StyledHeaderSummaryBlock = styled.div(({ hasItems, theme }) => {
291
305
  const { base: { spacing, palette: { 'brand-primary': primary } } } = theme;
292
- const color = readableColor(primary);
306
+ const color = resolveContrastColor({
307
+ background: primary,
308
+ theme
309
+ });
293
310
  const transparentColor = tryCatch(() => transparentize(0.5, color));
294
311
  return css `
295
312
  ${hasItems &&
@@ -384,6 +401,12 @@ export const StyledHeaderSummaryValue = styled(StyledFieldValue)(({ bold, trunca
384
401
  > :not([hidden]) {
385
402
  display: inline;
386
403
  }
404
+
405
+ > ${StyledStatus} {
406
+ display: inline-block;
407
+ max-width: 100%;
408
+ ${ellipsisOverflow}
409
+ }
387
410
  `;
388
411
  });
389
412
  StyledHeaderSummaryValue.defaultProps = defaultThemeProp;
@@ -603,119 +626,134 @@ export const StyledBannersStagesTasksContainer = styled.div(() => {
603
626
  }
604
627
  `;
605
628
  });
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 } } } }) => {
607
- const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);
608
- const foregroundColorForAssignment = calculateForegroundColor(assignmentBackground, assignmentForegroundColor);
609
- const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();
629
+ export const StyledWorkArea = styled.div(({ theme }) => {
630
+ const { 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 } } } = theme;
631
+ const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor, theme);
632
+ const foregroundColorForAssignment = calculateForegroundColor(assignmentBackground, assignmentForegroundColor, theme);
633
+ const { summaryExpanded, aboveMD, intelligentGuidance, isPreview, heading } = useCaseViewContext();
610
634
  let pbeRem = 0;
611
635
  if (intelligentGuidance) {
612
636
  pbeRem = aboveMD && !summaryExpanded ? 4 : 6;
613
637
  }
614
638
  return css `
615
- grid-area: work-area;
616
- padding: calc(2 * ${spacing});
617
- @media (width < ${breakpoints.sm}) {
618
- padding: calc(2 * ${spacing}) calc(0.75 * ${spacing});
619
- }
639
+ grid-area: work-area;
640
+ margin-block: calc(2 * ${spacing});
641
+ padding-inline: calc(2 * ${spacing});
642
+ ${heading === undefined &&
643
+ css `
644
+ margin-block: 0;
645
+ padding-inline: 0;
646
+ `}
647
+ @media (width < ${breakpoints.sm}) {
648
+ padding-inline: calc(0.75 * ${spacing});
649
+ ${heading === undefined &&
650
+ css `
651
+ padding-inline: 0;
652
+ `}
653
+ }
620
654
 
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
- }
655
+ /* Prevents unnecessary gap when case view has neither stages nor assignments */
656
+ &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {
657
+ ${StyledBannersStagesTasksContainer} {
658
+ display: none;
626
659
  }
660
+ }
627
661
 
628
- ${aboveMD &&
662
+ ${aboveMD &&
629
663
  css `
630
- padding: calc(2 * ${spacing}) 0;
664
+ padding-inline: 0;
631
665
 
632
- /* This is required to make scrollStick work. */
633
- ${!isPreview &&
666
+ /* This is required to make scrollStick work. */
667
+ ${!isPreview &&
634
668
  css `
635
- height: max-content;
636
- `}
669
+ height: max-content;
670
+ `}
637
671
 
638
- ${!summaryExpanded &&
672
+ ${!summaryExpanded &&
639
673
  css `
640
- margin-inline-start: calc(2 * ${spacing});
641
- `}
674
+ margin-inline-start: calc(2 * ${spacing});
642
675
  `}
643
- /* Order of style here is necessary for overriding styles above. */
676
+ `}
677
+ /* Order of style here is necessary for overriding styles above. */
644
678
  ${pbeRem > 0 &&
645
679
  css `
646
- /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */
647
- padding-block-end: ${pbeRem}rem;
648
- `}
680
+ /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */
681
+ padding-block-end: ${pbeRem}rem;
682
+ `}
649
683
  &:has(${StyledAssignments}),
650
684
  &:has(${StyledHierarchicalAssignments}) {
651
- ${StyledStages} {
652
- border-block-end: 0.0625rem solid ${borderLine};
685
+ ${StyledStagesWrapper} {
686
+ --stages-wrapper-bottom-radius: 0;
687
+ }
653
688
 
654
- &,
655
- ${StyledStageContainer}:first-of-type > ${StyledStage} {
656
- border-end-start-radius: 0;
657
- }
689
+ ${StyledStages} {
690
+ border-block-end: 0.0625rem solid ${borderLine};
658
691
 
659
- &,
660
- ${StyledStageContainer}:last-of-type > ${StyledStage} {
661
- border-end-end-radius: 0;
662
- }
692
+ &,
693
+ ${StyledStageContainer}:nth-of-type(2) > ${StyledStage} {
694
+ border-end-start-radius: 0;
695
+ }
696
+
697
+ &,
698
+ ${StyledStageContainer}:nth-last-of-type(2) > ${StyledStage} {
699
+ border-end-end-radius: 0;
663
700
  }
664
701
  }
702
+ }
665
703
 
666
- ${tabsDetached &&
704
+ ${tabsDetached &&
667
705
  css `
668
- ${StyledAllTabsWrapper} {
669
- border-start-start-radius: ${cardBorderRadius};
670
- border-start-end-radius: ${cardBorderRadius};
706
+ ${StyledAllTabsWrapper} {
707
+ border-start-start-radius: ${cardBorderRadius};
708
+ border-start-end-radius: ${cardBorderRadius};
671
709
 
672
- ${StyledTabs} {
673
- border-radius: unset;
674
- border-start-end-radius: inherit;
675
- }
710
+ ${StyledTabs} {
711
+ border-radius: unset;
712
+ border-start-end-radius: inherit;
713
+ }
676
714
 
677
- ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {
678
- border-start-start-radius: inherit;
679
- }
715
+ ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {
716
+ border-start-start-radius: inherit;
680
717
  }
681
- `}
718
+ }
719
+ `}
682
720
 
683
- /* Ensure horizontal tabs stay above sliding tab content */
721
+ /* Ensure horizontal tabs stay above sliding tab content */
684
722
  ${StyledTabs}[aria-orientation='horizontal'],
685
723
  ${StyledAllTabsWrapper} {
686
- z-index: 1;
724
+ z-index: 1;
725
+ }
726
+
727
+ &:has(${StyledStages}) {
728
+ ${StyledCard}${StyledAssignments},
729
+ ${StyledCard}${StyledHierarchicalAssignments} {
730
+ margin-block-start: calc(-2 * ${spacing});
731
+ border-start-start-radius: 0;
732
+ border-start-end-radius: 0;
687
733
  }
688
734
 
689
- &:has(${StyledStages}) {
735
+ &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),
736
+ &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {
690
737
  ${StyledCard}${StyledAssignments},
691
738
  ${StyledCard}${StyledHierarchicalAssignments} {
692
- margin-block-start: calc(-2 * ${spacing});
693
- border-start-start-radius: 0;
694
- border-start-end-radius: 0;
695
- }
696
-
697
- &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),
698
- &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {
699
- ${StyledCard}${StyledAssignments},
700
- ${StyledCard}${StyledHierarchicalAssignments} {
701
- background: ${assignmentBackground};
702
- color: ${foregroundColorForAssignment};
703
- ${assignmentDetached &&
739
+ background: ${assignmentBackground};
740
+ color: ${foregroundColorForAssignment};
741
+ ${assignmentDetached &&
704
742
  css `
705
- ${StyledTaskList} {
706
- background-color: ${backgroundColor};
707
- border: solid 0.0625rem ${borderLine};
708
- border-radius: var(--border-radius, ${borderRadius});
709
-
710
- ${StyledSummaryListItem} {
711
- padding: calc(${spacing} / 2) ${spacing};
712
- }
743
+ ${StyledTaskList} {
744
+ background-color: ${backgroundColor};
745
+ border: solid 0.0625rem ${borderLine};
746
+ border-radius: var(--border-radius, ${borderRadius});
747
+
748
+ ${StyledSummaryListItem} {
749
+ padding: calc(${spacing} / 2) ${spacing};
713
750
  }
714
- `}
715
- }
751
+ }
752
+ `}
716
753
  }
717
754
  }
718
- `;
755
+ }
756
+ `;
719
757
  });
720
758
  StyledWorkArea.defaultProps = defaultThemeProp;
721
759
  export const StyledUtilitiesHeading = styled(Text) ``;
@@ -769,12 +807,11 @@ export const StyledUtilities = styled.div(({ theme }) => {
769
807
  StyledUtilities.defaultProps = defaultThemeProp;
770
808
  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 } } } } }) => {
771
809
  const { aboveSM, aboveMD, persistentUtility, aboveXL, summaryExpanded, isPreview } = useCaseViewContext();
810
+ const { isMobileNav } = useContext(AppShellContext);
772
811
  const shouldRenderMobileTabs = !aboveMD || (persistentUtility && !aboveXL) || !summaryExpanded;
773
812
  const inlineStartPadding = navBackground === appBackground && summaryExpanded ? `${spacing}` : `calc(${spacing} * 2)`;
774
813
  return css `
775
- top: ${summaryExpanded
776
- ? 'var(--top-offset)'
777
- : 'calc(var(--appshell-sticky-offset, var(--appshell-offset, 0rem)) + var(--appshell-top-offset, 0rem))'};
814
+ top: var(--top-offset);
778
815
  width: 100%;
779
816
  z-index: ${zIndex.popover};
780
817
 
@@ -806,6 +843,18 @@ export const StyledSummary = styled.div(({ theme: { base: { spacing, breakpoints
806
843
  : css `
807
844
  @media (min-height: ${breakpoints.sm}) {
808
845
  position: sticky;
846
+
847
+ ${isMobileNav &&
848
+ css `
849
+ /* The touch app shell scrolls <main> below its chrome, so sticky offsets start at 0. */
850
+ top: 0;
851
+ `}
852
+
853
+ /* Extend the header background into the safe area without moving its content. */
854
+ & ${StyledCaseHeader} {
855
+ margin-block-start: calc(-1 * var(--safe-area-inset-block-start, 0rem));
856
+ padding-block-start: calc(${spacing} + var(--safe-area-inset-block-start, 0rem));
857
+ }
809
858
  }
810
859
  `}
811
860
  `;
@@ -814,15 +863,8 @@ StyledSummary.defaultProps = defaultThemeProp;
814
863
  export const StyledCaseDrawer = styled.div(({ previewActive, utilitiesExpanded, theme }) => {
815
864
  return css `
816
865
  background-color: ${theme.base.palette['primary-background']};
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
- );
866
+ height: calc(100dvh - var(--appshell-top-offset, 0rem) - var(--appshell-bottom-offset, 0rem));
867
+ inset-block-start: var(--appshell-top-offset, 0);
826
868
  z-index: ${theme.base['z-index'].drawer - 1};
827
869
  max-width: ${resizeDrawerMinWidth};
828
870
 
@@ -864,9 +906,9 @@ export const StyledPersistentUtility = styled.div(({ theme, persistentUtilityExp
864
906
  overflow: auto;
865
907
  position: sticky;
866
908
  z-index: 1;
867
- height: var(--case-view-height);
868
- inset-block-start: var(--top-offset);
869
- inset-block-end: var(--bottom-offset);
909
+ height: calc(var(--case-view-height) - var(--summary-height, 0rem));
910
+ inset-block-start: calc(var(--top-offset) + var(--summary-height, 0rem));
911
+ inset-block-end: var(--appshell-bottom-offset, 0);
870
912
  padding-block: calc(2 * ${theme.base.spacing});
871
913
  `;
872
914
  });
@@ -891,77 +933,75 @@ export const ScrollStick = styled.div `
891
933
  position: sticky;
892
934
  top: 0;
893
935
  `;
894
- export const StyledCaseView = styled.div(({ theme: { base: { palette: { 'app-background': appBackground }, spacing, 'border-radius': borderRadius }, components: { 'case-view': { utilities: { detached: utilitiesDetached, background: utilitiesBackground, 'foreground-color': utilitiesForegroundColor }, summary: { detached: summaryDetached } } } } }) => {
895
- const utilitiesForegroundComputed = calculateForegroundColor(utilitiesBackground, utilitiesForegroundColor);
896
- const { aboveSM, aboveMD, isPreview } = useCaseViewContext();
936
+ export const StyledCaseView = styled.div(({ theme }) => {
937
+ const { base: { palette: { 'app-background': appBackground }, spacing, 'border-radius': borderRadius }, components: { 'case-view': { utilities: { detached: utilitiesDetached, background: utilitiesBackground, 'foreground-color': utilitiesForegroundColor }, summary: { detached: summaryDetached } } } } = theme;
938
+ const utilitiesForegroundComputed = calculateForegroundColor(utilitiesBackground, utilitiesForegroundColor, theme);
939
+ const { aboveSM, aboveMD, isPreview, summaryExpanded, heading } = useCaseViewContext();
897
940
  return css `
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));
905
- position: relative;
906
- min-height: var(--case-view-height);
907
- background: ${appBackground};
941
+ --top-offset: calc(
942
+ ${summaryExpanded ? 'var(--summary-height)' : '0rem'} + var(--appshell-top-offset, 0rem)
943
+ );
944
+ --case-view-height: calc(100dvh - var(--top-offset) - var(--appshell-bottom-offset, 0rem));
945
+ position: relative;
946
+ min-height: ${heading !== undefined ? 'var(--case-view-height)' : 'auto'};
947
+ background: ${heading !== undefined ? appBackground : 'transparent'};
908
948
 
909
- ${aboveMD &&
949
+ ${aboveMD &&
910
950
  css `
911
- ${StyledUtilities}:last-child {
912
- margin-inline-end: calc(2 * ${spacing});
913
- color: ${utilitiesForegroundComputed};
951
+ ${StyledUtilities}:last-child {
952
+ margin-inline-end: calc(2 * ${spacing});
953
+ color: ${utilitiesForegroundComputed};
914
954
 
915
- ${!utilitiesDetached &&
955
+ ${!utilitiesDetached &&
916
956
  css `
917
- background: ${utilitiesBackground};
918
- margin-inline-end: 0;
919
- padding: calc(2 * ${spacing});
920
- padding-inline-end: 0;
921
- border-start-start-radius: ${borderRadius};
922
- border-end-start-radius: ${borderRadius};
957
+ background: ${utilitiesBackground};
958
+ margin-inline-end: 0;
959
+ padding: calc(2 * ${spacing});
960
+ padding-inline-end: 0;
961
+ border-start-start-radius: ${borderRadius};
962
+ border-end-start-radius: ${borderRadius};
963
+ border-start-end-radius: 0;
964
+ border-end-end-radius: 0;
965
+
966
+ ${StyledCard},
967
+ ${StyledGenAICoachContainer} {
923
968
  border-start-end-radius: 0;
924
969
  border-end-end-radius: 0;
970
+ }
925
971
 
926
- ${StyledCard},
927
- ${StyledGenAICoachContainer} {
928
- border-start-end-radius: 0;
929
- border-end-end-radius: 0;
930
- }
931
-
932
- ${StyledGenAICoachContainer} {
933
- inset-inline-end: 0;
934
- }
935
- `}
936
- }
937
- `}
972
+ ${StyledGenAICoachContainer} {
973
+ inset-inline-end: 0;
974
+ }
975
+ `}
976
+ }
977
+ `}
938
978
 
939
- ${aboveSM &&
979
+ ${aboveSM &&
940
980
  summaryDetached &&
941
981
  !isPreview &&
942
982
  css `
943
- &:not(:has(${StyledUtilities})) {
944
- ${StyledSummary} {
945
- padding-inline-end: calc(2 * ${spacing});
946
- }
983
+ &:not(:has(${StyledUtilities})) {
984
+ ${StyledSummary} {
985
+ padding-inline-end: calc(2 * ${spacing});
986
+ }
947
987
 
948
- ${StyledCaseHeader} {
949
- border-end-end-radius: ${borderRadius};
950
- }
988
+ ${StyledCaseHeader} {
989
+ border-end-end-radius: ${borderRadius};
951
990
  }
952
- `}
991
+ }
992
+ `}
953
993
 
954
994
  ${!aboveMD &&
955
995
  css `
956
- ${StyledGenAICoachContainer} {
957
- height: 42.5rem;
996
+ ${StyledGenAICoachContainer} {
997
+ height: 42.5rem;
958
998
 
959
- ${StyledInitialMessageContainer} {
960
- justify-content: center;
961
- }
999
+ ${StyledInitialMessageContainer} {
1000
+ justify-content: center;
962
1001
  }
963
- `}
964
- `;
1002
+ }
1003
+ `}
1004
+ `;
965
1005
  });
966
1006
  StyledCaseView.defaultProps = defaultThemeProp;
967
1007
  export const StyledUtilitiesHeader = styled(Text) `