@pega/cosmos-react-work 10.0.0-build.4.8 → 10.0.0-build.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  2. package/lib/components/AppAnnouncement/AppAnnouncement.js +25 -3
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  4. package/lib/components/Article/ArticleRating.d.ts.map +1 -1
  5. package/lib/components/Article/ArticleRating.js +2 -2
  6. package/lib/components/Article/ArticleRating.js.map +1 -1
  7. package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
  8. package/lib/components/ArticleList/ArticleFeedback.js +2 -2
  9. package/lib/components/ArticleList/ArticleFeedback.js.map +1 -1
  10. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
  11. package/lib/components/CaseView/CaseHeader/CaseHeader.js +1 -1
  12. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
  13. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  14. package/lib/components/CaseView/CaseView.styles.js +153 -137
  15. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  16. package/lib/components/CaseView/CaseView.types.d.ts +1 -0
  17. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  18. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  19. package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
  20. package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
  21. package/lib/components/GenAICoach/GenAICoach.js +39 -6
  22. package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
  23. package/lib/components/GenAICoach/GenAICoach.styles.d.ts +11 -0
  24. package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
  25. package/lib/components/GenAICoach/GenAICoach.styles.js +146 -129
  26. package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
  27. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +1 -1
  28. package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
  29. package/lib/components/GenAICoach/GenAICoach.test-ids.js +3 -1
  30. package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
  31. package/lib/components/GenAICoach/GenAICoach.types.d.ts +13 -1
  32. package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
  33. package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
  34. package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
  35. package/lib/components/GenAICoach/GenAIMessage.js +7 -4
  36. package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
  37. package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -1
  38. package/lib/components/GenAICoach/GenAIMessageFeedback.js +2 -2
  39. package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -1
  40. package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -1
  41. package/lib/components/GenAICoach/Questionnaire.js +10 -3
  42. package/lib/components/GenAICoach/Questionnaire.js.map +1 -1
  43. package/lib/components/GenAICoach/index.d.ts +1 -1
  44. package/lib/components/GenAICoach/index.d.ts.map +1 -1
  45. package/lib/components/GenAICoach/index.js.map +1 -1
  46. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
  47. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +20 -9
  48. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
  49. package/lib/components/InteractionNotification/InteractionNotification.d.ts +1 -1
  50. package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
  51. package/lib/components/InteractionNotification/InteractionNotification.js +2 -2
  52. package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
  53. package/lib/components/Shortcuts/Shortcuts.d.ts +1 -1
  54. package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -1
  55. package/lib/components/Shortcuts/Shortcuts.js +17 -9
  56. package/lib/components/Shortcuts/Shortcuts.js.map +1 -1
  57. package/lib/components/Shortcuts/Shortcuts.styles.d.ts +3 -1
  58. package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -1
  59. package/lib/components/Shortcuts/Shortcuts.styles.js +20 -18
  60. package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -1
  61. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +1 -1
  62. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -1
  63. package/lib/components/Shortcuts/Shortcuts.test-ids.js +4 -3
  64. package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -1
  65. package/lib/components/Shortcuts/Shortcuts.types.d.ts +14 -2
  66. package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -1
  67. package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -1
  68. package/lib/components/Stages/Stages.d.ts.map +1 -1
  69. package/lib/components/Stages/Stages.js +6 -4
  70. package/lib/components/Stages/Stages.js.map +1 -1
  71. package/lib/components/Stages/Stages.styles.d.ts +3 -3
  72. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  73. package/lib/components/Stages/Stages.styles.js +116 -22
  74. package/lib/components/Stages/Stages.styles.js.map +1 -1
  75. package/lib/components/Tags/Tags.d.ts.map +1 -1
  76. package/lib/components/Tags/Tags.js +1 -12
  77. package/lib/components/Tags/Tags.js.map +1 -1
  78. package/lib/components/Tasks/TaskCard.d.ts.map +1 -1
  79. package/lib/components/Tasks/TaskCard.js +5 -2
  80. package/lib/components/Tasks/TaskCard.js.map +1 -1
  81. package/lib/components/Tasks/TaskList.d.ts.map +1 -1
  82. package/lib/components/Tasks/TaskList.js +24 -16
  83. package/lib/components/Tasks/TaskList.js.map +1 -1
  84. package/lib/components/Tasks/Tasks.d.ts +7 -2
  85. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  86. package/lib/components/Tasks/Tasks.js +7 -5
  87. package/lib/components/Tasks/Tasks.js.map +1 -1
  88. package/package.json +3 -3
