@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.
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +8 -4
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.js +38 -11
- package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts +2 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.d.ts.map +1 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js +8 -0
- package/lib/components/AppAnnouncement/AppAnnouncement.test-ids.js.map +1 -0
- package/lib/components/Article/ArticleRating.d.ts.map +1 -1
- package/lib/components/Article/ArticleRating.js +2 -2
- package/lib/components/Article/ArticleRating.js.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.js +2 -2
- package/lib/components/ArticleList/ArticleFeedback.js.map +1 -1
- package/lib/components/CasePreview/CasePreview.d.ts +2 -0
- package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
- package/lib/components/CasePreview/CasePreview.js +33 -13
- package/lib/components/CasePreview/CasePreview.js.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/CaseHeader.js +5 -3
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
- package/lib/components/CaseView/CaseSummary.d.ts +3 -2
- package/lib/components/CaseView/CaseSummary.d.ts.map +1 -1
- package/lib/components/CaseView/CaseSummary.js +2 -2
- package/lib/components/CaseView/CaseSummary.js.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +6 -12
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.styles.d.ts +2 -2
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.styles.js +193 -153
- package/lib/components/CaseView/CaseView.styles.js.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +6 -2
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.types.js.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.js +1 -4
- package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitySummaryItemDialog.js +7 -4
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
- package/lib/components/Details/Details.d.ts.map +1 -1
- package/lib/components/Details/Details.js +9 -6
- package/lib/components/Details/Details.js.map +1 -1
- package/lib/components/Details/Details.styles.d.ts.map +1 -1
- package/lib/components/Details/Details.styles.js +10 -7
- package/lib/components/Details/Details.styles.js.map +1 -1
- package/lib/components/Details/DetailsList.d.ts.map +1 -1
- package/lib/components/Details/DetailsList.js +2 -2
- package/lib/components/Details/DetailsList.js.map +1 -1
- package/lib/components/GenAICoach/ActiveCases.d.ts.map +1 -1
- package/lib/components/GenAICoach/ActiveCases.js +2 -1
- package/lib/components/GenAICoach/ActiveCases.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +267 -73
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +232 -9
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +374 -192
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js +3 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +36 -3
- package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +44 -21
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageFeedback.js +10 -3
- package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -1
- package/lib/components/GenAICoach/Questionnaire.js +10 -3
- package/lib/components/GenAICoach/Questionnaire.js.map +1 -1
- package/lib/components/GenAICoach/index.d.ts +1 -1
- package/lib/components/GenAICoach/index.d.ts.map +1 -1
- package/lib/components/GenAICoach/index.js.map +1 -1
- package/lib/components/HeroBanner/HeroBanner.d.ts +7 -0
- package/lib/components/HeroBanner/HeroBanner.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.js +63 -0
- package/lib/components/HeroBanner/HeroBanner.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.styles.d.ts +35 -0
- package/lib/components/HeroBanner/HeroBanner.styles.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.styles.js +118 -0
- package/lib/components/HeroBanner/HeroBanner.styles.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts +2 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.js +11 -0
- package/lib/components/HeroBanner/HeroBanner.test-ids.js.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.types.d.ts +51 -0
- package/lib/components/HeroBanner/HeroBanner.types.d.ts.map +1 -0
- package/lib/components/HeroBanner/HeroBanner.types.js +2 -0
- package/lib/components/HeroBanner/HeroBanner.types.js.map +1 -0
- package/lib/components/HeroBanner/index.d.ts +3 -0
- package/lib/components/HeroBanner/index.d.ts.map +1 -0
- package/lib/components/HeroBanner/index.js +2 -0
- package/lib/components/HeroBanner/index.js.map +1 -0
- package/lib/components/HeroBanner/utils.d.ts +20 -0
- package/lib/components/HeroBanner/utils.d.ts.map +1 -0
- package/lib/components/HeroBanner/utils.js +125 -0
- package/lib/components/HeroBanner/utils.js.map +1 -0
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +5 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.js.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts +5 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +25 -15
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +6 -5
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +27 -9
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +8 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.d.ts +2 -2
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +6 -4
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/MasterDetail/DetailPanelHeader.d.ts +29 -0
- package/lib/components/MasterDetail/DetailPanelHeader.d.ts.map +1 -0
- package/lib/components/MasterDetail/DetailPanelHeader.js +14 -0
- package/lib/components/MasterDetail/DetailPanelHeader.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.d.ts +6 -0
- package/lib/components/MasterDetail/MasterDetail.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.js +116 -0
- package/lib/components/MasterDetail/MasterDetail.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.styles.d.ts +595 -0
- package/lib/components/MasterDetail/MasterDetail.styles.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.styles.js +246 -0
- package/lib/components/MasterDetail/MasterDetail.styles.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts +2 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.js +19 -0
- package/lib/components/MasterDetail/MasterDetail.test-ids.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.types.d.ts +71 -0
- package/lib/components/MasterDetail/MasterDetail.types.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetail.types.js +2 -0
- package/lib/components/MasterDetail/MasterDetail.types.js.map +1 -0
- package/lib/components/MasterDetail/MasterDetailActions.d.ts +10 -0
- package/lib/components/MasterDetail/MasterDetailActions.d.ts.map +1 -0
- package/lib/components/MasterDetail/MasterDetailActions.js +45 -0
- package/lib/components/MasterDetail/MasterDetailActions.js.map +1 -0
- package/lib/components/MasterDetail/index.d.ts +5 -0
- package/lib/components/MasterDetail/index.d.ts.map +1 -0
- package/lib/components/MasterDetail/index.js +4 -0
- package/lib/components/MasterDetail/index.js.map +1 -0
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +11 -7
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.styles.js +3 -3
- package/lib/components/SearchResults/SearchResults.styles.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.d.ts +1 -1
- package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.js +40 -18
- package/lib/components/Shortcuts/Shortcuts.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts +17 -6
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.styles.js +104 -58
- package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.test-ids.js +4 -3
- package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.types.d.ts +18 -2
- package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -1
- package/lib/components/Stages/Stages.d.ts +4 -2
- package/lib/components/Stages/Stages.d.ts.map +1 -1
- package/lib/components/Stages/Stages.js +123 -88
- package/lib/components/Stages/Stages.js.map +1 -1
- package/lib/components/Stages/Stages.styles.d.ts +88 -3
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
- package/lib/components/Stages/Stages.styles.js +873 -171
- package/lib/components/Stages/Stages.styles.js.map +1 -1
- package/lib/components/Stages/Stages.test-ids.d.ts +2 -0
- package/lib/components/Stages/Stages.test-ids.d.ts.map +1 -0
- package/lib/components/Stages/Stages.test-ids.js +7 -0
- package/lib/components/Stages/Stages.test-ids.js.map +1 -0
- package/lib/components/Stages/Stages.types.d.ts +9 -3
- package/lib/components/Stages/Stages.types.d.ts.map +1 -1
- package/lib/components/Stages/Stages.types.js.map +1 -1
- package/lib/components/Stages/index.d.ts +2 -1
- package/lib/components/Stages/index.d.ts.map +1 -1
- package/lib/components/Stages/index.js +1 -0
- package/lib/components/Stages/index.js.map +1 -1
- package/lib/components/Stages/useStagesScrollbar.d.ts +21 -0
- package/lib/components/Stages/useStagesScrollbar.d.ts.map +1 -0
- package/lib/components/Stages/useStagesScrollbar.js +152 -0
- package/lib/components/Stages/useStagesScrollbar.js.map +1 -0
- package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.js +13 -11
- package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.d.ts +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -1
- package/lib/components/Tags/Tags.d.ts.map +1 -1
- package/lib/components/Tags/Tags.js +2 -13
- package/lib/components/Tags/Tags.js.map +1 -1
- package/lib/components/Tasks/TaskCard.d.ts +8 -0
- package/lib/components/Tasks/TaskCard.d.ts.map +1 -0
- package/lib/components/Tasks/TaskCard.js +42 -0
- package/lib/components/Tasks/TaskCard.js.map +1 -0
- package/lib/components/Tasks/TaskCards.d.ts +9 -0
- package/lib/components/Tasks/TaskCards.d.ts.map +1 -0
- package/lib/components/Tasks/TaskCards.js +40 -0
- package/lib/components/Tasks/TaskCards.js.map +1 -0
- package/lib/components/Tasks/TaskList.d.ts +13 -1
- package/lib/components/Tasks/TaskList.d.ts.map +1 -1
- package/lib/components/Tasks/TaskList.js +31 -19
- package/lib/components/Tasks/TaskList.js.map +1 -1
- package/lib/components/Tasks/Tasks.d.ts +46 -6
- package/lib/components/Tasks/Tasks.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.js +11 -5
- package/lib/components/Tasks/Tasks.js.map +1 -1
- package/lib/components/Tasks/Tasks.test-ids.d.ts +1 -1
- package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.test-ids.js +1 -1
- package/lib/components/Tasks/Tasks.test-ids.js.map +1 -1
- package/lib/components/Tasks/index.d.ts +1 -1
- package/lib/components/Tasks/index.d.ts.map +1 -1
- package/lib/components/Tasks/index.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/package.json +5 -6
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import {
|
|
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,
|
|
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
|
|
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 {
|
|
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
|
-
?
|
|
41
|
-
|
|
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
|
-
?
|
|
56
|
+
? resolveContrastColor({
|
|
57
|
+
background: foregroundColor,
|
|
58
|
+
theme
|
|
59
|
+
})
|
|
52
60
|
: headerBackground;
|
|
53
|
-
const interactiveUsable =
|
|
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 =
|
|
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 =
|
|
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
|
|
607
|
-
const {
|
|
608
|
-
const
|
|
609
|
-
const
|
|
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
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
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
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
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
|
-
|
|
662
|
+
${aboveMD &&
|
|
629
663
|
css `
|
|
630
|
-
|
|
664
|
+
padding-inline: 0;
|
|
631
665
|
|
|
632
|
-
|
|
633
|
-
|
|
666
|
+
/* This is required to make scrollStick work. */
|
|
667
|
+
${!isPreview &&
|
|
634
668
|
css `
|
|
635
|
-
|
|
636
|
-
|
|
669
|
+
height: max-content;
|
|
670
|
+
`}
|
|
637
671
|
|
|
638
|
-
|
|
672
|
+
${!summaryExpanded &&
|
|
639
673
|
css `
|
|
640
|
-
|
|
641
|
-
`}
|
|
674
|
+
margin-inline-start: calc(2 * ${spacing});
|
|
642
675
|
`}
|
|
643
|
-
|
|
676
|
+
`}
|
|
677
|
+
/* Order of style here is necessary for overriding styles above. */
|
|
644
678
|
${pbeRem > 0 &&
|
|
645
679
|
css `
|
|
646
|
-
|
|
647
|
-
|
|
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
|
-
|
|
652
|
-
|
|
685
|
+
${StyledStagesWrapper} {
|
|
686
|
+
--stages-wrapper-bottom-radius: 0;
|
|
687
|
+
}
|
|
653
688
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
border-end-start-radius: 0;
|
|
657
|
-
}
|
|
689
|
+
${StyledStages} {
|
|
690
|
+
border-block-end: 0.0625rem solid ${borderLine};
|
|
658
691
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
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
|
-
|
|
704
|
+
${tabsDetached &&
|
|
667
705
|
css `
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
706
|
+
${StyledAllTabsWrapper} {
|
|
707
|
+
border-start-start-radius: ${cardBorderRadius};
|
|
708
|
+
border-start-end-radius: ${cardBorderRadius};
|
|
671
709
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
710
|
+
${StyledTabs} {
|
|
711
|
+
border-radius: unset;
|
|
712
|
+
border-start-end-radius: inherit;
|
|
713
|
+
}
|
|
676
714
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
715
|
+
${StylesAllTabsButtonWrapper}, ${StyledMenuButton} {
|
|
716
|
+
border-start-start-radius: inherit;
|
|
680
717
|
}
|
|
681
|
-
|
|
718
|
+
}
|
|
719
|
+
`}
|
|
682
720
|
|
|
683
|
-
|
|
721
|
+
/* Ensure horizontal tabs stay above sliding tab content */
|
|
684
722
|
${StyledTabs}[aria-orientation='horizontal'],
|
|
685
723
|
${StyledAllTabsWrapper} {
|
|
686
|
-
|
|
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(${
|
|
735
|
+
&:has(${StyledCard}${StyledAssignments} > ${StyledCardHeader}),
|
|
736
|
+
&:has(${StyledCard}${StyledHierarchicalAssignments} > ${StyledCardHeader}) {
|
|
690
737
|
${StyledCard}${StyledAssignments},
|
|
691
738
|
${StyledCard}${StyledHierarchicalAssignments} {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
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
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
895
|
-
const
|
|
896
|
-
const
|
|
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
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
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
|
-
|
|
949
|
+
${aboveMD &&
|
|
910
950
|
css `
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
951
|
+
${StyledUtilities}:last-child {
|
|
952
|
+
margin-inline-end: calc(2 * ${spacing});
|
|
953
|
+
color: ${utilitiesForegroundComputed};
|
|
914
954
|
|
|
915
|
-
|
|
955
|
+
${!utilitiesDetached &&
|
|
916
956
|
css `
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
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
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
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
|
-
|
|
979
|
+
${aboveSM &&
|
|
940
980
|
summaryDetached &&
|
|
941
981
|
!isPreview &&
|
|
942
982
|
css `
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
983
|
+
&:not(:has(${StyledUtilities})) {
|
|
984
|
+
${StyledSummary} {
|
|
985
|
+
padding-inline-end: calc(2 * ${spacing});
|
|
986
|
+
}
|
|
947
987
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
}
|
|
988
|
+
${StyledCaseHeader} {
|
|
989
|
+
border-end-end-radius: ${borderRadius};
|
|
951
990
|
}
|
|
952
|
-
|
|
991
|
+
}
|
|
992
|
+
`}
|
|
953
993
|
|
|
954
994
|
${!aboveMD &&
|
|
955
995
|
css `
|
|
956
|
-
|
|
957
|
-
|
|
996
|
+
${StyledGenAICoachContainer} {
|
|
997
|
+
height: 42.5rem;
|
|
958
998
|
|
|
959
|
-
|
|
960
|
-
|
|
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) `
|