@pega/cosmos-react-work 10.0.0-build.2.5 → 10.0.0-build.2.6
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 +145 -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;
|
|
@@ -164,10 +187,14 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
164
187
|
height: calc(100vh - var(--appshell-top-offset, 0vh));
|
|
165
188
|
border-radius: 0;
|
|
166
189
|
`}
|
|
190
|
+
|
|
191
|
+
${StyledText} {
|
|
192
|
+
color: ${foregroundColorForAgent};
|
|
193
|
+
}
|
|
167
194
|
`;
|
|
168
195
|
});
|
|
169
196
|
StyledGenAICoachContainer.defaultProps = defaultThemeProp;
|
|
170
|
-
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
197
|
+
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { ai } } } }) => {
|
|
171
198
|
const { l } = calculateFontSize(fontSize, fontScale);
|
|
172
199
|
return css `
|
|
173
200
|
color: inherit;
|
|
@@ -201,11 +228,17 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
201
228
|
`;
|
|
202
229
|
});
|
|
203
230
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
204
|
-
export const StyledFlexWrapper = styled.div `
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
231
|
+
export const StyledFlexWrapper = styled.div(({ isExpanded }) => css `
|
|
232
|
+
height: ${isExpanded ? 'auto' : '100%'};
|
|
233
|
+
overflow-y: auto;
|
|
234
|
+
position: relative;
|
|
235
|
+
|
|
236
|
+
${isExpanded &&
|
|
237
|
+
css `
|
|
238
|
+
flex: 1 1 0;
|
|
239
|
+
min-height: 0;
|
|
240
|
+
`}
|
|
241
|
+
`);
|
|
209
242
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
210
243
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
211
244
|
return css `
|
|
@@ -223,11 +256,23 @@ export const StyledInitialMessageContainer = styled.div(() => {
|
|
|
223
256
|
return css `
|
|
224
257
|
${StyledFormField} {
|
|
225
258
|
width: 100%;
|
|
226
|
-
max-width:
|
|
259
|
+
max-width: var(--message-container-width);
|
|
227
260
|
}
|
|
228
261
|
`;
|
|
229
262
|
});
|
|
230
263
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
264
|
+
export const StyledBannerSalutationBlock = styled.div(({ isExpanded }) => css `
|
|
265
|
+
transition:
|
|
266
|
+
opacity 0.45s ease,
|
|
267
|
+
transform 0.45s ease;
|
|
268
|
+
${isExpanded &&
|
|
269
|
+
css `
|
|
270
|
+
opacity: 0;
|
|
271
|
+
transform: translateY(-1.5rem);
|
|
272
|
+
pointer-events: none;
|
|
273
|
+
`}
|
|
274
|
+
`);
|
|
275
|
+
StyledBannerSalutationBlock.defaultProps = defaultThemeProp;
|
|
231
276
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
232
277
|
return css `
|
|
233
278
|
margin-block-end: ${spacing};
|
|
@@ -236,7 +281,7 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
236
281
|
|
|
237
282
|
${StyledFormField}, ${StyledComposerSection} {
|
|
238
283
|
width: 100%;
|
|
239
|
-
max-width:
|
|
284
|
+
max-width: var(--message-container-width);
|
|
240
285
|
}
|
|
241
286
|
`;
|
|
242
287
|
});
|
|
@@ -281,13 +326,18 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
281
326
|
`;
|
|
282
327
|
});
|
|
283
328
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
284
|
-
export const StyledMessage = styled.p(({ theme }) => {
|
|
329
|
+
export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
285
330
|
return css `
|
|
286
331
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
287
332
|
width: 100%;
|
|
288
333
|
min-width: 0;
|
|
289
334
|
overflow-wrap: break-word;
|
|
290
335
|
|
|
336
|
+
${simplified &&
|
|
337
|
+
css `
|
|
338
|
+
padding-inline-start: calc(2.5rem + ${theme.base.spacing});
|
|
339
|
+
`}
|
|
340
|
+
|
|
291
341
|
${StyledEditorContainer} {
|
|
292
342
|
padding: 0;
|
|
293
343
|
|
|
@@ -298,6 +348,14 @@ export const StyledMessage = styled.p(({ theme }) => {
|
|
|
298
348
|
`;
|
|
299
349
|
});
|
|
300
350
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
351
|
+
export const StyledMessageSender = styled(Text)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight } } }) => {
|
|
352
|
+
return css `
|
|
353
|
+
font-size: ${calculateFontSize(fontSize, fontScale).xl};
|
|
354
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
355
|
+
opacity: 0.7;
|
|
356
|
+
`;
|
|
357
|
+
});
|
|
358
|
+
StyledMessageSender.defaultProps = defaultThemeProp;
|
|
301
359
|
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } }) => {
|
|
302
360
|
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
303
361
|
return css `
|
|
@@ -314,7 +372,7 @@ export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius':
|
|
|
314
372
|
`;
|
|
315
373
|
});
|
|
316
374
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
317
|
-
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
375
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { 'foreground-color': agentForegroundColor } } } }) => {
|
|
318
376
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
319
377
|
return css `
|
|
320
378
|
display: flex;
|
|
@@ -322,7 +380,7 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
322
380
|
gap: ${spacing};
|
|
323
381
|
overflow-wrap: break-word;
|
|
324
382
|
font-size: ${systemFontSize};
|
|
325
|
-
color: ${
|
|
383
|
+
color: ${agentForegroundColor};
|
|
326
384
|
opacity: 0.7;
|
|
327
385
|
margin-block: calc(2 * ${spacing});
|
|
328
386
|
${stopped &&
|
|
@@ -334,20 +392,20 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
334
392
|
&::after {
|
|
335
393
|
content: '';
|
|
336
394
|
flex: 1;
|
|
337
|
-
border-block-start: 0.0625rem solid ${
|
|
395
|
+
border-block-start: 0.0625rem solid ${agentForegroundColor};
|
|
338
396
|
opacity: 0.7;
|
|
339
397
|
}
|
|
340
398
|
`;
|
|
341
399
|
});
|
|
342
400
|
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
343
|
-
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
401
|
+
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } }, simplified }) => {
|
|
344
402
|
return css `
|
|
345
|
-
padding-block-start: ${spacing};
|
|
403
|
+
padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};
|
|
346
404
|
list-style-type: none;
|
|
347
405
|
align-self: center;
|
|
348
|
-
max-width:
|
|
406
|
+
max-width: var(--message-container-width);
|
|
349
407
|
width: 100%;
|
|
350
|
-
margin-block-start: auto;
|
|
408
|
+
margin-block-start: var(--messages-list-margin-start, auto);
|
|
351
409
|
min-height: var(--stream-buffer, auto);
|
|
352
410
|
|
|
353
411
|
& > li {
|
|
@@ -415,7 +473,7 @@ export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
|
415
473
|
`);
|
|
416
474
|
StyledInnerList.defaultProps = defaultThemeProp;
|
|
417
475
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
418
|
-
const hoverColor = tryCatch(() => mix(0.95, theme.
|
|
476
|
+
const hoverColor = tryCatch(() => mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive));
|
|
419
477
|
return css `
|
|
420
478
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
421
479
|
padding-block: ${theme.base.spacing};
|
|
@@ -468,7 +526,7 @@ export const StyledAttachmentsList = styled(FileList)(({ theme }) => {
|
|
|
468
526
|
StyledAttachmentsList.defaultProps = defaultThemeProp;
|
|
469
527
|
export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
470
528
|
width: 100%;
|
|
471
|
-
max-width:
|
|
529
|
+
max-width: var(--message-container-width);
|
|
472
530
|
> span {
|
|
473
531
|
justify-content: center;
|
|
474
532
|
}
|
|
@@ -478,7 +536,7 @@ export const StyledAgentIcon = styled.svg `
|
|
|
478
536
|
height: 3rem;
|
|
479
537
|
`;
|
|
480
538
|
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
481
|
-
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
539
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components, base }, simplified }) => {
|
|
482
540
|
return css `
|
|
483
541
|
border: none;
|
|
484
542
|
box-shadow: none;
|
|
@@ -486,6 +544,10 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
486
544
|
max-height: 6rem;
|
|
487
545
|
overflow-y: auto;
|
|
488
546
|
padding-block-end: 0;
|
|
547
|
+
${simplified &&
|
|
548
|
+
css `
|
|
549
|
+
padding: calc(2 * ${base.spacing});
|
|
550
|
+
`}
|
|
489
551
|
&:focus:not([disabled]) {
|
|
490
552
|
border: none;
|
|
491
553
|
box-shadow: none;
|
|
@@ -494,22 +556,24 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
494
556
|
`;
|
|
495
557
|
});
|
|
496
558
|
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
497
|
-
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
559
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
560
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
498
561
|
return css `
|
|
499
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
562
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
500
563
|
margin-inline-start: auto;
|
|
501
564
|
`;
|
|
502
565
|
});
|
|
503
566
|
StyledSendButton.defaultProps = defaultThemeProp;
|
|
504
|
-
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
567
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
568
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
505
569
|
return css `
|
|
506
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
570
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
507
571
|
margin-inline-start: auto;
|
|
508
572
|
`;
|
|
509
573
|
});
|
|
510
574
|
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
511
575
|
export const StyledInitialMessageGrid = styled.div `
|
|
512
|
-
max-width:
|
|
576
|
+
max-width: var(--message-container-width);
|
|
513
577
|
width: 100%;
|
|
514
578
|
`;
|
|
515
579
|
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
@@ -530,15 +594,16 @@ StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
|
530
594
|
export const StyledInitialMessageText = styled.span `
|
|
531
595
|
${lineClamp(3)};
|
|
532
596
|
`;
|
|
533
|
-
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
597
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor } } } } } }) => {
|
|
534
598
|
return css `
|
|
535
599
|
background: ${avatarBackground};
|
|
600
|
+
color: ${avatarForegroundColor};
|
|
536
601
|
`;
|
|
537
602
|
});
|
|
538
603
|
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
539
604
|
export const StyledGenAIFooter = styled.div `
|
|
540
605
|
width: 100%;
|
|
541
|
-
max-width:
|
|
606
|
+
max-width: var(--message-container-width);
|
|
542
607
|
`;
|
|
543
608
|
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
544
609
|
return css `
|
|
@@ -581,41 +646,52 @@ export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
|
581
646
|
});
|
|
582
647
|
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
583
648
|
export const ProgressAngleStyle = createGlobalStyle `
|
|
584
|
-
@property --angle {
|
|
649
|
+
@property --progress-border-angle {
|
|
585
650
|
syntax: "<angle>";
|
|
586
|
-
inherits:
|
|
651
|
+
inherits: false;
|
|
587
652
|
initial-value: 0deg;
|
|
588
653
|
}
|
|
589
654
|
`;
|
|
655
|
+
const progressBorderSpin = keyframes `
|
|
656
|
+
to { --progress-border-angle: 360deg; }
|
|
657
|
+
`;
|
|
590
658
|
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
591
|
-
const aiColor = isSolidColor(theme.
|
|
592
|
-
? theme.
|
|
659
|
+
const aiColor = isSolidColor(theme.components.agent.ai)
|
|
660
|
+
? theme.components.agent.ai
|
|
593
661
|
: theme.base.colors.purple.dark;
|
|
594
662
|
const aiTransparent = transparentize(0.85, aiColor);
|
|
663
|
+
const borderWidth = '0.0625rem';
|
|
595
664
|
return css `
|
|
596
665
|
position: relative;
|
|
597
|
-
isolation: isolate;
|
|
598
666
|
border-radius: calc(2 * ${theme.base.spacing});
|
|
599
667
|
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
668
|
width: fit-content;
|
|
614
669
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
670
|
+
&::before {
|
|
671
|
+
content: '';
|
|
672
|
+
position: absolute;
|
|
673
|
+
inset: -${borderWidth};
|
|
674
|
+
border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});
|
|
675
|
+
border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});
|
|
676
|
+
padding: ${borderWidth};
|
|
677
|
+
background: conic-gradient(
|
|
678
|
+
from var(--progress-border-angle, 0deg) in oklab,
|
|
679
|
+
${aiTransparent} 0%,
|
|
680
|
+
${aiTransparent} 10%,
|
|
681
|
+
${aiColor} 50%,
|
|
682
|
+
${aiTransparent} 90%,
|
|
683
|
+
${aiTransparent} 100%
|
|
684
|
+
);
|
|
685
|
+
-webkit-mask:
|
|
686
|
+
linear-gradient(#000000 0 0) content-box,
|
|
687
|
+
linear-gradient(#000000 0 0);
|
|
688
|
+
-webkit-mask-composite: xor;
|
|
689
|
+
mask:
|
|
690
|
+
linear-gradient(#000000 0 0) content-box,
|
|
691
|
+
linear-gradient(#000000 0 0);
|
|
692
|
+
mask-composite: exclude;
|
|
693
|
+
pointer-events: none;
|
|
694
|
+
animation: ${progressBorderSpin} 1.25s linear infinite;
|
|
619
695
|
}
|
|
620
696
|
`;
|
|
621
697
|
});
|
|
@@ -635,7 +711,7 @@ export const StyledProgressContent = styled.div(({ theme }) => {
|
|
|
635
711
|
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
636
712
|
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
637
713
|
return css `
|
|
638
|
-
color: ${theme.
|
|
714
|
+
color: ${theme.components.agent.ai};
|
|
639
715
|
`;
|
|
640
716
|
});
|
|
641
717
|
StyledProgressText.defaultProps = defaultThemeProp;
|
|
@@ -1047,16 +1123,28 @@ export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
|
1047
1123
|
`;
|
|
1048
1124
|
});
|
|
1049
1125
|
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1050
|
-
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1126
|
+
export const StyledSalutation = styled(Text)(({ theme, simplified }) => {
|
|
1051
1127
|
return css `
|
|
1052
1128
|
text-align: center;
|
|
1053
1129
|
overflow-wrap: break-word;
|
|
1054
1130
|
word-break: break-word;
|
|
1055
|
-
font-size:
|
|
1131
|
+
font-size: ${simplified
|
|
1132
|
+
? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'
|
|
1133
|
+
: 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};
|
|
1056
1134
|
font-weight: ${theme.base['font-weight'].bold};
|
|
1057
1135
|
`;
|
|
1058
1136
|
});
|
|
1059
1137
|
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1138
|
+
export const StyledSubHeading = styled(Text)(({ theme }) => {
|
|
1139
|
+
const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1140
|
+
return css `
|
|
1141
|
+
text-align: center;
|
|
1142
|
+
overflow-wrap: break-word;
|
|
1143
|
+
word-break: break-word;
|
|
1144
|
+
font-size: ${xxl};
|
|
1145
|
+
`;
|
|
1146
|
+
});
|
|
1147
|
+
StyledSubHeading.defaultProps = defaultThemeProp;
|
|
1060
1148
|
export const StyledQuestionnaireCard = styled.article(({ theme: { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } }) => {
|
|
1061
1149
|
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
1062
1150
|
return css `
|