@pega/cosmos-react-work 9.0.0-build.9.9 → 9.0.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 +2 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/AppAnnouncement/AppAnnouncement.js +36 -21
- package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/Article/ArticleRating.d.ts +1 -1
- package/lib/components/Article/ArticleRating.d.ts.map +1 -1
- package/lib/components/ArticleList/AIArticleSummary.d.ts +3 -1
- package/lib/components/ArticleList/AIArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddy.d.ts +1 -1
- package/lib/components/ArticleList/ArticleBuddy.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddy.js +5 -1
- package/lib/components/ArticleList/ArticleBuddy.js.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyList.d.ts +1 -1
- package/lib/components/ArticleList/ArticleBuddyList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyResponse.d.ts +189 -3
- package/lib/components/ArticleList/ArticleBuddyResponse.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleBuddyResponse.js +1 -1
- package/lib/components/ArticleList/ArticleBuddyResponse.js.map +1 -1
- package/lib/components/ArticleList/ArticleFeedback.d.ts +3 -1
- package/lib/components/ArticleList/ArticleFeedback.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.d.ts +2 -2
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.js +6 -0
- package/lib/components/ArticleList/ArticleList.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.d.ts +17 -2
- package/lib/components/ArticleList/ArticleList.types.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.types.js.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts +183 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.styles.d.ts +2 -2
- package/lib/components/ArticleList/ArticleSummary.styles.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js +3 -1
- package/lib/components/ArticleList/ArticleSummaryHeader.js.map +1 -1
- package/lib/components/ArticleList/QuestionList.d.ts +5 -3
- package/lib/components/ArticleList/QuestionList.d.ts.map +1 -1
- package/lib/components/ArticleList/RelatedQuestions.d.ts +4 -2
- package/lib/components/ArticleList/RelatedQuestions.d.ts.map +1 -1
- package/lib/components/Assignments/Assignments.d.ts +2 -2
- package/lib/components/Assignments/Assignments.d.ts.map +1 -1
- package/lib/components/Assignments/Assignments.js +1 -1
- package/lib/components/Assignments/Assignments.js.map +1 -1
- package/lib/components/Assignments/Assignments.styles.d.ts +7 -3
- package/lib/components/Assignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.d.ts +2 -2
- package/lib/components/CaseHierarchy/CaseHierarchy.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.js +4 -3
- package/lib/components/CaseHierarchy/CaseHierarchy.js.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts +7 -3
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.js +9 -7
- package/lib/components/CaseHierarchy/CaseHierarchy.styles.js.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js +2 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.test-ids.js.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts +7 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.types.d.ts.map +1 -1
- package/lib/components/CaseHierarchy/CaseHierarchy.types.js.map +1 -1
- package/lib/components/CasePreview/CasePreview.d.ts +1 -1
- package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
- package/lib/components/CasePreview/CasePreview.js +83 -115
- 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 +97 -27
- package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -1
- package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -1
- package/lib/components/CaseView/CaseHeader/Summary.js +8 -1
- package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -1
- package/lib/components/CaseView/CaseSummaryFields.js +1 -1
- package/lib/components/CaseView/CaseSummaryFields.js.map +1 -1
- package/lib/components/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.js +49 -20
- package/lib/components/CaseView/CaseView.js.map +1 -1
- package/lib/components/CaseView/CaseView.styles.d.ts +83 -47
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
- package/lib/components/CaseView/CaseView.styles.js +329 -122
- package/lib/components/CaseView/CaseView.styles.js.map +1 -1
- package/lib/components/CaseView/CaseView.types.d.ts +24 -8
- 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.d.ts +1 -1
- package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
- package/lib/components/CaseView/UtilitiesSummary.js +14 -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 +10 -4
- package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +1 -1
- package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +1 -1
- package/lib/components/ConfigurableLayout/LayoutCell.js +25 -25
- package/lib/components/ConfigurableLayout/LayoutCell.js.map +1 -1
- package/lib/components/Confirmation/Confirmation.d.ts +10 -0
- package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/Confirmation/Confirmation.js +2 -2
- package/lib/components/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/Confirmation/index.d.ts +1 -1
- package/lib/components/Confirmation/index.d.ts.map +1 -1
- package/lib/components/Confirmation/index.js.map +1 -1
- package/lib/components/Details/Details.d.ts +3 -2
- package/lib/components/Details/Details.d.ts.map +1 -1
- package/lib/components/Details/Details.js +6 -5
- package/lib/components/Details/Details.js.map +1 -1
- package/lib/components/Details/Details.styles.d.ts +17 -15
- package/lib/components/Details/Details.styles.d.ts.map +1 -1
- package/lib/components/Details/Details.styles.js +28 -15
- package/lib/components/Details/Details.styles.js.map +1 -1
- package/lib/components/Details/Details.test-ids.d.ts +1 -1
- package/lib/components/Details/Details.test-ids.d.ts.map +1 -1
- package/lib/components/Details/Details.test-ids.js +2 -1
- package/lib/components/Details/Details.test-ids.js.map +1 -1
- package/lib/components/Details/DetailsList.d.ts.map +1 -1
- package/lib/components/Details/DetailsList.js +1 -5
- package/lib/components/Details/DetailsList.js.map +1 -1
- package/lib/components/GenAICoach/ActiveCases.d.ts +5 -0
- package/lib/components/GenAICoach/ActiveCases.d.ts.map +1 -0
- package/lib/components/GenAICoach/ActiveCases.js +50 -0
- package/lib/components/GenAICoach/ActiveCases.js.map +1 -0
- package/lib/components/GenAICoach/CaseWorkflow.d.ts +5 -0
- package/lib/components/GenAICoach/CaseWorkflow.d.ts.map +1 -0
- package/lib/components/GenAICoach/CaseWorkflow.js +111 -0
- package/lib/components/GenAICoach/CaseWorkflow.js.map +1 -0
- package/lib/components/GenAICoach/ConversationHistory.d.ts.map +1 -1
- package/lib/components/GenAICoach/ConversationHistory.js +11 -13
- package/lib/components/GenAICoach/ConversationHistory.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.d.ts +4 -3
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +721 -141
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +1639 -35
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +867 -82
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts +3 -2
- package/lib/components/GenAICoach/GenAICoach.test-ids.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js +6 -1
- package/lib/components/GenAICoach/GenAICoach.test-ids.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +215 -9
- 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 +6 -0
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +101 -52
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts +4 -0
- package/lib/components/GenAICoach/GenAIMessageFeedback.d.ts.map +1 -0
- package/lib/components/GenAICoach/GenAIMessageFeedback.js +95 -0
- package/lib/components/GenAICoach/GenAIMessageFeedback.js.map +1 -0
- package/lib/components/GenAICoach/GenAIMessageProgress.d.ts +4 -1
- package/lib/components/GenAICoach/GenAIMessageProgress.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessageProgress.js +11 -35
- package/lib/components/GenAICoach/GenAIMessageProgress.js.map +1 -1
- package/lib/components/GenAICoach/InitialSuggestedMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/InitialSuggestedMessage.js +5 -6
- package/lib/components/GenAICoach/InitialSuggestedMessage.js.map +1 -1
- package/lib/components/GenAICoach/PortalAgentSplitView.d.ts +6 -0
- package/lib/components/GenAICoach/PortalAgentSplitView.d.ts.map +1 -0
- package/lib/components/GenAICoach/PortalAgentSplitView.js +75 -0
- package/lib/components/GenAICoach/PortalAgentSplitView.js.map +1 -0
- package/lib/components/GenAICoach/Questionnaire.d.ts +4 -0
- package/lib/components/GenAICoach/Questionnaire.d.ts.map +1 -0
- package/lib/components/GenAICoach/Questionnaire.js +155 -0
- package/lib/components/GenAICoach/Questionnaire.js.map +1 -0
- package/lib/components/GenAICoach/ToolCandidates.d.ts +4 -0
- package/lib/components/GenAICoach/ToolCandidates.d.ts.map +1 -0
- package/lib/components/GenAICoach/ToolCandidates.js +19 -0
- package/lib/components/GenAICoach/ToolCandidates.js.map +1 -0
- package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts +4 -0
- package/lib/components/GenAICoach/ToolConfirmationMessage.d.ts.map +1 -0
- package/lib/components/GenAICoach/ToolConfirmationMessage.js +20 -0
- package/lib/components/GenAICoach/ToolConfirmationMessage.js.map +1 -0
- package/lib/components/GenAICoach/ToolDetails.d.ts +5 -0
- package/lib/components/GenAICoach/ToolDetails.d.ts.map +1 -0
- package/lib/components/GenAICoach/ToolDetails.js +99 -0
- package/lib/components/GenAICoach/ToolDetails.js.map +1 -0
- package/lib/components/GenAICoach/index.d.ts +5 -3
- package/lib/components/GenAICoach/index.d.ts.map +1 -1
- package/lib/components/GenAICoach/index.js +4 -2
- package/lib/components/GenAICoach/index.js.map +1 -1
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts +55 -34
- package/lib/components/HierarchicalAssignments/Assignments.styles.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/Assignments.styles.js +41 -11
- package/lib/components/HierarchicalAssignments/Assignments.styles.js.map +1 -1
- package/lib/components/HierarchicalAssignments/HierarchicalAssignments.types.d.ts +2 -0
- 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 +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js +7 -4
- package/lib/components/HierarchicalAssignments/nodeItems/AssignmentItem.js.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.d.ts.map +1 -1
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js +2 -2
- package/lib/components/HierarchicalAssignments/nodeItems/CaseDetail.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -5
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -1
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +17 -3
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.d.ts +31 -8
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +17 -10
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/Predictions/Predictions.d.ts.map +1 -1
- package/lib/components/Predictions/Predictions.js +11 -2
- package/lib/components/Predictions/Predictions.js.map +1 -1
- package/lib/components/SearchResults/ActiveFilter.d.ts +1 -1
- package/lib/components/SearchResults/ActiveFilter.d.ts.map +1 -1
- package/lib/components/SearchResults/Filter.d.ts.map +1 -1
- package/lib/components/SearchResults/Filter.js +1 -1
- package/lib/components/SearchResults/Filter.js.map +1 -1
- package/lib/components/SearchResults/SearchResult.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResult.js +14 -6
- package/lib/components/SearchResults/SearchResult.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +18 -3
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.styles.d.ts +12 -10
- package/lib/components/SearchResults/SearchResults.styles.d.ts.map +1 -1
- package/lib/components/Shortcuts/Shortcuts.d.ts +7 -0
- package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.js +47 -0
- package/lib/components/Shortcuts/Shortcuts.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts +22 -0
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.styles.js +114 -0
- package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +2 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.js +8 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.types.d.ts +64 -0
- package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.types.js +2 -0
- package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -0
- package/lib/components/Shortcuts/index.d.ts +3 -0
- package/lib/components/Shortcuts/index.d.ts.map +1 -0
- package/lib/components/Shortcuts/index.js +2 -0
- package/lib/components/Shortcuts/index.js.map +1 -0
- package/lib/components/Stages/Stages.d.ts.map +1 -1
- package/lib/components/Stages/Stages.js +37 -12
- package/lib/components/Stages/Stages.js.map +1 -1
- package/lib/components/Stages/Stages.styles.d.ts +22 -15
- package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
- package/lib/components/Stages/Stages.styles.js +285 -119
- package/lib/components/Stages/Stages.styles.js.map +1 -1
- package/lib/components/Stages/Stages.types.d.ts +5 -0
- package/lib/components/Stages/Stages.types.d.ts.map +1 -1
- package/lib/components/Stages/Stages.types.js.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.d.ts.map +1 -1
- package/lib/components/Stakeholders/Stakeholders.js +109 -145
- package/lib/components/Stakeholders/Stakeholders.js.map +1 -1
- package/lib/components/Tags/Tags.d.ts +2 -2
- package/lib/components/Tags/Tags.d.ts.map +1 -1
- package/lib/components/Tags/Tags.js +12 -2
- package/lib/components/Tags/Tags.js.map +1 -1
- package/lib/components/Tasks/TaskList.d.ts +10 -3
- package/lib/components/Tasks/TaskList.d.ts.map +1 -1
- package/lib/components/Tasks/TaskList.js +59 -5
- package/lib/components/Tasks/TaskList.js.map +1 -1
- package/lib/components/Tasks/Tasks.d.ts +10 -3
- package/lib/components/Tasks/Tasks.d.ts.map +1 -1
- package/lib/components/Tasks/Tasks.js +29 -5
- package/lib/components/Tasks/Tasks.js.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.d.ts.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.js +3 -2
- package/lib/components/UtilitiesLayout/UtilitiesLayout.js.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts +2 -2
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.d.ts.map +1 -1
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js +3 -2
- package/lib/components/UtilitiesLayout/UtilitiesLayout.styles.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +6 -7
|
@@ -1,37 +1,120 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
1
|
+
import styled, { createGlobalStyle, css } from 'styled-components';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
|
-
import { mix } from 'polished';
|
|
4
|
-
import { AppShellContext, Button, FileList, Flex, MenuButton, StyledEmptyState, StyledErrorState, StyledIcon, StyledText, SummaryItem, Text, calculateFontSize, defaultThemeProp, tryCatch } from '@pega/cosmos-react-core';
|
|
3
|
+
import { mix, darken, meetsContrastGuidelines, 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, tryCatch, Avatar, Fullscreen, animations, Modal, StyledIconShape } from '@pega/cosmos-react-core';
|
|
5
|
+
import { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';
|
|
6
|
+
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
7
|
+
import { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';
|
|
5
8
|
import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
|
|
9
|
+
import { StyledFullscreenButton } from '@pega/cosmos-react-core/lib/components/Fullscreen/FullscreenButton';
|
|
6
10
|
import { StyledFormField } from '@pega/cosmos-react-core/lib/components/FormField/FormField';
|
|
11
|
+
import { StyledHeader, StyledSelectionCard, StyledSingleField, StyledTileContent } from '@pega/cosmos-react-core/lib/components/SelectionCard/SelectionCard.styles';
|
|
7
12
|
import { StyledEditorContainer } from '@pega/cosmos-react-rte/lib/components/RichTextEditor/RichTextEditor.styles';
|
|
8
|
-
import { StyledProgress } from '@pega/cosmos-react-core/lib/components/Progress/Progress.styles';
|
|
9
|
-
import { resizeDrawerMaxWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
13
|
+
import { StyledProgress, StyledProgressRing } from '@pega/cosmos-react-core/lib/components/Progress/Progress.styles';
|
|
14
|
+
import { resizeDrawerMaxWidth, portalAgentMinWidth, portalAgentDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
15
|
+
import { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
16
|
+
import { RichTextViewer } from '@pega/cosmos-react-rte';
|
|
17
|
+
import { StepMarker, StyledStepText } from '@pega/cosmos-react-core/lib/components/MultiStepForm/FormProgress.styles';
|
|
18
|
+
import { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';
|
|
19
|
+
import { StyledStages } from '../Stages/Stages.styles';
|
|
10
20
|
import { isInUtilities } from './GenAICoach.utils';
|
|
11
|
-
|
|
12
|
-
const maxWidthMessage = '46rem';
|
|
21
|
+
const maxWidthMessage = '62.5rem';
|
|
13
22
|
export const StyledComposerSection = styled.div ``;
|
|
14
|
-
export const
|
|
23
|
+
export const StyledGenAIFormControl = styled(FormControl)(({ theme, focused }) => {
|
|
24
|
+
return css `
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
${focused &&
|
|
28
|
+
css `
|
|
29
|
+
&:not([disabled]) {
|
|
30
|
+
border-color: ${theme.components['form-control'][':focus']['border-color']};
|
|
31
|
+
box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover:not([readonly]):not([disabled]):not(:focus, :focus-within) {
|
|
35
|
+
border-color: transparent;
|
|
36
|
+
}
|
|
37
|
+
`}
|
|
38
|
+
`;
|
|
39
|
+
});
|
|
40
|
+
StyledGenAIFormControl.defaultProps = defaultThemeProp;
|
|
41
|
+
export const StyledComposerWrapper = styled.div(({ theme, focused, hasQuestionnaire }) => {
|
|
42
|
+
const { 'border-radius': formControlBorderRadius, 'border-width': formControlBorderWidth } = theme.components['form-control'];
|
|
43
|
+
const { 'border-radius': baseBorderRadius, palette } = theme.base;
|
|
44
|
+
const borderRadius = `calc(${formControlBorderRadius} * ${baseBorderRadius})`;
|
|
45
|
+
const borderWidth = formControlBorderWidth ?? '0.0625rem';
|
|
46
|
+
return css `
|
|
47
|
+
${hasQuestionnaire &&
|
|
48
|
+
css `
|
|
49
|
+
border: ${borderWidth} solid ${palette['border-line']};
|
|
50
|
+
border-radius: ${borderRadius};
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
|
|
53
|
+
${focused &&
|
|
54
|
+
css `
|
|
55
|
+
border-color: ${theme.components['form-control'][':focus']['border-color']};
|
|
56
|
+
box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};
|
|
57
|
+
`}
|
|
58
|
+
|
|
59
|
+
${StyledGenAIFormControl} {
|
|
60
|
+
border: none;
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
box-shadow: none;
|
|
63
|
+
overflow: visible;
|
|
64
|
+
}
|
|
65
|
+
`}
|
|
66
|
+
`;
|
|
67
|
+
});
|
|
68
|
+
StyledComposerWrapper.defaultProps = defaultThemeProp;
|
|
69
|
+
export const StyledMessagesContainer = styled.div(({ theme: { base: { spacing } }, withSuggestionCards }) => {
|
|
70
|
+
return css `
|
|
71
|
+
margin-block-end: calc(0.5 * ${spacing});
|
|
72
|
+
min-height: 0;
|
|
73
|
+
overflow-y: auto;
|
|
74
|
+
${withSuggestionCards &&
|
|
75
|
+
css `
|
|
76
|
+
overflow-y: visible;
|
|
77
|
+
margin-block-end: 0;
|
|
78
|
+
padding-block-start: 0;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
`}
|
|
81
|
+
`;
|
|
82
|
+
});
|
|
83
|
+
StyledMessagesContainer.defaultProps = defaultThemeProp;
|
|
84
|
+
export const StyledFullscreenWrapper = styled(Fullscreen) `
|
|
85
|
+
height: 100%;
|
|
86
|
+
`;
|
|
87
|
+
export const StyledGenAICoachContainer = styled.div(({ theme: { 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 } } }, variant, fullScreen, isCompact, isPortalAgent }) => {
|
|
15
88
|
const { previewActive } = useContext(AppShellContext);
|
|
89
|
+
const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
16
90
|
return css `
|
|
17
|
-
background: ${
|
|
91
|
+
background: ${agentBackground};
|
|
92
|
+
color: ${foregroundColorForAgent};
|
|
18
93
|
min-width: var(--utilities-drawer-min-width);
|
|
19
|
-
border-radius: ${
|
|
94
|
+
border-radius: ${cardBorderRadius};
|
|
95
|
+
transition: height ${animation.speed} ${animation.timing.ease};
|
|
96
|
+
|
|
97
|
+
${variant.placement === 'dialog' &&
|
|
98
|
+
css `
|
|
99
|
+
border-radius: calc(${formControlBorderRadius} * ${baseBorderRadius});
|
|
100
|
+
`}
|
|
101
|
+
|
|
20
102
|
${isInUtilities(variant) &&
|
|
103
|
+
!fullScreen &&
|
|
21
104
|
css `
|
|
22
105
|
min-height: 3rem;
|
|
23
106
|
max-width: 31.25rem;
|
|
24
107
|
box-shadow: 0 -1rem 1rem ${palette['app-background']};
|
|
25
|
-
border-radius: ${
|
|
108
|
+
border-radius: ${cardBorderRadius} ${cardBorderRadius} 0 0;
|
|
26
109
|
position: fixed;
|
|
27
|
-
inset-block-end: 0;
|
|
110
|
+
inset-block-end: var(--appshell-bottom-offset, 0);
|
|
28
111
|
inset-inline-end: calc(2 * ${spacing});
|
|
29
112
|
z-index: calc(${zIndex.drawer} + 1);
|
|
30
113
|
width: 25rem;
|
|
31
114
|
|
|
32
115
|
${previewActive &&
|
|
33
116
|
css `
|
|
34
|
-
@media (min-width: ${breakpoints.
|
|
117
|
+
@media (min-width: ${breakpoints.md}) {
|
|
35
118
|
margin-inline-end: min(var(--resize-drawer-width), ${resizeDrawerMaxWidth});
|
|
36
119
|
}
|
|
37
120
|
`}
|
|
@@ -47,12 +130,40 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
47
130
|
FIXME: This is a stopgap to address issue in Android web views via React Native where VH units do not work
|
|
48
131
|
*/
|
|
49
132
|
${((isInUtilities(variant) && variant.state === 'maximized') || !isInUtilities(variant)) &&
|
|
133
|
+
!fullScreen &&
|
|
50
134
|
css `
|
|
51
135
|
height: calc(0.85 * var(--case-view-height, 95vh));
|
|
52
136
|
@media (pointer: coarse) and (max-width: ${breakpoints.md}) {
|
|
53
137
|
height: 40rem;
|
|
54
138
|
}
|
|
55
139
|
`}
|
|
140
|
+
|
|
141
|
+
${variant.placement === 'fullpage' &&
|
|
142
|
+
css `
|
|
143
|
+
height: var(--content-height-in-view, 100vh);
|
|
144
|
+
`}
|
|
145
|
+
|
|
146
|
+
${isCompact &&
|
|
147
|
+
css `
|
|
148
|
+
height: 100%;
|
|
149
|
+
max-height: var(--content-height-in-view, 100vh);
|
|
150
|
+
|
|
151
|
+
${StyledMessagesContainer} {
|
|
152
|
+
margin-block-end: 0;
|
|
153
|
+
}
|
|
154
|
+
`}
|
|
155
|
+
|
|
156
|
+
${fullScreen &&
|
|
157
|
+
css `
|
|
158
|
+
height: 100vh;
|
|
159
|
+
border-radius: 0;
|
|
160
|
+
`}
|
|
161
|
+
|
|
162
|
+
${isPortalAgent &&
|
|
163
|
+
css `
|
|
164
|
+
height: calc(100vh - var(--appshell-offset, 0vh));
|
|
165
|
+
border-radius: 0;
|
|
166
|
+
`}
|
|
56
167
|
`;
|
|
57
168
|
});
|
|
58
169
|
StyledGenAICoachContainer.defaultProps = defaultThemeProp;
|
|
@@ -70,14 +181,13 @@ export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'fo
|
|
|
70
181
|
`;
|
|
71
182
|
});
|
|
72
183
|
StyledGenAIOptionsMenu.defaultProps = defaultThemeProp;
|
|
73
|
-
export const
|
|
74
|
-
const { xxs: buttonFontSize } = calculateFontSize(fontSize, fontScale);
|
|
184
|
+
export const StyledMenuSuggestions = styled(MenuButton)(({ theme: { base: { 'border-radius': baseBorderRadius, spacing }, components: { button: { 'border-radius': borderRadius } } } }) => {
|
|
75
185
|
return css `
|
|
76
|
-
|
|
77
|
-
|
|
186
|
+
padding: calc(0.75 * ${spacing});
|
|
187
|
+
border-radius: calc(${baseBorderRadius} * ${borderRadius});
|
|
78
188
|
`;
|
|
79
189
|
});
|
|
80
|
-
|
|
190
|
+
StyledMenuSuggestions.defaultProps = defaultThemeProp;
|
|
81
191
|
export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, spacing } } }) => {
|
|
82
192
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
83
193
|
return css `
|
|
@@ -91,21 +201,11 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
91
201
|
`;
|
|
92
202
|
});
|
|
93
203
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
94
|
-
export const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`;
|
|
100
|
-
});
|
|
101
|
-
StyledMessagesContainer.defaultProps = defaultThemeProp;
|
|
102
|
-
export const StyledFlexWrapper = styled.div(({ theme: { base: { spacing } } }) => {
|
|
103
|
-
return css `
|
|
104
|
-
margin-block-start: ${spacing};
|
|
105
|
-
height: 100%;
|
|
106
|
-
overflow-y: auto;
|
|
107
|
-
`;
|
|
108
|
-
});
|
|
204
|
+
export const StyledFlexWrapper = styled.div `
|
|
205
|
+
height: 100%;
|
|
206
|
+
overflow-y: auto;
|
|
207
|
+
position: relative;
|
|
208
|
+
`;
|
|
109
209
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
110
210
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
111
211
|
return css `
|
|
@@ -113,22 +213,24 @@ export const StyledGridContainer = styled.div(({ theme: { base }, conversationHi
|
|
|
113
213
|
min-height: 0;
|
|
114
214
|
${conversationHistory &&
|
|
115
215
|
css `
|
|
116
|
-
border: 0.0625rem solid ${base.palette['border-line']};
|
|
117
216
|
margin: calc(2 * ${base.spacing});
|
|
118
217
|
border-radius: ${base['border-radius']};
|
|
119
218
|
`}
|
|
120
219
|
`;
|
|
121
220
|
});
|
|
122
221
|
StyledGridContainer.defaultProps = defaultThemeProp;
|
|
123
|
-
export const StyledInitialMessageContainer = styled.div((
|
|
222
|
+
export const StyledInitialMessageContainer = styled.div(() => {
|
|
124
223
|
return css `
|
|
125
|
-
|
|
126
|
-
|
|
224
|
+
${StyledFormField} {
|
|
225
|
+
width: 100%;
|
|
226
|
+
max-width: ${maxWidthMessage};
|
|
227
|
+
}
|
|
228
|
+
`;
|
|
127
229
|
});
|
|
128
230
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
129
231
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
130
232
|
return css `
|
|
131
|
-
margin-block-end:
|
|
233
|
+
margin-block-end: ${spacing};
|
|
132
234
|
margin-inline: calc(2 * ${spacing});
|
|
133
235
|
align-items: center;
|
|
134
236
|
|
|
@@ -139,15 +241,36 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
139
241
|
`;
|
|
140
242
|
});
|
|
141
243
|
StyledInputContainer.defaultProps = defaultThemeProp;
|
|
142
|
-
export const
|
|
244
|
+
export const StyledStickyComposer = styled.div(({ theme: { base: { spacing }, components: { agent: { background: agentBackground } } } }) => {
|
|
245
|
+
return css `
|
|
246
|
+
position: sticky;
|
|
247
|
+
top: 0;
|
|
248
|
+
z-index: 2;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
background: ${agentBackground};
|
|
251
|
+
padding-block: calc(2 * ${spacing});
|
|
252
|
+
|
|
253
|
+
${StyledInputContainer} {
|
|
254
|
+
margin-block-end: 0;
|
|
255
|
+
}
|
|
256
|
+
`;
|
|
257
|
+
});
|
|
258
|
+
StyledStickyComposer.defaultProps = defaultThemeProp;
|
|
259
|
+
export const StyledSuggestion = styled(Button)(({ theme: { base: { 'border-radius': borderRadius, spacing } } }) => {
|
|
143
260
|
return css `
|
|
144
261
|
width: fit-content;
|
|
262
|
+
max-width: 100%;
|
|
145
263
|
padding: ${spacing};
|
|
146
264
|
white-space: normal;
|
|
147
265
|
word-break: break-word;
|
|
266
|
+
text-align: start;
|
|
267
|
+
border-start-start-radius: calc(1.25 * ${borderRadius});
|
|
268
|
+
border-start-end-radius: calc(0.5 * ${borderRadius});
|
|
269
|
+
border-end-start-radius: calc(1.25 * ${borderRadius});
|
|
270
|
+
border-end-end-radius: calc(1.25 * ${borderRadius});
|
|
271
|
+
|
|
148
272
|
& + & {
|
|
149
273
|
margin-inline-start: 0;
|
|
150
|
-
text-align: left;
|
|
151
274
|
}
|
|
152
275
|
`;
|
|
153
276
|
});
|
|
@@ -158,59 +281,65 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
158
281
|
`;
|
|
159
282
|
});
|
|
160
283
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
161
|
-
export const StyledTimeStamp = styled(Text)(() => {
|
|
162
|
-
return css `
|
|
163
|
-
display: flex;
|
|
164
|
-
align-items: center;
|
|
165
|
-
`;
|
|
166
|
-
});
|
|
167
|
-
StyledTimeStamp.defaultProps = defaultThemeProp;
|
|
168
284
|
export const StyledMessage = styled.p(({ theme }) => {
|
|
169
285
|
return css `
|
|
170
286
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
287
|
+
width: 100%;
|
|
288
|
+
min-width: 0;
|
|
171
289
|
overflow-wrap: break-word;
|
|
290
|
+
|
|
172
291
|
${StyledEditorContainer} {
|
|
173
292
|
padding: 0;
|
|
293
|
+
|
|
294
|
+
span {
|
|
295
|
+
animation: ${animations.reveal} 1s forwards;
|
|
296
|
+
}
|
|
174
297
|
}
|
|
175
298
|
`;
|
|
176
299
|
});
|
|
177
300
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
178
|
-
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing,
|
|
301
|
+
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } }) => {
|
|
302
|
+
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
179
303
|
return css `
|
|
180
304
|
overflow-wrap: break-word;
|
|
181
|
-
background: ${
|
|
305
|
+
background: ${userMessageBackground};
|
|
306
|
+
color: ${foregroundColorForUserMessage};
|
|
182
307
|
margin-inline-start: calc(4 * ${spacing});
|
|
183
308
|
margin-block-end: calc(0.5 * ${spacing});
|
|
184
309
|
padding: calc(0.5 * ${spacing});
|
|
185
|
-
border-start-start-radius:
|
|
186
|
-
border-start-end-radius:
|
|
187
|
-
border-end-start-radius:
|
|
188
|
-
border-end-end-radius:
|
|
310
|
+
border-start-start-radius: calc(1.25 * ${borderRadius});
|
|
311
|
+
border-start-end-radius: calc(0.5 * ${borderRadius});
|
|
312
|
+
border-end-start-radius: calc(1.25 * ${borderRadius});
|
|
313
|
+
border-end-end-radius: calc(1.25 * ${borderRadius});
|
|
189
314
|
`;
|
|
190
315
|
});
|
|
191
316
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
192
|
-
export const
|
|
317
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight, palette } } }) => {
|
|
318
|
+
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
193
319
|
return css `
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
320
|
+
display: flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
gap: ${spacing};
|
|
323
|
+
overflow-wrap: break-word;
|
|
324
|
+
font-size: ${systemFontSize};
|
|
325
|
+
color: ${palette['foreground-color']};
|
|
326
|
+
opacity: 0.7;
|
|
327
|
+
margin-block: calc(2 * ${spacing});
|
|
328
|
+
${stopped &&
|
|
329
|
+
css `
|
|
330
|
+
font-weight: ${fontWeight.normal};
|
|
331
|
+
`}
|
|
332
|
+
|
|
333
|
+
&::before,
|
|
334
|
+
&::after {
|
|
335
|
+
content: '';
|
|
336
|
+
flex: 1;
|
|
337
|
+
border-block-start: 0.0625rem solid ${palette['foreground-color']};
|
|
338
|
+
opacity: 0.7;
|
|
339
|
+
}
|
|
340
|
+
`;
|
|
212
341
|
});
|
|
213
|
-
|
|
342
|
+
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
214
343
|
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
215
344
|
return css `
|
|
216
345
|
padding-block-start: ${spacing};
|
|
@@ -218,13 +347,18 @@ export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing
|
|
|
218
347
|
align-self: center;
|
|
219
348
|
max-width: ${maxWidthMessage};
|
|
220
349
|
width: 100%;
|
|
350
|
+
margin-block-start: auto;
|
|
351
|
+
min-height: var(--stream-buffer, auto);
|
|
352
|
+
|
|
221
353
|
& > li {
|
|
222
|
-
max-width: calc(
|
|
354
|
+
max-width: calc(100% - calc(4.5 * ${spacing}));
|
|
223
355
|
}
|
|
356
|
+
|
|
224
357
|
& > li[from='user'] {
|
|
225
358
|
margin-inline-start: auto;
|
|
226
359
|
margin-block-end: ${spacing};
|
|
227
360
|
}
|
|
361
|
+
|
|
228
362
|
& > li[type='message'] {
|
|
229
363
|
&:focus-visible {
|
|
230
364
|
outline: none;
|
|
@@ -232,22 +366,39 @@ export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing
|
|
|
232
366
|
}
|
|
233
367
|
margin-block-end: ${spacing};
|
|
234
368
|
}
|
|
369
|
+
|
|
370
|
+
& > ${StyledSystemMessage} {
|
|
371
|
+
max-width: 100%;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
& > li:has(${StyledSuggestionsContainer}) {
|
|
375
|
+
max-width: 100%;
|
|
376
|
+
}
|
|
235
377
|
`;
|
|
236
378
|
});
|
|
237
379
|
StyledMessagesList.defaultProps = defaultThemeProp;
|
|
238
|
-
export const StyledHistoryContainer = styled(Flex)(({ theme, inFullPage }) =>
|
|
380
|
+
export const StyledHistoryContainer = styled(Flex)(({ theme, inFullPage }) => {
|
|
381
|
+
const { background, 'foreground-color': foregroundColor } = theme.components.agent.history;
|
|
382
|
+
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
383
|
+
return css `
|
|
239
384
|
height: 100%;
|
|
240
385
|
min-height: 0;
|
|
241
|
-
${
|
|
242
|
-
|
|
243
|
-
|
|
386
|
+
background: ${background};
|
|
387
|
+
color: ${foreground};
|
|
388
|
+
border-radius: ${theme.components.card['border-radius']};
|
|
389
|
+
box-shadow: ${theme.base.shadow.low};
|
|
390
|
+
|
|
391
|
+
${!inFullPage &&
|
|
392
|
+
css `
|
|
393
|
+
margin-inline: calc(1.5 * ${theme.base.spacing});
|
|
244
394
|
`}
|
|
245
395
|
|
|
246
396
|
${StyledEmptyState}, ${StyledErrorState} {
|
|
247
397
|
justify-content: flex-start;
|
|
248
398
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
249
399
|
}
|
|
250
|
-
|
|
400
|
+
`;
|
|
401
|
+
});
|
|
251
402
|
StyledHistoryContainer.defaultProps = defaultThemeProp;
|
|
252
403
|
export const StyledList = styled(Flex)(({ theme }) => css `
|
|
253
404
|
height: 100%;
|
|
@@ -255,19 +406,28 @@ export const StyledList = styled(Flex)(({ theme }) => css `
|
|
|
255
406
|
margin-block-end: calc(2 * ${theme.base.spacing});
|
|
256
407
|
`);
|
|
257
408
|
StyledList.defaultProps = defaultThemeProp;
|
|
409
|
+
export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
410
|
+
padding-inline: calc(2 * ${theme.base.spacing});
|
|
411
|
+
|
|
412
|
+
${StyledText} {
|
|
413
|
+
font-weight: ${theme.base['font-weight'].normal};
|
|
414
|
+
}
|
|
415
|
+
`);
|
|
416
|
+
StyledInnerList.defaultProps = defaultThemeProp;
|
|
258
417
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
259
418
|
const hoverColor = tryCatch(() => mix(0.95, theme.base.palette['primary-background'], theme.base.palette.interactive));
|
|
260
419
|
return css `
|
|
261
420
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
262
421
|
padding-block: ${theme.base.spacing};
|
|
263
|
-
border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
264
422
|
|
|
265
423
|
&:hover {
|
|
266
424
|
background-color: ${hoverColor};
|
|
425
|
+
border-radius: calc(3 * ${theme.base.spacing});
|
|
267
426
|
cursor: pointer;
|
|
268
427
|
}
|
|
269
428
|
&[aria-selected='true'] {
|
|
270
|
-
background-color: ${
|
|
429
|
+
background-color: ${theme.components.agent.history.item['selected-background']};
|
|
430
|
+
border-radius: calc(3 * ${theme.base.spacing});
|
|
271
431
|
}
|
|
272
432
|
&:focus {
|
|
273
433
|
border: 0.0625rem solid ${theme.base.palette.interactive};
|
|
@@ -285,7 +445,6 @@ export const StyledGroupHeader = styled.div(({ theme }) => {
|
|
|
285
445
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
286
446
|
padding-block-start: calc(2 * ${theme.base.spacing});
|
|
287
447
|
padding-block-end: calc(0.5 * ${theme.base.spacing});
|
|
288
|
-
border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
289
448
|
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
290
449
|
`;
|
|
291
450
|
});
|
|
@@ -314,4 +473,630 @@ export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
|
314
473
|
justify-content: center;
|
|
315
474
|
}
|
|
316
475
|
`;
|
|
476
|
+
export const StyledAgentIcon = styled.svg `
|
|
477
|
+
width: 3rem;
|
|
478
|
+
height: 3rem;
|
|
479
|
+
`;
|
|
480
|
+
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
481
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
482
|
+
return css `
|
|
483
|
+
border: none;
|
|
484
|
+
box-shadow: none;
|
|
485
|
+
min-height: calc(1.75 * ${components.input.height});
|
|
486
|
+
max-height: 6rem;
|
|
487
|
+
overflow-y: auto;
|
|
488
|
+
padding-block-end: 0;
|
|
489
|
+
&:focus:not([disabled]) {
|
|
490
|
+
border: none;
|
|
491
|
+
box-shadow: none;
|
|
492
|
+
background-color: transparent;
|
|
493
|
+
}
|
|
494
|
+
`;
|
|
495
|
+
});
|
|
496
|
+
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
497
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
498
|
+
return css `
|
|
499
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
500
|
+
margin-inline-start: auto;
|
|
501
|
+
`;
|
|
502
|
+
});
|
|
503
|
+
StyledSendButton.defaultProps = defaultThemeProp;
|
|
504
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
505
|
+
return css `
|
|
506
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
507
|
+
margin-inline-start: auto;
|
|
508
|
+
`;
|
|
509
|
+
});
|
|
510
|
+
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
511
|
+
export const StyledInitialMessageGrid = styled.div `
|
|
512
|
+
max-width: ${maxWidthMessage};
|
|
513
|
+
width: 100%;
|
|
514
|
+
`;
|
|
515
|
+
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
516
|
+
return css `
|
|
517
|
+
white-space: normal;
|
|
518
|
+
text-align: left;
|
|
519
|
+
min-width: unset;
|
|
520
|
+
padding-block: ${spacing};
|
|
521
|
+
padding-inline: calc(2 * ${spacing});
|
|
522
|
+
align-items: start;
|
|
523
|
+
|
|
524
|
+
& + & {
|
|
525
|
+
margin-inline-start: 0;
|
|
526
|
+
}
|
|
527
|
+
`;
|
|
528
|
+
});
|
|
529
|
+
StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
530
|
+
export const StyledInitialMessageText = styled.span `
|
|
531
|
+
${lineClamp(3)};
|
|
532
|
+
`;
|
|
533
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
534
|
+
return css `
|
|
535
|
+
background: ${avatarBackground};
|
|
536
|
+
`;
|
|
537
|
+
});
|
|
538
|
+
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
539
|
+
export const StyledGenAIFooter = styled.div `
|
|
540
|
+
width: 100%;
|
|
541
|
+
max-width: ${maxWidthMessage};
|
|
542
|
+
`;
|
|
543
|
+
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
544
|
+
return css `
|
|
545
|
+
border-block-end: 0.125rem solid ${borderLine};
|
|
546
|
+
padding: calc(2 * ${spacing});
|
|
547
|
+
`;
|
|
548
|
+
});
|
|
549
|
+
StyledToolMessage.defaultProps = defaultThemeProp;
|
|
550
|
+
export const StyledToolMessageContainer = styled.div(({ theme: { base: { spacing, 'border-radius': borderRadius, palette: { 'border-line': borderLine } } } }) => {
|
|
551
|
+
return css `
|
|
552
|
+
border: 0.125rem solid ${borderLine};
|
|
553
|
+
border-radius: min(calc(2 * ${borderRadius}), 1rem);
|
|
554
|
+
margin-block: ${spacing};
|
|
555
|
+
`;
|
|
556
|
+
});
|
|
557
|
+
StyledToolMessageContainer.defaultProps = defaultThemeProp;
|
|
558
|
+
export const StyledConfirmationMsg = styled(RichTextViewer)(({ theme: { base, components: { 'form-control': { ':read-only': { 'background-color': readOnlyBackgroundColor } } } } }) => `
|
|
559
|
+
padding: 0;
|
|
560
|
+
background-color: ${readOnlyBackgroundColor};
|
|
561
|
+
border-radius: calc(0.5 * ${base['border-radius']});
|
|
562
|
+
`);
|
|
563
|
+
StyledConfirmationMsg.defaultProps = defaultThemeProp;
|
|
564
|
+
export const StyledActionsContainer = styled.div(() => css `
|
|
565
|
+
margin-inline-start: auto;
|
|
566
|
+
|
|
567
|
+
&& button {
|
|
568
|
+
margin-inline-start: 0;
|
|
569
|
+
}
|
|
570
|
+
`);
|
|
571
|
+
StyledActionsContainer.defaultProps = defaultThemeProp;
|
|
572
|
+
export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
573
|
+
return css `
|
|
574
|
+
position: absolute;
|
|
575
|
+
bottom: calc(var(--composer-height, 0rem) + calc(5 * ${theme.base.spacing}));
|
|
576
|
+
width: fit-content;
|
|
577
|
+
align-self: center;
|
|
578
|
+
z-index: 1;
|
|
579
|
+
box-shadow: ${theme.base.shadow.high};
|
|
580
|
+
`;
|
|
581
|
+
});
|
|
582
|
+
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
583
|
+
export const ProgressAngleStyle = createGlobalStyle `
|
|
584
|
+
@property --angle {
|
|
585
|
+
syntax: "<angle>";
|
|
586
|
+
inherits: true;
|
|
587
|
+
initial-value: 0deg;
|
|
588
|
+
}
|
|
589
|
+
`;
|
|
590
|
+
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
591
|
+
const aiColor = isSolidColor(theme.base.palette.ai)
|
|
592
|
+
? theme.base.palette.ai
|
|
593
|
+
: theme.base.colors.purple.dark;
|
|
594
|
+
const aiTransparent = transparentize(0.85, aiColor);
|
|
595
|
+
return css `
|
|
596
|
+
position: relative;
|
|
597
|
+
isolation: isolate;
|
|
598
|
+
border-radius: calc(2 * ${theme.base.spacing});
|
|
599
|
+
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
|
+
width: fit-content;
|
|
614
|
+
|
|
615
|
+
@keyframes spin {
|
|
616
|
+
to {
|
|
617
|
+
--angle: 360deg;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
`;
|
|
621
|
+
});
|
|
622
|
+
StyledProgressContainer.defaultProps = defaultThemeProp;
|
|
623
|
+
export const StyledProgressContent = styled.div(({ theme }) => {
|
|
624
|
+
return css `
|
|
625
|
+
background: ${theme.components.agent.background};
|
|
626
|
+
border-radius: calc(2 * ${theme.base.spacing});
|
|
627
|
+
border-start-start-radius: calc(0.5 * ${theme.base.spacing});
|
|
628
|
+
padding: calc(2 * ${theme.base.spacing});
|
|
629
|
+
|
|
630
|
+
${StyledProgressRing} {
|
|
631
|
+
width: ${theme.components.icon.size.s};
|
|
632
|
+
}
|
|
633
|
+
`;
|
|
634
|
+
});
|
|
635
|
+
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
636
|
+
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
637
|
+
return css `
|
|
638
|
+
color: ${theme.base.palette.ai};
|
|
639
|
+
`;
|
|
640
|
+
});
|
|
641
|
+
StyledProgressText.defaultProps = defaultThemeProp;
|
|
642
|
+
export const StyledActionContainer = styled(Flex) `
|
|
643
|
+
&& {
|
|
644
|
+
display: flex;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&& > button:first-child:not(:last-child) {
|
|
648
|
+
margin-inline-end: 0;
|
|
649
|
+
}
|
|
650
|
+
margin-inline-end: auto;
|
|
651
|
+
`;
|
|
652
|
+
export const StyledToolCandidatesModal = styled(Modal)(({ theme }) => {
|
|
653
|
+
return css `
|
|
654
|
+
max-width: ${theme.base['content-width'].xl};
|
|
655
|
+
`;
|
|
656
|
+
});
|
|
657
|
+
StyledToolCandidatesModal.defaultProps = defaultThemeProp;
|
|
658
|
+
export const StyledPortalSplitContainer = styled.div `
|
|
659
|
+
container-type: inline-size;
|
|
660
|
+
container-name: portal-split;
|
|
661
|
+
display: flex;
|
|
662
|
+
width: 100%;
|
|
663
|
+
height: calc(100dvh - var(--appshell-offset, 0));
|
|
664
|
+
min-height: calc(100dvh - var(--appshell-offset, 0));
|
|
665
|
+
`;
|
|
666
|
+
StyledPortalSplitContainer.defaultProps = defaultThemeProp;
|
|
667
|
+
const portalAgentRegionBasis = (agentVisible, mainVisible) => {
|
|
668
|
+
if (!agentVisible)
|
|
669
|
+
return '0%';
|
|
670
|
+
if (!mainVisible)
|
|
671
|
+
return '100%';
|
|
672
|
+
return `clamp(${portalAgentMinWidth}, var(--region-a-width, ${portalAgentDefaultWidth}), calc(100% - ${portalAgentMinWidth}))`;
|
|
673
|
+
};
|
|
674
|
+
export const StyledPortalAgentRegion = styled.aside(({ agentVisible, mainVisible, theme }) => css `
|
|
675
|
+
flex: 0 0 ${portalAgentRegionBasis(agentVisible, mainVisible)};
|
|
676
|
+
min-width: 0;
|
|
677
|
+
transition: flex-basis calc(${theme.base.animation.speed} / 2)
|
|
678
|
+
${theme.base.animation.timing.ease};
|
|
679
|
+
will-change: flex-basis;
|
|
680
|
+
border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
681
|
+
|
|
682
|
+
@container portal-split (min-width: ${theme.base.breakpoints.xl}) {
|
|
683
|
+
${agentVisible &&
|
|
684
|
+
mainVisible &&
|
|
685
|
+
css `
|
|
686
|
+
flex-basis: clamp(
|
|
687
|
+
${portalAgentMinWidth},
|
|
688
|
+
var(--region-a-width, 25%),
|
|
689
|
+
calc(100% - ${portalAgentMinWidth})
|
|
690
|
+
);
|
|
691
|
+
`}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
${!agentVisible &&
|
|
695
|
+
css `
|
|
696
|
+
overflow: hidden;
|
|
697
|
+
`}
|
|
698
|
+
`);
|
|
699
|
+
StyledPortalAgentRegion.defaultProps = defaultThemeProp;
|
|
700
|
+
export const StyledPortalMainRegion = styled.div `
|
|
701
|
+
--appshell-sticky-offset: 0;
|
|
702
|
+
flex: 1 1 0%;
|
|
703
|
+
overflow: auto;
|
|
704
|
+
min-width: 0;
|
|
705
|
+
min-height: inherit;
|
|
706
|
+
contain: style;
|
|
707
|
+
|
|
708
|
+
&[inert] {
|
|
709
|
+
display: none;
|
|
710
|
+
}
|
|
711
|
+
`;
|
|
712
|
+
StyledPortalMainRegion.defaultProps = defaultThemeProp;
|
|
713
|
+
export const StyledPortalSeparator = styled.div `
|
|
714
|
+
position: relative;
|
|
715
|
+
flex-shrink: 0;
|
|
716
|
+
align-self: stretch;
|
|
717
|
+
|
|
718
|
+
${StyledResizeHandle} {
|
|
719
|
+
z-index: 1;
|
|
720
|
+
}
|
|
721
|
+
`;
|
|
722
|
+
StyledPortalSeparator.defaultProps = defaultThemeProp;
|
|
723
|
+
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 } } } }) => {
|
|
724
|
+
const cardFontSize = calculateFontSize(fontSize, fontScale).xxs;
|
|
725
|
+
const columnTrack = `clamp(2.5rem, var(--tile-col-track, 2.5rem), 5rem) minmax(20ch, ${contentWidth.sm}) 1fr`;
|
|
726
|
+
const singleCardSize = `calc(${contentWidth.sm} + 8.875rem)`;
|
|
727
|
+
return css `
|
|
728
|
+
max-width: 95rem;
|
|
729
|
+
width: 100%;
|
|
730
|
+
margin-inline: auto;
|
|
731
|
+
|
|
732
|
+
[data-testid='gallery'] {
|
|
733
|
+
min-height: 0;
|
|
734
|
+
max-height: none;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.bContainer {
|
|
738
|
+
height: auto !important;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
&& .grid-container {
|
|
742
|
+
position: static;
|
|
743
|
+
gap: calc(2 * ${spacing});
|
|
744
|
+
grid-auto-rows: minmax(2.75rem, 1fr);
|
|
745
|
+
|
|
746
|
+
@container (min-width: calc(1.25 * ${singleCardSize})) {
|
|
747
|
+
grid-template-columns: repeat(2, ${columnTrack});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
@container (min-width: calc(2 * ${singleCardSize})) {
|
|
751
|
+
grid-template-columns: repeat(3, ${columnTrack});
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@container (min-width: calc(3 * ${singleCardSize})) {
|
|
755
|
+
grid-template-columns: repeat(4, ${columnTrack});
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
&& ${StyledCard} {
|
|
760
|
+
background: transparent;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
${StyledFullscreenButton} {
|
|
764
|
+
display: none;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
${StyledHeader} {
|
|
768
|
+
${StyledText} {
|
|
769
|
+
font-size: ${cardFontSize};
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
${StyledSingleField} {
|
|
774
|
+
font-size: ${cardFontSize};
|
|
775
|
+
opacity: ${transparency['transparent-2']};
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
${StyledSelectionCard} {
|
|
779
|
+
border-color: ${formControlBorderColor};
|
|
780
|
+
|
|
781
|
+
&:focus,
|
|
782
|
+
&:not([data-main-focus]):focus-within {
|
|
783
|
+
border-color: transparent;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
${StyledTileContent} {
|
|
787
|
+
font-size: ${cardFontSize};
|
|
788
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
`;
|
|
792
|
+
});
|
|
793
|
+
StyledSuggestionCardsView.defaultProps = defaultThemeProp;
|
|
794
|
+
export const StyledAISuggestedBadge = styled(Flex)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, transparency } } }) => {
|
|
795
|
+
const systemFontSize = calculateFontSize(fontSize, fontScale).xxs;
|
|
796
|
+
return css `
|
|
797
|
+
${StyledText} {
|
|
798
|
+
font-size: ${systemFontSize};
|
|
799
|
+
}
|
|
800
|
+
opacity: ${transparency['transparent-2']};
|
|
801
|
+
`;
|
|
802
|
+
});
|
|
803
|
+
StyledAISuggestedBadge.defaultProps = defaultThemeProp;
|
|
804
|
+
export const StyledSuggestionCardsBottomHalf = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
805
|
+
return css `
|
|
806
|
+
min-height: 50%;
|
|
807
|
+
flex-shrink: 0;
|
|
808
|
+
margin-block-start: calc(2.5 * ${spacing});
|
|
809
|
+
`;
|
|
810
|
+
});
|
|
811
|
+
StyledSuggestionCardsBottomHalf.defaultProps = defaultThemeProp;
|
|
812
|
+
export const StyledCaseWorkflowBanner = styled(Flex)(({ theme }) => {
|
|
813
|
+
const background = theme.components['case-view'].header.background;
|
|
814
|
+
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color']);
|
|
815
|
+
return css `
|
|
816
|
+
@keyframes case-header-fade-in {
|
|
817
|
+
from {
|
|
818
|
+
opacity: 0;
|
|
819
|
+
transform: translateY(calc(${theme.base.spacing} * -1.5)) scale(0.98);
|
|
820
|
+
}
|
|
821
|
+
to {
|
|
822
|
+
opacity: 1;
|
|
823
|
+
transform: translateY(0) scale(1);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
margin-inline: calc(2 * ${theme.base.spacing});
|
|
827
|
+
margin-block: ${theme.base.spacing} 0;
|
|
828
|
+
padding: calc(${theme.base.spacing} * 0.75) ${theme.base.spacing};
|
|
829
|
+
background: ${background};
|
|
830
|
+
color: ${foreground};
|
|
831
|
+
border-radius: ${theme.base['border-radius']};
|
|
832
|
+
box-shadow: ${theme.base.shadow.low};
|
|
833
|
+
animation: case-header-fade-in ${theme.base.animation.speed} ${theme.base.animation.timing.ease}
|
|
834
|
+
both;
|
|
835
|
+
`;
|
|
836
|
+
});
|
|
837
|
+
StyledCaseWorkflowBanner.defaultProps = defaultThemeProp;
|
|
838
|
+
export const StyledCaseLaunchButton = styled(Button)(({ theme }) => {
|
|
839
|
+
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
840
|
+
return css `
|
|
841
|
+
display: flex;
|
|
842
|
+
align-items: center;
|
|
843
|
+
justify-content: flex-start;
|
|
844
|
+
gap: ${theme.base.spacing};
|
|
845
|
+
min-width: 0;
|
|
846
|
+
flex: 1 1 0;
|
|
847
|
+
padding: 0 calc(${theme.base.spacing} * 0.5);
|
|
848
|
+
font-size: ${fontSize.s};
|
|
849
|
+
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
850
|
+
text-align: start;
|
|
851
|
+
`;
|
|
852
|
+
});
|
|
853
|
+
StyledCaseLaunchButton.defaultProps = defaultThemeProp;
|
|
854
|
+
export const StyledCaseIconWrapper = styled.span `
|
|
855
|
+
flex-shrink: 0;
|
|
856
|
+
display: flex;
|
|
857
|
+
align-items: center;
|
|
858
|
+
|
|
859
|
+
${StyledIconShape} {
|
|
860
|
+
width: 1.5rem;
|
|
861
|
+
height: 1.5rem;
|
|
862
|
+
}
|
|
863
|
+
`;
|
|
864
|
+
StyledCaseIconWrapper.defaultProps = defaultThemeProp;
|
|
865
|
+
export const StyledCaseTitleText = styled.span `
|
|
866
|
+
display: block;
|
|
867
|
+
white-space: nowrap;
|
|
868
|
+
overflow: hidden;
|
|
869
|
+
text-overflow: ellipsis;
|
|
870
|
+
min-width: 0;
|
|
871
|
+
flex: 1 1 0;
|
|
872
|
+
`;
|
|
873
|
+
StyledCaseTitleText.defaultProps = defaultThemeProp;
|
|
874
|
+
export const StyledProgressLabel = styled.span(({ theme }) => {
|
|
875
|
+
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
876
|
+
return css `
|
|
877
|
+
flex: 0 1 auto;
|
|
878
|
+
max-width: 40%;
|
|
879
|
+
margin-inline-start: auto;
|
|
880
|
+
font-size: ${fontSize.xxs};
|
|
881
|
+
font-weight: ${theme.base['font-weight'].normal};
|
|
882
|
+
white-space: nowrap;
|
|
883
|
+
overflow: hidden;
|
|
884
|
+
text-overflow: ellipsis;
|
|
885
|
+
min-width: 0;
|
|
886
|
+
`;
|
|
887
|
+
});
|
|
888
|
+
StyledProgressLabel.defaultProps = defaultThemeProp;
|
|
889
|
+
export const StyledWorkflowInfoDialog = styled(InfoDialog)(({ theme }) => {
|
|
890
|
+
return css `
|
|
891
|
+
width: ${theme.base['content-width'].sm};
|
|
892
|
+
max-height: 80vh;
|
|
893
|
+
`;
|
|
894
|
+
});
|
|
895
|
+
StyledWorkflowInfoDialog.defaultProps = defaultThemeProp;
|
|
896
|
+
export const StyledStageList = styled.ol(({ theme }) => {
|
|
897
|
+
return css `
|
|
898
|
+
list-style: none;
|
|
899
|
+
padding: calc(${theme.base.spacing} * 0.5);
|
|
900
|
+
overflow-y: auto;
|
|
901
|
+
min-height: 0;
|
|
902
|
+
|
|
903
|
+
> li:not(:last-child) {
|
|
904
|
+
margin-block-end: calc(${theme.base.spacing} * 0.5);
|
|
905
|
+
}
|
|
906
|
+
`;
|
|
907
|
+
});
|
|
908
|
+
StyledStageList.defaultProps = defaultThemeProp;
|
|
909
|
+
export const StyledStageButton = styled(Button)(({ theme, expanded }) => {
|
|
910
|
+
return css `
|
|
911
|
+
width: 100%;
|
|
912
|
+
justify-content: start;
|
|
913
|
+
color: ${theme.base.palette['foreground-color']};
|
|
914
|
+
gap: calc(${theme.base.spacing} * 0.5);
|
|
915
|
+
|
|
916
|
+
${StyledIcon} {
|
|
917
|
+
transition: transform ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
|
|
918
|
+
flex-shrink: 0;
|
|
919
|
+
transform: rotateZ(${expanded ? '0deg' : '-90deg'});
|
|
920
|
+
}
|
|
921
|
+
`;
|
|
922
|
+
});
|
|
923
|
+
StyledStageButton.defaultProps = defaultThemeProp;
|
|
924
|
+
export const StyledStepsContainer = styled.div(({ theme, stageStatus }) => {
|
|
925
|
+
const isInactive = stageStatus === 'completed' || stageStatus === 'not-started';
|
|
926
|
+
const { m: stepMarkerSize } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
927
|
+
return css `
|
|
928
|
+
padding-inline-start: calc(${theme.base.spacing} * 2);
|
|
929
|
+
padding-block: calc(${theme.base.spacing} * 0.5);
|
|
930
|
+
|
|
931
|
+
${isInactive &&
|
|
932
|
+
css `
|
|
933
|
+
${StepMarker}[aria-current='step']::before {
|
|
934
|
+
width: ${stepMarkerSize};
|
|
935
|
+
height: ${stepMarkerSize};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
${StyledStepText} {
|
|
939
|
+
font-weight: ${theme.base['font-weight'].normal};
|
|
940
|
+
font-size: inherit;
|
|
941
|
+
}
|
|
942
|
+
`}
|
|
943
|
+
|
|
944
|
+
${stageStatus === 'not-started' &&
|
|
945
|
+
css `
|
|
946
|
+
${StepMarker}[aria-current='step']::before {
|
|
947
|
+
background: ${theme.base.palette['primary-background']};
|
|
948
|
+
border: calc(2 * ${theme.components['form-control']['border-width']}) solid
|
|
949
|
+
${theme.components['form-control']['border-color']};
|
|
950
|
+
}
|
|
951
|
+
`}
|
|
952
|
+
`;
|
|
953
|
+
});
|
|
954
|
+
StyledStepsContainer.defaultProps = defaultThemeProp;
|
|
955
|
+
export const StyledCaseViewIcon = styled(Icon)(({ theme, foreground, background }) => {
|
|
956
|
+
const meetsContrast = foreground && background
|
|
957
|
+
? tryCatch(() => meetsContrastGuidelines(foreground, background).AA, () => false)
|
|
958
|
+
: true;
|
|
959
|
+
return css `
|
|
960
|
+
--brand-accent: ${theme.base.palette['brand-accent']};
|
|
961
|
+
--gradient-start: oklch(from var(--brand-accent) calc(l - 0.3) calc(c * 1.5) h);
|
|
962
|
+
--gradient-mid: oklch(from var(--brand-accent) l c h);
|
|
963
|
+
--gradient-end: oklch(from var(--brand-accent) calc(l + 0.5) calc(c * 1.5) h);
|
|
964
|
+
|
|
965
|
+
${!meetsContrast
|
|
966
|
+
? css `
|
|
967
|
+
color: inherit;
|
|
968
|
+
background: transparent;
|
|
969
|
+
`
|
|
970
|
+
: null}
|
|
971
|
+
|
|
972
|
+
${theme.components['case-view'].icon.color !== 'auto'
|
|
973
|
+
? css `
|
|
974
|
+
color: ${theme.components['case-view'].icon.color};
|
|
975
|
+
`
|
|
976
|
+
: null}
|
|
977
|
+
|
|
978
|
+
${theme.components['case-view'].icon.background !== 'auto'
|
|
979
|
+
? css `
|
|
980
|
+
background: ${theme.components['case-view'].icon.background};
|
|
981
|
+
`
|
|
982
|
+
: null}
|
|
983
|
+
|
|
984
|
+
${theme.components['case-view'].icon['box-shadow'] !== 'auto'
|
|
985
|
+
? css `
|
|
986
|
+
box-shadow: ${theme.components['case-view'].icon['box-shadow']};
|
|
987
|
+
`
|
|
988
|
+
: null}
|
|
989
|
+
`;
|
|
990
|
+
});
|
|
991
|
+
StyledCaseViewIcon.defaultProps = defaultThemeProp;
|
|
992
|
+
export const StyledCaseViewImage = styled(Image) `
|
|
993
|
+
max-height: 100%;
|
|
994
|
+
`;
|
|
995
|
+
StyledCaseViewImage.defaultProps = defaultThemeProp;
|
|
996
|
+
export const StyledActiveCaseButton = styled.button(({ theme }) => {
|
|
997
|
+
const background = theme.components['case-view'].header.background;
|
|
998
|
+
const foreground = calculateForegroundColor(background, theme.components['case-view'].header['foreground-color']);
|
|
999
|
+
const hoverBg = tryCatch(() => darken(0.05, background), () => background);
|
|
1000
|
+
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1001
|
+
return css `
|
|
1002
|
+
border: none;
|
|
1003
|
+
outline: none;
|
|
1004
|
+
cursor: pointer;
|
|
1005
|
+
font-size: ${fontSize.xs};
|
|
1006
|
+
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
1007
|
+
padding: calc(${theme.base.spacing} * 0.5) ${theme.base.spacing};
|
|
1008
|
+
border-radius: ${theme.base['border-radius']};
|
|
1009
|
+
background: ${background};
|
|
1010
|
+
color: ${foreground};
|
|
1011
|
+
box-shadow: ${theme.base.shadow.low};
|
|
1012
|
+
|
|
1013
|
+
&:hover {
|
|
1014
|
+
background: ${hoverBg};
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
&:focus-visible {
|
|
1018
|
+
box-shadow: ${theme.base.shadow.focus};
|
|
1019
|
+
}
|
|
1020
|
+
`;
|
|
1021
|
+
});
|
|
1022
|
+
StyledActiveCaseButton.defaultProps = defaultThemeProp;
|
|
1023
|
+
export const StyledActiveCasesList = styled(Flex)(({ theme }) => {
|
|
1024
|
+
return css `
|
|
1025
|
+
overflow-y: auto;
|
|
1026
|
+
padding: calc(${theme.base.spacing} * 0.5) calc(${theme.base.spacing} * 0.5);
|
|
1027
|
+
min-height: 0;
|
|
1028
|
+
`;
|
|
1029
|
+
});
|
|
1030
|
+
StyledActiveCasesList.defaultProps = defaultThemeProp;
|
|
1031
|
+
export const StyledActiveCaseName = styled(Button)(({ theme }) => {
|
|
1032
|
+
const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1033
|
+
return css `
|
|
1034
|
+
justify-content: start;
|
|
1035
|
+
font-size: ${fontSize.s};
|
|
1036
|
+
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
1037
|
+
padding: 0;
|
|
1038
|
+
width: 100%;
|
|
1039
|
+
text-align: start;
|
|
1040
|
+
`;
|
|
1041
|
+
});
|
|
1042
|
+
StyledActiveCaseName.defaultProps = defaultThemeProp;
|
|
1043
|
+
export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
1044
|
+
return css `
|
|
1045
|
+
${StyledStages} {
|
|
1046
|
+
border: ${theme.components.button['border-width']} solid ${theme.base.palette['border-line']};
|
|
1047
|
+
}
|
|
1048
|
+
`;
|
|
1049
|
+
});
|
|
1050
|
+
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1051
|
+
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1052
|
+
return css `
|
|
1053
|
+
text-align: center;
|
|
1054
|
+
overflow-wrap: break-word;
|
|
1055
|
+
word-break: break-word;
|
|
1056
|
+
font-size: clamp(1.5rem, 1.333rem + 0.052vw, 2rem);
|
|
1057
|
+
font-weight: ${theme.base['font-weight'].bold};
|
|
1058
|
+
`;
|
|
1059
|
+
});
|
|
1060
|
+
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1061
|
+
export const StyledQuestionnaireCard = styled.article(({ theme: { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } }) => {
|
|
1062
|
+
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
1063
|
+
return css `
|
|
1064
|
+
width: 100%;
|
|
1065
|
+
border: none;
|
|
1066
|
+
border-block-end: 0.0625rem solid ${borderLine};
|
|
1067
|
+
border-radius: 0;
|
|
1068
|
+
background: ${background};
|
|
1069
|
+
color: ${foreground};
|
|
1070
|
+
|
|
1071
|
+
&&& ${StyledCardHeader} {
|
|
1072
|
+
padding-block-start: ${spacing};
|
|
1073
|
+
padding-inline-end: ${spacing};
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
&&& ${StyledCardFooter} {
|
|
1077
|
+
padding-block-end: ${spacing};
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
&&& ${StyledCardContent} {
|
|
1081
|
+
padding-block-end: ${spacing};
|
|
1082
|
+
}
|
|
1083
|
+
`;
|
|
1084
|
+
});
|
|
1085
|
+
StyledQuestionnaireCard.defaultProps = defaultThemeProp;
|
|
1086
|
+
export const StyledQuestionBlock = styled.fieldset `
|
|
1087
|
+
border: none;
|
|
1088
|
+
padding: 0;
|
|
1089
|
+
margin: 0;
|
|
1090
|
+
|
|
1091
|
+
/* Let radio/checkbox labels stretch so the ComboBox can fill available width */
|
|
1092
|
+
label {
|
|
1093
|
+
width: 100%;
|
|
1094
|
+
}
|
|
1095
|
+
`;
|
|
1096
|
+
StyledQuestionBlock.defaultProps = defaultThemeProp;
|
|
1097
|
+
export const StyledComboBoxWrapper = styled.div `
|
|
1098
|
+
min-width: 12rem;
|
|
1099
|
+
flex: 1;
|
|
1100
|
+
`;
|
|
1101
|
+
StyledComboBoxWrapper.defaultProps = defaultThemeProp;
|
|
317
1102
|
//# sourceMappingURL=GenAICoach.styles.js.map
|