@pega/cosmos-react-work 9.9.0 → 9.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/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +169 -27
- 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 +142 -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;
|
|
@@ -213,11 +236,17 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
213
236
|
`;
|
|
214
237
|
});
|
|
215
238
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
216
|
-
export const StyledFlexWrapper = styled.div `
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
239
|
+
export const StyledFlexWrapper = styled.div(({ isExpanded }) => css `
|
|
240
|
+
height: ${isExpanded ? 'auto' : '100%'};
|
|
241
|
+
overflow-y: auto;
|
|
242
|
+
position: relative;
|
|
243
|
+
|
|
244
|
+
${isExpanded &&
|
|
245
|
+
css `
|
|
246
|
+
flex: 1 1 0;
|
|
247
|
+
min-height: 0;
|
|
248
|
+
`}
|
|
249
|
+
`);
|
|
221
250
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
222
251
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
223
252
|
return css `
|
|
@@ -235,11 +264,23 @@ export const StyledInitialMessageContainer = styled.div(() => {
|
|
|
235
264
|
return css `
|
|
236
265
|
${StyledFormField} {
|
|
237
266
|
width: 100%;
|
|
238
|
-
max-width:
|
|
267
|
+
max-width: var(--message-container-width);
|
|
239
268
|
}
|
|
240
269
|
`;
|
|
241
270
|
});
|
|
242
271
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
272
|
+
export const StyledBannerSalutationBlock = styled.div(({ isExpanded }) => css `
|
|
273
|
+
transition:
|
|
274
|
+
opacity 0.45s ease,
|
|
275
|
+
transform 0.45s ease;
|
|
276
|
+
${isExpanded &&
|
|
277
|
+
css `
|
|
278
|
+
opacity: 0;
|
|
279
|
+
transform: translateY(-1.5rem);
|
|
280
|
+
pointer-events: none;
|
|
281
|
+
`}
|
|
282
|
+
`);
|
|
283
|
+
StyledBannerSalutationBlock.defaultProps = defaultThemeProp;
|
|
243
284
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
244
285
|
return css `
|
|
245
286
|
margin-block-end: ${spacing};
|
|
@@ -248,7 +289,7 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
248
289
|
|
|
249
290
|
${StyledFormField}, ${StyledComposerSection} {
|
|
250
291
|
width: 100%;
|
|
251
|
-
max-width:
|
|
292
|
+
max-width: var(--message-container-width);
|
|
252
293
|
}
|
|
253
294
|
`;
|
|
254
295
|
});
|
|
@@ -293,13 +334,18 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
293
334
|
`;
|
|
294
335
|
});
|
|
295
336
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
296
|
-
export const StyledMessage = styled.p(({ theme }) => {
|
|
337
|
+
export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
297
338
|
return css `
|
|
298
339
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
299
340
|
width: 100%;
|
|
300
341
|
min-width: 0;
|
|
301
342
|
overflow-wrap: break-word;
|
|
302
343
|
|
|
344
|
+
${simplified &&
|
|
345
|
+
css `
|
|
346
|
+
padding-inline-start: calc(2.5rem + ${theme.base.spacing});
|
|
347
|
+
`}
|
|
348
|
+
|
|
303
349
|
${StyledEditorContainer} {
|
|
304
350
|
padding: 0;
|
|
305
351
|
|
|
@@ -310,6 +356,14 @@ export const StyledMessage = styled.p(({ theme }) => {
|
|
|
310
356
|
`;
|
|
311
357
|
});
|
|
312
358
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
359
|
+
export const StyledMessageSender = styled(Text)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight } } }) => {
|
|
360
|
+
return css `
|
|
361
|
+
font-size: ${calculateFontSize(fontSize, fontScale).xl};
|
|
362
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
363
|
+
opacity: 0.7;
|
|
364
|
+
`;
|
|
365
|
+
});
|
|
366
|
+
StyledMessageSender.defaultProps = defaultThemeProp;
|
|
313
367
|
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } }) => {
|
|
314
368
|
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
315
369
|
return css `
|
|
@@ -326,15 +380,16 @@ export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius':
|
|
|
326
380
|
`;
|
|
327
381
|
});
|
|
328
382
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
329
|
-
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
383
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { 'foreground-color': agentForegroundColor, background: agentBackground } } } }) => {
|
|
330
384
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
385
|
+
const foregroundColorForSystemMessage = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
331
386
|
return css `
|
|
332
387
|
display: flex;
|
|
333
388
|
align-items: center;
|
|
334
389
|
gap: ${spacing};
|
|
335
390
|
overflow-wrap: break-word;
|
|
336
391
|
font-size: ${systemFontSize};
|
|
337
|
-
color: ${
|
|
392
|
+
color: ${foregroundColorForSystemMessage};
|
|
338
393
|
opacity: 0.7;
|
|
339
394
|
margin-block: calc(2 * ${spacing});
|
|
340
395
|
${stopped &&
|
|
@@ -346,20 +401,20 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
346
401
|
&::after {
|
|
347
402
|
content: '';
|
|
348
403
|
flex: 1;
|
|
349
|
-
border-block-start: 0.0625rem solid ${
|
|
404
|
+
border-block-start: 0.0625rem solid ${foregroundColorForSystemMessage};
|
|
350
405
|
opacity: 0.7;
|
|
351
406
|
}
|
|
352
407
|
`;
|
|
353
408
|
});
|
|
354
409
|
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
355
|
-
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
410
|
+
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } }, simplified }) => {
|
|
356
411
|
return css `
|
|
357
|
-
padding-block-start: ${spacing};
|
|
412
|
+
padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};
|
|
358
413
|
list-style-type: none;
|
|
359
414
|
align-self: center;
|
|
360
|
-
max-width:
|
|
415
|
+
max-width: var(--message-container-width);
|
|
361
416
|
width: 100%;
|
|
362
|
-
margin-block-start: auto;
|
|
417
|
+
margin-block-start: var(--messages-list-margin-start, auto);
|
|
363
418
|
min-height: var(--stream-buffer, auto);
|
|
364
419
|
|
|
365
420
|
& > li {
|
|
@@ -427,7 +482,7 @@ export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
|
427
482
|
`);
|
|
428
483
|
StyledInnerList.defaultProps = defaultThemeProp;
|
|
429
484
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
430
|
-
const hoverColor = tryCatch(() => mix(0.95, theme.
|
|
485
|
+
const hoverColor = tryCatch(() => mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive));
|
|
431
486
|
return css `
|
|
432
487
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
433
488
|
padding-block: ${theme.base.spacing};
|
|
@@ -480,7 +535,7 @@ export const StyledAttachmentsList = styled(FileList)(({ theme }) => {
|
|
|
480
535
|
StyledAttachmentsList.defaultProps = defaultThemeProp;
|
|
481
536
|
export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
482
537
|
width: 100%;
|
|
483
|
-
max-width:
|
|
538
|
+
max-width: var(--message-container-width);
|
|
484
539
|
> span {
|
|
485
540
|
justify-content: center;
|
|
486
541
|
}
|
|
@@ -490,7 +545,7 @@ export const StyledAgentIcon = styled.svg `
|
|
|
490
545
|
height: 3rem;
|
|
491
546
|
`;
|
|
492
547
|
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
493
|
-
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
548
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components, base }, simplified }) => {
|
|
494
549
|
return css `
|
|
495
550
|
border: none;
|
|
496
551
|
box-shadow: none;
|
|
@@ -498,6 +553,10 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
498
553
|
max-height: 6rem;
|
|
499
554
|
overflow-y: auto;
|
|
500
555
|
padding-block-end: 0;
|
|
556
|
+
${simplified &&
|
|
557
|
+
css `
|
|
558
|
+
padding: calc(2 * ${base.spacing});
|
|
559
|
+
`}
|
|
501
560
|
&:focus:not([disabled]) {
|
|
502
561
|
border: none;
|
|
503
562
|
box-shadow: none;
|
|
@@ -506,22 +565,24 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
506
565
|
`;
|
|
507
566
|
});
|
|
508
567
|
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
509
|
-
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
568
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
569
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
510
570
|
return css `
|
|
511
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
571
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
512
572
|
margin-inline-start: auto;
|
|
513
573
|
`;
|
|
514
574
|
});
|
|
515
575
|
StyledSendButton.defaultProps = defaultThemeProp;
|
|
516
|
-
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
576
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
577
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
517
578
|
return css `
|
|
518
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
579
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
519
580
|
margin-inline-start: auto;
|
|
520
581
|
`;
|
|
521
582
|
});
|
|
522
583
|
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
523
584
|
export const StyledInitialMessageGrid = styled.div `
|
|
524
|
-
max-width:
|
|
585
|
+
max-width: var(--message-container-width);
|
|
525
586
|
width: 100%;
|
|
526
587
|
`;
|
|
527
588
|
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
@@ -542,15 +603,16 @@ StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
|
542
603
|
export const StyledInitialMessageText = styled.span `
|
|
543
604
|
${lineClamp(3)};
|
|
544
605
|
`;
|
|
545
|
-
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
606
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor } } } } } }) => {
|
|
546
607
|
return css `
|
|
547
608
|
background: ${avatarBackground};
|
|
609
|
+
color: ${avatarForegroundColor};
|
|
548
610
|
`;
|
|
549
611
|
});
|
|
550
612
|
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
551
613
|
export const StyledGenAIFooter = styled.div `
|
|
552
614
|
width: 100%;
|
|
553
|
-
max-width:
|
|
615
|
+
max-width: var(--message-container-width);
|
|
554
616
|
`;
|
|
555
617
|
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
556
618
|
return css `
|
|
@@ -593,41 +655,52 @@ export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
|
593
655
|
});
|
|
594
656
|
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
595
657
|
export const ProgressAngleStyle = createGlobalStyle `
|
|
596
|
-
@property --angle {
|
|
658
|
+
@property --progress-border-angle {
|
|
597
659
|
syntax: "<angle>";
|
|
598
|
-
inherits:
|
|
660
|
+
inherits: false;
|
|
599
661
|
initial-value: 0deg;
|
|
600
662
|
}
|
|
601
663
|
`;
|
|
664
|
+
const progressBorderSpin = keyframes `
|
|
665
|
+
to { --progress-border-angle: 360deg; }
|
|
666
|
+
`;
|
|
602
667
|
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
603
|
-
const aiColor = isSolidColor(theme.
|
|
604
|
-
? theme.
|
|
668
|
+
const aiColor = isSolidColor(theme.components.agent.ai)
|
|
669
|
+
? theme.components.agent.ai
|
|
605
670
|
: theme.base.colors.purple.dark;
|
|
606
671
|
const aiTransparent = transparentize(0.85, aiColor);
|
|
672
|
+
const borderWidth = '0.0625rem';
|
|
607
673
|
return css `
|
|
608
674
|
position: relative;
|
|
609
|
-
isolation: isolate;
|
|
610
675
|
border-radius: calc(2 * ${theme.base.spacing});
|
|
611
676
|
border-start-start-radius: calc(0.5 * ${theme.base.spacing});
|
|
612
|
-
border: calc(0.125 * ${theme.base.spacing}) solid transparent;
|
|
613
|
-
background:
|
|
614
|
-
linear-gradient(${aiTransparent} 0 0) padding-box,
|
|
615
|
-
conic-gradient(
|
|
616
|
-
from var(--angle) in oklab,
|
|
617
|
-
${aiTransparent} 0%,
|
|
618
|
-
${aiTransparent} 10%,
|
|
619
|
-
${aiColor} 50%,
|
|
620
|
-
${aiTransparent} 90%,
|
|
621
|
-
${aiTransparent} 100%
|
|
622
|
-
)
|
|
623
|
-
border-box;
|
|
624
|
-
animation: spin 1s ease-in-out infinite;
|
|
625
677
|
width: fit-content;
|
|
626
678
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
679
|
+
&::before {
|
|
680
|
+
content: '';
|
|
681
|
+
position: absolute;
|
|
682
|
+
inset: -${borderWidth};
|
|
683
|
+
border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});
|
|
684
|
+
border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});
|
|
685
|
+
padding: ${borderWidth};
|
|
686
|
+
background: conic-gradient(
|
|
687
|
+
from var(--progress-border-angle, 0deg) in oklab,
|
|
688
|
+
${aiTransparent} 0%,
|
|
689
|
+
${aiTransparent} 10%,
|
|
690
|
+
${aiColor} 50%,
|
|
691
|
+
${aiTransparent} 90%,
|
|
692
|
+
${aiTransparent} 100%
|
|
693
|
+
);
|
|
694
|
+
-webkit-mask:
|
|
695
|
+
linear-gradient(#000000 0 0) content-box,
|
|
696
|
+
linear-gradient(#000000 0 0);
|
|
697
|
+
-webkit-mask-composite: xor;
|
|
698
|
+
mask:
|
|
699
|
+
linear-gradient(#000000 0 0) content-box,
|
|
700
|
+
linear-gradient(#000000 0 0);
|
|
701
|
+
mask-composite: exclude;
|
|
702
|
+
pointer-events: none;
|
|
703
|
+
animation: ${progressBorderSpin} 1.25s linear infinite;
|
|
631
704
|
}
|
|
632
705
|
`;
|
|
633
706
|
});
|
|
@@ -647,7 +720,7 @@ export const StyledProgressContent = styled.div(({ theme }) => {
|
|
|
647
720
|
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
648
721
|
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
649
722
|
return css `
|
|
650
|
-
color: ${theme.
|
|
723
|
+
color: ${theme.components.agent.ai};
|
|
651
724
|
`;
|
|
652
725
|
});
|
|
653
726
|
StyledProgressText.defaultProps = defaultThemeProp;
|
|
@@ -1060,16 +1133,28 @@ export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
|
1060
1133
|
`;
|
|
1061
1134
|
});
|
|
1062
1135
|
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1063
|
-
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1136
|
+
export const StyledSalutation = styled(Text)(({ theme, simplified }) => {
|
|
1064
1137
|
return css `
|
|
1065
1138
|
text-align: center;
|
|
1066
1139
|
overflow-wrap: break-word;
|
|
1067
1140
|
word-break: break-word;
|
|
1068
|
-
font-size:
|
|
1141
|
+
font-size: ${simplified
|
|
1142
|
+
? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'
|
|
1143
|
+
: 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};
|
|
1069
1144
|
font-weight: ${theme.base['font-weight'].bold};
|
|
1070
1145
|
`;
|
|
1071
1146
|
});
|
|
1072
1147
|
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1148
|
+
export const StyledSubHeading = styled(Text)(({ theme }) => {
|
|
1149
|
+
const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1150
|
+
return css `
|
|
1151
|
+
text-align: center;
|
|
1152
|
+
overflow-wrap: break-word;
|
|
1153
|
+
word-break: break-word;
|
|
1154
|
+
font-size: ${xxl};
|
|
1155
|
+
`;
|
|
1156
|
+
});
|
|
1157
|
+
StyledSubHeading.defaultProps = defaultThemeProp;
|
|
1073
1158
|
export const StyledQuestionnaireCard = styled.article(({ theme: { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } }) => {
|
|
1074
1159
|
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
1075
1160
|
return css `
|