@@ -1,11 +1,11 @@
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
6
  import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
7
7
  import { StyledAllTabsWrapper, StyledTabs, StylesAllTabsButtonWrapper } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';
8
- 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
9
  import { StyledMenuButton } from '@pega/cosmos-react-core/lib/components/MenuButton/MenuButton';
10
10
  import { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';
11
11
  import { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';
@@ -36,24 +36,35 @@ const getCaseTypeHeaderColors = (theme, color) => {
36
36
  ? mixCaseColorWithBackground(resolvedCaseTypeColor, theme.components.card.background)
37
37
  : theme.components['case-view'].header.background;
38
38
  const headerForeground = resolvedCaseTypeColor && theme.base['case-type-colors'] === 'header-and-icon'
39
- ? readableColor(headerBackground)
40
- : calculateForegroundColor(headerBackground, theme.components['case-view'].header['foreground-color']);
39
+ ? resolveContrastColor({
40
+ background: headerBackground,
41
+ theme
42
+ })
43
+ : calculateForegroundColor(headerBackground, theme.components['case-view'].header['foreground-color'], theme);
41
44
  return { caseTypeColor: resolvedCaseTypeColor ?? undefined, headerBackground, headerForeground };
42
45
  };
43
46
  const getCaseViewColors = (theme, caseTypeColor) => {
44
47
  const interactive = theme.base.palette.interactive;
48
+ const minContrast = theme.base['min-contrast'];
45
49
  const caseTypeHeaderColors = getCaseTypeHeaderColors(theme, caseTypeColor);
46
50
  const headerBackground = caseTypeHeaderColors.headerBackground;
47
51
  const foregroundColor = caseTypeHeaderColors.headerForeground;
48
52
  const isGradientBackground = !isSolidColor(headerBackground);
49
53
  const elementBackground = isGradientBackground
50
- ? readableColor(foregroundColor)
54
+ ? resolveContrastColor({
55
+ background: foregroundColor,
56
+ theme
57
+ })
51
58
  : headerBackground;
52
- const interactiveUsable = getContrast(elementBackground, interactive) >= wcagContrast.AA;
59
+ const interactiveUsable = meetsMinContrast(interactive, elementBackground, minContrast);
53
60
  const interactiveColor = !isGradientBackground && interactiveUsable ? interactive : foregroundColor;
54
61
  let hoverBackground = rgba(interactiveColor, 0.15);
55
62
  if (!isGradientBackground && interactiveUsable) {
56
- hoverBackground = readableHue(interactive, interactiveColor);
63
+ hoverBackground = resolveContrastColor({
64
+ background: interactiveColor,
65
+ foreground: interactive,
66
+ theme
67
+ });
57
68
  }
58
69
  return {
59
70
  caseTypeColor: caseTypeHeaderColors.caseTypeColor,
@@ -290,7 +301,10 @@ export const StyledCaseHeaderText = styled.div(({ theme }) => {
290
301
  StyledCaseHeaderText.defaultProps = defaultThemeProp;
291
302
  export const StyledHeaderSummaryBlock = styled.div(({ hasItems, theme }) => {
292
303
  const { base: { spacing, palette: { 'brand-primary': primary } } } = theme;
293
- const color = readableColor(primary);
304
+ const color = resolveContrastColor({
305
+ background: primary,
306
+ theme
307
+ });
294
308
  const transparentColor = tryCatch(() => transparentize(0.5, color));
295
309
  return css `
296
310
  ${hasItems &&
@@ -604,124 +618,125 @@ export const StyledBannersStagesTasksContainer = styled.div(() => {
604
618
  }
605
619
  `;
606
620
  });
607
- 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 } } } }) => {
608
- const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor);
609
- const foregroundColorForAssignment = calculateForegroundColor(assignmentBackground, assignmentForegroundColor);
621
+ export const StyledWorkArea = styled.div(({ theme }) => {
622
+ 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;
623
+ const { backgroundColor } = calculateBackgroundAndContrastColor(background, foregroundColor, theme);
624
+ const foregroundColorForAssignment = calculateForegroundColor(assignmentBackground, assignmentForegroundColor, theme);
610
625
  const { summaryExpanded, aboveMD, intelligentGuidance, isPreview } = useCaseViewContext();
611
626
  let pbeRem = 0;
612
627
  if (intelligentGuidance) {
613
628
  pbeRem = aboveMD && !summaryExpanded ? 4 : 6;
614
629
  }
615
630
  return css `
616
- grid-area: work-area;
617
- margin-block: calc(2 * ${spacing});
618
- padding-inline: calc(2 * ${spacing});
619
- @media (width < ${breakpoints.sm}) {
620
- padding-inline: calc(0.75 * ${spacing});
621
- }
631
+ grid-area: work-area;
632
+ margin-block: calc(2 * ${spacing});
633
+ padding-inline: calc(2 * ${spacing});
634
+ @media (width < ${breakpoints.sm}) {
635
+ padding-inline: calc(0.75 * ${spacing});
636
+ }
622
637
 
623
- /* Prevents unnecessary gap when case view has neither stages nor assignments */
624
- &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {
625
- ${StyledBannersStagesTasksContainer} {
626
- display: none;
627
- }
638
+ /* Prevents unnecessary gap when case view has neither stages nor assignments */
639
+ &:has(> ${StyledBannersStagesTasksContainer} > ${StyledTasks}:first-child:empty) {
640
+ ${StyledBannersStagesTasksContainer} {
641
+ display: none;
628
642
  }
643
+ }
629
644
 
630
- ${aboveMD &&
645
+ ${aboveMD &&
631
646
  css `
632
- padding-inline: 0;
647
+ padding-inline: 0;
633
648
 
634
- /* This is required to make scrollStick work. */
635
- ${!isPreview &&
649
+ /* This is required to make scrollStick work. */
650
+ ${!isPreview &&
636
651
  css `
637
- height: max-content;
638
- `}
652
+ height: max-content;
653
+ `}
639
654
 
640
- ${!summaryExpanded &&
655
+ ${!summaryExpanded &&
641
656
  css `
642
- margin-inline-start: calc(2 * ${spacing});
643
- `}
657
+ margin-inline-start: calc(2 * ${spacing});
644
658
  `}
645
- /* Order of style here is necessary for overriding styles above. */
659
+ `}
660
+ /* Order of style here is necessary for overriding styles above. */
646
661
  ${pbeRem > 0 &&
647
662
  css `
648
- /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */
649
- padding-block-end: ${pbeRem}rem;
650
- `}
663
+ /* Accounts for collapsed intelligentGuidance bubble covering work area content when fully scrolled. */
664
+ padding-block-end: ${pbeRem}rem;
665
+ `}
651
666
  &:has(${StyledAssignments}),
652
667
  &:has(${StyledHierarchicalAssignments}) {
653
- ${StyledStagesWrapper} {
654
- --stages-wrapper-bottom-radius: 0;
655
- }
668
+ ${StyledStagesWrapper} {
669
+ --stages-wrapper-bottom-radius: 0;
670
+ }
656
671
 
657
- ${StyledStages} {
658
- border-block-end: 0.0625rem solid ${borderLine};
672
+ ${StyledStages} {
673
+ border-block-end: 0.0625rem solid ${borderLine};
659
674
 
660
- &,
661
- ${StyledStageContainer}:nth-of-type(2) > ${StyledStage} {
662
- border-end-start-radius: 0;
663
- }
675
+ &,
676
+ ${StyledStageContainer}:nth-of-type(2) > ${StyledStage} {
677
+ border-end-start-radius: 0;
678
+ }
664
679
 
665
- &,
666
- ${StyledStageContainer}:nth-last-of-type(2) > ${StyledStage} {
667
- border-end-end-radius: 0;
668
- }
680
+ &,
681
+ ${StyledStageContainer}:nth-last-of-type(2) > ${StyledStage} {
682
+ border-end-end-radius: 0;
669
683
  }
670
684
  }
685
+ }
671
686
 
672
- ${tabsDetached &&
687
+ ${tabsDetached &&
673
688
  css `
674
- ${StyledAllTabsWrapper} {
675
- border-start-start-radius: ${cardBorderRadius};
676
- border-start-end-radius: ${cardBorderRadius};
689
+ ${StyledAllTabsWrapper} {
690
+ border-start-start-radius: ${cardBorderRadius};
691
+ border-start-end-radius: ${cardBorderRadius};
677
692
 
678
- ${StyledTabs} {
679
- border-radius: unset;
680
- border-start-end-radius: inherit;
681
- }
693
+ ${StyledTabs} {
694
+ border-radius: unset;
695
+ border-start-end-radius: inherit;
696
+ }
682
697
 
683
- ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {
684
- border-start-start-radius: inherit;
685
- }
698
+ ${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {
699
+ border-start-start-radius: inherit;
686
700
  }
687
- `}
701
+ }
702
+ `}
688
703
 
689
- /* Ensure horizontal tabs stay above sliding tab content */
704
+ /* Ensure horizontal tabs stay above sliding tab content */
690
705
  ${StyledTabs}[aria-orientation='horizontal'],
691
706
  ${StyledAllTabsWrapper} {
692
- z-index: 1;
707
+ z-index: 1;
708
+ }
709
+
710
+ &:has(${StyledStages}) {
711
+ ${StyledCard}${StyledAssignments},
712
+ ${StyledCard}${StyledHierarchicalAssignments} {
713
+ margin-block-start: calc(-2 * ${spacing});
714
+ border-start-start-radius: 0;
715
+ border-start-end-radius: 0;
693
716
  }
694
717
 
695
- &:has(${StyledStages}) {
718
+ &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),
719
+ &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {
696
720
  ${StyledCard}${StyledAssignments},
697
721
  ${StyledCard}${StyledHierarchicalAssignments} {
698
- margin-block-start: calc(-2 * ${spacing});
699
- border-start-start-radius: 0;
700
- border-start-end-radius: 0;
701
- }
702
-
703
- &:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),
704
- &:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {
705
- ${StyledCard}${StyledAssignments},
706
- ${StyledCard}${StyledHierarchicalAssignments} {
707
- background: ${assignmentBackground};
708
- color: ${foregroundColorForAssignment};
709
- ${assignmentDetached &&
722
+ background: ${assignmentBackground};
723
+ color: ${foregroundColorForAssignment};
724
+ ${assignmentDetached &&
710
725
  css `
711
- ${StyledTaskList} {
712
- background-color: ${backgroundColor};
713
- border: solid 0.0625rem ${borderLine};
714
- border-radius: var(--border-radius, ${borderRadius});
715
-
716
- ${StyledSummaryListItem} {
717
- padding: calc(${spacing} / 2) ${spacing};
718
- }
726
+ ${StyledTaskList} {
727
+ background-color: ${backgroundColor};
728
+ border: solid 0.0625rem ${borderLine};
729
+ border-radius: var(--border-radius, ${borderRadius});
730
+
731
+ ${StyledSummaryListItem} {
732
+ padding: calc(${spacing} / 2) ${spacing};
719
733
  }
720
- `}
721
- }
734
+ }
735
+ `}
722
736
  }
723
737
  }
724
- `;
738
+ }
739
+ `;
725
740
  });
