@pega/cosmos-react-work 10.0.0-build.2.5 → 10.0.0-build.2.7
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/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +168 -26
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +216 -9
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +141 -57
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +14 -2
- 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 +22 -17
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled, { createGlobalStyle, css } from 'styled-components';
|
|
1
|
+
import styled, { createGlobalStyle, css, keyframes } from 'styled-components';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { mix, darken, meetsContrastGuidelines, transparentize } from 'polished';
|
|
4
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';
|
|
@@ -18,7 +18,6 @@ import { StepMarker, StyledStepText } from '@pega/cosmos-react-core/lib/componen
|
|
|
18
18
|
import { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';
|
|
19
19
|
import { StyledStages } from '../Stages/Stages.styles';
|
|
20
20
|
import { isInUtilities } from './GenAICoach.utils';
|
|
21
|
-
const maxWidthMessage = '62.5rem';
|
|
22
21
|
export const StyledComposerSection = styled.div ``;
|
|
23
22
|
export const StyledGenAIFormControl = styled(FormControl)(({ theme, focused }) => {
|
|
24
23
|
return css `
|
|
@@ -84,7 +83,14 @@ StyledMessagesContainer.defaultProps = defaultThemeProp;
|
|
|
84
83
|
export const StyledFullscreenWrapper = styled(Fullscreen) `
|
|
85
84
|
height: 100%;
|
|
86
85
|
`;
|
|
87
|
-
export const
|
|
86
|
+
export const StyledHeaderContainer = styled(Flex)(({ theme }) => {
|
|
87
|
+
return css `
|
|
88
|
+
border-block-end: 0.0625rem solid
|
|
89
|
+
${transparentize(0.88, theme.components.agent['foreground-color'])};
|
|
90
|
+
`;
|
|
91
|
+
});
|
|
92
|
+
StyledHeaderContainer.defaultProps = defaultThemeProp;
|
|
93
|
+
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, simplifiedAgent }) => {
|
|
88
94
|
const { previewActive } = useContext(AppShellContext);
|
|
89
95
|
const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
90
96
|
return css `
|
|
@@ -93,6 +99,14 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
93
99
|
min-width: var(--utilities-drawer-min-width);
|
|
94
100
|
border-radius: ${cardBorderRadius};
|
|
95
101
|
transition: height ${animation.speed} ${animation.timing.ease};
|
|
102
|
+
${simplifiedAgent
|
|
103
|
+
? css `
|
|
104
|
+
--message-container-width: 40rem;
|
|
105
|
+
--messages-list-margin-start: 0;
|
|
106
|
+
`
|
|
107
|
+
: css `
|
|
108
|
+
--message-container-width: 62.5rem;
|
|
109
|
+
`}
|
|
96
110
|
|
|
97
111
|
${variant.placement === 'dialog' &&
|
|
98
112
|
css `
|
|
@@ -140,13 +154,22 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
140
154
|
|
|
141
155
|
${variant.placement === 'fullpage' &&
|
|
142
156
|
css `
|
|
143
|
-
|
|
157
|
+
${simplifiedAgent
|
|
158
|
+
? css `
|
|
159
|
+
transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);
|
|
160
|
+
height: var(--content-height-in-agent, var(--content-height-in-view, 100vh));
|
|
161
|
+
`
|
|
162
|
+
: css `
|
|
163
|
+
height: var(--content-height-in-view, 100vh);
|
|
164
|
+
`}
|
|
144
165
|
`}
|
|
145
166
|
|
|
146
167
|
${isCompact &&
|
|
147
168
|
css `
|
|
148
|
-
height: 100
|
|
149
|
-
max-height:
|
|
169
|
+
height: ${simplifiedAgent ? 'var(--compact-height, auto)' : '100%'};
|
|
170
|
+
max-height: ${simplifiedAgent
|
|
171
|
+
? 'var(--content-height-in-agent, var(--content-height-in-view, 100vh))'
|
|
172
|
+
: 'var(--content-height-in-view, 100vh)'};
|
|
150
173
|
|
|
151
174
|
${StyledMessagesContainer} {
|
|
152
175
|
margin-block-end: 0;
|
|
@@ -167,7 +190,7 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
167
190
|
`;
|
|
168
191
|
});
|
|
169
192
|
StyledGenAICoachContainer.defaultProps = defaultThemeProp;
|
|
170
|
-
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
193
|
+
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { ai } } } }) => {
|
|
171
194
|
const { l } = calculateFontSize(fontSize, fontScale);
|
|
172
195
|
return css `
|
|
173
196
|
color: inherit;
|
|
@@ -201,11 +224,17 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
201
224
|
`;
|
|
202
225
|
});
|
|
203
226
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
204
|
-
export const StyledFlexWrapper = styled.div `
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
227
|
+
export const StyledFlexWrapper = styled.div(({ isExpanded }) => css `
|
|
228
|
+
height: ${isExpanded ? 'auto' : '100%'};
|
|
229
|
+
overflow-y: auto;
|
|
230
|
+
position: relative;
|
|
231
|
+
|
|
232
|
+
${isExpanded &&
|
|
233
|
+
css `
|
|
234
|
+
flex: 1 1 0;
|
|
235
|
+
min-height: 0;
|
|
236
|
+
`}
|
|
237
|
+
`);
|
|
209
238
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
210
239
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
211
240
|
return css `
|
|
@@ -223,11 +252,23 @@ export const StyledInitialMessageContainer = styled.div(() => {
|
|
|
223
252
|
return css `
|
|
224
253
|
${StyledFormField} {
|
|
225
254
|
width: 100%;
|
|
226
|
-
max-width:
|
|
255
|
+
max-width: var(--message-container-width);
|
|
227
256
|
}
|
|
228
257
|
`;
|
|
229
258
|
});
|
|
230
259
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
260
|
+
export const StyledBannerSalutationBlock = styled.div(({ isExpanded }) => css `
|
|
261
|
+
transition:
|
|
262
|
+
opacity 0.45s ease,
|
|
263
|
+
transform 0.45s ease;
|
|
264
|
+
${isExpanded &&
|
|
265
|
+
css `
|
|
266
|
+
opacity: 0;
|
|
267
|
+
transform: translateY(-1.5rem);
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
`}
|
|
270
|
+
`);
|
|
271
|
+
StyledBannerSalutationBlock.defaultProps = defaultThemeProp;
|
|
231
272
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
232
273
|
return css `
|
|
233
274
|
margin-block-end: ${spacing};
|
|
@@ -236,7 +277,7 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
236
277
|
|
|
237
278
|
${StyledFormField}, ${StyledComposerSection} {
|
|
238
279
|
width: 100%;
|
|
239
|
-
max-width:
|
|
280
|
+
max-width: var(--message-container-width);
|
|
240
281
|
}
|
|
241
282
|
`;
|
|
242
283
|
});
|
|
@@ -281,13 +322,18 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
281
322
|
`;
|
|
282
323
|
});
|
|
283
324
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
284
|
-
export const StyledMessage = styled.p(({ theme }) => {
|
|
325
|
+
export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
285
326
|
return css `
|
|
286
327
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
287
328
|
width: 100%;
|
|
288
329
|
min-width: 0;
|
|
289
330
|
overflow-wrap: break-word;
|
|
290
331
|
|
|
332
|
+
${simplified &&
|
|
333
|
+
css `
|
|
334
|
+
padding-inline-start: calc(2.5rem + ${theme.base.spacing});
|
|
335
|
+
`}
|
|
336
|
+
|
|
291
337
|
${StyledEditorContainer} {
|
|
292
338
|
padding: 0;
|
|
293
339
|
|
|
@@ -298,6 +344,14 @@ export const StyledMessage = styled.p(({ theme }) => {
|
|
|
298
344
|
`;
|
|
299
345
|
});
|
|
300
346
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
347
|
+
export const StyledMessageSender = styled(Text)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight } } }) => {
|
|
348
|
+
return css `
|
|
349
|
+
font-size: ${calculateFontSize(fontSize, fontScale).xl};
|
|
350
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
351
|
+
opacity: 0.7;
|
|
352
|
+
`;
|
|
353
|
+
});
|
|
354
|
+
StyledMessageSender.defaultProps = defaultThemeProp;
|
|
301
355
|
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } }) => {
|
|
302
356
|
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
303
357
|
return css `
|
|
@@ -314,7 +368,7 @@ export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius':
|
|
|
314
368
|
`;
|
|
315
369
|
});
|
|
316
370
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
317
|
-
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
371
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { 'foreground-color': agentForegroundColor } } } }) => {
|
|
318
372
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
319
373
|
return css `
|
|
320
374
|
display: flex;
|
|
@@ -322,7 +376,7 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
322
376
|
gap: ${spacing};
|
|
323
377
|
overflow-wrap: break-word;
|
|
324
378
|
font-size: ${systemFontSize};
|
|
325
|
-
color: ${
|
|
379
|
+
color: ${agentForegroundColor};
|
|
326
380
|
opacity: 0.7;
|
|
327
381
|
margin-block: calc(2 * ${spacing});
|
|
328
382
|
${stopped &&
|
|
@@ -334,20 +388,20 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
334
388
|
&::after {
|
|
335
389
|
content: '';
|
|
336
390
|
flex: 1;
|
|
337
|
-
border-block-start: 0.0625rem solid ${
|
|
391
|
+
border-block-start: 0.0625rem solid ${agentForegroundColor};
|
|
338
392
|
opacity: 0.7;
|
|
339
393
|
}
|
|
340
394
|
`;
|
|
341
395
|
});
|
|
342
396
|
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
343
|
-
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
397
|
+
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } }, simplified }) => {
|
|
344
398
|
return css `
|
|
345
|
-
padding-block-start: ${spacing};
|
|
399
|
+
padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};
|
|
346
400
|
list-style-type: none;
|
|
347
401
|
align-self: center;
|
|
348
|
-
max-width:
|
|
402
|
+
max-width: var(--message-container-width);
|
|
349
403
|
width: 100%;
|
|
350
|
-
margin-block-start: auto;
|
|
404
|
+
margin-block-start: var(--messages-list-margin-start, auto);
|
|
351
405
|
min-height: var(--stream-buffer, auto);
|
|
352
406
|
|
|
353
407
|
& > li {
|
|
@@ -415,7 +469,7 @@ export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
|
415
469
|
`);
|
|
416
470
|
StyledInnerList.defaultProps = defaultThemeProp;
|
|
417
471
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
418
|
-
const hoverColor = tryCatch(() => mix(0.95, theme.
|
|
472
|
+
const hoverColor = tryCatch(() => mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive));
|
|
419
473
|
return css `
|
|
420
474
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
421
475
|
padding-block: ${theme.base.spacing};
|
|
@@ -468,7 +522,7 @@ export const StyledAttachmentsList = styled(FileList)(({ theme }) => {
|
|
|
468
522
|
StyledAttachmentsList.defaultProps = defaultThemeProp;
|
|
469
523
|
export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
470
524
|
width: 100%;
|
|
471
|
-
max-width:
|
|
525
|
+
max-width: var(--message-container-width);
|
|
472
526
|
> span {
|
|
473
527
|
justify-content: center;
|
|
474
528
|
}
|
|
@@ -478,7 +532,7 @@ export const StyledAgentIcon = styled.svg `
|
|
|
478
532
|
height: 3rem;
|
|
479
533
|
`;
|
|
480
534
|
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
481
|
-
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
535
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components, base }, simplified }) => {
|
|
482
536
|
return css `
|
|
483
537
|
border: none;
|
|
484
538
|
box-shadow: none;
|
|
@@ -486,6 +540,10 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
486
540
|
max-height: 6rem;
|
|
487
541
|
overflow-y: auto;
|
|
488
542
|
padding-block-end: 0;
|
|
543
|
+
${simplified &&
|
|
544
|
+
css `
|
|
545
|
+
padding: calc(2 * ${base.spacing});
|
|
546
|
+
`}
|
|
489
547
|
&:focus:not([disabled]) {
|
|
490
548
|
border: none;
|
|
491
549
|
box-shadow: none;
|
|
@@ -494,22 +552,24 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
494
552
|
`;
|
|
495
553
|
});
|
|
496
554
|
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
497
|
-
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
555
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
556
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
498
557
|
return css `
|
|
499
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
558
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
500
559
|
margin-inline-start: auto;
|
|
501
560
|
`;
|
|
502
561
|
});
|
|
503
562
|
StyledSendButton.defaultProps = defaultThemeProp;
|
|
504
|
-
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
563
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
564
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
505
565
|
return css `
|
|
506
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
566
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
507
567
|
margin-inline-start: auto;
|
|
508
568
|
`;
|
|
509
569
|
});
|
|
510
570
|
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
511
571
|
export const StyledInitialMessageGrid = styled.div `
|
|
512
|
-
max-width:
|
|
572
|
+
max-width: var(--message-container-width);
|
|
513
573
|
width: 100%;
|
|
514
574
|
`;
|
|
515
575
|
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
@@ -530,15 +590,16 @@ StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
|
530
590
|
export const StyledInitialMessageText = styled.span `
|
|
531
591
|
${lineClamp(3)};
|
|
532
592
|
`;
|
|
533
|
-
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
593
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor } } } } } }) => {
|
|
534
594
|
return css `
|
|
535
595
|
background: ${avatarBackground};
|
|
596
|
+
color: ${avatarForegroundColor};
|
|
536
597
|
`;
|
|
537
598
|
});
|
|
538
599
|
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
539
600
|
export const StyledGenAIFooter = styled.div `
|
|
540
601
|
width: 100%;
|
|
541
|
-
max-width:
|
|
602
|
+
max-width: var(--message-container-width);
|
|
542
603
|
`;
|
|
543
604
|
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
544
605
|
return css `
|
|
@@ -581,41 +642,52 @@ export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
|
581
642
|
});
|
|
582
643
|
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
583
644
|
export const ProgressAngleStyle = createGlobalStyle `
|
|
584
|
-
@property --angle {
|
|
645
|
+
@property --progress-border-angle {
|
|
585
646
|
syntax: "<angle>";
|
|
586
|
-
inherits:
|
|
647
|
+
inherits: false;
|
|
587
648
|
initial-value: 0deg;
|
|
588
649
|
}
|
|
589
650
|
`;
|
|
651
|
+
const progressBorderSpin = keyframes `
|
|
652
|
+
to { --progress-border-angle: 360deg; }
|
|
653
|
+
`;
|
|
590
654
|
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
591
|
-
const aiColor = isSolidColor(theme.
|
|
592
|
-
? theme.
|
|
655
|
+
const aiColor = isSolidColor(theme.components.agent.ai)
|
|
656
|
+
? theme.components.agent.ai
|
|
593
657
|
: theme.base.colors.purple.dark;
|
|
594
658
|
const aiTransparent = transparentize(0.85, aiColor);
|
|
659
|
+
const borderWidth = '0.0625rem';
|
|
595
660
|
return css `
|
|
596
661
|
position: relative;
|
|
597
|
-
isolation: isolate;
|
|
598
662
|
border-radius: calc(2 * ${theme.base.spacing});
|
|
599
663
|
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
664
|
width: fit-content;
|
|
614
665
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
666
|
+
&::before {
|
|
667
|
+
content: '';
|
|
668
|
+
position: absolute;
|
|
669
|
+
inset: -${borderWidth};
|
|
670
|
+
border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});
|
|
671
|
+
border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});
|
|
672
|
+
padding: ${borderWidth};
|
|
673
|
+
background: conic-gradient(
|
|
674
|
+
from var(--progress-border-angle, 0deg) in oklab,
|
|
675
|
+
${aiTransparent} 0%,
|
|
676
|
+
${aiTransparent} 10%,
|
|
677
|
+
${aiColor} 50%,
|
|
678
|
+
${aiTransparent} 90%,
|
|
679
|
+
${aiTransparent} 100%
|
|
680
|
+
);
|
|
681
|
+
-webkit-mask:
|
|
682
|
+
linear-gradient(#000000 0 0) content-box,
|
|
683
|
+
linear-gradient(#000000 0 0);
|
|
684
|
+
-webkit-mask-composite: xor;
|
|
685
|
+
mask:
|
|
686
|
+
linear-gradient(#000000 0 0) content-box,
|
|
687
|
+
linear-gradient(#000000 0 0);
|
|
688
|
+
mask-composite: exclude;
|
|
689
|
+
pointer-events: none;
|
|
690
|
+
animation: ${progressBorderSpin} 1.25s linear infinite;
|
|
619
691
|
}
|
|
620
692
|
`;
|
|
621
693
|
});
|
|
@@ -635,7 +707,7 @@ export const StyledProgressContent = styled.div(({ theme }) => {
|
|
|
635
707
|
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
636
708
|
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
637
709
|
return css `
|
|
638
|
-
color: ${theme.
|
|
710
|
+
color: ${theme.components.agent.ai};
|
|
639
711
|
`;
|
|
640
712
|
});
|
|
641
713
|
StyledProgressText.defaultProps = defaultThemeProp;
|
|
@@ -1047,16 +1119,28 @@ export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
|
1047
1119
|
`;
|
|
1048
1120
|
});
|
|
1049
1121
|
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1050
|
-
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1122
|
+
export const StyledSalutation = styled(Text)(({ theme, simplified }) => {
|
|
1051
1123
|
return css `
|
|
1052
1124
|
text-align: center;
|
|
1053
1125
|
overflow-wrap: break-word;
|
|
1054
1126
|
word-break: break-word;
|
|
1055
|
-
font-size:
|
|
1127
|
+
font-size: ${simplified
|
|
1128
|
+
? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'
|
|
1129
|
+
: 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};
|
|
1056
1130
|
font-weight: ${theme.base['font-weight'].bold};
|
|
1057
1131
|
`;
|
|
1058
1132
|
});
|
|
1059
1133
|
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1134
|
+
export const StyledSubHeading = styled(Text)(({ theme }) => {
|
|
1135
|
+
const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1136
|
+
return css `
|
|
1137
|
+
text-align: center;
|
|
1138
|
+
overflow-wrap: break-word;
|
|
1139
|
+
word-break: break-word;
|
|
1140
|
+
font-size: ${xxl};
|
|
1141
|
+
`;
|
|
1142
|
+
});
|
|
1143
|
+
StyledSubHeading.defaultProps = defaultThemeProp;
|
|
1060
1144
|
export const StyledQuestionnaireCard = styled.article(({ theme: { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } }) => {
|
|
1061
1145
|
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
1062
1146
|
return css `
|