@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,7 +1,7 @@
|
|
|
1
|
-
import styled, { createGlobalStyle, css } from 'styled-components';
|
|
1
|
+
import styled, { createGlobalStyle, css, keyframes } from 'styled-components';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
|
-
import { mix, darken,
|
|
4
|
-
import { AppShellContext, Button, FileList, Flex, FormControl, Icon, Image, MenuButton, InfoDialog, StyledEmptyState, StyledErrorState, StyledIcon, StyledText, SummaryItem, Text, TextArea, calculateFontSize, calculateForegroundColor, defaultThemeProp, isSolidColor, tryCatch, Avatar, Fullscreen, animations, Modal, StyledIconShape } from '@pega/cosmos-react-core';
|
|
3
|
+
import { mix, darken, transparentize } from 'polished';
|
|
4
|
+
import { AppShellContext, Button, FileList, Flex, FormControl, Icon, Image, MenuButton, InfoDialog, StyledEmptyState, StyledErrorState, StyledIcon, StyledText, SummaryItem, Text, TextArea, calculateFontSize, calculateForegroundColor, defaultThemeProp, isSolidColor, meetsMinContrast, tryCatch, Avatar, Fullscreen, animations, Modal, StyledIconShape } from '@pega/cosmos-react-core';
|
|
5
5
|
import { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';
|
|
6
6
|
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
7
7
|
import { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';
|
|
@@ -15,10 +15,10 @@ import { resizeDrawerMaxWidth, portalAgentMinWidth, portalAgentDefaultWidth } fr
|
|
|
15
15
|
import { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
16
16
|
import { RichTextViewer } from '@pega/cosmos-react-rte';
|
|
17
17
|
import { StepMarker, StyledStepText } from '@pega/cosmos-react-core/lib/components/MultiStepForm/FormProgress.styles';
|
|
18
|
-
import {
|
|
18
|
+
import { StyledFileList } from '@pega/cosmos-react-core/lib/components/File/FileList';
|
|
19
|
+
import { StyledTouchDialog } from '@pega/cosmos-react-core/lib/components/Dialog/TouchDialog.styles';
|
|
19
20
|
import { StyledStages } from '../Stages/Stages.styles';
|
|
20
21
|
import { isInUtilities } from './GenAICoach.utils';
|
|
21
|
-
const maxWidthMessage = '62.5rem';
|
|
22
22
|
export const StyledComposerSection = styled.div ``;
|
|
23
23
|
export const StyledGenAIFormControl = styled(FormControl)(({ theme, focused }) => {
|
|
24
24
|
return css `
|
|
@@ -38,34 +38,59 @@ export const StyledGenAIFormControl = styled(FormControl)(({ theme, focused }) =
|
|
|
38
38
|
`;
|
|
39
39
|
});
|
|
40
40
|
StyledGenAIFormControl.defaultProps = defaultThemeProp;
|
|
41
|
-
export const StyledComposerWrapper = styled.div(({ theme, focused, hasQuestionnaire }) => {
|
|
41
|
+
export const StyledComposerWrapper = styled.div(({ theme, focused, hasQuestionnaire, $agentInBanner }) => {
|
|
42
42
|
const { 'border-radius': formControlBorderRadius, 'border-width': formControlBorderWidth } = theme.components['form-control'];
|
|
43
43
|
const { 'border-radius': baseBorderRadius, palette } = theme.base;
|
|
44
44
|
const borderRadius = `calc(${formControlBorderRadius} * ${baseBorderRadius})`;
|
|
45
45
|
const borderWidth = formControlBorderWidth ?? '0.0625rem';
|
|
46
46
|
return css `
|
|
47
|
-
|
|
47
|
+
${$agentInBanner &&
|
|
48
48
|
css `
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
> ${StyledFormField} {
|
|
50
|
+
position: relative;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
}
|
|
53
|
+
`}
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
${hasQuestionnaire &&
|
|
56
|
+
css `
|
|
57
|
+
border: ${borderWidth} solid ${palette['border-line']};
|
|
58
|
+
border-radius: ${borderRadius};
|
|
59
|
+
overflow: hidden;
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
overflow: visible;
|
|
64
|
-
}
|
|
61
|
+
${focused &&
|
|
62
|
+
css `
|
|
63
|
+
border-color: ${theme.components['form-control'][':focus']['border-color']};
|
|
64
|
+
box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};
|
|
65
65
|
`}
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
${StyledGenAIFormControl} {
|
|
68
|
+
border: none;
|
|
69
|
+
border-radius: 0;
|
|
70
|
+
box-shadow: none;
|
|
71
|
+
overflow: visible;
|
|
72
|
+
}
|
|
73
|
+
`}
|
|
74
|
+
`;
|
|
67
75
|
});
|
|
68
76
|
StyledComposerWrapper.defaultProps = defaultThemeProp;
|
|
77
|
+
export const StyledConversationHistoryButton = styled.div(({ theme }) => css `
|
|
78
|
+
position: relative;
|
|
79
|
+
padding-inline-end: ${theme.base.spacing};
|
|
80
|
+
margin-inline-end: ${theme.base.spacing};
|
|
81
|
+
|
|
82
|
+
&::after {
|
|
83
|
+
content: '';
|
|
84
|
+
position: absolute;
|
|
85
|
+
inset-block-start: 50%;
|
|
86
|
+
inset-inline-end: 0;
|
|
87
|
+
width: 0.0625rem;
|
|
88
|
+
height: 1.5rem;
|
|
89
|
+
background: ${theme.base.palette['border-line']};
|
|
90
|
+
transform: translateY(-50%);
|
|
91
|
+
}
|
|
92
|
+
`);
|
|
93
|
+
StyledConversationHistoryButton.defaultProps = defaultThemeProp;
|
|
69
94
|
export const StyledMessagesContainer = styled.div(({ theme: { base: { spacing } }, withSuggestionCards }) => {
|
|
70
95
|
return css `
|
|
71
96
|
margin-block-end: calc(0.5 * ${spacing});
|
|
@@ -84,46 +109,62 @@ StyledMessagesContainer.defaultProps = defaultThemeProp;
|
|
|
84
109
|
export const StyledFullscreenWrapper = styled(Fullscreen) `
|
|
85
110
|
height: 100%;
|
|
86
111
|
`;
|
|
87
|
-
export const
|
|
112
|
+
export const StyledHeaderContainer = styled(Flex)(({ theme }) => {
|
|
113
|
+
return css `
|
|
114
|
+
border-block-end: 0.0625rem solid
|
|
115
|
+
${transparentize(0.88, theme.components.agent['foreground-color'])};
|
|
116
|
+
`;
|
|
117
|
+
});
|
|
118
|
+
StyledHeaderContainer.defaultProps = defaultThemeProp;
|
|
119
|
+
export const StyledGenAICoachContainer = styled.div(({ theme, variant, fullScreen, isCompact, isPortalAgent, simplifiedAgent }) => {
|
|
120
|
+
const { base: { palette, 'z-index': zIndex, spacing, breakpoints, animation, 'border-radius': baseBorderRadius }, components: { card: { 'border-radius': cardBorderRadius }, agent: { background: agentBackground, 'foreground-color': agentForegroundColor }, 'form-control': { 'border-radius': formControlBorderRadius } } } = theme;
|
|
88
121
|
const { previewActive } = useContext(AppShellContext);
|
|
89
|
-
const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
122
|
+
const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor, theme);
|
|
90
123
|
return css `
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
124
|
+
background: ${agentBackground};
|
|
125
|
+
color: ${foregroundColorForAgent};
|
|
126
|
+
min-width: var(--utilities-drawer-min-width);
|
|
127
|
+
border-radius: ${cardBorderRadius};
|
|
128
|
+
transition: height ${animation.speed} ${animation.timing.ease};
|
|
129
|
+
${simplifiedAgent
|
|
130
|
+
? css `
|
|
131
|
+
--message-container-width: 40rem;
|
|
132
|
+
--messages-list-margin-start: 0;
|
|
133
|
+
`
|
|
134
|
+
: css `
|
|
135
|
+
--message-container-width: 62.5rem;
|
|
136
|
+
`}
|
|
96
137
|
|
|
97
|
-
|
|
138
|
+
${variant.placement === 'dialog' &&
|
|
98
139
|
css `
|
|
99
|
-
|
|
100
|
-
|
|
140
|
+
border-radius: calc(${formControlBorderRadius} * ${baseBorderRadius});
|
|
141
|
+
`}
|
|
101
142
|
|
|
102
143
|
${isInUtilities(variant) &&
|
|
103
144
|
!fullScreen &&
|
|
104
145
|
css `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
146
|
+
min-height: 3rem;
|
|
147
|
+
max-width: 31.25rem;
|
|
148
|
+
box-shadow: 0 -1rem 1rem ${palette['app-background']};
|
|
149
|
+
border-radius: ${cardBorderRadius} ${cardBorderRadius} 0 0;
|
|
150
|
+
position: fixed;
|
|
151
|
+
inset-block-end: var(--appshell-bottom-offset, 0);
|
|
152
|
+
inset-inline-end: calc(2 * ${spacing});
|
|
153
|
+
z-index: calc(${zIndex.drawer} + 1);
|
|
154
|
+
width: 25rem;
|
|
155
|
+
|
|
156
|
+
${previewActive &&
|
|
116
157
|
css `
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
158
|
+
@media (min-width: ${breakpoints.md}) {
|
|
159
|
+
margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});
|
|
160
|
+
}
|
|
161
|
+
`}
|
|
121
162
|
|
|
122
|
-
|
|
163
|
+
${variant.state === 'minimized' &&
|
|
123
164
|
css `
|
|
124
|
-
|
|
125
|
-
`}
|
|
165
|
+
height: 3rem;
|
|
126
166
|
`}
|
|
167
|
+
`}
|
|
127
168
|
|
|
128
169
|
/*
|
|
129
170
|
~85% of Utilities height and fixed height if screen size less than md and devices with coarse pointer
|
|
@@ -132,42 +173,62 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
132
173
|
${((isInUtilities(variant) && variant.state === 'maximized') || !isInUtilities(variant)) &&
|
|
133
174
|
!fullScreen &&
|
|
134
175
|
css `
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
176
|
+
height: calc(0.85 * var(--case-view-height, 95vh));
|
|
177
|
+
@media (pointer: coarse) and (max-width: ${breakpoints.md}) {
|
|
178
|
+
height: 40rem;
|
|
179
|
+
}
|
|
180
|
+
`}
|
|
140
181
|
|
|
141
182
|
${variant.placement === 'fullpage' &&
|
|
142
183
|
css `
|
|
143
|
-
|
|
144
|
-
|
|
184
|
+
${simplifiedAgent
|
|
185
|
+
? css `
|
|
186
|
+
transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);
|
|
187
|
+
height: var(--content-height-in-agent, var(--content-height-in-view, 100vh));
|
|
188
|
+
`
|
|
189
|
+
: css `
|
|
190
|
+
height: var(--content-height-in-view, 100vh);
|
|
191
|
+
`}
|
|
192
|
+
`}
|
|
145
193
|
|
|
146
194
|
${isCompact &&
|
|
147
195
|
css `
|
|
148
|
-
|
|
149
|
-
|
|
196
|
+
height: ${simplifiedAgent ? 'auto' : '100%'};
|
|
197
|
+
max-height: ${simplifiedAgent
|
|
198
|
+
? 'var(--content-height-in-agent, var(--content-height-in-view, 100vh))'
|
|
199
|
+
: 'var(--content-height-in-view, 100vh)'};
|
|
150
200
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
201
|
+
${StyledMessagesContainer} {
|
|
202
|
+
margin-block-end: 0;
|
|
203
|
+
}
|
|
204
|
+
`}
|
|
155
205
|
|
|
156
206
|
${fullScreen &&
|
|
157
207
|
css `
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
208
|
+
height: 100vh;
|
|
209
|
+
border-radius: 0;
|
|
210
|
+
`}
|
|
161
211
|
|
|
162
212
|
${isPortalAgent &&
|
|
163
213
|
css `
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
214
|
+
height: 100%;
|
|
215
|
+
min-height: 0;
|
|
216
|
+
border-radius: 0;
|
|
217
|
+
`}
|
|
218
|
+
|
|
219
|
+
${StyledErrorState} {
|
|
220
|
+
${StyledText} {
|
|
221
|
+
color: ${agentForegroundColor};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
${StyledFileList} {
|
|
226
|
+
color: ${palette['foreground-color']};
|
|
227
|
+
}
|
|
228
|
+
`;
|
|
168
229
|
});
|
|
169
230
|
StyledGenAICoachContainer.defaultProps = defaultThemeProp;
|
|
170
|
-
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
231
|
+
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { ai } } } }) => {
|
|
171
232
|
const { l } = calculateFontSize(fontSize, fontScale);
|
|
172
233
|
return css `
|
|
173
234
|
color: inherit;
|
|
@@ -188,9 +249,32 @@ export const StyledMenuSuggestions = styled(MenuButton)(({ theme: { base: { 'bor
|
|
|
188
249
|
`;
|
|
189
250
|
});
|
|
190
251
|
StyledMenuSuggestions.defaultProps = defaultThemeProp;
|
|
191
|
-
|
|
252
|
+
/**
|
|
253
|
+
* Compact MenuButton used in the composer toolbar for agent mode and model selection.
|
|
254
|
+
* Appears only when the corresponding config prop is provided.
|
|
255
|
+
*/
|
|
256
|
+
export const StyledComposerSelector = styled(MenuButton)(({ theme: { base: { spacing } } }) => {
|
|
257
|
+
return css `
|
|
258
|
+
color: inherit;
|
|
259
|
+
padding-inline: calc(0.5 * ${spacing});
|
|
260
|
+
margin-inline-start: ${spacing};
|
|
261
|
+
flex-shrink: 1;
|
|
262
|
+
min-width: 7ch;
|
|
263
|
+
max-width: 30ch;
|
|
264
|
+
`;
|
|
265
|
+
});
|
|
266
|
+
StyledComposerSelector.defaultProps = defaultThemeProp;
|
|
267
|
+
export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, spacing, animation } } }) => {
|
|
192
268
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
193
269
|
return css `
|
|
270
|
+
@keyframes disclaimer-fade-in {
|
|
271
|
+
from {
|
|
272
|
+
opacity: 0;
|
|
273
|
+
}
|
|
274
|
+
to {
|
|
275
|
+
opacity: 0.7;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
194
278
|
font-size: ${systemFontSize};
|
|
195
279
|
margin-block-start: ${spacing};
|
|
196
280
|
${inFullPage &&
|
|
@@ -198,14 +282,24 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
198
282
|
padding-block-end: calc(2 * ${spacing});
|
|
199
283
|
`}
|
|
200
284
|
opacity: 0.7;
|
|
285
|
+
animation: disclaimer-fade-in ${animation.speed} ${animation.timing.ease} both;
|
|
286
|
+
@media (prefers-reduced-motion: reduce) {
|
|
287
|
+
animation-duration: 1ms;
|
|
288
|
+
}
|
|
201
289
|
`;
|
|
202
290
|
});
|
|
203
291
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
204
|
-
export const StyledFlexWrapper = styled.div `
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
292
|
+
export const StyledFlexWrapper = styled.div(({ isExpanded }) => css `
|
|
293
|
+
height: ${isExpanded ? 'auto' : '100%'};
|
|
294
|
+
overflow-y: auto;
|
|
295
|
+
position: relative;
|
|
296
|
+
|
|
297
|
+
${isExpanded &&
|
|
298
|
+
css `
|
|
299
|
+
flex: 1 1 0;
|
|
300
|
+
min-height: 0;
|
|
301
|
+
`}
|
|
302
|
+
`);
|
|
209
303
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
210
304
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
211
305
|
return css `
|
|
@@ -223,11 +317,23 @@ export const StyledInitialMessageContainer = styled.div(() => {
|
|
|
223
317
|
return css `
|
|
224
318
|
${StyledFormField} {
|
|
225
319
|
width: 100%;
|
|
226
|
-
max-width:
|
|
320
|
+
max-width: var(--message-container-width);
|
|
227
321
|
}
|
|
228
322
|
`;
|
|
229
323
|
});
|
|
230
324
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
325
|
+
export const StyledBannerSalutationBlock = styled.div(({ isExpanded }) => css `
|
|
326
|
+
transition:
|
|
327
|
+
opacity 0.45s ease,
|
|
328
|
+
transform 0.45s ease;
|
|
329
|
+
${isExpanded &&
|
|
330
|
+
css `
|
|
331
|
+
opacity: 0;
|
|
332
|
+
transform: translateY(-1.5rem);
|
|
333
|
+
pointer-events: none;
|
|
334
|
+
`}
|
|
335
|
+
`);
|
|
336
|
+
StyledBannerSalutationBlock.defaultProps = defaultThemeProp;
|
|
231
337
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
232
338
|
return css `
|
|
233
339
|
margin-block-end: ${spacing};
|
|
@@ -236,7 +342,7 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
236
342
|
|
|
237
343
|
${StyledFormField}, ${StyledComposerSection} {
|
|
238
344
|
width: 100%;
|
|
239
|
-
max-width:
|
|
345
|
+
max-width: var(--message-container-width);
|
|
240
346
|
}
|
|
241
347
|
`;
|
|
242
348
|
});
|
|
@@ -281,16 +387,27 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
281
387
|
`;
|
|
282
388
|
});
|
|
283
389
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
284
|
-
export const StyledMessage = styled.p(({ theme }) => {
|
|
390
|
+
export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
285
391
|
return css `
|
|
286
392
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
287
393
|
width: 100%;
|
|
288
394
|
min-width: 0;
|
|
289
395
|
overflow-wrap: break-word;
|
|
290
396
|
|
|
397
|
+
${simplified &&
|
|
398
|
+
css `
|
|
399
|
+
padding-inline-start: calc(2.5rem + ${theme.base.spacing});
|
|
400
|
+
`}
|
|
401
|
+
|
|
291
402
|
${StyledEditorContainer} {
|
|
292
403
|
padding: 0;
|
|
293
404
|
|
|
405
|
+
table {
|
|
406
|
+
display: block;
|
|
407
|
+
max-width: 100%;
|
|
408
|
+
overflow-x: auto;
|
|
409
|
+
}
|
|
410
|
+
|
|
294
411
|
span {
|
|
295
412
|
animation: ${animations.reveal} 1s forwards;
|
|
296
413
|
}
|
|
@@ -298,56 +415,67 @@ export const StyledMessage = styled.p(({ theme }) => {
|
|
|
298
415
|
`;
|
|
299
416
|
});
|
|
300
417
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
301
|
-
export const
|
|
302
|
-
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
418
|
+
export const StyledMessageSender = styled(Text)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight } } }) => {
|
|
303
419
|
return css `
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
420
|
+
font-size: ${calculateFontSize(fontSize, fontScale).xl};
|
|
421
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
422
|
+
opacity: 0.7;
|
|
423
|
+
`;
|
|
424
|
+
});
|
|
425
|
+
StyledMessageSender.defaultProps = defaultThemeProp;
|
|
426
|
+
export const StyledUserMessage = styled.li(({ theme }) => {
|
|
427
|
+
const { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } = theme;
|
|
428
|
+
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor, theme);
|
|
429
|
+
return css `
|
|
430
|
+
overflow-wrap: break-word;
|
|
431
|
+
background: ${userMessageBackground};
|
|
432
|
+
color: ${foregroundColorForUserMessage};
|
|
433
|
+
margin-inline-start: calc(4 * ${spacing});
|
|
434
|
+
margin-block-end: calc(0.5 * ${spacing});
|
|
435
|
+
padding: calc(0.5 * ${spacing});
|
|
436
|
+
border-start-start-radius: calc(1.25 * ${borderRadius});
|
|
437
|
+
border-start-end-radius: calc(0.5 * ${borderRadius});
|
|
438
|
+
border-end-start-radius: calc(1.25 * ${borderRadius});
|
|
439
|
+
border-end-end-radius: calc(1.25 * ${borderRadius});
|
|
440
|
+
`;
|
|
315
441
|
});
|
|
316
442
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
317
|
-
export const StyledSystemMessage = styled.li(({ stopped, theme
|
|
443
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme }) => {
|
|
444
|
+
const { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { 'foreground-color': agentForegroundColor, background: agentBackground } } } = theme;
|
|
318
445
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
446
|
+
const foregroundColorForSystemMessage = calculateForegroundColor(agentBackground, agentForegroundColor, theme);
|
|
319
447
|
return css `
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
448
|
+
display: flex;
|
|
449
|
+
align-items: center;
|
|
450
|
+
gap: ${spacing};
|
|
451
|
+
overflow-wrap: break-word;
|
|
452
|
+
font-size: ${systemFontSize};
|
|
453
|
+
color: ${foregroundColorForSystemMessage};
|
|
454
|
+
opacity: 0.7;
|
|
455
|
+
margin-block: calc(2 * ${spacing});
|
|
456
|
+
${stopped &&
|
|
329
457
|
css `
|
|
330
|
-
|
|
331
|
-
|
|
458
|
+
font-weight: ${fontWeight.normal};
|
|
459
|
+
`}
|
|
332
460
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
461
|
+
&::before,
|
|
462
|
+
&::after {
|
|
463
|
+
content: '';
|
|
464
|
+
flex: 1;
|
|
465
|
+
border-block-start: 0.0625rem solid ${foregroundColorForSystemMessage};
|
|
466
|
+
opacity: 0.7;
|
|
467
|
+
}
|
|
468
|
+
`;
|
|
341
469
|
});
|
|
342
470
|
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
343
|
-
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
471
|
+
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } }, simplified }) => {
|
|
344
472
|
return css `
|
|
345
|
-
padding-block-start: ${spacing};
|
|
473
|
+
padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};
|
|
346
474
|
list-style-type: none;
|
|
347
475
|
align-self: center;
|
|
348
|
-
max-width:
|
|
476
|
+
max-width: var(--message-container-width);
|
|
349
477
|
width: 100%;
|
|
350
|
-
margin-block-start: auto;
|
|
478
|
+
margin-block-start: var(--messages-list-margin-start, auto);
|
|
351
479
|
min-height: var(--stream-buffer, auto);
|
|
352
480
|
|
|
353
481
|
& > li {
|
|
@@ -379,7 +507,7 @@ export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing
|
|
|
379
507
|
StyledMessagesList.defaultProps = defaultThemeProp;
|
|
380
508
|
export const StyledHistoryContainer = styled(Flex)(({ theme, inFullPage }) => {
|
|
381
509
|
const { background, 'foreground-color': foregroundColor } = theme.components.agent.history;
|
|
382
|
-
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
510
|
+
const foreground = calculateForegroundColor(background, foregroundColor, theme);
|
|
383
511
|
return css `
|
|
384
512
|
height: 100%;
|
|
385
513
|
min-height: 0;
|
|
@@ -415,7 +543,7 @@ export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
|
415
543
|
`);
|
|
416
544
|
StyledInnerList.defaultProps = defaultThemeProp;
|
|
417
545
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
418
|
-
const hoverColor = tryCatch(() => mix(0.95, theme.
|
|
546
|
+
const hoverColor = tryCatch(() => mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive));
|
|
419
547
|
return css `
|
|
420
548
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
421
549
|
padding-block: ${theme.base.spacing};
|
|
@@ -468,7 +596,7 @@ export const StyledAttachmentsList = styled(FileList)(({ theme }) => {
|
|
|
468
596
|
StyledAttachmentsList.defaultProps = defaultThemeProp;
|
|
469
597
|
export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
470
598
|
width: 100%;
|
|
471
|
-
max-width:
|
|
599
|
+
max-width: var(--message-container-width);
|
|
472
600
|
> span {
|
|
473
601
|
justify-content: center;
|
|
474
602
|
}
|
|
@@ -478,7 +606,7 @@ export const StyledAgentIcon = styled.svg `
|
|
|
478
606
|
height: 3rem;
|
|
479
607
|
`;
|
|
480
608
|
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
481
|
-
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
609
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components, base }, simplified }) => {
|
|
482
610
|
return css `
|
|
483
611
|
border: none;
|
|
484
612
|
box-shadow: none;
|
|
@@ -486,6 +614,10 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
486
614
|
max-height: 6rem;
|
|
487
615
|
overflow-y: auto;
|
|
488
616
|
padding-block-end: 0;
|
|
617
|
+
${simplified &&
|
|
618
|
+
css `
|
|
619
|
+
padding: calc(2 * ${base.spacing});
|
|
620
|
+
`}
|
|
489
621
|
&:focus:not([disabled]) {
|
|
490
622
|
border: none;
|
|
491
623
|
box-shadow: none;
|
|
@@ -494,29 +626,47 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
494
626
|
`;
|
|
495
627
|
});
|
|
496
628
|
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
497
|
-
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
629
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
630
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
498
631
|
return css `
|
|
499
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
500
|
-
|
|
632
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
633
|
+
flex-shrink: 0;
|
|
501
634
|
`;
|
|
502
635
|
});
|
|
503
636
|
StyledSendButton.defaultProps = defaultThemeProp;
|
|
504
|
-
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
637
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
638
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
505
639
|
return css `
|
|
506
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
507
|
-
|
|
640
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
641
|
+
flex-shrink: 0;
|
|
508
642
|
`;
|
|
509
643
|
});
|
|
510
644
|
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
511
645
|
export const StyledInitialMessageGrid = styled.div `
|
|
512
|
-
max-width:
|
|
646
|
+
max-width: var(--message-container-width);
|
|
513
647
|
width: 100%;
|
|
514
648
|
`;
|
|
649
|
+
export const StyledSimplifiedInitialMessageGrid = styled(StyledInitialMessageGrid)(({ theme: { base: { 'border-radius': baseBorderRadius, spacing }, components: { 'form-control': { 'background-color': composerBackground, 'border-radius': formControlBorderRadius } } } }) => {
|
|
650
|
+
const borderRadius = `calc(${baseBorderRadius} * ${formControlBorderRadius})`;
|
|
651
|
+
return css `
|
|
652
|
+
background: ${transparentize(0.8, composerBackground)};
|
|
653
|
+
border-radius: 0 0 ${borderRadius} ${borderRadius};
|
|
654
|
+
margin-block-start: calc(-1 * ${borderRadius});
|
|
655
|
+
padding: calc(${borderRadius} + 1.5 * ${spacing}) calc(1.5 * ${spacing}) calc(1.5 * ${spacing});
|
|
656
|
+
|
|
657
|
+
> button {
|
|
658
|
+
width: fit-content;
|
|
659
|
+
max-width: 100%;
|
|
660
|
+
}
|
|
661
|
+
`;
|
|
662
|
+
});
|
|
663
|
+
StyledSimplifiedInitialMessageGrid.defaultProps = defaultThemeProp;
|
|
515
664
|
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
516
665
|
return css `
|
|
517
666
|
white-space: normal;
|
|
518
667
|
text-align: left;
|
|
519
668
|
min-width: unset;
|
|
669
|
+
max-width: 100%;
|
|
520
670
|
padding-block: ${spacing};
|
|
521
671
|
padding-inline: calc(2 * ${spacing});
|
|
522
672
|
align-items: start;
|
|
@@ -530,15 +680,16 @@ StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
|
530
680
|
export const StyledInitialMessageText = styled.span `
|
|
531
681
|
${lineClamp(3)};
|
|
532
682
|
`;
|
|
533
|
-
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
683
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor } } } } } }) => {
|
|
534
684
|
return css `
|
|
535
685
|
background: ${avatarBackground};
|
|
686
|
+
color: ${avatarForegroundColor};
|
|
536
687
|
`;
|
|
537
688
|
});
|
|
538
689
|
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
539
690
|
export const StyledGenAIFooter = styled.div `
|
|
540
691
|
width: 100%;
|
|
541
|
-
max-width:
|
|
692
|
+
max-width: var(--message-container-width);
|
|
542
693
|
`;
|
|
543
694
|
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
544
695
|
return css `
|
|
@@ -581,41 +732,52 @@ export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
|
581
732
|
});
|
|
582
733
|
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
583
734
|
export const ProgressAngleStyle = createGlobalStyle `
|
|
584
|
-
@property --angle {
|
|
735
|
+
@property --progress-border-angle {
|
|
585
736
|
syntax: "<angle>";
|
|
586
|
-
inherits:
|
|
737
|
+
inherits: false;
|
|
587
738
|
initial-value: 0deg;
|
|
588
739
|
}
|
|
589
740
|
`;
|
|
741
|
+
const progressBorderSpin = keyframes `
|
|
742
|
+
to { --progress-border-angle: 360deg; }
|
|
743
|
+
`;
|
|
590
744
|
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
591
|
-
const aiColor = isSolidColor(theme.
|
|
592
|
-
? theme.
|
|
745
|
+
const aiColor = isSolidColor(theme.components.agent.ai)
|
|
746
|
+
? theme.components.agent.ai
|
|
593
747
|
: theme.base.colors.purple.dark;
|
|
594
748
|
const aiTransparent = transparentize(0.85, aiColor);
|
|
749
|
+
const borderWidth = '0.0625rem';
|
|
595
750
|
return css `
|
|
596
751
|
position: relative;
|
|
597
|
-
isolation: isolate;
|
|
598
752
|
border-radius: calc(2 * ${theme.base.spacing});
|
|
599
753
|
border-start-start-radius: calc(0.5 * ${theme.base.spacing});
|
|
600
|
-
border: calc(0.125 * ${theme.base.spacing}) solid transparent;
|
|
601
|
-
background:
|
|
602
|
-
linear-gradient(${aiTransparent} 0 0) padding-box,
|
|
603
|
-
conic-gradient(
|
|
604
|
-
from var(--angle) in oklab,
|
|
605
|
-
${aiTransparent} 0%,
|
|
606
|
-
${aiTransparent} 10%,
|
|
607
|
-
${aiColor} 50%,
|
|
608
|
-
${aiTransparent} 90%,
|
|
609
|
-
${aiTransparent} 100%
|
|
610
|
-
)
|
|
611
|
-
border-box;
|
|
612
|
-
animation: spin 1s ease-in-out infinite;
|
|
613
754
|
width: fit-content;
|
|
614
755
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
756
|
+
&::before {
|
|
757
|
+
content: '';
|
|
758
|
+
position: absolute;
|
|
759
|
+
inset: -${borderWidth};
|
|
760
|
+
border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});
|
|
761
|
+
border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});
|
|
762
|
+
padding: ${borderWidth};
|
|
763
|
+
background: conic-gradient(
|
|
764
|
+
from var(--progress-border-angle, 0deg) in oklab,
|
|
765
|
+
${aiTransparent} 0%,
|
|
766
|
+
${aiTransparent} 10%,
|
|
767
|
+
${aiColor} 50%,
|
|
768
|
+
${aiTransparent} 90%,
|
|
769
|
+
${aiTransparent} 100%
|
|
770
|
+
);
|
|
771
|
+
-webkit-mask:
|
|
772
|
+
linear-gradient(#000000 0 0) content-box,
|
|
773
|
+
linear-gradient(#000000 0 0);
|
|
774
|
+
-webkit-mask-composite: xor;
|
|
775
|
+
mask:
|
|
776
|
+
linear-gradient(#000000 0 0) content-box,
|
|
777
|
+
linear-gradient(#000000 0 0);
|
|
778
|
+
mask-composite: exclude;
|
|
779
|
+
pointer-events: none;
|
|
780
|
+
animation: ${progressBorderSpin} 1.25s linear infinite;
|
|
619
781
|
}
|
|
620
782
|
`;
|
|
621
783
|
});
|
|
@@ -635,7 +797,7 @@ export const StyledProgressContent = styled.div(({ theme }) => {
|
|
|
635
797
|
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
636
798
|
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
637
799
|
return css `
|
|
638
|
-
color: ${theme.
|
|
800
|
+
color: ${theme.components.agent.ai};
|
|
639
801
|
`;
|
|
640
802
|
});
|
|
641
803
|
StyledProgressText.defaultProps = defaultThemeProp;
|
|
@@ -660,8 +822,7 @@ export const StyledPortalSplitContainer = styled.div `
|
|
|
660
822
|
container-name: portal-split;
|
|
661
823
|
display: flex;
|
|
662
824
|
width: 100%;
|
|
663
|
-
height: calc(100dvh - var(--appshell-offset,
|
|
664
|
-
min-height: calc(100dvh - var(--appshell-offset, 0));
|
|
825
|
+
min-height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
665
826
|
`;
|
|
666
827
|
StyledPortalSplitContainer.defaultProps = defaultThemeProp;
|
|
667
828
|
const portalAgentRegionBasis = (agentVisible, mainVisible) => {
|
|
@@ -677,7 +838,10 @@ export const StyledPortalAgentRegion = styled.aside(({ agentVisible, mainVisible
|
|
|
677
838
|
transition: flex-basis calc(${theme.base.animation.speed} / 2)
|
|
678
839
|
${theme.base.animation.timing.ease};
|
|
679
840
|
will-change: flex-basis;
|
|
680
|
-
|
|
841
|
+
position: sticky;
|
|
842
|
+
top: var(--appshell-top-offset, 0);
|
|
843
|
+
height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
844
|
+
align-self: flex-start;
|
|
681
845
|
|
|
682
846
|
@container portal-split (min-width: ${theme.base.breakpoints.xl}) {
|
|
683
847
|
${agentVisible &&
|
|
@@ -691,6 +855,12 @@ export const StyledPortalAgentRegion = styled.aside(({ agentVisible, mainVisible
|
|
|
691
855
|
`}
|
|
692
856
|
}
|
|
693
857
|
|
|
858
|
+
${agentVisible &&
|
|
859
|
+
mainVisible &&
|
|
860
|
+
css `
|
|
861
|
+
border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
862
|
+
`}
|
|
863
|
+
|
|
694
864
|
${!agentVisible &&
|
|
695
865
|
css `
|
|
696
866
|
overflow: hidden;
|
|
@@ -698,12 +868,9 @@ export const StyledPortalAgentRegion = styled.aside(({ agentVisible, mainVisible
|
|
|
698
868
|
`);
|
|
699
869
|
StyledPortalAgentRegion.defaultProps = defaultThemeProp;
|
|
700
870
|
export const StyledPortalMainRegion = styled.div `
|
|
701
|
-
--appshell-sticky-offset: 0;
|
|
702
871
|
flex: 1 1 0%;
|
|
703
|
-
overflow: auto;
|
|
704
872
|
min-width: 0;
|
|
705
|
-
min-height:
|
|
706
|
-
contain: style;
|
|
873
|
+
min-height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
707
874
|
|
|
708
875
|
&[inert] {
|
|
709
876
|
display: none;
|
|
@@ -711,13 +878,12 @@ export const StyledPortalMainRegion = styled.div `
|
|
|
711
878
|
`;
|
|
712
879
|
StyledPortalMainRegion.defaultProps = defaultThemeProp;
|
|
713
880
|
export const StyledPortalSeparator = styled.div `
|
|
714
|
-
position:
|
|
881
|
+
position: sticky;
|
|
882
|
+
top: var(--appshell-top-offset, 0);
|
|
883
|
+
align-self: flex-start;
|
|
715
884
|
flex-shrink: 0;
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
${StyledResizeHandle} {
|
|
719
|
-
z-index: 1;
|
|
720
|
-
}
|
|
885
|
+
height: calc(100dvh - var(--appshell-total-offset, 0rem));
|
|
886
|
+
z-index: 1;
|
|
721
887
|
`;
|
|
722
888
|
StyledPortalSeparator.defaultProps = defaultThemeProp;
|
|
723
889
|
export const StyledSuggestionCardsView = styled.div(({ theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight, transparency, 'content-width': contentWidth }, components: { 'form-control': { 'border-color': formControlBorderColor } } } }) => {
|
|
@@ -811,7 +977,7 @@ export const StyledSuggestionCardsBottomHalf = styled(Flex)(({ theme: { base: {
|
|
|
811
977
|
StyledSuggestionCardsBottomHalf.defaultProps = defaultThemeProp;
|
|
812
978
|
export const StyledCaseWorkflowBanner = styled(Flex)(({ theme }) => {
|
|
813
979
|
const background = theme.components['case-view'].header.background;
|
|
814
|
-
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color']);
|
|
980
|
+
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color'], theme);
|
|
815
981
|
return css `
|
|
816
982
|
@keyframes case-header-fade-in {
|
|
817
983
|
from {
|
|
@@ -888,8 +1054,10 @@ export const StyledProgressLabel = styled.span(({ theme }) => {
|
|
|
888
1054
|
StyledProgressLabel.defaultProps = defaultThemeProp;
|
|
889
1055
|
export const StyledWorkflowInfoDialog = styled(InfoDialog)(({ theme }) => {
|
|
890
1056
|
return css `
|
|
891
|
-
|
|
892
|
-
|
|
1057
|
+
&:not(${StyledTouchDialog}) {
|
|
1058
|
+
width: ${theme.base['content-width'].sm};
|
|
1059
|
+
max-height: 80vh;
|
|
1060
|
+
}
|
|
893
1061
|
`;
|
|
894
1062
|
});
|
|
895
1063
|
StyledWorkflowInfoDialog.defaultProps = defaultThemeProp;
|
|
@@ -953,8 +1121,9 @@ export const StyledStepsContainer = styled.div(({ theme, stageStatus }) => {
|
|
|
953
1121
|
});
|
|
954
1122
|
StyledStepsContainer.defaultProps = defaultThemeProp;
|
|
955
1123
|
export const StyledCaseViewIcon = styled(Icon)(({ theme, foreground, background }) => {
|
|
1124
|
+
const minContrast = theme.base['min-contrast'];
|
|
956
1125
|
const meetsContrast = foreground && background
|
|
957
|
-
? tryCatch(() =>
|
|
1126
|
+
? tryCatch(() => meetsMinContrast(foreground, background, minContrast), () => false)
|
|
958
1127
|
: true;
|
|
959
1128
|
return css `
|
|
960
1129
|
--brand-accent: ${theme.base.palette['brand-accent']};
|
|
@@ -995,7 +1164,7 @@ export const StyledCaseViewImage = styled(Image) `
|
|
|
995
1164
|
StyledCaseViewImage.defaultProps = defaultThemeProp;
|
|
996
1165
|
export const StyledActiveCaseButton = styled.button(({ theme }) => {
|
|
997
1166
|
const background = theme.components['case-view'].header.background;
|
|
998
|
-
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color']);
|
|
1167
|
+
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color'], theme);
|
|
999
1168
|
const hoverBg = tryCatch(() => darken(0.05, background), () => background);
|
|
1000
1169
|
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1001
1170
|
return css `
|
|
@@ -1048,39 +1217,52 @@ export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
|
1048
1217
|
`;
|
|
1049
1218
|
});
|
|
1050
1219
|
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1051
|
-
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1220
|
+
export const StyledSalutation = styled(Text)(({ theme, simplified }) => {
|
|
1052
1221
|
return css `
|
|
1053
1222
|
text-align: center;
|
|
1054
1223
|
overflow-wrap: break-word;
|
|
1055
1224
|
word-break: break-word;
|
|
1056
|
-
font-size:
|
|
1225
|
+
font-size: ${simplified
|
|
1226
|
+
? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'
|
|
1227
|
+
: 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};
|
|
1057
1228
|
font-weight: ${theme.base['font-weight'].bold};
|
|
1058
1229
|
`;
|
|
1059
1230
|
});
|
|
1060
1231
|
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1061
|
-
export const
|
|
1062
|
-
const
|
|
1232
|
+
export const StyledSubHeading = styled(Text)(({ theme }) => {
|
|
1233
|
+
const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1063
1234
|
return css `
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1235
|
+
text-align: center;
|
|
1236
|
+
overflow-wrap: break-word;
|
|
1237
|
+
word-break: break-word;
|
|
1238
|
+
font-size: ${xxl};
|
|
1239
|
+
`;
|
|
1240
|
+
});
|
|
1241
|
+
StyledSubHeading.defaultProps = defaultThemeProp;
|
|
1242
|
+
export const StyledQuestionnaireCard = styled.article(({ theme }) => {
|
|
1243
|
+
const { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } = theme;
|
|
1244
|
+
const foreground = calculateForegroundColor(background, foregroundColor, theme);
|
|
1245
|
+
return css `
|
|
1246
|
+
width: 100%;
|
|
1247
|
+
border: none;
|
|
1248
|
+
border-block-end: 0.0625rem solid ${borderLine};
|
|
1249
|
+
border-radius: 0;
|
|
1250
|
+
background: ${background};
|
|
1251
|
+
color: ${foreground};
|
|
1070
1252
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1253
|
+
&&& ${StyledCardHeader} {
|
|
1254
|
+
padding-block-start: ${spacing};
|
|
1255
|
+
padding-inline-end: ${spacing};
|
|
1256
|
+
}
|
|
1075
1257
|
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1258
|
+
&&& ${StyledCardFooter} {
|
|
1259
|
+
padding-block-end: ${spacing};
|
|
1260
|
+
}
|
|
1079
1261
|
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1262
|
+
&&& ${StyledCardContent} {
|
|
1263
|
+
padding-block-end: ${spacing};
|
|
1264
|
+
}
|
|
1265
|
+
`;
|
|
1084
1266
|
});
|
|
1085
1267
|
StyledQuestionnaireCard.defaultProps = defaultThemeProp;
|
|
1086
1268
|
export const StyledQuestionBlock = styled.fieldset `
|