726
741
  StyledWorkArea.defaultProps = defaultThemeProp;
727
742
  export const StyledUtilitiesHeading = styled(Text) ``;
@@ -861,8 +876,8 @@ export const StyledPersistentUtility = styled.div(({ theme, persistentUtilityExp
861
876
  overflow: auto;
862
877
  position: sticky;
863
878
  z-index: 1;
864
- height: var(--case-view-height);
865
- inset-block-start: var(--top-offset);
879
+ height: calc(var(--case-view-height) - var(--summary-height, 0rem));
880
+ inset-block-start: calc(var(--top-offset) + var(--summary-height, 0rem));
866
881
  inset-block-end: var(--appshell-bottom-offset, 0);
867
882
  padding-block: calc(2 * ${theme.base.spacing});
868
883
  `;
@@ -888,74 +903,75 @@ export const ScrollStick = styled.div `
888
903
  position: sticky;
889
904
  top: 0;
890
905
  `;
891
- 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 } } } } }) => {
892
- const utilitiesForegroundComputed = calculateForegroundColor(utilitiesBackground, utilitiesForegroundColor);
906
+ export const StyledCaseView = styled.div(({ theme }) => {
907
+ 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;
908
+ const utilitiesForegroundComputed = calculateForegroundColor(utilitiesBackground, utilitiesForegroundColor, theme);
893
909
  const { aboveSM, aboveMD, isPreview, summaryExpanded } = useCaseViewContext();
894
910
  return css `
895
- --top-offset: calc(
896
- ${summaryExpanded ? 'var(--summary-height)' : '0rem'} + var(--appshell-top-offset, 0rem)
897
- );
898
- --case-view-height: calc(100dvh - var(--top-offset) - var(--appshell-bottom-offset, 0rem));
899
- position: relative;
900
- min-height: var(--case-view-height);
901
- background: ${appBackground};
911
+ --top-offset: calc(
912
+ ${summaryExpanded ? 'var(--summary-height)' : '0rem'} + var(--appshell-top-offset, 0rem)
913
+ );
914
+ --case-view-height: calc(100dvh - var(--top-offset) - var(--appshell-bottom-offset, 0rem));
915
+ position: relative;
916
+ min-height: var(--case-view-height);
917
+ background: ${appBackground};
902
918
 
903
- ${aboveMD &&
919
+ ${aboveMD &&
904
920
  css `
905
- ${StyledUtilities}:last-child {
906
- margin-inline-end: calc(2 * ${spacing});
907
- color: ${utilitiesForegroundComputed};
921
+ ${StyledUtilities}:last-child {
922
+ margin-inline-end: calc(2 * ${spacing});
923
+ color: ${utilitiesForegroundComputed};
908
924
 
909
- ${!utilitiesDetached &&
925
+ ${!utilitiesDetached &&
910
926
  css `
911
- background: ${utilitiesBackground};
912
- margin-inline-end: 0;
913
- padding: calc(2 * ${spacing});
914
- padding-inline-end: 0;
915
- border-start-start-radius: ${borderRadius};
916
- border-end-start-radius: ${borderRadius};
927
+ background: ${utilitiesBackground};
928
+ margin-inline-end: 0;
929
+ padding: calc(2 * ${spacing});
930
+ padding-inline-end: 0;
931
+ border-start-start-radius: ${borderRadius};
932
+ border-end-start-radius: ${borderRadius};
933
+ border-start-end-radius: 0;
934
+ border-end-end-radius: 0;
935
+
936
+ ${StyledCard},
937
+ ${StyledGenAICoachContainer} {
917
938
  border-start-end-radius: 0;
918
939
  border-end-end-radius: 0;
940
+ }
919
941
 
920
- ${StyledCard},
921
- ${StyledGenAICoachContainer} {
922
- border-start-end-radius: 0;
923
- border-end-end-radius: 0;
924
- }
925
-
926
- ${StyledGenAICoachContainer} {
927
- inset-inline-end: 0;
928
- }
929
- `}
930
- }
931
- `}
942
+ ${StyledGenAICoachContainer} {
943
+ inset-inline-end: 0;
944
+ }
945
+ `}
946
+ }
947
+ `}
932
948
 
933
- ${aboveSM &&
949
+ ${aboveSM &&
934
950
  summaryDetached &&
935
951
  !isPreview &&
936
952
  css `
937
- &:not(:has(${StyledUtilities})) {
938
- ${StyledSummary} {
939
- padding-inline-end: calc(2 * ${spacing});
940
- }
953
+ &:not(:has(${StyledUtilities})) {
954
+ ${StyledSummary} {
955
+ padding-inline-end: calc(2 * ${spacing});
956
+ }
941
957
 
942
- ${StyledCaseHeader} {
943
- border-end-end-radius: ${borderRadius};
944
- }
958
+ ${StyledCaseHeader} {
959
+ border-end-end-radius: ${borderRadius};
945
960
  }
946
- `}
961
+ }
962
+ `}
947
963
 
948
964
  ${!aboveMD &&
949
965
  css `
950
- ${StyledGenAICoachContainer} {
951
- height: 42.5rem;
966
+ ${StyledGenAICoachContainer} {
967
+ height: 42.5rem;
952
968
 
953
- ${StyledInitialMessageContainer} {
954
- justify-content: center;
955
- }
969
+ ${StyledInitialMessageContainer} {
970
+ justify-content: center;
956
971
  }
957
- `}
958
- `;
972
+ }
973
+ `}
974
+ `;
959
975
  });
960
976
  StyledCaseView.defaultProps = defaultThemeProp;
961
977
  export const StyledUtilitiesHeader = styled(Text) `